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

How to monitor the episode/epoch return/length in Tianshou? #1082

Open
1 of 6 tasks
PingH129 opened this issue Mar 30, 2024 · 1 comment
Open
1 of 6 tasks

How to monitor the episode/epoch return/length in Tianshou? #1082

PingH129 opened this issue Mar 30, 2024 · 1 comment
Labels
question Further information is requested

Comments

@PingH129
Copy link

PingH129 commented Mar 30, 2024

  • I have marked all applicable categories:
    • exception-raising bug
    • RL algorithm bug
    • documentation request (i.e. "X is missing from the documentation.")
    • new feature request
    • design request (i.e. "X should be changed to Y.")
  • [+] I have visited the source website
  • [+] I have searched through the issue tracker for duplicates
  • [+] I have mentioned version numbers, operating system and environment, where applicable:
    import tianshou, gymnasium as gym, torch, numpy, sys
    print(tianshou.__version__, gym.__version__, torch.__version__, numpy.__version__, sys.version, sys.platform)

I'm using the trainer in Tianshou for MARL, but how can I monitor the episode/epoch return and length in tianshou in the training process?

@PingH129 PingH129 changed the title How to monitor the episode/epoch return/length in Tianshou? How to monitor the episode/epoch return/length in Tianshou in the training process? Mar 30, 2024
@PingH129 PingH129 changed the title How to monitor the episode/epoch return/length in Tianshou in the training process? How to monitor the episode/epoch return/length in Tianshou? Mar 30, 2024
@Trinkle23897
Copy link
Collaborator

You should check the collector's return value. It has episodic statistic number. For example:

return CollectStats.with_autogenerated_stats(
returns=np.array(episode_returns),
lens=np.array(episode_lens),
n_collected_episodes=num_collected_episodes,
n_collected_steps=step_count,
collect_time=collect_time,
collect_speed=step_count / collect_time,
)

@Trinkle23897 Trinkle23897 added the question Further information is requested label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants