Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test failure #51

Open
3rw4n0 opened this issue Mar 6, 2024 · 1 comment
Open

Unit test failure #51

3rw4n0 opened this issue Mar 6, 2024 · 1 comment

Comments

@3rw4n0
Copy link

3rw4n0 commented Mar 6, 2024

Hello,

Sorry to bother you with my issue, but I don't think I've seen anyone else report the same problem as mine.
I'm still very much a neophyte when it comes to python and, by extension, anaconda.
So, I hope that perhaps my problem is actually trivial.

I seem to have succeeded in installing PhySO because when I list the modules installed for python in the Anaconda prompt, physo appears in the list.
I was also able to install all the requirements.

However, when I run the unit test, I get a failure.

Also, despite installing MiKTeX and the necessary packages, I get question marks instead of mathematical symbols in the Anaconda Prompt.

My results are below.
I'd be very grateful if you could help me understand what's wrong.

Kind regards.

.....Dummy epoch time = 262.106800 ms
.Dummy epoch time (w duplicate elimination) = 207.696900 ms (found 17/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
.Dummy epoch time (w free const) = 15307.137200 ms (found 30/1000 candidates with R = 1 +/- 0.000010)
.Dummy epoch time (w free const and duplicate elimination) = 11886.376700 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) = 11928.847900 ms (found 16/1000 candidates with R > 0 and 1/1000 with R = 1 +/- 0.000010)
....
Required units time (in ideal non-mixed cases) : 0.013004 ms / step / (prog in batch)
.
ComputeInfixNotation time = 0.024 ms
.
ExecuteProgram time = 10.363 ms

ExecuteProgram time (wo tokens) = 10.127 ms
.
ExecuteProgram time = 10.524 ms

ExecuteProgram time (wo tokens) = 10.074 ms
.LBFGS const opti: 5.459267 ms / step
.................D:\User\Program\PhySO\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), "
D:\User\Program\PhySO\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), "
D:\User\Program\PhySO\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 = 2.035 ms
get_infix_str time = 0.052 ms

get_infix_image time = 2.796 s
.Not testing tree representation features on Windows as this generally causes problems and is only useful for physo developers.
.
Reward_SquashedNRMSE time = 2.927 ms
................SR task started...
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 1184.97it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00000 ===========
-> Time 3.20 s

Overall best  at R=0.549237
-> Raw expression :
      ⎛                ⎛⎛       1.0⎞    ⎞⎞
m⋅v⋅v⋅⎝-1.0 + 1.0 + log⎝⎝1.0 + ℯ   ⎠⋅1.0⎠⎠

Best of epoch at R=0.549237
-> Raw expression :
      ⎛                ⎛⎛       1.0⎞    ⎞⎞
m⋅v⋅v⋅⎝-1.0 + 1.0 + log⎝⎝1.0 + ℯ   ⎠⋅1.0⎠⎠


100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:01<00:00, 790.09it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00001 ===========
-> Time 5.33 s

Overall best  at R=0.549237
-> Raw expression :
      ⎛                ⎛⎛       1.0⎞    ⎞⎞
m⋅v⋅v⋅⎝-1.0 + 1.0 + log⎝⎝1.0 + ℯ   ⎠⋅1.0⎠⎠

Best of epoch at R=0.549237
-> Raw expression :
  1.0
───────
⎛ -1  ⎞
⎜─────⎟
⎜⎛  2⎞⎟
⎜⎜ v ⎟⎟
⎜⎜───⎟⎟
⎜⎜⎛1⎞⎟⎟
⎜⎜⎜─⎟⎟⎟
⎝⎝⎝m⎠⎠⎠


100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 9144.91it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00002 ===========
-> Time 4.37 s

Overall best  at R=0.579454
-> Raw expression :
                2
  ⎛       ⎛ 1 ⎞⎞
  ⎜1.0⋅cos⎜───⎟⎟
  ⎜       ⎝1.0⎠⎟
z⋅⎜────────────⎟
  ⎜ ⎛  -1    ⎞ ⎟
  ⎜ ⎜────────⎟ ⎟
  ⎜ ⎜     0.5⎟ ⎟
  ⎝ ⎝(g⋅m)   ⎠ ⎠

Best of epoch at R=0.579454
-> Raw expression :
                2
  ⎛       ⎛ 1 ⎞⎞
  ⎜1.0⋅cos⎜───⎟⎟
  ⎜       ⎝1.0⎠⎟
z⋅⎜────────────⎟
  ⎜ ⎛  -1    ⎞ ⎟
  ⎜ ⎜────────⎟ ⎟
  ⎜ ⎜     0.5⎟ ⎟
  ⎝ ⎝(g⋅m)   ⎠ ⎠


100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 4924.20it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00003 ===========
-> Time 4.41 s

Overall best  at R=1.000000
-> Raw expression :
  ⎛        2                    ⎞
m⋅⎝-g⋅z + v  - v⋅v⋅log(sin(1.0))⎠

Best of epoch at R=1.000000
-> Raw expression :
  ⎛        2                    ⎞
m⋅⎝-g⋅z + v  - v⋅v⋅log(sin(1.0))⎠


100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 1560.50it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00004 ===========
-> Time 4.91 s

Overall best  at R=1.000000
-> Raw expression :
  ⎛        2                    ⎞
m⋅⎝-g⋅z + v  - v⋅v⋅log(sin(1.0))⎠

Best of epoch at R=0.579454
-> Raw expression :
          z
─────────────────────
                    2
⎛          0.5     ⎞
⎜     ⎛ 1 ⎞        ⎟
⎜     ⎜───⎟        ⎟
⎜     ⎝g⋅m⎠        ⎟
⎜──────────────────⎟
⎜⎛      1.0       ⎞⎟
⎜⎜────────────────⎟⎟
⎜⎜   ⎛         1 ⎞⎟⎟
⎜⎜   ⎜        ───⎟⎟⎟
⎜⎜   ⎜   2    1.0⎟⎟⎟
⎝⎝cos⎝1.0  + ℯ   ⎠⎠⎠


.D:\User\Program\PhySO\physo\task\sr.py:182: UserWarning: No information about fixed constants, not using any.
  warnings.warn("No information about fixed constants, not using any.")
D:\User\Program\PhySO\physo\task\sr.py:190: UserWarning: No units given for fixed constants, assuming dimensionless units.
  warnings.warn("No units given for fixed constants, assuming dimensionless units.")
SR task started...
D:\User\Program\PhySO\physo\physym\prior.py:808: UserWarning: And error while making prior NestedFunctions, this prior will be ignored. Error message:
Some tokens given in argument functions: ['exp'] are not in the library of tokens: ['mul' 'add' 'sub' 'div' 'g' 'm' 'z' 'v' 'E' 'dummy' '-']
  warnings.warn("And error while making prior %s, this prior will be ignored. Error message:\n%s"%(name,e))
D:\User\Program\PhySO\physo\physym\prior.py:808: UserWarning: And error while making prior NestedFunctions, this prior will be ignored. Error message:
Some tokens given in argument functions: ['log'] are not in the library of tokens: ['mul' 'add' 'sub' 'div' 'g' 'm' 'z' 'v' 'E' 'dummy' '-']
  warnings.warn("And error while making prior %s, this prior will be ignored. Error message:\n%s"%(name,e))
D:\User\Program\PhySO\physo\physym\prior.py:557: UserWarning: No trigonometric functions detected, no prior from NestedTrigonometryPrior (tokens = [], nesting forbidden)
  warnings.warn("No trigonometric functions detected, no prior from %s" % (self))
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 2132.22it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00000 ===========
-> Time 2.66 s

Overall best  at R=0.579454
-> Raw expression :
m⋅(-g + g + g)⋅(-z + z + z)

Best of epoch at R=0.579454
-> Raw expression :
m⋅(-g + g + g)⋅(-z + z + z)


D:\User\Program\PhySO\physo\physym\prior.py:808: UserWarning: And error while making prior NestedFunctions, this prior will be ignored. Error message:
Some tokens given in argument functions: ['exp'] are not in the library of tokens: ['mul' 'add' 'sub' 'div' 'g' 'm' 'z' 'v' 'E' 'dummy' '-']
  warnings.warn("And error while making prior %s, this prior will be ignored. Error message:\n%s"%(name,e))
D:\User\Program\PhySO\physo\physym\prior.py:808: UserWarning: And error while making prior NestedFunctions, this prior will be ignored. Error message:
Some tokens given in argument functions: ['log'] are not in the library of tokens: ['mul' 'add' 'sub' 'div' 'g' 'm' 'z' 'v' 'E' 'dummy' '-']
  warnings.warn("And error while making prior %s, this prior will be ignored. Error message:\n%s"%(name,e))
D:\User\Program\PhySO\physo\physym\prior.py:557: UserWarning: No trigonometric functions detected, no prior from NestedTrigonometryPrior (tokens = [], nesting forbidden)
  warnings.warn("No trigonometric functions detected, no prior from %s" % (self))
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1000/1000 [00:00<00:00, 2205.75it/s]
Unable to make visualisation plots.
Unable to save train curves data.
Unable to save pareto data.
Unable to save pareto figure.
=========== Epoch 00001 ===========
-> Time 4.05 s

Overall best  at R=0.579454
-> Raw expression :
m⋅(-g + g + g)⋅(-z + z + z)

Best of epoch at R=0.579454
-> Raw expression :
     g⋅m⋅z
───────────────
  z   z   g + g
- ─ + ─ + ─────
  z   z     g


F
======================================================================
FAIL: test_prior_not_in_op_names (physo.task.tests.sr_UnitTest.Test_SR)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\User\Program\PhySO\physo\task\tests\sr_UnitTest.py", line 112, in test_prior_not_in_op_names
    assert pareto_front_r.max() > 0.9999, "Solution expression was not found."
AssertionError: Solution expression was not found.

----------------------------------------------------------------------
Ran 77 tests in 108.571s

FAILED (failures=1)
@jpavol
Copy link

jpavol commented Mar 25, 2024

Exactly the same problem here... :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants