panahiparham / ml-experiment-definition

MIT License
2 stars 3 forks source link

Consistent ordering for configurations #11

Closed panahiparham closed 1 month ago

panahiparham commented 1 month ago

In #9 there is a discussion to add functionality to guarantee the order of configuration. One obvious benefit is easier testing and PyExpUtils also preserves ordering. Should we do it here as well?

yasuiniko commented 1 month ago

Is this about the order of properties in the configuration dictionary, or about the mapping between id numbers and configurations?

panahiparham commented 1 month ago

Note this assertion in one of the tests assumes get_configs returning configurations in a particular order, but this is not currently implemented in get_configs

https://github.com/panahiparham/ml-experiment-definition/blob/5b42a4088de265cae8b4ee56e1df8f3b74d397d5/tests/test_ExperimentDefinition.py#L38

panahiparham commented 1 month ago

Order is already consistent because of this:

https://github.com/panahiparham/ml-experiment-definition/blob/5b42a4088de265cae8b4ee56e1df8f3b74d397d5/ml_experiment/ExperimentDefinition.py#L35C34-L35C44