Commit 358c4c6
Fix metric_config_summary_df for scalarized objectives (facebook#5061)
Summary:
Pull Request resolved: facebook#5061
The `metric_config_summary_df` method in `Experiment` crashes when using
scalarized objectives because the `else` branch calls `sub_obj.minimize`,
which raises `UserInputError` for scalarized objectives.
Add an `elif objective.is_scalarized_objective:` branch that iterates
`objective.metric_weights` and sets per-metric goal using `weight < 0`.
Reviewed By: dme65
Differential Revision: D97122953
fbshipit-source-id: 8829b930426489cc98aebfd6b08fd60ed3dcd6d31 parent 4b2905b commit 358c4c6
2 files changed
Lines changed: 33 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2215 | 2215 | | |
2216 | 2216 | | |
2217 | 2217 | | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
2218 | 2230 | | |
2219 | | - | |
2220 | | - | |
2221 | | - | |
| 2231 | + | |
2222 | 2232 | | |
2223 | 2233 | | |
2224 | | - | |
| 2234 | + | |
2225 | 2235 | | |
2226 | 2236 | | |
2227 | 2237 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1625 | 1625 | | |
1626 | 1626 | | |
1627 | 1627 | | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
| 1633 | + | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
1628 | 1647 | | |
1629 | 1648 | | |
1630 | 1649 | | |
| |||
0 commit comments