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 lambda function support in config files e.g., lr_lambda argument for torch optimizer schedulers #1306

Open
yurakuratov opened this issue Aug 27, 2020 · 0 comments

Comments

@yurakuratov
Copy link
Contributor

Want to contribute to DeepPavlov? Please read the contributing guideline first.

What problem are we trying to solve?:

`lr_lambda` argument can't be passed to `optim.lr_scheduler.LambdaLR`
`lr_lambda` argument is a lambda function and in case of this configuration file:

"lr_scheduler": "LambdaLR",
        "lr_scheduler_parameters": {
          "lr_lambda": "lambda x: x"
        }

lr_lambda is treated like python string

How can we solve it?:

run eval(lr_lambda) when passing lambda function as argument

Are there other issues that block this solution?:

NA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant