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 function to override default configuration #47

Open
bagustris opened this issue Jul 24, 2023 · 5 comments
Open

Add function to override default configuration #47

bagustris opened this issue Jul 24, 2023 · 5 comments

Comments

@bagustris
Copy link
Collaborator

bagustris commented Jul 24, 2023

The example for INI file currently contain user-specific path, e.g.,

emodb = /home/audeering.local/fburkhardt/audb/emodb/1.3.0/fe182b91/

I want to request that the user can override the config without editing the config. The suggested CLI argument is -o or --override . So the command will be,

 python -m nkululeko -i tests/exp_emodb_os_mlp.ini -o "exp_emodb_os_mlp.data.emodb=/home/bagus/emodb"

Benefits: No need to modify INI file for testing/trying Nkululeko.

Also, should the path variable be consistent across datasets? In that emodb the dataset path is named "emodb" but in other datasets (Android) is named "data".

@felixbur
Copy link
Owner

the path variable must be unique for the databases, because there can be several databases

@felixbur
Copy link
Owner

This suggestion reminds me a bit of a functionality i implemented some time ago (probably doesn't work out-of-the-box any more)
https://github.com/felixbur/nkululeko/blob/main/meta/demos/multiple_exeriments/parse_nkulu.py

@bagustris
Copy link
Collaborator Author

For now, it is not a big problem since we can run local test without any change. But it is better to keep this issue open for the future.

@bagustris
Copy link
Collaborator Author

@felixbur
There is a discussion in Stackoverflow exactly related to this matter,

https://stackoverflow.com/questions/48538581/argparse-defaults-from-file

But before going further, I have some things in my head now:

  1. User use INI file to define the config (current behavior, simplest).
  2. User use command line arguments to override INI file (raised by this issue)
  3. User use command line arguments without INI file

Having these capabilities will improve the speed of experimenting with Nkululeko. Just use the arrow key from the terminal to recall the last commands (or history/ctrl-z) and edit the command line arguments to experiment with other variables to see their impact.

@felixbur
Copy link
Owner

so, 2 is also already implemented
by using the nkuluflag module. An example is here
http://blog.syntheticspeech.de/2022/03/28/how-to-run-multiple-experiments-in-one-go-with-nkululeko/

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

No branches or pull requests

2 participants