Skip to content

Comments

Fix handling of empty parameters in parameter_overview.#361

Merged
copybara-service[bot] merged 1 commit intomainfrom
test_714884571
Jan 14, 2025
Merged

Fix handling of empty parameters in parameter_overview.#361
copybara-service[bot] merged 1 commit intomainfrom
test_714884571

Conversation

@copybara-service
Copy link

Fix handling of empty parameters in parameter_overview.

The test should not be on whether it is an empty dict, but whether after flattening it is empty.
Without this fix the added test fails with:

  File "../py/clu/parameter_overview.py", line 156, in _get_parameter_rows
    names, values = map(list, tuple(zip(*sorted(params.items()))))
    ^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)

The test should not be on whether it is an empty dict, but whether after flattening it is empty.
Without this fix the added test fails with:

```
  File "../py/clu/parameter_overview.py", line 156, in _get_parameter_rows
    names, values = map(list, tuple(zip(*sorted(params.items()))))
    ^^^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 0)
```
PiperOrigin-RevId: 715237667
@copybara-service copybara-service bot merged commit c139e6a into main Jan 14, 2025
@copybara-service copybara-service bot deleted the test_714884571 branch January 14, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant