fabric.mlflow
SEARCH_MAX_RESULTS
Each train should not have more than 5000 trials
time_it
def time_it(func_or_code=None)
Decorator or function that measures execution time.
Can be used in three ways:
- As a decorator with no arguments: @time_it
- As a decorator with arguments: @time_it()
- As a function call with a string of code to execute and time: time_it("some_code()")
Arguments:
func_or_code
callable or str, optional - Either a function to decorate or a string of code to execute and time.
Returns:
callable or None: Returns a decorated function if used as a decorator, or None if used to execute a string of code.
MLflowIntegration Objects
class MLflowIntegration()
pickle_and_log_automl_artifacts
def pickle_and_log_automl_artifacts(automl,
model,
estimator,
signature=None,
run_id=None)
log automl artifacts to mlflow
load back with automl = mlflow.pyfunc.load_model(model_run_id_or_uri)
, then do prediction with automl.predict(X)
adopt_children
def adopt_children(result=None)
Set autologging child runs to nested by fetching them after all child runs are completed. Note that this may cause disorder when concurrently starting multiple AutoML processes with the same experiment name if the MLflow version is less than or equal to "2.5.0".
retrain
def retrain(train_func, config)
retrain with given config, added for logging the best config and model to parent run. No more needed after v2.0.2post2 as we no longer log best config and model to parent run.