Skip to content

Commit 0b98bfc

Browse files
Merge pull request #677 from Labelbox/mmw/AL-3352
Modify get_config return value [AL-3352]
2 parents 2aa0972 + 24352e4 commit 0b98bfc

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22

33
# Version 0.0.0 (YYYY-MM-DD)
4+
### Changed
5+
* `ModelRun.get_config()`
6+
* Modifies get_config to return un-nested Model Run config
47
### Added
58
* `ModelRun.update_config()`
69
* Updates model run training metadata

labelbox/schema/model_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def get_config(self) -> Dict[str, Any]:
310310
}
311311
""", {'modelRunId': self.uid},
312312
experimental=True)
313-
return res["modelRun"]
313+
return res["modelRun"]["trainingMetadata"]
314314

315315
@experimental
316316
def export_labels(

tests/integration/annotation_import/test_model_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_model_run_get_config(model_run_with_training_metadata):
7171
new_config = {"batch_size": 2000}
7272
model_run_with_training_metadata.update_config(new_config)
7373
res = model_run_with_training_metadata.get_config()
74-
assert res["trainingMetadata"]["batch_size"] == new_config["batch_size"]
74+
assert res["batch_size"] == new_config["batch_size"]
7575

7676

7777
def test_model_run_data_rows_delete(client, model_run_with_model_run_data_rows):

0 commit comments

Comments
 (0)