-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from JdeRobot/rlstudioV12
first refactor v1.2
- Loading branch information
Showing
156 changed files
with
17,540 additions
and
6,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Change Log | ||
|
||
Here you can find all important changes in this project. RL-Studio adheres to [Semantic Versioning](http://semver.org/). | ||
## [Unreleased] | ||
|
||
## [1.2.0] - 2022-01-11 | ||
### Added: | ||
|
||
- Add new files in envs/gazebo/f1/models/: original files are split into different modular files such as images.py, reset.py, step.py, settings.py, simplified_perception.py ([PR #122](https://github.com/JdeRobot/RL-Studio/pull/122)) | ||
|
||
### Changed: | ||
- entry file name: `rl-studio.py ` | ||
- config file names: now they follow naming `config_mode_task_algorithm_agent_simulator` | ||
- files structure in envs/gazebo/f1/models/: files are named `task_algorithm.py` | ||
|
||
|
||
|
||
[1.2.0]: https://github.com/JdeRobot/RL-Studio/pull/122 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# CODING STYLE | ||
|
||
If you are contributing to RL-Studio tool development, please follow the below coding style and structure of directories, files recommendations: | ||
|
||
## SOME RULES | ||
|
||
- [PEP 8](https://peps.python.org/pep-0008/) style guide for Python Code | ||
- [Black](https://github.com/psf/black) format | ||
- [Pylint](https://pypi.org/project/pylint/) as static code analyser | ||
- Constants variable must be upper-case (e.g `TIME_THRESHOLD`, `NUMBER_OF_RUNS`) | ||
- Comment all non trivial functions to ease readability | ||
- All the internal imported packages must be imported from the root of the project (e.g `import rl_studio.agents` instead `import agents`) | ||
- Organize imports before pushing your code to the repo | ||
|
||
- When creating a project, please keep in mind: | ||
|
||
- in **/agents** directory, files names should be `mode_task_algorithm_simulator_framework.py`, i.e. `trainer_followline_ddpg_F1_gazebo_tf.py` or `inferencer_mountaincar_qlearn_openai_pytorch.py`. In case of not using framework leave it blank. | ||
- in **/envs/gazebo/f1/models** directory, files names should be `task_algorithm_framework.py`, i.e. `followline_ddpg_gazebo_tf.py` or `followlane_qlearn_pytorch.py`. In case of not using framework leave it blank. | ||
- As a general rule, **classes names** have to follow convention `ModeTaskAlgorithmAgentSimuladorFramework`, i.e. `TrainerFollowLaneDDPGF1GazeboPytorch` or `InferencerFollowLaneDQNF1GazeboTF` | ||
- in **/envs/gazebo** directory, classes names follow rule `TaskAlgorithmAgentSimulatorFramework`, i.e. `FollowlineDDPGF1GazeboTF`. | ||
|
||
# Directory architecture | ||
|
||
## Config files | ||
|
||
- in **/config** directory add a configuration file with the following format `config_mode_task_algorithm_agent_simulator.yaml`, i.e. `config_training_followlane_qlearn_F1_carla.yaml` | ||
|
||
## Models | ||
|
||
- Add a trained brain in **/checkpoints** folder. You can configure it in the config.yaml file. Automatically the app will add a directory with the format `task_algorithm_agent_simulator_framework` where to save models. | ||
- The file model should have the format `timestamp_maxreward_epoch_ADITIONALTEXT.h5` in format h5 i.e. `09122002_max45678_epoch435_actor_conv2d32x64_critic_conv2d32x64_actionsCont_stateImg_rewardDiscrete.h5` to indicate the main features of the model saved in order to easily find the exact model. | ||
|
||
## Metrics | ||
|
||
- In **/metrics** folder should be saved statistics and metrics of models. You can configure it in the config.yaml file. Automatically the app will add a directory with the format `mode/task_algorithm_agent_simulator_framework/data` where to save data. | ||
|
||
## Graphics | ||
|
||
- In **/metrics** folder should be saved graphics of models. You can configure it in the config.yaml file. Automatically the app will add a directory with the format `mode/task_algorithm_agent_simulator_framework/graphics` where to save graphics. | ||
|
||
## Logs and TensorBoard files | ||
|
||
- In **/logs** folder should be saved TensorBoard and logs files. You can configure it in the config.yaml file. | ||
For TensorBoard, automatically the app will add a directory with the format `mode/task_algorithm_agent_simulator_framework/TensorBoard`. | ||
|
||
For logs, the app automatically will add a directory with the format `mode/task_algorithm_agent_simulator_framework/logs`. | ||
|
||
# TIPS | ||
|
||
- You can refer to "mountain_car qlearning" project as an example of how to implement a real time monitoring | ||
- You can refer to "cartpole dqn" project as an example of how to implement logging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Contributing to Reinforcement Learning Studio | ||
|
||
Thanks for your interest on contributing! | ||
|
||
This file contains a set of rules to contributing to the project and the | ||
rest of the projects developed by JdeRobot. | ||
If you have any doubt about how to contribute contact one of the maintainers | ||
of the project. They will be pleased to tell you how you can contribute with your | ||
knowledge to the project and organization! | ||
|
||
* [Code of conduct](#code-of-conduct) | ||
* [Prerequisites before contributing](#prerequisites-before-contributing) | ||
* [How can I contribute?](#how-can-i-contribute) | ||
|
||
|
||
<a name="#code-of-conduct"></a> | ||
## Code of conduct | ||
Please report any unacceptable behavior to any of [the maintainers](#i-have-a-question). | ||
|
||
<a name="#prerequisites"></a> | ||
## Prerequisites before contributing | ||
In order to contribute to JdeRobot projects, please read carefully the project README.md/[webpage](https://github.com/JdeRobot/RL-Studio) before | ||
starting contributing to understand the purpose of the project and where you can contribute. | ||
|
||
<a name="#how-to-contribute"></a> | ||
## How can I contribute? | ||
Any JdeRobot project follows the same workflow when contributing. | ||
|
||
* **Find a problem or possible improvement for the project:** First of all, check that the feature/bug is not listed in the current [open issues](https://github.com/JdeRobot/RL-Studio/issues). | ||
|
||
* **Create an issue:** [Create an issue](https://github.com/JdeRobot/RL-Studio/issues/new) in the project with the problem/improvement you will | ||
address. In this issue, explain carefully what you will be updating and how this changes will impact the project. | ||
Provide any complementary information to explain it (code samples, screenshots ...). You should information about: | ||
* Expected behavior | ||
* Actual behavior | ||
* Steps to reproduce | ||
* Environment | ||
* Possible cause | ||
* Possible solution | ||
|
||
The two following points are different depending on the permissions you have to the repo. | ||
* **[If you have write permission] Work in a separate branch always:** Create a new branch with a describable name (you can use the issue number as branch name "issue_xxx"). Create your commits in that branch making the needed changes. Please, use describable names as commit messages, so everyone can understand easily the changes you made. | ||
|
||
* **[If you only have read permission] Fork the project:** Fork the project. Work on that copy of the repo, making the desirable changes. Please, use describable names as commit messages, so everyone can understand easily the changes you made. | ||
|
||
* **Open a pull request:** A pull request is compulsory any time a new change wants to be added to the core or the project. After solving the issue, create a pull request with your branch. In this pull request include all the commits made, write a good description of the changes made and refer to the issue solved to make things easier to the maintainers. Include any additional resource that would be interesting (references, screenshots...). Link the PR with the issue. | ||
|
||
* **Testing and merging pull requests** | ||
One of maintainers will review your code. Reviewer could ask you to modify your pull request. | ||
Please provide timely response for reviewers (within weeks, not months), otherwise you submission could be postponed or even rejected. | ||
|
||
* **[If you have write permission] Don't accept your own pull requests:** Wait for a project maintainer to accept the changes you made. They will probably comment the pull request with some feedback and will consider if it can be merge to the master branch. Be proactive and kind! | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.