mirror of
https://github.com/clearml/clearml
synced 2025-05-03 12:31:00 +00:00
Allow auto-model logging callbacks to drop logging
This commit is contained in:
parent
261d4aa958
commit
e03d421b46
@ -167,6 +167,11 @@ class WeightsFileHandler(object):
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# if callback forced us to leave they return None
|
||||||
|
if model_info is None:
|
||||||
|
# callback forced quit
|
||||||
|
return filepath
|
||||||
|
|
||||||
if not model_info.local_model_path:
|
if not model_info.local_model_path:
|
||||||
get_logger(TrainsFrameworkAdapter).debug("Could not retrieve model file location, model is not logged")
|
get_logger(TrainsFrameworkAdapter).debug("Could not retrieve model file location, model is not logged")
|
||||||
return filepath
|
return filepath
|
||||||
@ -324,6 +329,13 @@ class WeightsFileHandler(object):
|
|||||||
model_info = cb('save', model_info)
|
model_info = cb('save', model_info)
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# if callbacks force us to leave they return None
|
||||||
|
if model_info is None:
|
||||||
|
# callback forced quit
|
||||||
|
return saved_path
|
||||||
|
|
||||||
|
# update the trains_out_model after the pre callbacks
|
||||||
trains_out_model = model_info.model
|
trains_out_model = model_info.model
|
||||||
|
|
||||||
# check if object already has InputModel
|
# check if object already has InputModel
|
||||||
|
Loading…
Reference in New Issue
Block a user