Open
Description
Instantiated metrics are not pickleable, as __init__
instantiates tf variables, which cannot be pickled.
This means that keras models trained with one of the metrics, and then saved, cannot be opened without knowing the dict structure for the 'custom_objects' argument when loading the model. Without using dill, one cannot pickle said dict, which would make delivering a complete model possible. Tools like mlflow are able to track and return complete keras models, however only if the model and custom_objects are both pickleable.
I've come up with a moderately ugly solution that waits until a metric is called to instantiate any tf variables, let me know if you want to see it.
Metadata
Metadata
Assignees
Labels
No labels