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

[Bug] speed regression when using ListConfig in place of tuple when configuring Adam with instantiate #1015

Closed
omry opened this issue Sep 25, 2020 · 1 comment · Fixed by #1024
Labels
bug Something isn't working
Milestone

Comments

@omry
Copy link
Collaborator

omry commented Sep 25, 2020

#1011 reports performance regression in Adam when using instantiate.
The root cause appears to be that ListConfig is used to configure the betas where tuple or list would be more performant.

Adam is accessing the betas twice per layer during the optimization, which - in some scenarios - is enough to cause a speed regression.

@omry omry added the bug Something isn't working label Sep 25, 2020
@omry omry added this to the 1.1.0 milestone Sep 27, 2020
@omry
Copy link
Collaborator Author

omry commented Oct 1, 2020

To address this, a new instantiation parameter is added:

_convert_ : [none, partial, all]

The parameter can be a par t of the provided conifig or can be specified in the callsite to instanitate.

  • _convert_: none : Keep current behavior, passed parameters are DictConfig and ListConfig objects. This is the default behavior for when _convert_ is not specified.
  • _convert_ : partial : convert to primitive containers, with the exception of Structured Configs and their nested objects
  • _convert_ : all : complete conversion to primitive containers.

@omry omry closed this as completed in #1024 Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant