WassimTenachi / PhySO

Physical Symbolic Optimization
https://physo.readthedocs.io/
MIT License
1.81k stars 249 forks source link

pytorch 1.11.0 needed - not on anaconda #4

Closed cosimadp closed 1 year ago

cosimadp commented 1 year ago

Tried installing the file requirements.txt after having installed pytorch, but it needs an older version (1.11.0) that is no longer on anaconda - any tips on how to solve this? Thanks!

WassimTenachi commented 1 year ago

Hey cosimadp,

Any recent version of pytroch should work ! I just tested pytorch 12.1.0 which works fine. I just updated the requirements.txt file to reflect that !

Please let me know if your issue is fixed so I can close this thread.

Wassim

PS: out of curiosity are you on linux or macOS (intel or ARM) ?

cosimadp commented 1 year ago

Hey Wassim,

Thanks, that worked!

Tried running your unit test to check the installation and there still are some errors: FAIL: test_tree_rpr (physo.physym.tests.program_display_UnitTest.DisplayTest)

Traceback (most recent call last): File "/Users/cosima/Documents/GitHub/PhySO/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: '/var/folders/sf/p4_8lxts6r33flfn1fj9zg0w0000gn/T/dot2tex4ix3jpou/dot2tex.log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/cosima/Documents/GitHub/PhySO/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

Any idea what those might be related to? The program ran for a bit before exiting with this error log. I’m using macOS.

Thanks so much for your help!

On Mar 15, 2023, at 5:22 PM, Wassim Tenachi @.***> wrote:

Hey cosimadp,

Any recent version of pytroch should work ! I just tested pytorch 12.1.0 which works fine. I just updated the requirements.txt file to reflect that !

Please let me know if your issue is fixed so I can close this thread.

Wassim

PS: out of curiosity are you on linux or macOS (intel or ARM) ?

— Reply to this email directly, view it on GitHub https://github.com/WassimTenachi/PhySO/issues/4#issuecomment-1471020785, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJDM7WE2MWZTQ5OOPLW4ZLW4JMNHANCNFSM6AAAAAAV4QFH6M. You are receiving this because you authored the thread.

WassimTenachi commented 1 year ago

So it sounds like you are not able to pass the tests for the function generating the tree representation of a symbolic function. This is not a problem as this is a debug feature only intended for advanced users who plan on contributing code.

You wont need that if you are just planning on using this code for SR ! :) You can even delete the program_display_UnitTest.py or comment its content.

Are you able to pass all other tests except for the ones in program_display_UnitTest.py ? Do you have a mac M1 ?

Wassim

WassimTenachi commented 1 year ago

If you still want to install these optional packages, you can try pulling the latest version from git and run:

conda install --file requirements_display1.txt pip install -r requirements_display2.txt

Which should install those packages smoothly. Wassim

cosimadp commented 1 year ago

Hey Wassim!

Installed your new packages, thanks! What other tests can I try? Like the demos?

Yeah Mac M1 - is that an issue?

Thanks a lot! Cosima

On Mar 15, 2023, at 6:44 PM, Wassim Tenachi @.***> wrote:

So it sounds like you are not able to pass the tests for the function generating the tree representation of a symbolic function. This is not a problem as this is a debug feature only intended for advanced users who plan on contributing code.

You wont need that if you are just planning on using this code for SR ! :) You can even delete the program_display_UnitTest.py or comment its content.

Are you able to pass all other tests except for the ones in program_display_UnitTest.py ? Do you have a mac M1 ?

Wassim

— Reply to this email directly, view it on GitHub https://github.com/WassimTenachi/PhySO/issues/4#issuecomment-1471151861, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJDM7R4S2WBFOA7T5D2FFDW4JWBHANCNFSM6AAAAAAV4QFH6M. You are receiving this because you authored the thread.

WassimTenachi commented 1 year ago

No, no worries this is not a problem, physo has been tested extensively on Mac M1.

If you were able to pass the unit tests it means that everything was installed correctly.

Yes, you can try out the mechanical energy demo notebook for example.

Please tell me if everything works on your end so I can close this issue! :)

Wassim

cosimadp commented 1 year ago

Hey Wassim,

I tried to run the demos through terminal and through Spyder, but they don’t recognize physo as a module. Is there a particular configuration / order that the files need to be run in to make sure they work?

Thanks, Cosima

On Mar 16, 2023, at 4:55 PM, Wassim Tenachi @.***> wrote:

No, no worries this is not a problem, physo has been tested extensively on Mac M1.

If you were able to pass the unit tests it means that everything was installed correctly.

Yes, you can try out the mechanical energy demo notebook for example.

Please tell me if everything works on your end so I can close this issue! :)

Wassim

— Reply to this email directly, view it on GitHub https://github.com/WassimTenachi/PhySO/issues/4#issuecomment-1472910779, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJDM7RBU2XOAB7BOTFBTY3W4OR73ANCNFSM6AAAAAAV4QFH6M. You are receiving this because you authored the thread.

WassimTenachi commented 1 year ago

Hi @cosimadp,

It sounds like physo was not installed as a package.

Can you (re)run installation by executing this at the root of the repo ? pip install -e .

Then can you run: conda list And check that physo is listed in the list of installed packages as: physo 1.0.dev0 dev_0 <develop>

Demos should be ran in the same conda environment as the one where physo and its dependencies were installed. So can you make sure that the environment in which you are running them is the right one ?

WassimTenachi commented 1 year ago

@cosimadp can you confirm that you were able to resolve the problem so I can close this thread ?