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

Clean Code & Typing #8

Open
mchiquier opened this issue May 26, 2020 · 3 comments
Open

Clean Code & Typing #8

mchiquier opened this issue May 26, 2020 · 3 comments

Comments

@mchiquier
Copy link
Contributor

@goodmattg How do you imagine we have boilerplate that checks for this?

Useful links:
https://docs.python.org/3/library/typing.html

@goodmattg
Copy link
Collaborator

I mean that our code in this boilerplate should be well typed 😄. You're totally correct we aren't going to typecheck the researcher's code. IDE's actually do support that, but no researcher would want it.

@ChickenTarm
Copy link
Collaborator

one way for researchers to have typing for their code is to define schemas that is some custom schema they define that gets passed around. They could just use a dictionary like i see a lot of people using, but one problem with dictionaries is that people just cram in whatever garbage they want leading to bad readability.

@goodmattg
Copy link
Collaborator

We're addressing this in a few ways:

  1. All of our code should be typed in case researchers want to add custom logging, actions, etc.
  2. We're YAML first in terms of configuration. Hydra makes it easy to split configurations into multiple files and keep things clean. Our repo is a good example of using the "defaults" section to keep things clean. The release version of Hydra does support something called "Structured Config" which is like strongly typed YAML, but I think that would just confuse researchers

https://hydra.cc/docs/next/tutorials/structured_config/intro/#internaldocs-banner

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

No branches or pull requests

3 participants