You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
> Hi, Sir or Madam! When running the notebook transfer_learning_demo.ipynb, I met some problem. Firstly, after changing the path of files and python env, it threw the error as follow:
Traceback (most recent call last):
File "/home/data/aidd/Reinvent//input.py", line 20, in <module>
manager = Manager(configuration)
File "/home/data/aidd/Reinvent/running_modes/manager.py", line 13, in __init__
self._load_environmental_variables()
File "/home/data/aidd/Reinvent/running_modes/manager.py", line 29, in _load_environmental_variables
raise ex
File "/home/data/aidd/Reinvent/running_modes/manager.py", line 24, in _load_environmental_variables
environmental_variables = config["ENVIRONMENTAL_VARIABLES"]
KeyError: 'ENVIRONMENTAL_VARIABLES'
I am not very clear what should be set in config.json. I just note some code in manager.py like these:
import json
import os
from running_modes.configurations import GeneralConfigurationEnvelope
from running_modes.enums.running_mode_enum import RunningModeEnum
from running_modes.constructors.running_mode import RunningMode
class Manager:
def __init__(self, configuration):
self.running_mode_enum = RunningModeEnum()
self.configuration = GeneralConfigurationEnvelope(**configuration)
self._load_environmental_variables()
def run(self):
runner = RunningMode(self.configuration)
runner.run()
def _load_environmental_variables(self):
try:
project_root = os.path.dirname(__file__)
with open(os.path.join(project_root, '../configs/config.json'), 'r') as f:
config = json.load(f)
#environmental_variables = config["ENVIRONMENTAL_VARIABLES"]
#for key, value in environmental_variables.items():
#os.environ[key] = value
except KeyError as ex:
raise ex
Could you tell me how to set the config.json in Reinvent folder? Thank you very much!
Originally posted by @lam-sys in #31 (comment)
The text was updated successfully, but these errors were encountered: