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

parse_config doesn't allow to add extra variables #1483

Open
QtRoS opened this issue Sep 5, 2021 · 1 comment
Open

parse_config doesn't allow to add extra variables #1483

QtRoS opened this issue Sep 5, 2021 · 1 comment

Comments

@QtRoS
Copy link

QtRoS commented Sep 5, 2021

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

What problem are we trying to solve?:

1. `parse_config` function from `deeppavlov.core.commands.utils` doesn't allow me to add extra vars or override existing. The only way to override vars is to add environment variable. It is very unhandy. I can rewrite this function so it would allow to add extra vars. 
2. Variables in config-files are substituted by hand. Why don't you use industry standard template engines like J2? 

How can we solve it?:

1. Via adding new parameter to function. 
2. Via using jinja

Are there other issues that block this solution?:

As far as I can see - none.

If you are ok with it - I will code it myself and do PR.

@anilhimam17
Copy link

Hey if you want to add extra variables to the function you try using decorators.
Through decorators you can add additional functionality and variables to the code.

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

2 participants