def __init__(self, _tracking_uri=get_pod_uri("mlflow", "5001")): mlflow.set_tracking_uri(_tracking_uri) print("Tracking Model Metadata on MLFlow Server @ " + mlflow.get_tracking_uri()) if not mlflow.get_tracking_uri() == _tracking_uri: Warning( "MLManager doesn't seem to be communicating with the right server endpoint." "Try instantiating this class again!") MlflowClient.__init__(self, _tracking_uri) self.active_run = None self.active_experiment = None
def __init__(self, conf=None): MlflowClient.__init__(self, conf.get('tracking_uri')) mlflow.set_tracking_uri(conf.get('tracking_uri')) self.artifact_location = conf.get('artifact_location') self.user_id = conf.get('user_id') self.git_directory = conf.get('use_git_version', None) self.experiment_name = conf.get('experiment_name') self.experiment_id = None self.run_tags = {} self.run_uuid = None self.source_type = 'NOTEBOOK' if not conf.get( 'source_type') else conf.get('source_type') current_experiment = self.get_experiment_by_name(self.experiment_name) if not current_experiment: self.experiment_id = self.create_experiment( self.experiment_name, self.artifact_location) else: self.experiment_id = current_experiment.experiment_id mlflow.set_experiment(self.experiment_name)