Commit 6d78f18
Fix ValueError in FillMissingParameters with empty experiment data
Summary:
`FillMissingParameters.transform_experiment_data` crashes with
`ValueError: Columns must be same length as key` when `arm_data` has
zero rows (e.g., during initial Sobol trial generation before any
trials have completed).
This happens because `DataFrame.apply(func, axis=1)` on an empty
DataFrame returns an empty DataFrame rather than an empty Series.
Assigning that DataFrame to a single column then fails.
Replace `arm_data.apply(...)` with a list comprehension over
`arm_data.iterrows()`, which correctly produces an empty list for
empty DataFrames.
Failing run: https://www.internalfb.com/mlhub/flow/1044918711/overview
Differential Revision: D952660271 parent 1cd0b89 commit 6d78f18
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments