Ax icon indicating copy to clipboard operation
Ax copied to clipboard

Make parameters ordered in SearchSpace

Open esantorella opened this issue 1 year ago • 2 comments

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

esantorella avatar Oct 01 '24 12:10 esantorella

This pull request was exported from Phabricator. Differential Revision: D63641392

facebook-github-bot avatar Oct 01 '24 12:10 facebook-github-bot

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.

codecov-commenter avatar Oct 01 '24 13:10 codecov-commenter

abandoned

saitcakmak avatar Aug 07 '25 14:08 saitcakmak