Remove the hard dependency of distribute_coordinator.CoordinatorMode in keras.
PiperOrigin-RevId: 339311858 Change-Id: Ie943fe2e9ff32c20be49e2c88a908c614386ccd4
This commit is contained in:
parent
5b768f5917
commit
a9c9fff285
@ -6513,7 +6513,7 @@ def configure_and_create_distributed_session(distribution_strategy):
|
|||||||
dc.run_distribute_coordinator(
|
dc.run_distribute_coordinator(
|
||||||
_create_session,
|
_create_session,
|
||||||
distribution_strategy,
|
distribution_strategy,
|
||||||
mode=dc.CoordinatorMode.INDEPENDENT_WORKER)
|
mode='independent_worker')
|
||||||
else:
|
else:
|
||||||
_create_session(distribution_strategy)
|
_create_session(distribution_strategy)
|
||||||
|
|
||||||
|
@ -777,7 +777,7 @@ def _train_with_multi_worker(method):
|
|||||||
return dc.run_distribute_coordinator(
|
return dc.run_distribute_coordinator(
|
||||||
_worker_fn,
|
_worker_fn,
|
||||||
model._distribution_strategy,
|
model._distribution_strategy,
|
||||||
mode=dc.CoordinatorMode.INDEPENDENT_WORKER)
|
mode='independent_worker')
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user