Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions labelbox/schema/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Task(DbObject):
result_url = Field.String("result_url", "result")
errors_url = Field.String("errors_url", "errors")
type = Field.String("type")
metadata = Field.Json("metadata")
_user: Optional["User"] = None

# Relationships
Expand Down
11 changes: 11 additions & 0 deletions tests/integration/test_foundry.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ def test_run_foundry_app_with_global_key(foundry_client, data_row, app,
assert task.status == 'COMPLETE'


def test_run_foundry_app_returns_model_run_id(foundry_client, data_row, app):
data_rows = lb.GlobalKeys([data_row.global_key])
task = foundry_client.run_app(
model_run_name=f"test-app-with-global-key-{random_str}",
data_rows=data_rows,
app_id=app.id)
model_run_id = task.metadata['modelRunId']
model_run = foundry_client.client.get_model_run(model_run_id)
assert model_run.uid == model_run_id


def test_run_foundry_app_with_non_existent_data_rows(foundry_client, data_row,
app, random_str):
data_rows = lb.GlobalKeys([data_row.global_key, "non-existent-global-key"])
Expand Down