Skip to content

parse_config doesn't allow to add extra variables  #1483

Description

@QtRoS

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.

Activity

  1. anilhimam17 commented on Oct 24, 2021

    @anilhimam17

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions