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
Then, it run successfully. However, it run only by CPU, GPU cannot accelerate.
Could you tell me how to set the config.json in Reinvent folder? Thank you very much!
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:
I am not very clear what should be set in config.json. I just note some code in manager.py like these:
Then, it run successfully. However, it run only by CPU, GPU cannot accelerate. Could you tell me how to set the config.json in Reinvent folder? Thank you very much!