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

feature(wrh): add taxi env #799

Merged
merged 9 commits into from
May 30, 2024
Merged

feature(wrh): add taxi env #799

merged 9 commits into from
May 30, 2024

Conversation

ruiheng123
Copy link
Contributor

@ruiheng123 ruiheng123 commented May 29, 2024

Description

Related Issue

TODO

Check List

  • merge the latest version source branch/repo, and resolve all the conflicts
  • pass style check
  • pass all the tests

taxi env first commit
Config upload
@PaParaZz1 PaParaZz1 added the env Questions about RL environment label May 29, 2024
dizoo/taxi/config/__init__.py Show resolved Hide resolved
dizoo/taxi/envs/__init__.py Outdated Show resolved Hide resolved
dizoo/taxi/envs/taxi_env.py Outdated Show resolved Hide resolved
dizoo/taxi/envs/taxi_env.py Outdated Show resolved Hide resolved
def __init__(self, cfg: dict) -> None:

#^ 该部分为初始化定义,需要有的
self._cfg = EasyDict(
Copy link
Member

Choose a reason for hiding this comment

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

use the implementation like default_config in other previous environment in dizoo

dizoo/taxi/envs/taxi_env.py Outdated Show resolved Hide resolved
dizoo/taxi/envs/taxi_env.py Outdated Show resolved Hide resolved
dizoo/taxi/envs/test_taxi_env.py Outdated Show resolved Hide resolved
dizoo/taxi/envs/test_taxi_env.py Outdated Show resolved Hide resolved
dizoo/taxi/config/__init__.py Show resolved Hide resolved
@ruiheng123 ruiheng123 changed the title First commit for taxi feature(wrh): First commit for taxi May 29, 2024
@ruiheng123 ruiheng123 changed the title feature(wrh): First commit for taxi feature(wrh): first commit for taxi May 29, 2024
@PaParaZz1 PaParaZz1 changed the title feature(wrh): first commit for taxi feature(wrh): first commit for taxi env May 29, 2024
@ruiheng123 ruiheng123 changed the title feature(wrh): first commit for taxi env feature(wrh): taxi_dqn_config update May 30, 2024
# Clean up temporary image files
for temp_image_file in temp_image_files:
os.remove(temp_image_file)
print(f"GIF saved as {gif_path}")
Copy link
Collaborator

Choose a reason for hiding this comment

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

use log instead of print.


@staticmethod
def frames_to_gif(frames: List[imageio.core.util.Array], gif_path: str, duration: float = 0.1) -> None:
"""
Copy link
Collaborator

Choose a reason for hiding this comment

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

@PaParaZz1 PaParaZz1 changed the title feature(wrh): taxi_dqn_config update feature(wrh): add taxi env May 30, 2024
@PaParaZz1 PaParaZz1 merged commit d919fa5 into opendilab:main May 30, 2024
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
env Questions about RL environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants