antheas
08/15/2022, 2:37 PMmlflow_log_model_closure
) to pin the name for the version of the function that will run.
What's the better solution for this?
def mlflow_log_model_results(name: str, res: pd.DataFrame):
if not mlflow.active_run():
return
...
def mlflow_log_model_closure(name: str):
def closure(res: pd.DataFrame):
return mlflow_log_model_results(name, res)
closure.__name__ = f"log_{name}_model_results"
return closure