Any recommended way to save a tf privacy model?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python, tensorflow
- Ambito
- machine-learning
Direzione di ricerca
Inizia con i punti di ingresso per il salvataggio e il caricamento di TensorFlow/Keras mostrati nel report, inclusi tf.saved_model.save e tf.keras.models.load_model. Analizza il fallimento della deserializzazione di DPOptimizerClass; il lavoro sarà completato quando sarà confermato un modo supportato per salvare e ricaricare un modello TensorFlow Privacy, oppure sarà documentata una correzione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Hi, thanks for the open source, a great work.
If one "naively" saves a tf privacy model, it will face an issue.
Let say, you save the model by TF recommended methods, such as
tf.saved_model.save(model, "model.tfmodel")
or
model.save("model.tfmodel", save_format = 'tf')
It will resulted in an error:
`---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[19], line 9
----> 9 loaded_model = tf.keras.models.load_model("model.tfmodel")
File /usr/local/lib/python3.11/dist-packages/keras/src/saving/saving_api.py:262, in load_model(filepath, custom_objects, compile, safe_mode, **kwargs)
254 return saving_lib.load_model(
255 filepath,
256 custom_objects=custom_objects,
257 compile=compile,
258 safe_mode=safe_mode,
259 )
261 # Legacy case.
--> 262 return legacy_sm_saving_lib.load_model(
263 filepath, custom_objects=custom_objects, compile=compile, **kwargs
264 )
File /usr/local/lib/python3.11/dist-packages/keras/src/utils/traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb
File /usr/local/lib/python3.11/dist-packages/keras/src/saving/legacy/serialization.py:365, in class_and_config_for_serialized_keras_object(config, module_objects, custom_objects, printable_module_name)
361 cls = object_registration.get_registered_object(
362 class_name, custom_objects, module_objects
363 )
364 if cls is None:
--> 365 raise ValueError(
366 f"Unknown {printable_module_name}: '{class_name}'. "
367 "Please ensure you are using a keras.utils.custom_object_scope "
368 "and that this object is included in the scope. See "
369 "https://www.tensorflow.org/guide/keras/save_and_serialize"
370 "#registering_the_custom_object for details."
371 )
373 cls_config = config["config"]
374 # Check if cls_config is a list. If it is a list, return the class and the
375 # associated class configs for recursively deserialization. This case will
376 # happen on the old version of sequential model (e.g. keras_version ==
377 # "2.0.6"), which is serialized in a different structure, for example
378 # "{'class_name': 'Sequential',
379 # 'config': [{'class_name': 'Embedding', 'config': ...}, {}, ...]}".
ValueError: Unknown optimizer: 'DPOptimizerClass'. Please ensure you are using a keras.utils.custom_object_scope and that this object is included in the scope. See https://www.tensorflow.org/guide/keras/save_and_serialize#registering_the_custom_object for details.`
- Lingua principale
- Python
- Stelle
- 2k
- Fork
- 477
- Merge medio
- 17h 24m
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di tensorflow/privacy
-
[Draft] New IssueAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
tensorflow/privacy#633 · 1 commento ·
-
HUSSIENALI0780Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
tensorflow/privacy#626 · 1 commento ·
-
٦٦٧٧Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 1/100
tensorflow/privacy#625 ·
-
Bug ReportAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
tensorflow/privacy#624 ·
-
SecureAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
tensorflow/privacy#623 ·
Tutte le issue di tensorflow/privacy
Issue simili
-
area: providers/aws priority: p2 size: S type: bug type: testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
finos/open-resource-broker#851 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
sandialabs/atlas-ui-3#1196 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
ShaftHQ/SHAFT_ENGINE#7902 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: GraphML export writes invalid XML when a value contains a control character (e.g. form feed)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
topoteretes/cognee#6646 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
DOI-USGS/pywatershed#428 ·