Skip to content

Added logging per Brain of time to update policy, time elapsed during training, time to collect experiences, buffer length, average return per policy #1858

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 2 commits into from
Apr 3, 2019

Conversation

eshvk
Copy link
Contributor

@eshvk eshvk commented Mar 22, 2019

Squashing and rebasing against develop

@harperj
Copy link
Contributor

harperj commented Mar 26, 2019

Looks like you have a couple of test failures.

@Unity-Technologies Unity-Technologies deleted a comment Mar 26, 2019
Copy link
Contributor

@vincentpierre vincentpierre left a comment

Choose a reason for hiding this comment

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

I think this needs a documentation change. How to use this new debug statement and maybe even add to the create issue template ?

@eshvk eshvk force-pushed the develop-esh-metrics branch from 01fb639 to 42099cc Compare March 26, 2019 23:37
@Unity-Technologies Unity-Technologies deleted a comment Mar 26, 2019
@Unity-Technologies Unity-Technologies deleted a comment Mar 27, 2019
@eshvk eshvk force-pushed the develop-esh-metrics branch from 66eef6f to 19f244c Compare March 27, 2019 23:48
@Unity-Technologies Unity-Technologies deleted a comment Mar 27, 2019
@Unity-Technologies Unity-Technologies deleted a comment Mar 29, 2019
@eshvk eshvk force-pushed the develop-esh-metrics branch 2 times, most recently from 9232e51 to 76b14da Compare March 29, 2019 03:45
@Unity-Technologies Unity-Technologies deleted a comment Mar 29, 2019
@Unity-Technologies Unity-Technologies deleted a comment Mar 29, 2019
@Unity-Technologies Unity-Technologies deleted a comment Mar 29, 2019

self.demonstration_buffer = Buffer()
self.evaluation_buffer = Buffer()
self.summary_writer = tf.summary.FileWriter(self.summary_path)
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you test that BC is still training and logging tensorboard ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just tried it, looks like it is still running and logging

@@ -98,7 +109,10 @@ def get_action(self, curr_info: BrainInfo) -> ActionInfo:
:param curr_info: Current BrainInfo.
:return: The ActionInfo given by the policy given the BrainInfo.
"""
return self.policy.get_action(curr_info)
self.trainer_metrics.start_experience_collection_timer()
Copy link
Contributor

Choose a reason for hiding this comment

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

In BC trainer that inherits from trainer but no trainer_metrics is used, will this cause problems ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No because trainer_metrics is of type TrainerMetrics which is instantiated in the constructor for Trainer, the constructor is called in BCTrainer so the object will exist and the method can be called. We will not write the data because it will be gibberish.

for brain_name, trainer in self.trainers.items():
if brain_name in self.trainer_metrics:
self.trainer_metrics[brain_name].add_delta_step(delta_time_step)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not self.trainers[brain_name].trainer_metrics ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you explain this a bit more? Are you saying why have the if condition?

@eshvk eshvk force-pushed the develop-esh-metrics branch from 76b14da to 67abb7b Compare April 1, 2019 22:32
@eshvk eshvk force-pushed the develop-esh-metrics branch from 67abb7b to b89bb0f Compare April 2, 2019 20:47
@Unity-Technologies Unity-Technologies deleted a comment Apr 2, 2019
@eshvk
Copy link
Contributor Author

eshvk commented Apr 2, 2019

PTAL @vincentpierre Fixed most of the outstanding issues, squashed, rebased from develop

@eshvk eshvk merged commit 69b223c into develop Apr 3, 2019
@eshvk eshvk deleted the develop-esh-metrics branch April 3, 2019 16:53
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants