You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fcad1fb
Browse filesBrowse the repository at this point in the historyBrowse files
Study trials must carry their hyperparameter values and the optimization
engine's trial ID, and ESS must reject values outside the study's search
space before they reach a workload.
- API: immutable WorkUnit.parameters (google.protobuf.Struct) and
WorkUnit.trial_id.
- Storage: migration 020 adds nullable WorkUnits.Parameters (proto
bytes, no proto bundle change) and TrialId on Spanner and PostgreSQL;
converters write them and every read path returns them, including the
paused-task joins.
- Validation: BatchCreateWorkUnits requires trial_id (at most 128
printable bytes) and parameters with exactly one feasible value per
study_config parameter, and rejects duplicate trial IDs within a
batch; CreateWorkUnit rejects both fields.
- Docs: ESS README STUDY section and the batch create flow.
BUG=b/558652203
TAG=agy
CONV=4b859498-5191-4c6a-9c79-00403f7cb8ae
([`internal/workunit/createworkunit.go`](../../internal/workunit/createworkunit.go)), and rejects
119
+
`parameters` and `trial_id` with `INVALID_ARGUMENT`.
119
120
120
121
#### Creating Trials: `BatchCreateWorkUnits`
121
122
@@ -133,17 +134,19 @@ experiment's largest work unit ID. ESS checks, in order
133
134
| The caller's verified email equals the `hpo` component parameter `studyControllerServiceAccount` (ASCII case-insensitive). XID ACLs are not consulted. A missing `hpo` component or an empty parameter rejects every caller. This check runs before the experiment is read or the payload is validated. |`PERMISSION_DENIED`|
134
135
| The experiment exists. |`NOT_FOUND`|
135
136
| The experiment is a `STUDY`; other types are not supported yet. |`UNIMPLEMENTED`|
136
-
| The request holds 1 to 500 requests, and each work unit is valid, as for `CreateWorkUnit`. |`INVALID_ARGUMENT`|
137
+
| The request holds 1 to 500 requests, each work unit is valid, as for `CreateWorkUnit`, and trial IDs are unique in the batch. |`INVALID_ARGUMENT`|
138
+
| Each work unit has a `trial_id` (at most 128 bytes, printable) and `parameters` with exactly one feasible value per `study_config` parameter: a finite number in range for `DOUBLE`, an integral one for `INTEGER`, one of the values for `DISCRETE`, and one of the category strings for `CATEGORICAL`. |`INVALID_ARGUMENT`|
137
139
138
140
ESS then writes all work units in one transaction
139
141
([`internal/workunit/batchcreateworkunits.go`](../../internal/workunit/batchcreateworkunits.go)): it
140
142
checks the caller against the `hpo` component again, reads the experiment once, allocates the IDs with a
141
143
single next-ID read, inserts the work units in one write, and updates the experiment's denormalized
142
144
status and resources once. After the commit it records one creation operation per work unit and
143
145
enqueues each creation task. A work unit whose operation or task cannot be created gets the same
144
-
`FATAL` status message as in `CreateWorkUnit`, and the RPC returns `INTERNAL` naming those work units;
145
-
the other work units are scheduled. The work units are already stored, so the study controller must
146
-
not create them again when it retries.
146
+
`FATAL` status message as in `CreateWorkUnit`, and the RPC returns `INTERNAL` naming those work
147
+
units; the other work units are scheduled. Because the trials are already stored, the study
148
+
controller must not create them again when it retries; ESS does not deduplicate `trial_id` across
149
+
batches. `parameters` and `trial_id` are immutable and returned by `GetWorkUnit` and `ListWorkUnits`.
0 commit comments