Skip to content

Commit 781a1d0

Browse files
Steve Mandalafacebook-github-bot
Steve Mandala
authored andcommitted
Expose properties column in SQATrial
Summary: In MLHub, we use the properties column to store additional metadata on trials. We via access this via our custom MLHubDecoder, but we need to expose this column via SQA first. Reviewed By: lena-kashtelyan Differential Revision: D21064787 fbshipit-source-id: ba12059fdd08f7e93d6b19ee813831954b8f5f75
1 parent 53fc18b commit 781a1d0

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ax/storage/sqa_store/sqa_classes.py

+1
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ class SQATrial(Base):
292292
time_run_started: Optional[datetime] = Column(IntTimestamp)
293293
trial_type: Optional[str] = Column(String(NAME_OR_TYPE_FIELD_LENGTH))
294294
generation_step_index: Optional[int] = Column(Integer)
295+
properties: Optional[Dict[str, Any]] = Column(JSONEncodedTextDict, default={})
295296

296297
# relationships
297298
# Trials and experiments are mutable, so the children relationships need

ax/storage/sqa_store/tests/utils.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
"num_arms_created": "num_arms_created",
217217
},
218218
python_only=["experiment", "status_quo", "status_quo_weight_override"],
219-
encoded_only=["is_batch", "status_quo_name", "deployed_name"],
219+
encoded_only=["is_batch", "status_quo_name", "deployed_name", "properties"],
220220
),
221221
"BraninObjective": EncodeDecodeFieldsMap(
222222
python_only=["metric"],
@@ -434,6 +434,7 @@
434434
"status_quo_name",
435435
"deployed_name",
436436
"optimize_for_power",
437+
"properties",
437438
],
438439
),
439440
}

0 commit comments

Comments
 (0)