View source on GitHub |
Gets filepaths for different workers to resolve conflict of MWMS.
tfr.keras.strategy_utils.get_output_filepath(
filepath: str, strategy: Optional[tf.distribute.Strategy]
) -> str
Example usage:
strategy = get_strategy("MultiWorkerMirroredStrategy")
worker_filepath = get_output_filepath("model/", strategy)
Args | |
---|---|
filepath
|
Path to output model files. |
strategy
|
Distributed training strategy is used. |
Returns | |
---|---|
Output path that is compatible with strategy and the specific worker. |