keras-team/keras · error · ValueError
Invalid value for argument `synchronization`. Expected one o
Error message
Invalid value for argument `synchronization`. Expected one of `None`, `'none'`, `'on_read'`, `'on_write'`, `'auto'`. Received: synchronization={synchronization} What it means
Error "Invalid value for argument `synchronization`. Expected one of `None`, `'none'`, `'on_read'`, `'on_write'`, `'auto'`. Received: synchronization={synchronization}" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/common/variables.py:136
"sum",
"only_first_replica",
):
raise ValueError(
"Invalid value for argument `aggregation`. Expected "
"one of `None`, `'none'`, `'mean'`, `'sum'`, "
"`'only_first_replica'`. "
f"Received: aggregation={aggregation}"
)
if aggregation is None:
aggregation = "none"
if synchronization not in (
None,
"none",
"on_read",
"on_write",
"auto",
):
raise ValueError(
"Invalid value for argument `synchronization`. Expected "
"one of `None`, `'none'`, `'on_read'`, `'on_write'`, "
"`'auto'`. "
f"Received: synchronization={synchronization}"
)
if synchronization is None:
synchronization = "none"
self._name = name
parent_path = current_path()
if parent_path:
self._path = f"{parent_path}/{name}"
else:
self._path = name
self._shape = None
self._initializer = None
self._regularizer = None
self._constraint = None
self._trainable = bool(trainable)View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/common/variables.py:136 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/6491ce74d8bcac63.
Report an issue: GitHub.