探索【PhySO】

0、 初步报错情况

根据原链接,已确定安装成功,运行demo时出现报错,不能正常运行

报错:

.Dummy epoch time = 238.366736 ms
.Dummy epoch time (w duplicate elimination) = 180.852427 ms (found 15/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
.Dummy epoch time (w free const) = 6321.609278 ms (found 42/1000 candidates with R = 1 +/- 0.000010)
.Dummy epoch time (w free const and duplicate elimination) = 358.070956 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
.Dummy epoch time (w free const and duplicate elimination, keeping lowest complexity) = 355.305707 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
....
Required units time (in ideal non-mixed cases) : 0.013504 ms / step / (prog in batch) 
.
ComputeInfixNotation time = 0.016 ms
.
ExecuteProgram time = 17.883 ms
.
ExecuteProgram time = 18.085 ms
.LBFGS const opti: 2.380366 ms / step
................/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token y were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token x1 were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token pi were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
.......................get_infix_sympy time = 1.655 ms
get_infix_str time = 0.040 ms
FF
Reward_SquashedNRMSE time = 3.606 ms
................
======================================================================
FAIL: test_infix_repr (physo.physym.tests.program_display_UnitTest.DisplayTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fyo/anaconda3/envs/PhySO/lib/python3.8/site-packages/matplotlib/texmanager.py", line 233, in _run_checked_subprocess
    report = subprocess.check_output(
FileNotFoundError: [Errno 2] No such file or directory: 'latex'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/fyo/PhySO-main/physo/physym/tests/program_display_UnitTest.py", line 104, in test_infix_repr
    img = my_programs.get_infix_image(prog_idx=0,)
RuntimeError: Failed to process string with tex because latex could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fyo/PhySO-main/physo/physym/tests/program_display_UnitTest.py", line 108, in test_infix_repr
    self.fail("Infix generation failed : get_infix_image")
AssertionError: Infix generation failed : get_infix_image

======================================================================
FAIL: test_tree_rpr (physo.physym.tests.program_display_UnitTest.DisplayTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/fyo/PhySO-main/physo/physym/tests/program_display_UnitTest.py", line 153, in test_tree_rpr
    tree_latex = my_programs.get_tree_latex(prog_idx=0,)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/dot2texku9v5lk9/dot2tex.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/fyo/PhySO-main/physo/physym/tests/program_display_UnitTest.py", line 157, in test_tree_rpr
    self.fail("Tree generation failed : get_tree_latex")
AssertionError: Tree generation failed : get_tree_latex

----------------------------------------------------------------------
Ran 70 tests in 33.486s

FAILED (failures=2)

1、

参照-PhySO- 物理符号回归建模方法 —— 中文注释项目找寻一点线索,文中提及#库的调用: monitoring;benchmark;physo,尝试进行相应安装。
通过pip install monitoringconda install benchmark顺利安装了两个库,再次运行后仍然同样报错

注意到报错中的No such file or directory: 'latex',接下来尝试安装latex,根据Ubuntu安装LaTeX

仅仅执行sudo apt-get install texlive-full后,报错部分就少了两个FAIL报错:

.Dummy epoch time = 192.601971 ms
.Dummy epoch time (w duplicate elimination) = 146.413313 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
.Dummy epoch time (w free const) = 7491.963136 ms (found 40/1000 candidates with R = 1 +/- 0.000010)
.Dummy epoch time (w free const and duplicate elimination) = 484.551667 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
.Dummy epoch time (w free const and duplicate elimination, keeping lowest complexity) = 488.265802 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
....
Required units time (in ideal non-mixed cases) : 0.015821 ms / step / (prog in batch) 
.
ComputeInfixNotation time = 0.017 ms
.
ExecuteProgram time = 19.228 ms
.
ExecuteProgram time = 19.315 ms
.LBFGS const opti: 2.427994 ms / step
................/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token y were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token x1 were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
/home/fyo/PhySO-main/physo/physym/library.py:245: UserWarning: The units of token pi were not provided (is_constraining_phy_units=False ; phy_units=[nan nan nan nan nan nan nan]), unable to compute units constraints.
  warnings.warn("The units of token %s were not provided (is_constraining_phy_units=%s ; phy_units=%s), "
.......................get_infix_sympy time = 1.682 ms
get_infix_str time = 0.043 ms

get_infix_image time = 1.410 s
.
get_tree_latex time = 2.380 s

get_tree_image time = 0.202 s

get_tree_image_via_tex time = 2.468 s

get_tree_latex time = 1.624 s

get_tree_image time = 0.185 s

get_tree_image_via_tex time = 2.387 s
.
Reward_SquashedNRMSE time = 3.690 ms
................
----------------------------------------------------------------------
Ran 70 tests in 45.838s

OK

接下来继续完成latex 的安装步骤,报错同上。

2

相关issues*3

PhySO/demo/
在这里插入图片描述上方链接和图片中一共包含3个例子,每个例子分别包含一个.ipynb文件和一个.py文件

  1. demo_damped_harmonic_oscillator
  2. demo_mechanical_energy
  3. demo_quick_sr

3

遇到一个新的问题,cuda不能使用?
metahouses /-PhySO-/demo_damped_harmonic_oscillator.ipynb
后续还需要探索

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值