A tff.program.SavedModelFileReleaseManager is a utility for releasing values
from a federated program to a file system and is used to release values from
platform storage to customer storage in a federated program.
Values are released to the file system using the SavedModel (see
tf.saved_model) format. When the value is released, each
tff.program.MaterializableValueReference is materialized. The structure of
the value is discarded.
[null,null,["Last updated 2024-09-20 UTC."],[],[],null,["# tff.program.SavedModelFileReleaseManager\n\n\u003cbr /\u003e\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |\n\nA [`tff.program.ReleaseManager`](../../tff/program/ReleaseManager) that releases values to a file system.\n\nInherits From: [`ReleaseManager`](../../tff/program/ReleaseManager) \n\n tff.program.SavedModelFileReleaseManager(\n root_dir: Union[str, os.PathLike[str]], prefix: str = 'release_'\n )\n\nA [`tff.program.SavedModelFileReleaseManager`](../../tff/program/SavedModelFileReleaseManager) is a utility for releasing values\nfrom a federated program to a file system and is used to release values from\nplatform storage to customer storage in a federated program.\n\nValues are released to the file system using the SavedModel (see\n[`tf.saved_model`](https://www.tensorflow.org/api_docs/python/tf/saved_model)) format. When the value is released, each\n[`tff.program.MaterializableValueReference`](../../tff/program/MaterializableValueReference) is materialized. The structure of\nthe value is discarded.\n| **Note:** The SavedModel format can only contain values that can be converted to a [`tf.Tensor`](https://www.tensorflow.org/api_docs/python/tf/Tensor) (see [`tf.convert_to_tensor`](https://www.tensorflow.org/api_docs/python/tf/convert_to_tensor)), releasing any other values will result in an error.\n\nSee \u003chttps://www.tensorflow.org/guide/saved_model\u003e for more information about\nthe SavedModel format.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|------------|--------------------------------------------------------------------------------------------------|\n| `root_dir` | A path on the file system to save program state. If this path does not exist it will be created. |\n| `prefix` | A string to use as the prefix for filenames. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ------ ||\n|--------------|-----------------------------------|\n| `ValueError` | If `root_dir` is an empty string. |\n\n\u003cbr /\u003e\n\nMethods\n-------\n\n### `get_value`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n get_value(\n key\n ) -\u003e ../../tff/program#ReleasableStructure\n\nReturns the value for the given `key`.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|-------|-----------------------------------------|\n| `key` | Used to reference the released `value`. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ||\n|---|---|\n| A retrieved value matching `structure`. ||\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Raises ||\n|------------------------------|----------------------------------------------------|\n| `ReleasedValueNotFoundError` | If there is no released value for the given `key`. |\n\n\u003cbr /\u003e\n\n### `release`\n\n[View source](https://github.com/tensorflow/federated/blob/v0.87.0\nVersion 2.0, January 2004\nLicensed under the Apache License, Version 2.0 (the) \n\n release(\n value, key\n )\n\nReleases `value` from a federated program.\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ||\n|---------|------------------------------------------------------------------------------------------|\n| `value` | A [`tff.program.ReleasableStructure`](../../tff/program#ReleasableStructure) to release. |\n| `key` | Used to reference (in the file system) the released `value`. |\n\n\u003cbr /\u003e"]]