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

Could you provide detail code example to customize the env and algo that can run successfully in a entire file? #236

Closed
yuuma002 opened this issue Jun 20, 2024 · 7 comments
Labels
discussion Discussion of a typical issue or concept good first issue Good for newcomers

Comments

@yuuma002
Copy link

We have read the docs carefully. However, we cannot find such example. All we can find is:

https://github.com/opendilab/LightZero/blob/main/docs/source/tutorials/envs/customize_envs_zh.md

What we want is the code example that can run successfully in a entire files with customized envs, which is not by the config files (e.g. zoo/classic_control/cartpole/config/cartpole_muzero_config.py)

Could you provide detail code example to customize the env and algo that can run successfully in a entire file?

Thank a lot.

@PaParaZz1
Copy link
Member

You can refer to our previous pull request about adding a new environment. Such as:

If you have any other questions, please feel free to ask in this issue.

@PaParaZz1 PaParaZz1 added good first issue Good for newcomers discussion Discussion of a typical issue or concept labels Jun 20, 2024
@yuuma002
Copy link
Author

Should we refer to the source code of ding package when we write code with customized the env or algo?

@PaParaZz1
Copy link
Member

Typically, you do not need to refer to the source code of DI-engine (ding); simply following the examples we provide should suffice. However, if you encounter issues that you are unable to resolve, you may consult the policy/model/env sections of DI-engine or seek assistance by posting issues in LightZero.

@yuuma002
Copy link
Author

Could you provide detail docs of the classes we should used in building RL algorithms?

We find some classes lacks docs in https://di-engine-docs.readthedocs.io/en/latest/01_quickstart/first_rl_program.html:

  • StepCollector
  • eps_greedy_handler
  • interaction_evaluator
  • ...

This makes it diffucult to understand the quickstart tutorial.

Hope you can fix the issue.

Thanks.

@PaParaZz1
Copy link
Member

LightZero uses our old pipeline of DI-engine while the quickstart doc of DI-engine has already presented our new pipeline.

  • Here is the doc (in Chinese, if necessary, we will add the English version next week) about their difference.
  • Here is the doc about the concrete API definition of middlewares (e.g. eps_greedy_handler) in new pipeline.
  • Here is the doc about the concrete API definition of modules in old pipeline.

@yuuma002
Copy link
Author

@PaParaZz1
Copy link
Member

When will the docs be completed (e.g. https://di-engine-docs.readthedocs.io/en/latest/05_api_doc/framework/middleware/functional/explorer.html#eps-greedy-handler)?

image

We have fixed this problem in the latest commit of DI-engine. It is a import bug resulting in the wrong doc format. Now you can visit the corresponding API doc with this doc link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Discussion of a typical issue or concept good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants