mirror of
https://github.com/clearml/clearml
synced 2025-05-04 04:51:02 +00:00
WeightsFileHandler callback documentation
This commit is contained in:
parent
b0cb4db6a1
commit
0454804721
@ -99,13 +99,15 @@ class WeightsFileHandler(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def add_pre_callback(cls, callback_function):
|
def add_pre_callback(cls, callback_function):
|
||||||
# type: (Callable[[str, ModelInfo], ModelInfo]) -> int
|
# type: (Callable[[str, ModelInfo], Optional[ModelInfo]]) -> int
|
||||||
"""
|
"""
|
||||||
Add a pre-save/load callback for weights files and return its handle. If the callback was already added,
|
Add a pre-save/load callback for weights files and return its handle. If the callback was already added,
|
||||||
return the existing handle.
|
return the existing handle.
|
||||||
|
|
||||||
Use this callback to modify the weights filename registered in the Trains Server. In case Trains is
|
Use this callback to modify the weights filename registered in the Trains Server. In case Trains is
|
||||||
configured to upload the weights file, this will affect the uploaded filename as well.
|
configured to upload the weights file, this will affect the uploaded filename as well.
|
||||||
|
Callback returning None will disable the tracking of the current call Model save,
|
||||||
|
it will not disable saving it to disk, just the logging/tracking/uploading.
|
||||||
|
|
||||||
:param callback_function: A function accepting action type ("load" or "save"),
|
:param callback_function: A function accepting action type ("load" or "save"),
|
||||||
callback_function('load' or 'save', WeightsFileHandler.ModelInfo) -> WeightsFileHandler.ModelInfo
|
callback_function('load' or 'save', WeightsFileHandler.ModelInfo) -> WeightsFileHandler.ModelInfo
|
||||||
@ -115,7 +117,7 @@ class WeightsFileHandler(object):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def add_post_callback(cls, callback_function):
|
def add_post_callback(cls, callback_function):
|
||||||
# type: (Callable[[str, dict], dict]) -> int
|
# type: (Callable[[str, ModelInfo], ModelInfo]) -> int
|
||||||
"""
|
"""
|
||||||
Add a post-save/load callback for weights files and return its handle.
|
Add a post-save/load callback for weights files and return its handle.
|
||||||
If the callback was already added, return the existing handle.
|
If the callback was already added, return the existing handle.
|
||||||
|
Loading…
Reference in New Issue
Block a user