facebook / Ax

Adaptive Experimentation Platform
https://ax.dev
MIT License
2.35k stars 303 forks source link

Do not error out with missing model_state_after_gen in _extract_model_state_after_gen #2797

Closed saitcakmak closed 2 days ago

saitcakmak commented 2 days ago

Summary: GeneratorRun._model_state_after_gen is an optional field. _extract_model_state_after_gen would previously error out of it wasn't specified, which could lead to GenerationNode.fit erroring out for no good reason. This diff updates _extract_model_state_after_gen to return and empty dict if `GeneratorRun._model_state_after_gen is None.

Reviewed By: Balandat

Differential Revision: D63544406

facebook-github-bot commented 2 days ago

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

codecov-commenter commented 2 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.68%. Comparing base (6899783) to head (00eafe9).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2797 +/- ## ======================================= Coverage 95.68% 95.68% ======================================= Files 488 488 Lines 47984 47996 +12 ======================================= + Hits 45914 45926 +12 Misses 2070 2070 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

facebook-github-bot commented 2 days ago

This pull request has been merged in facebook/Ax@d66814a3076c16fc8456e65cc370b2bd53a70b0e.