From f3dd65781809487aa2b967a34fc3eb8b47c6a518 Mon Sep 17 00:00:00 2001 From: Neil Girdhar Date: Thu, 6 Jul 2023 15:09:52 -0400 Subject: [PATCH] Order Space by insertion order Now that dictionaries are ordered by insertion order, sorting lexicographically is not necessary to ensure consistency. --- src/orion/algo/space/__init__.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/orion/algo/space/__init__.py b/src/orion/algo/space/__init__.py index f611bad83..faf1a8dd3 100644 --- a/src/orion/algo/space/__init__.py +++ b/src/orion/algo/space/__init__.py @@ -1152,24 +1152,6 @@ def __repr__(self): dims = list(self.values()) return "Space([{}])".format(",\n ".join(map(str, dims))) - def items(self): - """Return items sorted according to keys""" - # pylint: disable=consider-using-dict-items - return [(k, self[k]) for k in self.keys()] - - def values(self): - """Return values sorted according to keys""" - # pylint: disable=consider-using-dict-items - return [self[k] for k in self.keys()] - - def keys(self): - """Return sorted keys""" - return list(iter(self)) - - def __iter__(self): - """Return sorted keys""" - return iter(sorted(super().keys())) - @property def configuration(self): """Return a dictionary of priors."""