tensorflow/models · error · ValueError
Did not pass all values of array: %s
Error message
Did not pass all values of array: %s
What it means
Error "Did not pass all values of array: %s" thrown in tensorflow/models.
Source
Thrown at official/modeling/hyperparams/params_dict.py:453
if len(name_nested) > 1:
grouping = name_nested[0]
if bracketed_index:
value = '.'.join(name_nested[1:]) + bracketed_index + '=' + v
else:
value = '.'.join(name_nested[1:]) + '=' + v
nested_map[grouping].append(value)
else:
formatted_entries.append('%s : %s' % (name, v))
for grouping, value in nested_map.items():
value = ','.join(value)
value = nested_csv_str_to_json_str(value)
formatted_entries.append('%s : %s' % (grouping, value))
# Add array parameters and check that the array is fully initialized.
for name in array_param_map:
if any(v is None for v in array_param_map[name]):
raise ValueError('Did not pass all values of array: %s' % name)
formatted_entries.append('%s : %s' % (name, array_param_map[name]))
return '{' + ', '.join(formatted_entries) + '}'
def override_params_dict(params, dict_or_string_or_yaml_file, is_strict):
"""Override a given ParamsDict using a dict, JSON/YAML/CSV string or YAML file.
The logic of the function is outlined below:
1. Test that the input is a dict. If not, proceed to 2.
2. Tests that the input is a string. If not, raise unknown ValueError
2.1. Test if the string is in a CSV format. If so, parse.
If not, proceed to 2.2.
2.2. Try loading the string as a YAML/JSON. If successful, parse to
dict and use it to override. If not, proceed to 2.3.
2.3. Try using the string as a file path and load the YAML file.
Args:View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/modeling/hyperparams/params_dict.py:453 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/7f260c8a30e479d2.
Report an issue: GitHub.