Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Add option to save ttyrec files every "M" episodes (#260) #304

Merged
merged 2 commits into from
Jan 26, 2022
Merged

Conversation

heiner
Copy link
Contributor

@heiner heiner commented Jan 25, 2022

Taking over from #260. Fixes #256.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 25, 2022
@heiner
Copy link
Contributor Author

heiner commented Jan 25, 2022

Downside of PR as-is: Just setting savedir no longer saves data, one needs to also set save_ttyrec_every to a nonzero value now.

Alternative: Default save_ttyrec_every to -1 which could mean "1" if savedir is not-None, "0" otherwise?

@heiner heiner marked this pull request as ready for review January 25, 2022 19:20
@cdmatters
Copy link
Contributor

Downside of PR as-is: Just setting savedir no longer saves data, one needs to also set save_ttyrec_every to a nonzero value now.

Alternative: Default save_ttyrec_every to -1 which could mean "1" if savedir is not-None, "0" otherwise?

Could we not just have a setting where if savedir is set - then we save every x. So the off switch is controlled by savedir, and there is no second off switch.

@heiner
Copy link
Contributor Author

heiner commented Jan 26, 2022

Downside of PR as-is: Just setting savedir no longer saves data, one needs to also set save_ttyrec_every to a nonzero value now.
Alternative: Default save_ttyrec_every to -1 which could mean "1" if savedir is not-None, "0" otherwise?

Could we not just have a setting where if savedir is set - then we save every x. So the off switch is controlled by savedir, and there is no second off switch.

Yes.

My alternative suggestion was along those lines but not exactly that. The reason I went for something else first is that savedir has this additional twist where None means don't save, empty string means create a new random directory. I thought we could make the off switch the other flag instead...

@cdmatters
Copy link
Contributor

cdmatters commented Jan 26, 2022

Downside of PR as-is: Just setting savedir no longer saves data, one needs to also set save_ttyrec_every to a nonzero value now.
Alternative: Default save_ttyrec_every to -1 which could mean "1" if savedir is not-None, "0" otherwise?

Could we not just have a setting where if savedir is set - then we save every x. So the off switch is controlled by savedir, and there is no second off switch.

Yes.

My alternative suggestion was along those lines but not exactly that. The reason I went for something else first is that savedir has this additional twist where None means don't save, empty string means create a new random directory. I thought we could make the off switch the other flag instead...

From a linguistic point of view, i think this PR is right to make save_ttyrec_every=0 be OFF, rather than savedir=None, and its cleaner to remove te "" None case difference. I'm happy with this (breaking!) change

dmadeka and others added 2 commits January 26, 2022 13:29
Initial attempt to add Episode Save Cycle
Downside: Just setting savedir no longer saves data, one needs
to also set save_ttyrec_every to a nonzero value now.

Alternative: Default save_ttyrec_every to -1 which could mean
"1" if savedir is not-None, "0" otherwise?
@heiner heiner merged commit c579e70 into main Jan 26, 2022
@heiner heiner deleted the ttyrecskip branch January 26, 2022 13:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save ttyrecs every "M" episode
4 participants