Skip to content

Commit

Permalink
feat: remove name from assetProjectModels query (#1777)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hervé <[email protected]>
  • Loading branch information
HNicolas and Nicolas Hervé authored Sep 27, 2024
1 parent 54ab49c commit 5fa375d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/kili/llm/services/export/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

ASSET_NEEDED_FIELDS = [
"assetProjectModels.id",
"assetProjectModels.projectModelId",
"assetProjectModels.configuration",
"assetProjectModels.name",
"content",
"externalId",
"jsonMetadata",
Expand Down Expand Up @@ -254,7 +254,7 @@ def _format_models_object(models, obfuscated_models):
for model in models:
model_configuration = {
"id": model["id"],
"name": model["name"],
"projectModelId": model["projectModelId"],
"configuration": model["configuration"],
}
res[obfuscated_models[model["id"]]] = model_configuration
Expand Down
32 changes: 16 additions & 16 deletions tests/unit/llm/services/export/test_dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@
"assetProjectModels": [
{
"id": "clzief6pr003c7tc99680e8yj",
"name": "ProjectModelA",
"configuration": {"temperature": 1, "model": "auto"},
"projectModelId": "ProjectModelA",
"configuration": {"temperature": 1, "model": "my-model-1"},
},
{
"id": "clzief6ps003d7tc9fzgj2xkf",
"name": "ProjectModelB",
"configuration": {"temperature": 0.5, "model": "auto"},
"projectModelId": "ProjectModelB",
"configuration": {"temperature": 0.5, "model": "my-model-2"},
},
],
"externalId": "clzief6pg003a7tc9cn0p1obf",
Expand Down Expand Up @@ -242,19 +242,19 @@
"models": {
"A": {
"configuration": {
"model": "auto",
"model": "my-model-1",
"temperature": 1,
},
"id": "clzief6pr003c7tc99680e8yj",
"name": "ProjectModelA",
"projectModelId": "ProjectModelA",
},
"B": {
"configuration": {
"model": "auto",
"model": "my-model-2",
"temperature": 0.5,
},
"id": "clzief6ps003d7tc9fzgj2xkf",
"name": "ProjectModelB",
"projectModelId": "ProjectModelB",
},
},
"labels": [
Expand Down Expand Up @@ -310,19 +310,19 @@
"models": {
"A": {
"configuration": {
"model": "auto",
"model": "my-model-1",
"temperature": 1,
},
"id": "clzief6pr003c7tc99680e8yj",
"name": "ProjectModelA",
"projectModelId": "ProjectModelA",
},
"B": {
"configuration": {
"model": "auto",
"model": "my-model-2",
"temperature": 0.5,
},
"id": "clzief6ps003d7tc9fzgj2xkf",
"name": "ProjectModelB",
"projectModelId": "ProjectModelB",
},
},
"labels": [
Expand Down Expand Up @@ -392,19 +392,19 @@
"models": {
"A": {
"configuration": {
"model": "auto",
"model": "my-model-1",
"temperature": 1,
},
"id": "clzief6pr003c7tc99680e8yj",
"name": "ProjectModelA",
"projectModelId": "ProjectModelA",
},
"B": {
"configuration": {
"model": "auto",
"model": "my-model-2",
"temperature": 0.5,
},
"id": "clzief6ps003d7tc9fzgj2xkf",
"name": "ProjectModelB",
"projectModelId": "ProjectModelB",
},
},
"labels": [
Expand Down

0 comments on commit 5fa375d

Please sign in to comment.