Disable MLFlow logging completely #11871
turbotimon
started this conversation in
Show and tell
Replies: 1 comment
-
A slightly improved version that also works with context managers: class MLFlowDummy():
'''Dummy element that can be called with everything.'''
def __getattribute__(self, name):
return self
def __call__(self, *args, **kwargs):
return self
def __enter__(self):
return self
def __exit__(self, *args, **kwargs):
pass
def my_training_func(mlflow):
with mlflow.start_run(run_name="myrun") as run: # context manager
mlflow.log_param("buya", "kasha")
my_training_func(MLFlowDummy()) # disable mlflow |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I often want to be able to completely disable mlflow logging for my training script. It seems that there is no such functionality. The best solution I've come up with is to create some sort of null object and include it in my script.
If you are in a notebook, you can simple disable the mlflow import and create your dummy:
Possible uscases are:
If anyone has a better solution, please post it here!
Beta Was this translation helpful? Give feedback.
All reactions