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

Define summary frequency per step #273

Closed
visuallization opened this issue Jun 27, 2023 · 2 comments
Closed

Define summary frequency per step #273

visuallization opened this issue Jun 27, 2023 · 2 comments

Comments

@visuallization
Copy link

Hi there,

Is there a possibility to define the summary frequency per step? Kind of similar to unity ml agents.

Cheers!

@alex-petrenko
Copy link
Owner

Hi @visuallization !

Currently the summary rate per step is defined in learner.py

    def _should_save_summaries(self):
        summaries_every_seconds = self.summary_rate_decay_seconds.at(self.train_step)
        if time.time() - self.last_summary_time < summaries_every_seconds:
            return False

        return True

Where summary_rate_decay is:

self.summary_rate_decay_seconds = LinearDecay([(0, 2), (100000, 60), (1000000, 120)])

This will start saving summaries every 2 seconds at the beginning of training, linearly decay to once in 60 seconds at 100000 train steps, and to once in 120 seconds after 1M steps, and then it will stay there.

The logic behind this is following:

  • at the beginning of training and for shorter runs we want high granularity of summaries to have nice informative smooth curves.
  • for longer runs (hours or days) we don't want frequent summaries, at the very least to prevent tensorboard event files from growing to gigabytes.

You are welcome to modify this code to implement the desired logic. I don't think there's a command line option to control that. Contributions are welcome!

@visuallization
Copy link
Author

visuallization commented Jul 7, 2023

@alex-petrenko Okay great thanks for the detailed explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants