Skip to content

Commit

Permalink
📚 Update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylark0924 committed Aug 20, 2023
1 parent f1a9734 commit 4eed409
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion doc/source/tutorial/config_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ More examples can be found in [example-RofuncRL](https://rofunc.readthedocs.io/e

## Customize configurations

You can customize the configurations for your own task and agent by directly pass the absolute path of the configuration file to `get_config` function. For example, if you want to customize the configurations for `DoughRolling` task, you can create a `DoughRolling.yaml` file in `[path]/task` and pass the absolute path of the file to `get_config` function. Then, you can customize the configurations for `PPO` algorithm by creating a `DoughRollingPPO.yaml` file in `[path]/train` and pass the absolute path of the file to `get_config` function. Remember to copy the `config` file to your own `[path]`.
You can customize the configurations for your own task and agent by directly pass the absolute path of the configuration file to [`get_config`](https://rofunc.readthedocs.io/en/latest/apidocs/rofunc/rofunc.config.utils.html) function. For example, if you want to customize the configurations for `DoughRolling` task, you need to

1. create a `DoughRolling.yaml` file in `[path]/task`
2. customize the configurations for `PPO` algorithm by creating a `DoughRollingPPO.yaml` file in `[path]/train`
3. remember to copy the `config` file to your own `[path]`

```python
import argparse
Expand Down
3 changes: 2 additions & 1 deletion doc/source/tutorial/customizeRL.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,6 @@ if __name__ == '__main__':
```

:::{tip}
More examples can be found in [example-RofuncRL](https://rofunc.readthedocs.io/en/latest/auto_examples/learning_rl/index.html)
1. For more details about the configuration system, please refer to [Configuration System](https://rofunc.readthedocs.io/en/latest/tutorial/config_system.html).
2. More examples can be found in [example-RofuncRL](https://rofunc.readthedocs.io/en/latest/auto_examples/learning_rl/index.html)
:::
1 change: 1 addition & 0 deletions rofunc/config/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
def get_config(config_path=None, config_name=None, args=None, debug=False, absl_config_path=None) -> DictConfig:
"""
Load config file and rewrite some params by args.
:param config_path: relative path to the config file (only for rofunc package)
:param config_name: name of the config file (without .yaml)
:param args: custom args to rewrite some params in the config file
Expand Down

0 comments on commit 4eed409

Please sign in to comment.