We have a helper function that uses a sklearn estimator. We don't want to to be logged to mlflow.
I can do
def myfunc():
import mlflow
with mlflow.autolog.ignore:
# train model
# use model
return predictions
But
I get info prints:
2024/11/29 08:33:05 INFO mlflow.tracking.fluent: Autologging successfully enabled for statsmodels.
2024/11/29 08:33:06 INFO mlflow.tracking.fluent: Autologging successfully enabled for sklearn.
2. I will change the state of autologging to True, even if the user had it to autologging = False before calling myfunc()
How can I solve this? Can I get state of autologging somehow so I can set it back? How to supress info prints?
It would be nice if something like this would be supported, but I cant find anything
def myfunc():
import mlflow
with mlflow.autolog.ignore:
# train model
# use model
return predictions