Ax
Ax copied to clipboard
Make parameters ordered in SearchSpace
Summary:
This PR: Changes SearchSpace.parameters from a dict to an OrderedDict.
Context: In benchmarking, the order of parameters matters because parameters can be converted to a tensor. In the current Python version, this should work even without using OrderedDict because dicts are insertion-ordered, but this isn't an officially supported language feature or guaranteed to last.
One downside is that by annotating the parameters as an OrderedDict, we can't also annotate them as an immutable Mapping. For now, this is fine, because the parameters are mutated, so we can't annotate them as immutable anyway.
Differential Revision: D63641392
This pull request was exported from Phabricator. Differential Revision: D63641392
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.70%. Comparing base (
77123e2) to head (1a8b124).
Additional details and impacted files
@@ Coverage Diff @@
## main #2806 +/- ##
=======================================
Coverage 95.70% 95.70%
=======================================
Files 490 490
Lines 48527 48528 +1
=======================================
+ Hits 46445 46446 +1
Misses 2082 2082
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
abandoned