Importing DingoDataset from within dingo.core.utils was causing a circular import, since the module containing DingoDataset depended on another utility (to obtain the version).
The offending function was dingo.core.utils.dataset_utils.load_data_from_file. Since this was only called once (by dingo.gw.data.data_preparation.load_raw_data) I refactored the former function into the latter. I also had to remove an associated test. Since this part of the inference code is being used less often in favor of dingo_pipe, I did not create a new test to replace it.
In addition, within dingo.core.utils.dataset_utils, the two functions save_dataset and load_dataset were not being used at all, so I removed them. The final function recursive_check_dicts_are_equal was moved to dingo.core.utils.misc, and so the module could be deleted. All tests run successfully now.
Merging now since the code was broken due to the circular import. I did not check that the old inference code continues to work, so it may be worth looking into.
Importing
DingoDataset
from withindingo.core.utils
was causing a circular import, since the module containingDingoDataset
depended on another utility (to obtain the version).The offending function was
dingo.core.utils.dataset_utils.load_data_from_file
. Since this was only called once (bydingo.gw.data.data_preparation.load_raw_data
) I refactored the former function into the latter. I also had to remove an associated test. Since this part of the inference code is being used less often in favor of dingo_pipe, I did not create a new test to replace it.In addition, within
dingo.core.utils.dataset_utils
, the two functionssave_dataset
andload_dataset
were not being used at all, so I removed them. The final functionrecursive_check_dicts_are_equal
was moved todingo.core.utils.misc
, and so the module could be deleted. All tests run successfully now.