crypticorn 2.9.0rc1__py3-none-any.whl → 2.10.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- crypticorn/cli/__init__.py +2 -1
- crypticorn/cli/__main__.py +2 -1
- crypticorn/cli/init.py +20 -8
- crypticorn/cli/templates/merge-env.sh +13 -0
- crypticorn/cli/version.py +7 -0
- crypticorn/common/openapi.py +9 -10
- crypticorn/common/router/admin_router.py +13 -5
- crypticorn/common/router/status_router.py +1 -1
- crypticorn/hive/client/__init__.py +1 -1
- crypticorn/hive/client/api/admin_api.py +30 -27
- crypticorn/hive/client/api/data_api.py +36 -18
- crypticorn/hive/client/api/models_api.py +87 -72
- crypticorn/hive/client/models/__init__.py +1 -1
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/api_error_level.py +1 -1
- crypticorn/hive/client/models/api_error_type.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/{model.py → model_read.py} +3 -3
- {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.0.dist-info}/METADATA +19 -2
- {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.0.dist-info}/RECORD +24 -21
- crypticorn-2.10.0.dist-info/licenses/LICENSE +15 -0
- {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.9.0rc1.dist-info → crypticorn-2.10.0.dist-info}/top_level.txt +0 -0
@@ -21,8 +21,8 @@ from typing import Any, List, Optional
|
|
21
21
|
from typing_extensions import Annotated
|
22
22
|
from crypticorn.hive.client.models.data_version import DataVersion
|
23
23
|
from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
24
|
-
from crypticorn.hive.client.models.model import Model
|
25
24
|
from crypticorn.hive.client.models.model_create import ModelCreate
|
25
|
+
from crypticorn.hive.client.models.model_read import ModelRead
|
26
26
|
from crypticorn.hive.client.models.model_update import ModelUpdate
|
27
27
|
|
28
28
|
from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
|
@@ -57,7 +57,7 @@ class ModelsApi:
|
|
57
57
|
_content_type: Optional[StrictStr] = None,
|
58
58
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
59
59
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
60
|
-
) ->
|
60
|
+
) -> ModelRead:
|
61
61
|
"""Create Model
|
62
62
|
|
63
63
|
Create a new model
|
@@ -95,7 +95,7 @@ class ModelsApi:
|
|
95
95
|
)
|
96
96
|
|
97
97
|
_response_types_map: Dict[str, Optional[str]] = {
|
98
|
-
"201": "
|
98
|
+
"201": "ModelRead",
|
99
99
|
}
|
100
100
|
response_data = await self.api_client.call_api(
|
101
101
|
*_param, _request_timeout=_request_timeout
|
@@ -121,7 +121,7 @@ class ModelsApi:
|
|
121
121
|
_content_type: Optional[StrictStr] = None,
|
122
122
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
123
123
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
124
|
-
) -> ApiResponse[
|
124
|
+
) -> ApiResponse[ModelRead]:
|
125
125
|
"""Create Model
|
126
126
|
|
127
127
|
Create a new model
|
@@ -159,7 +159,7 @@ class ModelsApi:
|
|
159
159
|
)
|
160
160
|
|
161
161
|
_response_types_map: Dict[str, Optional[str]] = {
|
162
|
-
"201": "
|
162
|
+
"201": "ModelRead",
|
163
163
|
}
|
164
164
|
response_data = await self.api_client.call_api(
|
165
165
|
*_param, _request_timeout=_request_timeout
|
@@ -223,7 +223,7 @@ class ModelsApi:
|
|
223
223
|
)
|
224
224
|
|
225
225
|
_response_types_map: Dict[str, Optional[str]] = {
|
226
|
-
"201": "
|
226
|
+
"201": "ModelRead",
|
227
227
|
}
|
228
228
|
response_data = await self.api_client.call_api(
|
229
229
|
*_param, _request_timeout=_request_timeout
|
@@ -297,7 +297,7 @@ class ModelsApi:
|
|
297
297
|
@validate_call
|
298
298
|
async def delete_model(
|
299
299
|
self,
|
300
|
-
id: Annotated[StrictInt, Field(description="
|
300
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
301
301
|
_request_timeout: Union[
|
302
302
|
None,
|
303
303
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -314,7 +314,7 @@ class ModelsApi:
|
|
314
314
|
|
315
315
|
Delete a model
|
316
316
|
|
317
|
-
:param id:
|
317
|
+
:param id: The ID of the model to delete. (required)
|
318
318
|
:type id: int
|
319
319
|
:param _request_timeout: timeout setting for this request. If one
|
320
320
|
number provided, it will be total request
|
@@ -361,7 +361,7 @@ class ModelsApi:
|
|
361
361
|
@validate_call
|
362
362
|
async def delete_model_with_http_info(
|
363
363
|
self,
|
364
|
-
id: Annotated[StrictInt, Field(description="
|
364
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
365
365
|
_request_timeout: Union[
|
366
366
|
None,
|
367
367
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -378,7 +378,7 @@ class ModelsApi:
|
|
378
378
|
|
379
379
|
Delete a model
|
380
380
|
|
381
|
-
:param id:
|
381
|
+
:param id: The ID of the model to delete. (required)
|
382
382
|
:type id: int
|
383
383
|
:param _request_timeout: timeout setting for this request. If one
|
384
384
|
number provided, it will be total request
|
@@ -425,7 +425,7 @@ class ModelsApi:
|
|
425
425
|
@validate_call
|
426
426
|
async def delete_model_without_preload_content(
|
427
427
|
self,
|
428
|
-
id: Annotated[StrictInt, Field(description="
|
428
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to delete.")],
|
429
429
|
_request_timeout: Union[
|
430
430
|
None,
|
431
431
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -442,7 +442,7 @@ class ModelsApi:
|
|
442
442
|
|
443
443
|
Delete a model
|
444
444
|
|
445
|
-
:param id:
|
445
|
+
:param id: The ID of the model to delete. (required)
|
446
446
|
:type id: int
|
447
447
|
:param _request_timeout: timeout setting for this request. If one
|
448
448
|
number provided, it will be total request
|
@@ -539,10 +539,15 @@ class ModelsApi:
|
|
539
539
|
@validate_call
|
540
540
|
async def evaluate_model(
|
541
541
|
self,
|
542
|
-
id: Annotated[
|
542
|
+
id: Annotated[
|
543
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
544
|
+
],
|
543
545
|
request_body: List[Any],
|
544
546
|
version: Annotated[
|
545
|
-
Optional[DataVersion],
|
547
|
+
Optional[DataVersion],
|
548
|
+
Field(
|
549
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
550
|
+
),
|
546
551
|
] = None,
|
547
552
|
_request_timeout: Union[
|
548
553
|
None,
|
@@ -558,13 +563,13 @@ class ModelsApi:
|
|
558
563
|
) -> EvaluationResponse:
|
559
564
|
"""Evaluate Model
|
560
565
|
|
561
|
-
Evaluate a model's predictions
|
566
|
+
Evaluate a model's predictions against the internal `y_test` data. Returns metrics based on the type of the model.
|
562
567
|
|
563
|
-
:param id:
|
568
|
+
:param id: The ID of the model you want to evaluate. (required)
|
564
569
|
:type id: int
|
565
570
|
:param request_body: (required)
|
566
571
|
:type request_body: List[object]
|
567
|
-
:param version: Data version to
|
572
|
+
:param version: Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing.
|
568
573
|
:type version: DataVersion
|
569
574
|
:param _request_timeout: timeout setting for this request. If one
|
570
575
|
number provided, it will be total request
|
@@ -613,10 +618,15 @@ class ModelsApi:
|
|
613
618
|
@validate_call
|
614
619
|
async def evaluate_model_with_http_info(
|
615
620
|
self,
|
616
|
-
id: Annotated[
|
621
|
+
id: Annotated[
|
622
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
623
|
+
],
|
617
624
|
request_body: List[Any],
|
618
625
|
version: Annotated[
|
619
|
-
Optional[DataVersion],
|
626
|
+
Optional[DataVersion],
|
627
|
+
Field(
|
628
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
629
|
+
),
|
620
630
|
] = None,
|
621
631
|
_request_timeout: Union[
|
622
632
|
None,
|
@@ -632,13 +642,13 @@ class ModelsApi:
|
|
632
642
|
) -> ApiResponse[EvaluationResponse]:
|
633
643
|
"""Evaluate Model
|
634
644
|
|
635
|
-
Evaluate a model's predictions
|
645
|
+
Evaluate a model's predictions against the internal `y_test` data. Returns metrics based on the type of the model.
|
636
646
|
|
637
|
-
:param id:
|
647
|
+
:param id: The ID of the model you want to evaluate. (required)
|
638
648
|
:type id: int
|
639
649
|
:param request_body: (required)
|
640
650
|
:type request_body: List[object]
|
641
|
-
:param version: Data version to
|
651
|
+
:param version: Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing.
|
642
652
|
:type version: DataVersion
|
643
653
|
:param _request_timeout: timeout setting for this request. If one
|
644
654
|
number provided, it will be total request
|
@@ -687,10 +697,15 @@ class ModelsApi:
|
|
687
697
|
@validate_call
|
688
698
|
async def evaluate_model_without_preload_content(
|
689
699
|
self,
|
690
|
-
id: Annotated[
|
700
|
+
id: Annotated[
|
701
|
+
StrictInt, Field(description="The ID of the model you want to evaluate.")
|
702
|
+
],
|
691
703
|
request_body: List[Any],
|
692
704
|
version: Annotated[
|
693
|
-
Optional[DataVersion],
|
705
|
+
Optional[DataVersion],
|
706
|
+
Field(
|
707
|
+
description="Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing."
|
708
|
+
),
|
694
709
|
] = None,
|
695
710
|
_request_timeout: Union[
|
696
711
|
None,
|
@@ -706,13 +721,13 @@ class ModelsApi:
|
|
706
721
|
) -> RESTResponseType:
|
707
722
|
"""Evaluate Model
|
708
723
|
|
709
|
-
Evaluate a model's predictions
|
724
|
+
Evaluate a model's predictions against the internal `y_test` data. Returns metrics based on the type of the model.
|
710
725
|
|
711
|
-
:param id:
|
726
|
+
:param id: The ID of the model you want to evaluate. (required)
|
712
727
|
:type id: int
|
713
728
|
:param request_body: (required)
|
714
729
|
:type request_body: List[object]
|
715
|
-
:param version: Data version to
|
730
|
+
:param version: Data version for evaluation. Defaults to latest public version. Using older versions won't affect leaderboard rankings but can be useful for additional model testing.
|
716
731
|
:type version: DataVersion
|
717
732
|
:param _request_timeout: timeout setting for this request. If one
|
718
733
|
number provided, it will be total request
|
@@ -831,7 +846,7 @@ class ModelsApi:
|
|
831
846
|
@validate_call
|
832
847
|
async def get_model(
|
833
848
|
self,
|
834
|
-
id: Annotated[StrictInt, Field(description="
|
849
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
835
850
|
_request_timeout: Union[
|
836
851
|
None,
|
837
852
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -843,12 +858,12 @@ class ModelsApi:
|
|
843
858
|
_content_type: Optional[StrictStr] = None,
|
844
859
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
845
860
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
846
|
-
) ->
|
861
|
+
) -> ModelRead:
|
847
862
|
"""Get Model
|
848
863
|
|
849
864
|
Get a model by ID
|
850
865
|
|
851
|
-
:param id:
|
866
|
+
:param id: The ID of the model to retrieve. (required)
|
852
867
|
:type id: int
|
853
868
|
:param _request_timeout: timeout setting for this request. If one
|
854
869
|
number provided, it will be total request
|
@@ -881,7 +896,7 @@ class ModelsApi:
|
|
881
896
|
)
|
882
897
|
|
883
898
|
_response_types_map: Dict[str, Optional[str]] = {
|
884
|
-
"200": "
|
899
|
+
"200": "ModelRead",
|
885
900
|
}
|
886
901
|
response_data = await self.api_client.call_api(
|
887
902
|
*_param, _request_timeout=_request_timeout
|
@@ -895,7 +910,7 @@ class ModelsApi:
|
|
895
910
|
@validate_call
|
896
911
|
async def get_model_with_http_info(
|
897
912
|
self,
|
898
|
-
id: Annotated[StrictInt, Field(description="
|
913
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
899
914
|
_request_timeout: Union[
|
900
915
|
None,
|
901
916
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -907,12 +922,12 @@ class ModelsApi:
|
|
907
922
|
_content_type: Optional[StrictStr] = None,
|
908
923
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
909
924
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
910
|
-
) -> ApiResponse[
|
925
|
+
) -> ApiResponse[ModelRead]:
|
911
926
|
"""Get Model
|
912
927
|
|
913
928
|
Get a model by ID
|
914
929
|
|
915
|
-
:param id:
|
930
|
+
:param id: The ID of the model to retrieve. (required)
|
916
931
|
:type id: int
|
917
932
|
:param _request_timeout: timeout setting for this request. If one
|
918
933
|
number provided, it will be total request
|
@@ -945,7 +960,7 @@ class ModelsApi:
|
|
945
960
|
)
|
946
961
|
|
947
962
|
_response_types_map: Dict[str, Optional[str]] = {
|
948
|
-
"200": "
|
963
|
+
"200": "ModelRead",
|
949
964
|
}
|
950
965
|
response_data = await self.api_client.call_api(
|
951
966
|
*_param, _request_timeout=_request_timeout
|
@@ -959,7 +974,7 @@ class ModelsApi:
|
|
959
974
|
@validate_call
|
960
975
|
async def get_model_without_preload_content(
|
961
976
|
self,
|
962
|
-
id: Annotated[StrictInt, Field(description="
|
977
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to retrieve.")],
|
963
978
|
_request_timeout: Union[
|
964
979
|
None,
|
965
980
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -976,7 +991,7 @@ class ModelsApi:
|
|
976
991
|
|
977
992
|
Get a model by ID
|
978
993
|
|
979
|
-
:param id:
|
994
|
+
:param id: The ID of the model to retrieve. (required)
|
980
995
|
:type id: int
|
981
996
|
:param _request_timeout: timeout setting for this request. If one
|
982
997
|
number provided, it will be total request
|
@@ -1009,7 +1024,7 @@ class ModelsApi:
|
|
1009
1024
|
)
|
1010
1025
|
|
1011
1026
|
_response_types_map: Dict[str, Optional[str]] = {
|
1012
|
-
"200": "
|
1027
|
+
"200": "ModelRead",
|
1013
1028
|
}
|
1014
1029
|
response_data = await self.api_client.call_api(
|
1015
1030
|
*_param, _request_timeout=_request_timeout
|
@@ -1073,7 +1088,7 @@ class ModelsApi:
|
|
1073
1088
|
@validate_call
|
1074
1089
|
async def get_model_by_name(
|
1075
1090
|
self,
|
1076
|
-
name: Annotated[StrictStr, Field(description="
|
1091
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1077
1092
|
_request_timeout: Union[
|
1078
1093
|
None,
|
1079
1094
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1085,12 +1100,12 @@ class ModelsApi:
|
|
1085
1100
|
_content_type: Optional[StrictStr] = None,
|
1086
1101
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1087
1102
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1088
|
-
) ->
|
1103
|
+
) -> ModelRead:
|
1089
1104
|
"""Get Model By Name
|
1090
1105
|
|
1091
1106
|
Get a model by name
|
1092
1107
|
|
1093
|
-
:param name:
|
1108
|
+
:param name: The name of the model to get. (required)
|
1094
1109
|
:type name: str
|
1095
1110
|
:param _request_timeout: timeout setting for this request. If one
|
1096
1111
|
number provided, it will be total request
|
@@ -1123,7 +1138,7 @@ class ModelsApi:
|
|
1123
1138
|
)
|
1124
1139
|
|
1125
1140
|
_response_types_map: Dict[str, Optional[str]] = {
|
1126
|
-
"200": "
|
1141
|
+
"200": "ModelRead",
|
1127
1142
|
}
|
1128
1143
|
response_data = await self.api_client.call_api(
|
1129
1144
|
*_param, _request_timeout=_request_timeout
|
@@ -1137,7 +1152,7 @@ class ModelsApi:
|
|
1137
1152
|
@validate_call
|
1138
1153
|
async def get_model_by_name_with_http_info(
|
1139
1154
|
self,
|
1140
|
-
name: Annotated[StrictStr, Field(description="
|
1155
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1141
1156
|
_request_timeout: Union[
|
1142
1157
|
None,
|
1143
1158
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1149,12 +1164,12 @@ class ModelsApi:
|
|
1149
1164
|
_content_type: Optional[StrictStr] = None,
|
1150
1165
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1151
1166
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1152
|
-
) -> ApiResponse[
|
1167
|
+
) -> ApiResponse[ModelRead]:
|
1153
1168
|
"""Get Model By Name
|
1154
1169
|
|
1155
1170
|
Get a model by name
|
1156
1171
|
|
1157
|
-
:param name:
|
1172
|
+
:param name: The name of the model to get. (required)
|
1158
1173
|
:type name: str
|
1159
1174
|
:param _request_timeout: timeout setting for this request. If one
|
1160
1175
|
number provided, it will be total request
|
@@ -1187,7 +1202,7 @@ class ModelsApi:
|
|
1187
1202
|
)
|
1188
1203
|
|
1189
1204
|
_response_types_map: Dict[str, Optional[str]] = {
|
1190
|
-
"200": "
|
1205
|
+
"200": "ModelRead",
|
1191
1206
|
}
|
1192
1207
|
response_data = await self.api_client.call_api(
|
1193
1208
|
*_param, _request_timeout=_request_timeout
|
@@ -1201,7 +1216,7 @@ class ModelsApi:
|
|
1201
1216
|
@validate_call
|
1202
1217
|
async def get_model_by_name_without_preload_content(
|
1203
1218
|
self,
|
1204
|
-
name: Annotated[StrictStr, Field(description="
|
1219
|
+
name: Annotated[StrictStr, Field(description="The name of the model to get.")],
|
1205
1220
|
_request_timeout: Union[
|
1206
1221
|
None,
|
1207
1222
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1218,7 +1233,7 @@ class ModelsApi:
|
|
1218
1233
|
|
1219
1234
|
Get a model by name
|
1220
1235
|
|
1221
|
-
:param name:
|
1236
|
+
:param name: The name of the model to get. (required)
|
1222
1237
|
:type name: str
|
1223
1238
|
:param _request_timeout: timeout setting for this request. If one
|
1224
1239
|
number provided, it will be total request
|
@@ -1251,7 +1266,7 @@ class ModelsApi:
|
|
1251
1266
|
)
|
1252
1267
|
|
1253
1268
|
_response_types_map: Dict[str, Optional[str]] = {
|
1254
|
-
"200": "
|
1269
|
+
"200": "ModelRead",
|
1255
1270
|
}
|
1256
1271
|
response_data = await self.api_client.call_api(
|
1257
1272
|
*_param, _request_timeout=_request_timeout
|
@@ -1318,13 +1333,13 @@ class ModelsApi:
|
|
1318
1333
|
by_user: Annotated[
|
1319
1334
|
Optional[StrictBool],
|
1320
1335
|
Field(
|
1321
|
-
description="Whether to get models by user. Else all models are returned."
|
1336
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
1322
1337
|
),
|
1323
1338
|
] = None,
|
1324
1339
|
user_id: Annotated[
|
1325
1340
|
Optional[StrictStr],
|
1326
1341
|
Field(
|
1327
|
-
description="
|
1342
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
1328
1343
|
),
|
1329
1344
|
] = None,
|
1330
1345
|
_request_timeout: Union[
|
@@ -1338,14 +1353,14 @@ class ModelsApi:
|
|
1338
1353
|
_content_type: Optional[StrictStr] = None,
|
1339
1354
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1340
1355
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1341
|
-
) -> List[
|
1356
|
+
) -> List[ModelRead]:
|
1342
1357
|
"""Get All Models
|
1343
1358
|
|
1344
1359
|
List all models
|
1345
1360
|
|
1346
|
-
:param by_user: Whether to get models by user. Else all models are returned.
|
1361
|
+
:param by_user: Whether to get models by a specific user. Else all models are returned.
|
1347
1362
|
:type by_user: bool
|
1348
|
-
:param user_id:
|
1363
|
+
:param user_id: The ID of the user to get models for. Only used if `by_user` is true. Default is current user.
|
1349
1364
|
:type user_id: str
|
1350
1365
|
:param _request_timeout: timeout setting for this request. If one
|
1351
1366
|
number provided, it will be total request
|
@@ -1379,7 +1394,7 @@ class ModelsApi:
|
|
1379
1394
|
)
|
1380
1395
|
|
1381
1396
|
_response_types_map: Dict[str, Optional[str]] = {
|
1382
|
-
"200": "List[
|
1397
|
+
"200": "List[ModelRead]",
|
1383
1398
|
}
|
1384
1399
|
response_data = await self.api_client.call_api(
|
1385
1400
|
*_param, _request_timeout=_request_timeout
|
@@ -1396,13 +1411,13 @@ class ModelsApi:
|
|
1396
1411
|
by_user: Annotated[
|
1397
1412
|
Optional[StrictBool],
|
1398
1413
|
Field(
|
1399
|
-
description="Whether to get models by user. Else all models are returned."
|
1414
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
1400
1415
|
),
|
1401
1416
|
] = None,
|
1402
1417
|
user_id: Annotated[
|
1403
1418
|
Optional[StrictStr],
|
1404
1419
|
Field(
|
1405
|
-
description="
|
1420
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
1406
1421
|
),
|
1407
1422
|
] = None,
|
1408
1423
|
_request_timeout: Union[
|
@@ -1416,14 +1431,14 @@ class ModelsApi:
|
|
1416
1431
|
_content_type: Optional[StrictStr] = None,
|
1417
1432
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1418
1433
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1419
|
-
) -> ApiResponse[List[
|
1434
|
+
) -> ApiResponse[List[ModelRead]]:
|
1420
1435
|
"""Get All Models
|
1421
1436
|
|
1422
1437
|
List all models
|
1423
1438
|
|
1424
|
-
:param by_user: Whether to get models by user. Else all models are returned.
|
1439
|
+
:param by_user: Whether to get models by a specific user. Else all models are returned.
|
1425
1440
|
:type by_user: bool
|
1426
|
-
:param user_id:
|
1441
|
+
:param user_id: The ID of the user to get models for. Only used if `by_user` is true. Default is current user.
|
1427
1442
|
:type user_id: str
|
1428
1443
|
:param _request_timeout: timeout setting for this request. If one
|
1429
1444
|
number provided, it will be total request
|
@@ -1457,7 +1472,7 @@ class ModelsApi:
|
|
1457
1472
|
)
|
1458
1473
|
|
1459
1474
|
_response_types_map: Dict[str, Optional[str]] = {
|
1460
|
-
"200": "List[
|
1475
|
+
"200": "List[ModelRead]",
|
1461
1476
|
}
|
1462
1477
|
response_data = await self.api_client.call_api(
|
1463
1478
|
*_param, _request_timeout=_request_timeout
|
@@ -1474,13 +1489,13 @@ class ModelsApi:
|
|
1474
1489
|
by_user: Annotated[
|
1475
1490
|
Optional[StrictBool],
|
1476
1491
|
Field(
|
1477
|
-
description="Whether to get models by user. Else all models are returned."
|
1492
|
+
description="Whether to get models by a specific user. Else all models are returned."
|
1478
1493
|
),
|
1479
1494
|
] = None,
|
1480
1495
|
user_id: Annotated[
|
1481
1496
|
Optional[StrictStr],
|
1482
1497
|
Field(
|
1483
|
-
description="
|
1498
|
+
description="The ID of the user to get models for. Only used if `by_user` is true. Default is current user."
|
1484
1499
|
),
|
1485
1500
|
] = None,
|
1486
1501
|
_request_timeout: Union[
|
@@ -1499,9 +1514,9 @@ class ModelsApi:
|
|
1499
1514
|
|
1500
1515
|
List all models
|
1501
1516
|
|
1502
|
-
:param by_user: Whether to get models by user. Else all models are returned.
|
1517
|
+
:param by_user: Whether to get models by a specific user. Else all models are returned.
|
1503
1518
|
:type by_user: bool
|
1504
|
-
:param user_id:
|
1519
|
+
:param user_id: The ID of the user to get models for. Only used if `by_user` is true. Default is current user.
|
1505
1520
|
:type user_id: str
|
1506
1521
|
:param _request_timeout: timeout setting for this request. If one
|
1507
1522
|
number provided, it will be total request
|
@@ -1535,7 +1550,7 @@ class ModelsApi:
|
|
1535
1550
|
)
|
1536
1551
|
|
1537
1552
|
_response_types_map: Dict[str, Optional[str]] = {
|
1538
|
-
"200": "List[
|
1553
|
+
"200": "List[ModelRead]",
|
1539
1554
|
}
|
1540
1555
|
response_data = await self.api_client.call_api(
|
1541
1556
|
*_param, _request_timeout=_request_timeout
|
@@ -1606,7 +1621,7 @@ class ModelsApi:
|
|
1606
1621
|
@validate_call
|
1607
1622
|
async def update_model(
|
1608
1623
|
self,
|
1609
|
-
id: Annotated[StrictInt, Field(description="
|
1624
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1610
1625
|
model_update: ModelUpdate,
|
1611
1626
|
_request_timeout: Union[
|
1612
1627
|
None,
|
@@ -1624,7 +1639,7 @@ class ModelsApi:
|
|
1624
1639
|
|
1625
1640
|
Update a model's information
|
1626
1641
|
|
1627
|
-
:param id:
|
1642
|
+
:param id: The ID of the model to update. (required)
|
1628
1643
|
:type id: int
|
1629
1644
|
:param model_update: (required)
|
1630
1645
|
:type model_update: ModelUpdate
|
@@ -1674,7 +1689,7 @@ class ModelsApi:
|
|
1674
1689
|
@validate_call
|
1675
1690
|
async def update_model_with_http_info(
|
1676
1691
|
self,
|
1677
|
-
id: Annotated[StrictInt, Field(description="
|
1692
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1678
1693
|
model_update: ModelUpdate,
|
1679
1694
|
_request_timeout: Union[
|
1680
1695
|
None,
|
@@ -1692,7 +1707,7 @@ class ModelsApi:
|
|
1692
1707
|
|
1693
1708
|
Update a model's information
|
1694
1709
|
|
1695
|
-
:param id:
|
1710
|
+
:param id: The ID of the model to update. (required)
|
1696
1711
|
:type id: int
|
1697
1712
|
:param model_update: (required)
|
1698
1713
|
:type model_update: ModelUpdate
|
@@ -1742,7 +1757,7 @@ class ModelsApi:
|
|
1742
1757
|
@validate_call
|
1743
1758
|
async def update_model_without_preload_content(
|
1744
1759
|
self,
|
1745
|
-
id: Annotated[StrictInt, Field(description="
|
1760
|
+
id: Annotated[StrictInt, Field(description="The ID of the model to update.")],
|
1746
1761
|
model_update: ModelUpdate,
|
1747
1762
|
_request_timeout: Union[
|
1748
1763
|
None,
|
@@ -1760,7 +1775,7 @@ class ModelsApi:
|
|
1760
1775
|
|
1761
1776
|
Update a model's information
|
1762
1777
|
|
1763
|
-
:param id:
|
1778
|
+
:param id: The ID of the model to update. (required)
|
1764
1779
|
:type id: int
|
1765
1780
|
:param model_update: (required)
|
1766
1781
|
:type model_update: ModelUpdate
|
@@ -29,8 +29,8 @@ from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
|
29
29
|
from crypticorn.hive.client.models.exception_detail import ExceptionDetail
|
30
30
|
from crypticorn.hive.client.models.feature_size import FeatureSize
|
31
31
|
from crypticorn.hive.client.models.log_level import LogLevel
|
32
|
-
from crypticorn.hive.client.models.model import Model
|
33
32
|
from crypticorn.hive.client.models.model_create import ModelCreate
|
33
|
+
from crypticorn.hive.client.models.model_read import ModelRead
|
34
34
|
from crypticorn.hive.client.models.model_status import ModelStatus
|
35
35
|
from crypticorn.hive.client.models.model_update import ModelUpdate
|
36
36
|
from crypticorn.hive.client.models.target import Target
|
@@ -28,7 +28,7 @@ from typing_extensions import Self
|
|
28
28
|
|
29
29
|
class ExceptionDetail(BaseModel):
|
30
30
|
"""
|
31
|
-
|
31
|
+
Exception details returned to the client.
|
32
32
|
""" # noqa: E501
|
33
33
|
|
34
34
|
message: Optional[StrictStr] = None
|
@@ -28,7 +28,7 @@ from typing import Optional, Set
|
|
28
28
|
from typing_extensions import Self
|
29
29
|
|
30
30
|
|
31
|
-
class
|
31
|
+
class ModelRead(BaseModel):
|
32
32
|
"""
|
33
33
|
Pydantic model for model response
|
34
34
|
""" # noqa: E501
|
@@ -73,7 +73,7 @@ class Model(BaseModel):
|
|
73
73
|
|
74
74
|
@classmethod
|
75
75
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
76
|
-
"""Create an instance of
|
76
|
+
"""Create an instance of ModelRead from a JSON string"""
|
77
77
|
return cls.from_dict(json.loads(json_str))
|
78
78
|
|
79
79
|
def to_dict(self) -> Dict[str, Any]:
|
@@ -104,7 +104,7 @@ class Model(BaseModel):
|
|
104
104
|
|
105
105
|
@classmethod
|
106
106
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
107
|
-
"""Create an instance of
|
107
|
+
"""Create an instance of ModelRead from a dict"""
|
108
108
|
if obj is None:
|
109
109
|
return None
|
110
110
|
|