Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
mlflow ctx
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Epstein committed Jan 13, 2021
1 parent f243e0f commit bfd2786
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions splicemachine/features/feature_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ def get_training_set(self, features: Union[List[Feature], List[str]], current_va
if current_values_only:
ts.start_time = ts.end_time

if hasattr(self, 'mlflow_ctx') and not return_sql:
if self.mlflow_ctx and not return_sql:
self.mlflow_ctx._active_training_set: TrainingSet = ts
ts._register_metadata(self.mlflow_ctx)
return sql if return_sql else self.splice_ctx.df(sql)
Expand Down Expand Up @@ -395,7 +395,7 @@ def get_training_set_from_view(self, training_view: str, features: Union[List[Fe
sql = _generate_training_set_history_sql(tvw, features, feature_sets, start_time=start_time, end_time=end_time)

# Link this to mlflow for model deployment
if hasattr(self, 'mlflow_ctx') and not return_sql:
if self.mlflow_ctx and not return_sql:
ts = TrainingSet(training_view=tvw, features=features,
start_time=start_time, end_time=end_time)
self.mlflow_ctx._active_training_set: TrainingSet = ts
Expand Down Expand Up @@ -819,7 +819,7 @@ def run_feature_elimination(self, df, features: List[Union[str, Feature]], label
round_metrics[row['name']] = row['score']
mlflow_results.append(round_metrics)

if log_mlflow and hasattr(self, 'mlflow_ctx'):
if log_mlflow and self.mlflow_ctx:
run_name = mlflow_run_name or f'feature_elimination_{label}'
self.__log_mlflow_results(run_name, rnd, mlflow_results)

Expand Down

0 comments on commit bfd2786

Please sign in to comment.