-
Notifications
You must be signed in to change notification settings - Fork 15
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
Structured Configs with URL for torch.optim and torch.utils.data #18
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Tomasz Kornuta <[email protected]>
Signed-off-by: Tomasz Kornuta <[email protected]>
@tkornuta-nvidia Are you envisioning we have many |
|
@romesco: |
also, I think we should get into the habit of always adding tests when we add new configs. |
Yes, sorry it was because of the reorganization of file structure. It's only a linting problem in the |
Yes, this is what I am proposing.
|
ehehe, yeah, I know - still, quoting Shaggy" wasn't me" ;) |
I think we should use Hydra to compose configs for us much like we do otherwise. |
…ate configs with additional URL links Signed-off-by: Tomasz Kornuta <[email protected]>
Signed-off-by: Tomasz Kornuta <[email protected]>
…SPDX identifier Signed-off-by: Tomasz Kornuta <[email protected]>
Signed-off-by: Tomasz Kornuta <[email protected]>
@@ -1,9 +1,13 @@ | |||
# Copyright (c) 2020, Facebook, Inc. and its affiliates. All Rights Reserved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the change from conf
directory to sources
directory, I think this is a good idea. I think the term conf/config/configen is very overloaded in this setting. (something I commented on a while back too). It made knowing where to look for things imo overly difficult until I got used to the lay of the land. I might even argue this should be propagated to the default dir for configen.
Signed-off-by: Tomasz Kornuta <[email protected]>
Signed-off-by: Tomasz Kornuta <[email protected]>
@@ -66,12 +67,12 @@ class CosineAnnealingLRConf: | |||
class ReduceLROnPlateauConf: | |||
_target_: str = "torch.optim.lr_scheduler.ReduceLROnPlateau" | |||
optimizer: Any = MISSING | |||
mode: str = 'min' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @romesco pulled latest hydra changes and regenerated configs - ` -> "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold on with this one until configen is ready to support this.
@@ -1,4 +1,5 @@ | |||
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved | |||
# SPDX-License-Identifier: MIT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not change the headers until we resolve the discussion about it.
config/torch/optim/adadelta.py
Outdated
@@ -13,6 +14,7 @@ | |||
|
|||
@dataclass | |||
class AdadeltaConf: | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are you changing the formatting of generated code?
"""For more details on parameteres please refer to the original documentation: | ||
https://pytorch.org/docs/stable/optim.html#torch.optim.Adagrad | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold on with this change until we finalize the change to configen. This is not urgent and we can do it with configen once it's ready.
Summarizing, this PR introduces:
This is the first try of using configen - in short: great job with this one, @omry, "meta-program or die!" ;)
Please note for generation of all Structured Configs I have used modified version of configen: (Hydra PR: facebookresearch/hydra#1082)
I assumed we will have different contributors for different modules. So to increase the modularity I have reorganized the source folder structure (source = folder containing specification of modules to be generated). Due to the current limitation of configen (hardcoded "configen.yaml" file) the proposed solution has the following directory structure: