IBM / mi-prometheus

Enabling reproducible Machine Learning research
http://mi-prometheus.rtfd.io/
Apache License 2.0
42 stars 18 forks source link

Extract and add absolute path to nested config files #16

Open tkornuta-ibm opened 5 years ago

tkornuta-ibm commented 5 years ago

Describe the bug Currently, all workers assume that they are executed from the mi-prometheus main directory. Along with setup.py we open the possibility to execute the mip-* workers from any directory. To Reproduce

tkornuta@tkornuta-MacBookPro:~/pytorch-env$ mip-onlinetrainer --c mi-prometheus/configs/maes_baselines/maes/maes_serial_recall.yaml Info: Parsing the mi-prometheus/configs/maes_baselines/maes/maes_serial_recall.yaml configuration file Info: Parsing the configs/maes_baselines/maes/default_maes.yaml configuration file Error: Configuration file configs/maes_baselines/maes/default_maes.yaml does not exist

Expected behavior Workers should search the other configs in relation to the first one.

Solution

Extract the absolute path to the main config, then navigate in relation to that one. The goal is to leave the paths in default_config sections as they are, i.e. starting from the configs/ directory.