这是indexloc提供的服务,不要输入任何密码
Skip to content

change API of train_fn and test_fn #229

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

Merged
merged 8 commits into from
Sep 26, 2020
Merged

change API of train_fn and test_fn #229

merged 8 commits into from
Sep 26, 2020

Conversation

Trinkle23897
Copy link
Collaborator

@Trinkle23897 Trinkle23897 commented Sep 25, 2020

train_fn(epoch) -> train_fn(epoch, env_step)
test_fn(epoch) -> test_fn(epoch, env_step)

@youkaichao
Copy link
Collaborator

What is the rationale of changing the signature? Maybe env_step means the number of steps for environments. Then I think env_step should be passed to test_fn , too.

BTW, I find env_step not so meaningful. I prefer something like num_steps.

@Trinkle23897 Trinkle23897 force-pushed the dev branch 2 times, most recently from d63a222 to f280797 Compare September 25, 2020 10:21
@youkaichao
Copy link
Collaborator

I agree with the idea of this PR. Just remember to change all occurrence. This PR changes the signature and thus breaks the compatibility, so it is easy to check whether you have changed all occurrence: just re-run all the examples.

@Trinkle23897
Copy link
Collaborator Author

I agree with the idea of this PR. Just remember to change all occurrences. This PR changes the signature and thus breaks the compatibility, so it is easy to check whether you have changed all occurrences: just re-run all the examples.

Yes, I've checked and all examples are runnable.

duburcqa
duburcqa previously approved these changes Sep 25, 2020
@Trinkle23897 Trinkle23897 merged commit 710966e into master Sep 26, 2020
@Trinkle23897 Trinkle23897 deleted the dev branch September 26, 2020 08:35
BFAnas pushed a commit to BFAnas/tianshou that referenced this pull request May 5, 2024
train_fn(epoch) -> train_fn(epoch, num_env_step)
test_fn(epoch) -> test_fn(epoch, num_env_step)
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

Successfully merging this pull request may close these issues.

3 participants