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

Cleaning start #6

Merged
merged 14 commits into from
Dec 5, 2022
Merged

Cleaning start #6

merged 14 commits into from
Dec 5, 2022

Conversation

hunoutl
Copy link
Contributor

@hunoutl hunoutl commented Oct 14, 2022

Refactoring the repo.
AVEC & STLIB lib are gone. They don't have there place here.
to do -> add requirements
sofagym folder contains the sofagym lib.
We can find examples scene in env (was envs before but rename to env to imitate the gym lib).
to do -> i think it's strange how it is done right now. To me it's should be a repo root.
to do -> make corrections everywhere to be sync with sofa 22.06. Some calls are deprecated...

From now on, we stop using STLIB & AVEC from here.
sofagym (lib) & examples (env) are separated.
env is envs now to match with gym lib
we could have error o that since some paths are hard
@@ -525,7 +525,7 @@ def start_scene(config, nb_actions):
# Run the first client
def deferredStart():
sdict = str(config)
subprocess.run([config['python_version'], path+"common/rpc_client.py", sdict, str(nb_actions), str(port_rpc)],
subprocess.run([config['python_version'], path+"sofagym/rpc_client.py", sdict, str(nb_actions), str(port_rpc)],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion for another PR: modifier config["python_version"] par sys.executable pour sortir la version de python utilisé de la config.

Copy link
Member

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are AVEC & STLIB used anywhere in the project? In an example?
If yes, documentation should be updated to explain how to use AVEC and STLIB as an external dependency. Is it your plan when you say "to do -> add requirements"?

@hunoutl
Copy link
Contributor Author

hunoutl commented Oct 18, 2022

Are AVEC & STLIB used anywhere in the project? In an example? If yes, documentation should be updated to explain how to use AVEC and STLIB as an external dependency. Is it your plan when you say "to do -> add requirements"?

exactly

@p-shg
Copy link
Contributor

p-shg commented Oct 25, 2022

Are AVEC & STLIB used anywhere in the project? In an example? If yes, documentation should be updated to explain how to use AVEC and STLIB as an external dependency. Is it your plan when you say "to do -> add requirements"?

exactly

STLIB was added to the project a long time ago when the master STLIB was not up to date with SofaPython3, it is probably not needed anymore.
AVEC was used by @EtienneMenager for an experiment in the paper but I don't think we need to carry it here. Etienne what do you think?

@EtienneMenager
Copy link
Collaborator

Are AVEC & STLIB used anywhere in the project? In an example? If yes, documentation should be updated to explain how to use AVEC and STLIB as an external dependency. Is it your plan when you say "to do -> add requirements"?

exactly

STLIB was added to the project a long time ago when the master STLIB was not up to date with SofaPython3, it is probably not needed anymore. AVEC was used by @EtienneMenager for an experiment in the paper but I don't think we need to carry it here. Etienne what do you think?

Yes, AVEC was just to show that we could use any kind of RL algorithms, even the ones that are coming from the actual research. For the library it is not very important I think...

@hunoutl
Copy link
Contributor Author

hunoutl commented Oct 27, 2022

I started the readme update.
For the examples folder, after reading gym's documentation and its way of register envs, I think it's better to keep the structure that I had already started to put in place. Namely sofagym.envs which contains the basic Sofa/Gym environments.
to do -> a documentation or a template to add easily a new env for sofagym.

This was referenced Oct 27, 2022
Closed
Copy link
Member

@alxbilger alxbilger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in requierements.txt -> requirements.txt (to update in readme too)

Comment on lines +15 to +18
* [BeamAdapter](https://github.com/sofa-framework/BeamAdapter) (fetchable within sofa)
* [SPLIB](https://github.com/SofaDefrost/SPLIB)
* [STLIB](https://github.com/SofaDefrost/STLIB)
* [SoftRobots](https://github.com/SofaDefrost/SoftRobots)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why BeamAdapter and SoftRobots are not optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are used in almost all of the envs examples. However, actually, they are not really mandatory. I will check that and correct accordingly.

README.md Outdated Show resolved Hide resolved
test_env.py Outdated Show resolved Hide resolved
@alxbilger alxbilger merged commit e81486c into SofaDefrost:main Dec 5, 2022
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

Successfully merging this pull request may close these issues.

4 participants