Skip to content

Commit cb98def

Browse files
authored
Merge branch 'develop' into kjamrozy/ptdt-4605
2 parents dd790a7 + c5025f1 commit cb98def

File tree

3 files changed

+4
-25
lines changed

3 files changed

+4
-25
lines changed

libs/labelbox/src/labelbox/schema/foundry/foundry_client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ def _create_app(self, app: App) -> App:
1818
$name: String!, $modelId: ID!, $ontologyId: ID!, $description: String, $inferenceParams: Json!, $classToSchemaId: Json!
1919
){{
2020
createModelFoundryApp(input: {{
21-
name: $name
22-
modelId: $modelId
21+
name: $name
22+
modelId: $modelId
2323
ontologyId: $ontologyId
2424
description: $description
2525
inferenceParams: $inferenceParams
@@ -89,6 +89,7 @@ def run_app(
8989
"classToSchemaId": app.class_to_schema_id,
9090
"inferenceParams": app.inference_params,
9191
"ontologyId": app.ontology_id,
92+
"modelAppId": app.id,
9293
}
9394

9495
data_rows_key = (

libs/labelbox/src/labelbox/schema/model_run.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class ModelRun(DbObject):
5656
created_by_id = Field.String("created_by_id", "createdBy")
5757
model_id = Field.String("model_id")
5858
training_metadata = Field.Json("training_metadata")
59+
model_app_id = Field.String("model_app_id")
5960

6061
class Status(Enum):
6162
EXPORTING_DATA = "EXPORTING_DATA"

libs/labelbox/tests/integration/test_api_keys.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -227,26 +227,3 @@ def test_create_api_key_invalid_time_unit(client):
227227
time_unit="days", # String instead of TimeUnit enum
228228
)
229229
assert "valid TimeUnit" in str(excinfo.value)
230-
231-
232-
@pytest.mark.skipif(
233-
condition=os.environ["LABELBOX_TEST_ENVIRON"] == "prod",
234-
reason="Accounts with admin permission can create API keys",
235-
)
236-
def test_create_api_key_insufficient_permissions(client):
237-
"""Test that creating an API key fails when the user has insufficient permissions."""
238-
user_email = client.get_user().email
239-
240-
if client.get_user().org_role().name != "Admin":
241-
# Attempt to create another API key using the limited permissions client
242-
# This should fail due to insufficient permissions
243-
with pytest.raises(LabelboxError) as excinfo:
244-
client.create_api_key(
245-
name=f"Test Key {uuid.uuid4()}",
246-
user=user_email,
247-
role="Admin",
248-
validity=5,
249-
time_unit=TimeUnit.MINUTE,
250-
)
251-
252-
assert "192" in str(excinfo.value)

0 commit comments

Comments
 (0)