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

how to run the code? #1

Closed
SHITIANYU-hue opened this issue Sep 12, 2023 · 4 comments
Closed

how to run the code? #1

SHITIANYU-hue opened this issue Sep 12, 2023 · 4 comments

Comments

@SHITIANYU-hue
Copy link

i run python main.py (in before_finetuned/magnetization1_4mT) , but i got this error:

Total steps 200000
Total learning steps per simulation 2000
Traceback (most recent call last):
File "/home/tianyu/code/msr/RL-for-MSRs/Code and Models/before_finetuned/magnetization1_4mT/main.py", line 47, in
observation = env.reset()
File "/home/tianyu/code/msr/RL-for-MSRs/Code and Models/before_finetuned/magnetization1_4mT/set_environment.py", line 132, in reset
self.shearable_rod = CosseratRod.straight_rod(
File "/home/tianyu/anaconda3/envs/msr/lib/python3.9/site-packages/elastica/rod/cosserat_rod.py", line 297, in straight_rod
raise ValueError(
ValueError: The option to set damping coefficient (nu) for the rod during rod
initialisation is now deprecated. Instead, for adding damping to rods,
please derive your simulation class from the add-on Damping mixin class.
For reference see the class elastica.dissipation.AnalyticalLinearDamper(),
and for usage check examples/axial_stretching.py

@SHITIANYU-hue
Copy link
Author

But i can run axial_strectching.py successfully:

image

@alantes
Copy link
Owner

alantes commented Sep 13, 2023

Hi SHITIANYU-hue, thank you for your question. It seems that you have installed a newer version of PyElastica, which may not be compatible with the initialization of straight_rod in my code. Sorry for the trouble but maybe you should try older version of PyElastica. If I remember it correctly, you may need to install v0.1.0.post2 release.

@SHITIANYU-hue
Copy link
Author

Hello, Thanks for your help, yes, it works now, by the way, it has another issue with the device, it should have a device here:

image

@alantes
Copy link
Owner

alantes commented Sep 14, 2023

Hello, Thanks for your help, yes, it works now, by the way, it has another issue with the device, it should have a device here:

image

Thanks. I will get it fixed soon.

@alantes alantes closed this as completed Sep 14, 2023
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