DeepPavlov icon indicating copy to clipboard operation
DeepPavlov copied to clipboard

`parse_config` doesn't allow to add extra variables

Open QtRoS opened this issue 4 years ago • 1 comments

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.

QtRoS avatar Sep 05 '21 17:09 QtRoS

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.

anilhimam17 avatar Oct 24 '21 16:10 anilhimam17