Skip to content

MRT User Configuration - Overriding YAML File by Command Line Positional Arguments #86

@declmal

Description

@declmal

There's a common case that when a user invokes a MRT process, he/she will type in the command line as follows:

python main2.py --yaml-path /path/to/test.yaml

where the yaml file test.yaml is configured beforehand.

when he/she needs to revise some hyper-parameters, one feasible way is to reopen test.yaml and revise the corresponding parameter, which could be tedious.

Another possible way is overriding by optional command line arguments, such as

python main2.py --yaml-path /path/to/test.yaml --softmax-lambd 0.5

where the value of softmax_lambd will be overriden as 0.5.

However, as shown in yacs doc:

Screen Shot 2021-09-29 at 4 37 16 PM

yaml configuration is updated by the interface cfg.merge_from_list, and it is not recommended for configuration along with a command line argument.

So, what could be the best way to implement this command line overriden feature, or is this feature necessary?

Though, one possible solution is to use the common package located in python/mrt/common.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions