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

Add a command print_named_configs #332

Merged
merged 3 commits into from
Jul 9, 2018

Conversation

thequilo
Copy link
Collaborator

@thequilo thequilo commented Jul 7, 2018

I found this command very useful, especially when an experiment contains multiple ingredients which define (nested) named configs. This refers to #239 and may be used to print the available named configs when the user requests an unknown config.

This command is added to the main experiment and prints a list of available named configurations. Docstrings for config scopes are copied and printed as additional information for the named config colored in grey. Here's an example of what the output looks like:

Named Configurations (doc):
  named_config1
  ingredient2.named_config3
    """
      A docstring with
      mutliple

      lines.

      """
  ingredient2.dict_config
  ingredient1.named_config2   # A beatiful docstring (this is colored in grey)

Btw: This is my first pull request so please correct me if I am doing something wrong.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 83.516% when pulling 3b88c53 on thequilo:print-named-configs into 3052552 on IDSIA:master.

@thequilo thequilo force-pushed the print-named-configs branch 2 times, most recently from 94a9248 to cce9443 Compare July 7, 2018 03:13
@Qwlouse
Copy link
Collaborator

Qwlouse commented Jul 9, 2018

Wow, that is a very nice PR and a useful feature indeed. It will also come in handy for #239. Thanks a lot for your contribution!

@Qwlouse Qwlouse merged commit 8b73c80 into IDSIA:master Jul 9, 2018
@thequilo thequilo deleted the print-named-configs branch July 10, 2018 01:36
@thequilo
Copy link
Collaborator Author

Thanks :)

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.

None yet

3 participants