Skip to content

Conversation

benjamc
Copy link
Collaborator

@benjamc benjamc commented Jul 15, 2025

#1241 plus some flake fixes

Actual Results

Config selector cannot find new configurations.

Reason

Configs are added to the runhistory twice because the runhistory sees the configs with different types but same values as distinct.

Fix

Convert all config values to built-in python types via json serialization.

@benjamc benjamc added this to the v2.4 milestone Jul 15, 2025
@benjamc benjamc marked this pull request as ready for review July 15, 2025 12:13
Config with only pure python types.
"""
config_values = list(dict(config).values())
config_values = json.loads(json.dumps(config_values, cls=NumpyEncoder))
Copy link
Contributor

@dengdifan dengdifan Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we directly call

config_dict=json.loads(json.dumps(config, cls=NumpyEncoder))
config=Configuration(configuration_space=config.config_space, values=config_dict))

?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

[Bug] Configs with different types (numpy vs native) are counted double
2 participants