tfma.exporter.FinalExporter
Stay organized with collections
Save and categorize content based on your preferences.
This class exports the EvalSavedModel in the end.
tfma.exporter.FinalExporter(
*args, **kwargs
)
This class performs a single export in the end of training.
Attributes |
name
|
Directory name.
A directory name under the export base directory where exports of
this type are written. Should not be None nor empty.
|
Methods
export
View source
export(
estimator: tf_estimator.Estimator,
export_path: str,
checkpoint_path: Optional[str],
eval_result: Optional[bytes],
is_the_final_export: bool
) -> Optional[bytes]
Exports the given Estimator
to a specific format.
Args |
estimator
|
the Estimator to export.
|
export_path
|
A string containing a directory where to write the export.
|
checkpoint_path
|
The checkpoint path to export.
|
eval_result
|
The output of Estimator.evaluate on this checkpoint.
|
is_the_final_export
|
This boolean is True when this is an export in the
end of training. It is False for the intermediate exports during the
training. When passing Exporter to tf.estimator.train_and_evaluate
is_the_final_export is always False if TrainSpec.max_steps is
None .
|
Returns |
The string path to the exported directory or None if export is skipped.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[null,null,["Last updated 2024-04-26 UTC."],[],[],null,["# tfma.exporter.FinalExporter\n\n\u003cbr /\u003e\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/eval_saved_model/exporter.py#L96-L148) |\n\nThis class exports the EvalSavedModel in the end. \n\n tfma.exporter.FinalExporter(\n *args, **kwargs\n )\n\nThis class performs a single export in the end of training.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Attributes ---------- ||\n|--------|-------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | Directory name. \u003cbr /\u003e A directory name under the export base directory where exports of this type are written. Should not be `None` nor empty. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `export`\n\n[View source](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/eval_saved_model/exporter.py#L138-L148) \n\n export(\n estimator: tf_estimator.Estimator,\n export_path: str,\n checkpoint_path: Optional[str],\n eval_result: Optional[bytes],\n is_the_final_export: bool\n ) -\u003e Optional[bytes]\n\nExports the given `Estimator` to a specific format.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `estimator` | the `Estimator` to export. |\n| `export_path` | A string containing a directory where to write the export. |\n| `checkpoint_path` | The checkpoint path to export. |\n| `eval_result` | The output of `Estimator.evaluate` on this checkpoint. |\n| `is_the_final_export` | This boolean is True when this is an export in the end of training. It is False for the intermediate exports during the training. When passing `Exporter` to `tf.estimator.train_and_evaluate` `is_the_final_export` is always False if `TrainSpec.max_steps` is `None`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| The string path to the exported directory or `None` if export is skipped. ||\n\n\u003cbr /\u003e"]]