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

Better error handling if trainer config doesn't contain "default" section #3063

Merged
merged 4 commits into from Dec 12, 2019

Conversation

chriselion
Copy link
Contributor

  • Allow an empty "default" section.
  • Raise an exception if both "default" and the brain name sections are missing
  • Raise an exception if the "trainer" key is missing.
  • Make the unknown trainer type message a bit clearer (put the unknown type in the message)

Open question: do we want to support this still?

_brain_key: Any = brain_name
while not isinstance(trainer_config[_brain_key], dict):
_brain_key = trainer_config[_brain_key]

Seems like it was there for compatibility at some point.

Copy link
Contributor

@ervteng ervteng left a comment

Choose a reason for hiding this comment

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

👍

@chriselion chriselion merged commit d5c6ff8 into master Dec 12, 2019
@delete-merged-branch delete-merged-branch bot deleted the develop-MLA-185-handle-no-default branch December 12, 2019 02:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 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.

None yet

2 participants