Order of Hyperparams different on docker container vs. local machine
Generated metadata for a Hyperparameter using Union, such as the following:
sample_learning_data = hyperparams.Hyperparameter[Union[None, int]](
description="Number of elements to sample from learningData dataframe",
default=None,
)
Produces different ordering depending on the environment for both the repr and underlying tuple containing the None and int objects of Union. When running the validation script, which uses a docker container, the resulting metadata that gets saved to JSON is Union[int, NoneType], whereas locally it is Union[NoneType, int].
Note that these are actually equivalent in code (in Python: Union[int, None] == Union[None, int]), but the validation script checks the string that gets loaded from parsing the generated JSON file.
Validation on CI thus fails because the ordering is swapped in the submitted metadata vs. the generated metadata on the docker container on the CI.