GSTT-CSC / MLOps

Framework for building ML apps
GNU General Public License v3.0
9 stars 5 forks source link

__init__ method calls config_setup before use_localhost is set #12

Closed hshuaib90 closed 3 years ago

hshuaib90 commented 3 years ago

When instantiating Experiment, the attribute use_localhost variable is not set within __init__ until after config_setup is called. However, in line 35 config_setup calls self.use_localhost which triggers this AttributeError:

Traceback (most recent call last):
  File "run_project.py", line 24, in <module>
    run_project(args)
  File "run_project.py", line 7, in run_project
    exp = Experiment(config_path=in_args.config_path, use_localhost=in_args.use_localhost)
  File "/Users/mohammadharisshuaib/Software/mlops_test/mlops_env/lib/python3.7/site-packages/mlops-0.1-py3.7.egg/mlops/Experiment.py", line 19, in __init__
  File "/Users/mohammadharisshuaib/Software/mlops_test/mlops_env/lib/python3.7/site-packages/mlops-0.1-py3.7.egg/mlops/Experiment.py", line 35, in config_setup
AttributeError: 'Experiment' object has no attribute 'use_localhost'

Moving self.use_localhost = use_localhost up in the __init__ method before the config_setup means it works.