Skip to content

[refactor] CLI changes #3705

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 20 commits into from
Mar 30, 2020
Merged

[refactor] CLI changes #3705

merged 20 commits into from
Mar 30, 2020

Conversation

ervteng
Copy link
Contributor

@ervteng ervteng commented Mar 28, 2020

Proposed change(s)

  • Make --train the default, and deprecate it (with warning message)
  • Add --inference flag for inference mode
  • Replace --load with --resume
  • Block training if the model files already exist. Require --force to overwrite these files.
  • Tensorboard writer deletes old summaries if overwriting. This prevents the double-back-around plots we sometimes get if we use the same run-id.

TODO: Doc changes, changelog

Useful links (Github issues, JIRA tickets, ML-Agents forum threads etc.)

MLA-787

Types of change(s)

  • Bug fix
  • New feature
  • Code refactor
  • Breaking change
  • Documentation update
  • Other (please describe)

Checklist

  • Added tests that prove my fix is effective or that my feature works
  • Updated the changelog (if applicable)
  • Updated the documentation (if applicable)
  • Updated the migration guide (if applicable)

Other comments

@ervteng ervteng requested review from harperj and andrewcoh March 28, 2020 00:42
@ervteng ervteng marked this pull request as ready for review March 28, 2020 00:42


def handle_existing_directories(
model_path: str, summary_path: str, resume: bool, force: bool
Copy link
Contributor Author

Choose a reason for hiding this comment

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

note that summary_path isn't used yet but with consolidating all summaries into the same directory will be checked as well.

Copy link
Contributor

@harperj harperj left a comment

Choose a reason for hiding this comment

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

Another minor comment, but looks good to me

self.summary_writers[category] = tf.summary.FileWriter(filewriter_dir)

def _delete_all_events_files(self, directory_name: str) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: could add some logging to make the user aware this is happening.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

@ervteng ervteng merged commit 082f007 into master Mar 30, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-cliflags branch March 30, 2020 22:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 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