adaptive-sdk 0.1.1__py3-none-any.whl → 0.1.3__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.
- adaptive_sdk/client.py +6 -12
- adaptive_sdk/external/reward_server.py +1 -1
- adaptive_sdk/graphql_client/__init__.py +26 -19
- adaptive_sdk/graphql_client/add_hf_model.py +7 -1
- adaptive_sdk/graphql_client/async_client.py +154 -98
- adaptive_sdk/graphql_client/cancel_job.py +12 -0
- adaptive_sdk/graphql_client/client.py +154 -98
- adaptive_sdk/graphql_client/create_custom_recipe.py +12 -0
- adaptive_sdk/graphql_client/create_grader.py +12 -0
- adaptive_sdk/graphql_client/create_job.py +12 -0
- adaptive_sdk/graphql_client/create_user.py +12 -0
- adaptive_sdk/graphql_client/custom_fields.py +410 -72
- adaptive_sdk/graphql_client/custom_mutations.py +56 -50
- adaptive_sdk/graphql_client/custom_queries.py +52 -48
- adaptive_sdk/graphql_client/custom_typing_fields.py +120 -15
- adaptive_sdk/graphql_client/delete_custom_recipe.py +6 -0
- adaptive_sdk/graphql_client/delete_dataset.py +6 -0
- adaptive_sdk/graphql_client/delete_grader.py +13 -0
- adaptive_sdk/graphql_client/delete_user.py +12 -0
- adaptive_sdk/graphql_client/describe_job.py +12 -0
- adaptive_sdk/graphql_client/enums.py +31 -34
- adaptive_sdk/graphql_client/fragments.py +220 -256
- adaptive_sdk/graphql_client/get_custom_recipe.py +13 -0
- adaptive_sdk/graphql_client/get_grader.py +11 -0
- adaptive_sdk/graphql_client/input_types.py +83 -228
- adaptive_sdk/graphql_client/list_compute_pools.py +3 -3
- adaptive_sdk/graphql_client/list_custom_recipes.py +13 -0
- adaptive_sdk/graphql_client/list_graders.py +12 -0
- adaptive_sdk/graphql_client/list_harmony_groups.py +13 -0
- adaptive_sdk/graphql_client/list_jobs.py +27 -0
- adaptive_sdk/graphql_client/lock_grader.py +12 -0
- adaptive_sdk/graphql_client/share_use_case.py +12 -0
- adaptive_sdk/graphql_client/update_custom_recipe.py +12 -0
- adaptive_sdk/graphql_client/update_grader.py +12 -0
- adaptive_sdk/input_types/__init__.py +0 -44
- adaptive_sdk/input_types/typed_dicts.py +0 -135
- adaptive_sdk/resources/__init__.py +9 -32
- adaptive_sdk/resources/base_resource.py +9 -1
- adaptive_sdk/resources/chat.py +37 -35
- adaptive_sdk/resources/datasets.py +14 -115
- adaptive_sdk/resources/feedback.py +0 -6
- adaptive_sdk/resources/graders.py +467 -0
- adaptive_sdk/resources/interactions.py +8 -18
- adaptive_sdk/resources/jobs.py +142 -0
- adaptive_sdk/resources/models.py +77 -33
- adaptive_sdk/resources/recipes.py +361 -0
- adaptive_sdk/resources/use_cases.py +152 -1
- adaptive_sdk/resources/users.py +50 -7
- adaptive_sdk/rest/__init__.py +2 -32
- adaptive_sdk/rest/base_model.py +5 -10
- adaptive_sdk/rest/rest_types.py +61 -57
- {adaptive_sdk-0.1.1.dist-info → adaptive_sdk-0.1.3.dist-info}/METADATA +4 -1
- {adaptive_sdk-0.1.1.dist-info → adaptive_sdk-0.1.3.dist-info}/RECORD +54 -56
- adaptive_sdk/graphql_client/cancel_evaluation_job.py +0 -6
- adaptive_sdk/graphql_client/cancel_training_job.py +0 -6
- adaptive_sdk/graphql_client/create_custom_recipe_training_job.py +0 -12
- adaptive_sdk/graphql_client/create_custom_script.py +0 -12
- adaptive_sdk/graphql_client/create_evaluation_job.py +0 -12
- adaptive_sdk/graphql_client/create_training_job.py +0 -12
- adaptive_sdk/graphql_client/describe_evaluation_job.py +0 -13
- adaptive_sdk/graphql_client/describe_training_job.py +0 -13
- adaptive_sdk/graphql_client/generate_dataset.py +0 -12
- adaptive_sdk/graphql_client/list_custom_scripts.py +0 -13
- adaptive_sdk/graphql_client/list_evaluation_jobs.py +0 -13
- adaptive_sdk/graphql_client/list_partitions.py +0 -12
- adaptive_sdk/graphql_client/list_training_jobs.py +0 -13
- adaptive_sdk/resources/completions.py +0 -83
- adaptive_sdk/resources/custom_recipe.py +0 -151
- adaptive_sdk/resources/evaluation/__init__.py +0 -6
- adaptive_sdk/resources/evaluation/evaluation.py +0 -17
- adaptive_sdk/resources/evaluation/jobs.py +0 -289
- adaptive_sdk/resources/judges.py +0 -258
- adaptive_sdk/resources/reward_servers.py +0 -90
- adaptive_sdk/resources/training/__init__.py +0 -6
- adaptive_sdk/resources/training/constants.py +0 -9
- adaptive_sdk/resources/training/defaults.py +0 -179
- adaptive_sdk/resources/training/jobs.py +0 -279
- adaptive_sdk/resources/training/training.py +0 -17
- {adaptive_sdk-0.1.1.dist-info → adaptive_sdk-0.1.3.dist-info}/WHEEL +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
adaptive_sdk/__init__.py,sha256=RQWUHUyEWFSqvTKQpM7Q98nRPnisXRgIZlYd65aJucs,308
|
|
2
2
|
adaptive_sdk/base_client.py,sha256=gHLNOdiPRE53JGCo6jA8D8sTS1WQJ5-UCJOpKMyEhxY,4255
|
|
3
|
-
adaptive_sdk/client.py,sha256=
|
|
3
|
+
adaptive_sdk/client.py,sha256=xhAKU_zSSeQoBaUbtwHqHyZgtRQqYut4hNV8cTMoAw4,5077
|
|
4
4
|
adaptive_sdk/error_handling.py,sha256=emicEqdEOCgWwCgMkQyvB7VWdKRMnfrWA2urEthQ_g0,3345
|
|
5
5
|
adaptive_sdk/openapi.json,sha256=1zCNC1PsbRnfWy_2TF1MUgF4PDL3pbwYqJbzVTqmm-U,14607
|
|
6
6
|
adaptive_sdk/patch.py,sha256=mF9iw2VnxirxA7_T7TdatpCTwk3EXfXml9elYAvmy7U,223
|
|
@@ -10,120 +10,118 @@ adaptive_sdk/external/base_model.py,sha256=_WSTDyJdV61Pno63gCXsaL0r9dOahw_JoZ7e7
|
|
|
10
10
|
adaptive_sdk/external/constants.py,sha256=HaEbIoGG6u0a_tr8_NdNmM-8ApTG1Q0n2G5aGF4Z_nA,280
|
|
11
11
|
adaptive_sdk/external/requests_journal.py,sha256=zw-5o_oYqoMAGUzyLxiIgUg1_2qjZ-sOG-oSYLPprfM,4401
|
|
12
12
|
adaptive_sdk/external/reward_client.py,sha256=9y2NzL0P_50KSbV0mtYIUqqyJk2nckeb6rNj99MCkpc,6468
|
|
13
|
-
adaptive_sdk/external/reward_server.py,sha256=
|
|
13
|
+
adaptive_sdk/external/reward_server.py,sha256=i2QuIvTMiPcD58xqdGJ57FMgNwRiCoSkFsaDy-G28Y0,7346
|
|
14
14
|
adaptive_sdk/external/reward_types.py,sha256=aZmTolT0OjgObo-64zJkarUKOY4RdxHnsQt8AKAaq1w,1710
|
|
15
15
|
adaptive_sdk/external/websocket_utils.py,sha256=QN-K1IRbqe1LdQTz6vXhVgn-R2SjOB80NjGD2w_LaAo,1284
|
|
16
|
-
adaptive_sdk/graphql_client/__init__.py,sha256=
|
|
16
|
+
adaptive_sdk/graphql_client/__init__.py,sha256=bkNmqrQhxDM3YC_M8qvI8urFUrsnz66xtEsqXrNx4YE,20381
|
|
17
17
|
adaptive_sdk/graphql_client/add_external_model.py,sha256=9VpQHlJMm5t_Ja_SX2MkYcSG1IQpem6mrdXMfNTa1oo,352
|
|
18
|
-
adaptive_sdk/graphql_client/add_hf_model.py,sha256=
|
|
18
|
+
adaptive_sdk/graphql_client/add_hf_model.py,sha256=aC2IcYftepe28Hi01Kg0w3A7bjKrStWasx6aXiqghJU,312
|
|
19
19
|
adaptive_sdk/graphql_client/add_model.py,sha256=Uyhpxkziz1Pv2S7Q0wOaKGK4krjmEf2PeLK0yEs89Hs,461
|
|
20
20
|
adaptive_sdk/graphql_client/add_remote_env.py,sha256=X94F94tnMzuX9TC_Ieowngw35gJxnKL2YST2sqEJ7CY,328
|
|
21
21
|
adaptive_sdk/graphql_client/async_base_client_open_telemetry.py,sha256=FA5yIdgoq2Geq8fzQaG7UNXCwKXPPGi3bf7xVRhU5t0,19773
|
|
22
|
-
adaptive_sdk/graphql_client/async_client.py,sha256=
|
|
22
|
+
adaptive_sdk/graphql_client/async_client.py,sha256=MEI7X7vLB_-j6v03CtT2uOnO65JnwnDdhGwz0DVvUoo,112309
|
|
23
23
|
adaptive_sdk/graphql_client/attach_model_to_use_case.py,sha256=WyERM4wxKrUS1u9VZ3FUasZu5AVSbRswzy9jmxssTFM,361
|
|
24
24
|
adaptive_sdk/graphql_client/base_client_open_telemetry.py,sha256=j_JEzPlgRdqyHgjwWqo85KkpfdaPGUgiyjkSqQRHyFk,9410
|
|
25
25
|
adaptive_sdk/graphql_client/base_model.py,sha256=2xxKA4sIdlGPIezw06XP9bseSxBURU7nivgt_gL44iA,621
|
|
26
26
|
adaptive_sdk/graphql_client/base_operation.py,sha256=2DuKKDMdshl-t6mgvN6RYjZMdZ3sVzl5IlZw7xThSn4,4641
|
|
27
27
|
adaptive_sdk/graphql_client/cancel_ab_campaign.py,sha256=JAEpmedz0jOu90U3KR0PYCMAhf2_E6h6WOT30HSE91k,176
|
|
28
|
-
adaptive_sdk/graphql_client/
|
|
29
|
-
adaptive_sdk/graphql_client/
|
|
30
|
-
adaptive_sdk/graphql_client/client.py,sha256=ATcikGnujY7u1kAoOG3n6EP63SBKn7M2tU4JOo9IpS4,116960
|
|
28
|
+
adaptive_sdk/graphql_client/cancel_job.py,sha256=3ZLoqrULi1mp5A5i4rD-gXliKhD8038IPfvCNBg0dPs,291
|
|
29
|
+
adaptive_sdk/graphql_client/client.py,sha256=j4w8k6hZ4YH9A8HA0AJcpQMiV0j4mZ3hUwKVwj1zYtk,111400
|
|
31
30
|
adaptive_sdk/graphql_client/create_ab_campaign.py,sha256=___2iFSGnWKkjXz_MfxKUxi1EoQcSBv9AX8S7YoUeVw,374
|
|
32
|
-
adaptive_sdk/graphql_client/
|
|
33
|
-
adaptive_sdk/graphql_client/
|
|
34
|
-
adaptive_sdk/graphql_client/
|
|
31
|
+
adaptive_sdk/graphql_client/create_custom_recipe.py,sha256=eIVLDHbdFG2qWjoZBLC3Xs40Fjy6L-u6wrABV5ibUxo,382
|
|
32
|
+
adaptive_sdk/graphql_client/create_grader.py,sha256=H6xdf7Zn7JkOehINWMkULH3ObASrtvPLKaX-BjW-3zw,321
|
|
33
|
+
adaptive_sdk/graphql_client/create_job.py,sha256=nXthwdViHMxsTOFoHbY1Uy2m_7kxE1vp_c8XhNyLaRA,291
|
|
35
34
|
adaptive_sdk/graphql_client/create_judge.py,sha256=ZusgRcEdABVH9PNS4f2MYzEK4J7ocz9PWJgQhz9FvHo,311
|
|
36
35
|
adaptive_sdk/graphql_client/create_metric.py,sha256=KWmTxC0lTpOg7DHlz4w3eNH_vn_VBO3SVRh_CFGqw8k,321
|
|
37
36
|
adaptive_sdk/graphql_client/create_prebuilt_judge.py,sha256=-8S16Kg5tqjnDYpHGdKgLiM7UlO8zU215Dp5Q3fqsy0,376
|
|
38
37
|
adaptive_sdk/graphql_client/create_role.py,sha256=6aTdNOZxavMyjkH-g01uYOZgpjYWcAXQ5cdH2Cb1l6s,403
|
|
39
38
|
adaptive_sdk/graphql_client/create_team.py,sha256=6Alt1ralE1-Xvp2wrEaLUHMW5RtiFqz2fIsUYE_2LbM,370
|
|
40
|
-
adaptive_sdk/graphql_client/create_training_job.py,sha256=XW3i4XHlk5UasALsoeupDQVJFdxyIh91zAYki-uJuW0,372
|
|
41
39
|
adaptive_sdk/graphql_client/create_use_case.py,sha256=sekD76jWCo3zNCfMsBGhVYfNSIK4JPPBz9066BOt49g,332
|
|
42
|
-
adaptive_sdk/graphql_client/
|
|
43
|
-
adaptive_sdk/graphql_client/
|
|
44
|
-
adaptive_sdk/graphql_client/
|
|
45
|
-
adaptive_sdk/graphql_client/
|
|
40
|
+
adaptive_sdk/graphql_client/create_user.py,sha256=gurD0kZgncXt1HBr7Oo5AkK5ubqFKpJvaR1rn506gHo,301
|
|
41
|
+
adaptive_sdk/graphql_client/custom_fields.py,sha256=7cY-u4TnUkkQWTLm2oJx6BJJa096pIpCjPwQj9K0tig,118728
|
|
42
|
+
adaptive_sdk/graphql_client/custom_mutations.py,sha256=X6Kq88XNxNQfBqBUUs2OTutaziZQYLq8UPmja9Vnoq4,23788
|
|
43
|
+
adaptive_sdk/graphql_client/custom_queries.py,sha256=Bm4-OKO_Nxsz-BiraVG-2_i41R4X1GLnJaWs_SzPx9A,15819
|
|
44
|
+
adaptive_sdk/graphql_client/custom_typing_fields.py,sha256=N05vjKxk7kkGqEzi-eYvN4A0enbz_PXthzNAZaNei7Y,26588
|
|
45
|
+
adaptive_sdk/graphql_client/delete_custom_recipe.py,sha256=tsWGqherJyVe5OBFG8QCG5GUdlX8s-nd8MSiMAXfSqk,183
|
|
46
|
+
adaptive_sdk/graphql_client/delete_dataset.py,sha256=k5enUd6zO89RmA349eVzYajtZigWjOdDdPTcUzTFahI,167
|
|
47
|
+
adaptive_sdk/graphql_client/delete_grader.py,sha256=U9r26BtvOaThzyf0VGouvkuEaJ1wJGPGjbHluSDWBsc,350
|
|
46
48
|
adaptive_sdk/graphql_client/delete_judge.py,sha256=rdiA12Q3Q0JEZTOBjTK3Tz33f2aurj5G9vqSoJUjw3I,342
|
|
49
|
+
adaptive_sdk/graphql_client/delete_user.py,sha256=zMlvEaxGQAfDn-vMc0LWuhgzv1DJb69DuFwJcKGdF5o,301
|
|
47
50
|
adaptive_sdk/graphql_client/deploy_model.py,sha256=xvVMhNm_7MZAmGrNpElSG-qpLutJGU8D5-OLFDbNAkU,160
|
|
48
51
|
adaptive_sdk/graphql_client/describe_ab_campaign.py,sha256=1-z2U5aPHx3EBk0JawW1MO0n1hUpuFNk_oEgzn_6hhQ,594
|
|
49
52
|
adaptive_sdk/graphql_client/describe_dataset.py,sha256=3E4vhnIsTXAjBz51TpfNhw8ldItoePumGn5hw5B3EkM,300
|
|
50
|
-
adaptive_sdk/graphql_client/describe_evaluation_job.py,sha256=23LU4QRTPxH6rHxlDdDNkBWCT6wol531tG_tMstiXtg,413
|
|
51
53
|
adaptive_sdk/graphql_client/describe_interaction.py,sha256=1gJ2b7ssrrcOujEKzzj7oH18h--V3DSk8HL84hlwuUc,331
|
|
54
|
+
adaptive_sdk/graphql_client/describe_job.py,sha256=L6UV2mseiNzFcY8ztnyNOv29XeNdiKsgnXuZMkt7yng,264
|
|
52
55
|
adaptive_sdk/graphql_client/describe_metric.py,sha256=PzzoQcarRiV1qsWiGOyMiOnuE_T7VOKWNltpCMmdjao,291
|
|
53
56
|
adaptive_sdk/graphql_client/describe_metric_admin.py,sha256=_SKKwnFhZnbOTT97elEr503JnoHO_VvZnrKvNj_RyKE,321
|
|
54
57
|
adaptive_sdk/graphql_client/describe_model.py,sha256=UnsOnAyBjNsnkJaS4q5uwkSSvInHwRqUj3XqAoO0yO4,434
|
|
55
58
|
adaptive_sdk/graphql_client/describe_model_admin.py,sha256=XUt_CBSMw1HRleUEWZn2snYt2BNSux_siqrVlwtqH-w,484
|
|
56
|
-
adaptive_sdk/graphql_client/describe_training_job.py,sha256=YCOgXbSOiAaKvPZS37_JdA3Er9DY5VQHh59hALK2daI,393
|
|
57
59
|
adaptive_sdk/graphql_client/describe_use_case.py,sha256=WW0QkTmdfggN8YBUNGi8ShrP_fr2jXPR6Fer6jlQxu0,353
|
|
58
|
-
adaptive_sdk/graphql_client/enums.py,sha256=
|
|
60
|
+
adaptive_sdk/graphql_client/enums.py,sha256=G9hEK0xC3C1ZwJ3CX2L79WBYQshdIBNBeGOq7ueTWZ4,5812
|
|
59
61
|
adaptive_sdk/graphql_client/exceptions.py,sha256=NiC6v-5S7aRDlvQTcHH3K5KvxWvk-c-PkIQQHkipTB8,2268
|
|
60
|
-
adaptive_sdk/graphql_client/fragments.py,sha256=
|
|
61
|
-
adaptive_sdk/graphql_client/
|
|
62
|
+
adaptive_sdk/graphql_client/fragments.py,sha256=c3NrpifmeKTuiI7mjrTy9yAF1znXgSGLh9tZHAyH3So,21278
|
|
63
|
+
adaptive_sdk/graphql_client/get_custom_recipe.py,sha256=7qxBZGQTqpc69k-NwzgFctaHWaRz0tHl7YlVSsEad6U,383
|
|
64
|
+
adaptive_sdk/graphql_client/get_grader.py,sha256=kubHDBtUcq6mZtUR5_Of0QbjnGUPSYuavF3_xwmwbY8,233
|
|
62
65
|
adaptive_sdk/graphql_client/get_judge.py,sha256=urEnHW3XfURi5GAFBPfbqzOZGQDxgsGRA6nZmUKmoMA,224
|
|
63
|
-
adaptive_sdk/graphql_client/input_types.py,sha256=
|
|
66
|
+
adaptive_sdk/graphql_client/input_types.py,sha256=aOgG_us5vCAntd82mHfq5wvJpe_yhRct2v7_EVQGNKw,17661
|
|
64
67
|
adaptive_sdk/graphql_client/link_metric.py,sha256=EDH67ckBzzc6MYIGfsmgZRBnjqxLsCGwFUaFMXPEsBY,327
|
|
65
68
|
adaptive_sdk/graphql_client/list_ab_campaigns.py,sha256=SIbU6I2OQkNHt0Gw6YStoiiwJHUk2rfXnpoGLzrFjxc,379
|
|
66
|
-
adaptive_sdk/graphql_client/list_compute_pools.py,sha256=
|
|
67
|
-
adaptive_sdk/graphql_client/
|
|
69
|
+
adaptive_sdk/graphql_client/list_compute_pools.py,sha256=4Qli5Foxm3jztbUAL5gbwqtcrElwwlC4LGJMOMBI6Cc,782
|
|
70
|
+
adaptive_sdk/graphql_client/list_custom_recipes.py,sha256=bVXC2mdOHvf6znEguhsnA0KhmBn_2E02FbbsgJzpNac,387
|
|
68
71
|
adaptive_sdk/graphql_client/list_datasets.py,sha256=YIqvbtHYaFLnN9uHeX7GYns_iKncbafySUKYBOvLde0,283
|
|
69
|
-
adaptive_sdk/graphql_client/
|
|
72
|
+
adaptive_sdk/graphql_client/list_graders.py,sha256=UiRPBCH6Qm_BTe4Z1b8Veyao9PEFQb7VsgwMbHmwOAw,274
|
|
70
73
|
adaptive_sdk/graphql_client/list_grouped_interactions.py,sha256=lQhfb0xUrZsctJgUCShy_VxxuI-z81DUJJKcCdETwdk,2299
|
|
74
|
+
adaptive_sdk/graphql_client/list_harmony_groups.py,sha256=FNK6GvznmHMg_F2xeJum4nUZFiwJVrrb6MW5M4hq6sY,387
|
|
71
75
|
adaptive_sdk/graphql_client/list_interactions.py,sha256=OUV3IX3J9XN6L4hZ8jJKtw7O6KnI5i8eJHGI9eKi0WA,822
|
|
76
|
+
adaptive_sdk/graphql_client/list_jobs.py,sha256=-t6U8RNA2kaRYrZTEMxSVSx3WW3r6h5PwJbVDFLgDCA,802
|
|
72
77
|
adaptive_sdk/graphql_client/list_judge_versions.py,sha256=cBjOsBVF3_wVDYNrJE-4I8HG_ToLzxk47DDBjLRR3Zs,373
|
|
73
78
|
adaptive_sdk/graphql_client/list_judges.py,sha256=qVJ2SL2H11YwC8_DGh_Dm3ea5joPJFBfKg7rcoz3JB4,265
|
|
74
79
|
adaptive_sdk/graphql_client/list_metrics.py,sha256=Sa-k5UuSz0O4YJF-7kJQGK89rbMAAzxFE-l8_N8kzSY,284
|
|
75
80
|
adaptive_sdk/graphql_client/list_models.py,sha256=Mb8JFKlwoCwaxOxNBbVmKUXAjluRDjnLcPiNrwmHnow,436
|
|
76
|
-
adaptive_sdk/graphql_client/list_partitions.py,sha256=eHZ6sUpx0r6A9021VJRIvEETNRtxgzVRds86eh6E5ns,301
|
|
77
81
|
adaptive_sdk/graphql_client/list_permissions.py,sha256=gWOmmI5gqkjtHwZM4wRyogNX02HM0fQ16hb22_Tq9qo,137
|
|
78
82
|
adaptive_sdk/graphql_client/list_remote_envs.py,sha256=5Wk09weUGVSudcIJPRmqyZJOAd1aCzgB8vXPAv6i33s,357
|
|
79
83
|
adaptive_sdk/graphql_client/list_roles.py,sha256=p9APEJp1CDb_OZvarhTQb2hpo8Gf_pzYNItM92Hqi80,361
|
|
80
84
|
adaptive_sdk/graphql_client/list_teams.py,sha256=oWNS1BRWx4uTWE8wRKFMuL4hD7IBFLEEfF-osBPEmmY,334
|
|
81
|
-
adaptive_sdk/graphql_client/list_training_jobs.py,sha256=529GI1bA1jOnu4fvkle0MsZiHzU87X-CKoo8GTvY0Lc,377
|
|
82
85
|
adaptive_sdk/graphql_client/list_use_cases.py,sha256=fbEicXAKDTgsBwBVwtd68hMEPk-I3fLmWmrEsVDndI8,337
|
|
83
86
|
adaptive_sdk/graphql_client/list_users.py,sha256=9LCNz49jqxrUapHyOdnzs-ZtU1xsejqoXUmE8vsr-qY,256
|
|
84
87
|
adaptive_sdk/graphql_client/load_dataset.py,sha256=P_h3wPTT4E5mbgJoR5jX1_5GhDLIJsA6lmYPT27VxY8,323
|
|
88
|
+
adaptive_sdk/graphql_client/lock_grader.py,sha256=cCISIKjFaSakf-tr4oEWebieT5yrpvGxdS_R_E4iww8,305
|
|
85
89
|
adaptive_sdk/graphql_client/me.py,sha256=0I4fqW8wtO-jQSsSym_dtWggdbEa3m71wH955-AswwI,440
|
|
86
90
|
adaptive_sdk/graphql_client/remove_remote_env.py,sha256=lmEwudWc6bkU1ev2g9_QEOgkJT_n7n9P5wGm5AV2MY8,173
|
|
87
91
|
adaptive_sdk/graphql_client/remove_team_member.py,sha256=H75WLcB4bM0yctfmmzztxSAzxvbOwWmkVZhO5DUuh1g,350
|
|
92
|
+
adaptive_sdk/graphql_client/share_use_case.py,sha256=r1XO20e1WdXVRcebD4m8sutHoygxcJi7W0xOCeOfZVY,324
|
|
88
93
|
adaptive_sdk/graphql_client/terminate_model.py,sha256=n2evZhsrbTQKDZ1qrFLu3IJRCdJAJufg7BEmpu6lELs,169
|
|
89
94
|
adaptive_sdk/graphql_client/test_remote_env.py,sha256=GvnMA3vcMG_gHaLEybmdAmqdP-k0ZIz4ArAgx47wRfk,745
|
|
90
95
|
adaptive_sdk/graphql_client/unlink_metric.py,sha256=a6MvrsmFPp2Nksf3jBrC8o6Hk8w4ibruXGW0kwfBbcI,163
|
|
96
|
+
adaptive_sdk/graphql_client/update_custom_recipe.py,sha256=ZBSPWwBatsOcv3r0wZ7QJLbP7bYSdTbPBs1_B14kO6U,382
|
|
97
|
+
adaptive_sdk/graphql_client/update_grader.py,sha256=iLxjO069OS-t4pLRxJ-ETyQb7Js3eQu82kyQW--GG48,321
|
|
91
98
|
adaptive_sdk/graphql_client/update_judge.py,sha256=lscNCRJKG5JtZ2eFxVPPDtkJnjLFV6PTMI-9roiTN4Q,311
|
|
92
99
|
adaptive_sdk/graphql_client/update_model.py,sha256=w4-6gHg5k28k9SQwZ9qQZKbs3LQhnLp1-bBIzRxJqH8,354
|
|
93
100
|
adaptive_sdk/graphql_client/update_model_compute_config.py,sha256=0RtrzzfuMrt-i6lABANRhem8jcDNkXORBEDFdSVpxfs,417
|
|
94
101
|
adaptive_sdk/graphql_client/update_user.py,sha256=E6vtj177-Hx1uUUo8MiSrynULXrnxtJma3Kq69FPC6M,897
|
|
95
|
-
adaptive_sdk/input_types/__init__.py,sha256=
|
|
96
|
-
adaptive_sdk/input_types/typed_dicts.py,sha256=
|
|
97
|
-
adaptive_sdk/resources/__init__.py,sha256
|
|
102
|
+
adaptive_sdk/input_types/__init__.py,sha256=SVy4Ks4pm1M32LZ_yHN2itlzNW0g2Kg3b3_ibNLI-7s,806
|
|
103
|
+
adaptive_sdk/input_types/typed_dicts.py,sha256=0HWbJ6nY4zrNCsMg6MynkAO2VUr_7Iu9u9F1Y-71gWE,4942
|
|
104
|
+
adaptive_sdk/resources/__init__.py,sha256=-cHNzI-hg1u-GGe-fVvV_L4JOgat2zJuKnC3E2In-iw,1326
|
|
98
105
|
adaptive_sdk/resources/abtests.py,sha256=9PCPjxuWwY9ec88ewnq54gkoELq5U5iaBmHhzLCAsFU,7698
|
|
99
|
-
adaptive_sdk/resources/base_resource.py,sha256=
|
|
100
|
-
adaptive_sdk/resources/chat.py,sha256=
|
|
101
|
-
adaptive_sdk/resources/completions.py,sha256=CFiUYZaRRTgwDC6zEe1pd5Q87EVupNpcilKYoc18DgU,2883
|
|
106
|
+
adaptive_sdk/resources/base_resource.py,sha256=D9adWSFxiDB7chVstDuBu1jcuXkE71UQJexnWENpC4A,1497
|
|
107
|
+
adaptive_sdk/resources/chat.py,sha256=k-jh_IZfKwqoWNN2P5BhAM3P_f5HLybVZp35pUadwso,11954
|
|
102
108
|
adaptive_sdk/resources/compute_pools.py,sha256=4eHP8FMkZOsGPjZ-qBvda2PunA6GMyvvJTHnhAEGTo4,938
|
|
103
|
-
adaptive_sdk/resources/
|
|
104
|
-
adaptive_sdk/resources/datasets.py,sha256=7qxlF7Vd7PsRMLBZAoREwcplQyE3-eIwdYSaqbnZ_cE,8547
|
|
109
|
+
adaptive_sdk/resources/datasets.py,sha256=44Lt6xaZ-YTKy04fce9J7chnfFofKJr_8bfkamDjZNg,4992
|
|
105
110
|
adaptive_sdk/resources/embeddings.py,sha256=-ov_EChHU6PJJOJRtDlCo4sYyr9hwyvRjnBhub8QNFg,3922
|
|
106
|
-
adaptive_sdk/resources/feedback.py,sha256=
|
|
107
|
-
adaptive_sdk/resources/
|
|
108
|
-
adaptive_sdk/resources/
|
|
109
|
-
adaptive_sdk/resources/
|
|
111
|
+
adaptive_sdk/resources/feedback.py,sha256=lujqwFIhxi6iovL8JWL05Kr-gkzR4QEwUXZbTx33raA,14116
|
|
112
|
+
adaptive_sdk/resources/graders.py,sha256=b6q-5Z6x-vAoZuXHl6xFrcwC3S4TPXxu121SpR3fYdk,17230
|
|
113
|
+
adaptive_sdk/resources/interactions.py,sha256=9A0aKyfE5dhMj-rj6NOiF7kxAl89SXksFsRJXXjPGK8,10810
|
|
114
|
+
adaptive_sdk/resources/jobs.py,sha256=TO79natSIDexj3moat_5hAjTGAy_-p9dn0qYExYeNQM,4305
|
|
115
|
+
adaptive_sdk/resources/models.py,sha256=krQbfMnVkjNqXfPG-8irH_xlloDpFpQiqYsbED3-8z8,18591
|
|
110
116
|
adaptive_sdk/resources/permissions.py,sha256=ckO-oacWkvgcwXBK5iW_8qaK-g0SHXpEEy1qZy5lrB0,1053
|
|
111
|
-
adaptive_sdk/resources/
|
|
117
|
+
adaptive_sdk/resources/recipes.py,sha256=f4Q_noEAjx-LGkgzLOU6UtgFTK75cQu0cYBakNjUCv0,13224
|
|
112
118
|
adaptive_sdk/resources/roles.py,sha256=fD1F5Gd3ddkATsU2aFj7japTJVZngVgqt6TXskBQEOA,2218
|
|
113
119
|
adaptive_sdk/resources/teams.py,sha256=KItuOfqKKyFSRFoEAF7rAXb8nbIqRkwRxjEbACjeEoY,1476
|
|
114
|
-
adaptive_sdk/resources/use_cases.py,sha256=
|
|
115
|
-
adaptive_sdk/resources/users.py,sha256=
|
|
116
|
-
adaptive_sdk/
|
|
117
|
-
adaptive_sdk/
|
|
118
|
-
adaptive_sdk/
|
|
119
|
-
adaptive_sdk/
|
|
120
|
-
adaptive_sdk/
|
|
121
|
-
adaptive_sdk
|
|
122
|
-
adaptive_sdk/resources/training/jobs.py,sha256=4lkNWUxxSlcqGPiA0YE5sxCVsbVRktktTJ4IejqcRBo,11543
|
|
123
|
-
adaptive_sdk/resources/training/training.py,sha256=aStcQ1LG3ZkXxUOqkPFPOQiqIjm6_r8KrOzEUFYPOrE,464
|
|
124
|
-
adaptive_sdk/rest/__init__.py,sha256=t61cp9r3bm13K4uZYXkGYTodXfCCjLrwXjgH0iFxrn8,763
|
|
125
|
-
adaptive_sdk/rest/base_model.py,sha256=Zs6hILGL_WJEtnP8jSYYvd0XBysVkRPhiUUmGxGO0cQ,571
|
|
126
|
-
adaptive_sdk/rest/rest_types.py,sha256=T8x578zVX0MDxCyxMY4DRmiOnX4ctv3I_bzDQg39eJ0,7872
|
|
127
|
-
adaptive_sdk-0.1.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
128
|
-
adaptive_sdk-0.1.1.dist-info/METADATA,sha256=-2LmStsJl6fVBZydpO10sHQR_BSptMxrFktcQu8Z3Ck,1286
|
|
129
|
-
adaptive_sdk-0.1.1.dist-info/RECORD,,
|
|
120
|
+
adaptive_sdk/resources/use_cases.py,sha256=a_Ls3kbYgByJMlOYM_UGi4MTiW4wU7m057budrgfEE0,9014
|
|
121
|
+
adaptive_sdk/resources/users.py,sha256=SoGWwdDCdhK4KjYOcAws-ZWlW7Edii7D3Vxfdu-NZY4,4406
|
|
122
|
+
adaptive_sdk/rest/__init__.py,sha256=Szn4qFr1ChFRxMvaVjeaAsGoFU3oV26xZB-vkRCu2Hk,611
|
|
123
|
+
adaptive_sdk/rest/base_model.py,sha256=gQvP9N3QLDNlWKFfLeT5Cf0WwGFtKxyi8VWidIZn2jA,541
|
|
124
|
+
adaptive_sdk/rest/rest_types.py,sha256=Ln8tEN9JCaOdAxg4Y2CYoAc2oeNGtFOoUx2jx6huBWk,7586
|
|
125
|
+
adaptive_sdk-0.1.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
126
|
+
adaptive_sdk-0.1.3.dist-info/METADATA,sha256=bmubGA9-_k8xKi8p1GNMsZzmFR6L6M0F71vTzGaUIqU,1400
|
|
127
|
+
adaptive_sdk-0.1.3.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import TrainingJobData
|
|
4
|
-
|
|
5
|
-
class CreateCustomRecipeTrainingJob(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
create_custom_recipe_training_job: 'CreateCustomRecipeTrainingJobCreateCustomRecipeTrainingJob' = Field(alias='createCustomRecipeTrainingJob')
|
|
8
|
-
|
|
9
|
-
class CreateCustomRecipeTrainingJobCreateCustomRecipeTrainingJob(TrainingJobData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
CreateCustomRecipeTrainingJob.model_rebuild()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import CustomScriptData
|
|
4
|
-
|
|
5
|
-
class CreateCustomScript(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
create_custom_script: 'CreateCustomScriptCreateCustomScript' = Field(alias='createCustomScript')
|
|
8
|
-
|
|
9
|
-
class CreateCustomScriptCreateCustomScript(CustomScriptData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
CreateCustomScript.model_rebuild()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import EvaluationJobData
|
|
4
|
-
|
|
5
|
-
class CreateEvaluationJob(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
create_evaluation_job: 'CreateEvaluationJobCreateEvaluationJob' = Field(alias='createEvaluationJob')
|
|
8
|
-
|
|
9
|
-
class CreateEvaluationJobCreateEvaluationJob(EvaluationJobData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
CreateEvaluationJob.model_rebuild()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import TrainingJobData
|
|
4
|
-
|
|
5
|
-
class CreateTrainingJob(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
create_training_job: 'CreateTrainingJobCreateTrainingJob' = Field(alias='createTrainingJob')
|
|
8
|
-
|
|
9
|
-
class CreateTrainingJobCreateTrainingJob(TrainingJobData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
CreateTrainingJob.model_rebuild()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
from pydantic import Field
|
|
3
|
-
from .base_model import BaseModel
|
|
4
|
-
from .fragments import EvaluationJobData
|
|
5
|
-
|
|
6
|
-
class DescribeEvaluationJob(BaseModel):
|
|
7
|
-
"""@public"""
|
|
8
|
-
evaluation_job: Optional['DescribeEvaluationJobEvaluationJob'] = Field(alias='evaluationJob')
|
|
9
|
-
|
|
10
|
-
class DescribeEvaluationJobEvaluationJob(EvaluationJobData):
|
|
11
|
-
"""@public"""
|
|
12
|
-
pass
|
|
13
|
-
DescribeEvaluationJob.model_rebuild()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from typing import Optional
|
|
2
|
-
from pydantic import Field
|
|
3
|
-
from .base_model import BaseModel
|
|
4
|
-
from .fragments import TrainingJobData
|
|
5
|
-
|
|
6
|
-
class DescribeTrainingJob(BaseModel):
|
|
7
|
-
"""@public"""
|
|
8
|
-
training_job: Optional['DescribeTrainingJobTrainingJob'] = Field(alias='trainingJob')
|
|
9
|
-
|
|
10
|
-
class DescribeTrainingJobTrainingJob(TrainingJobData):
|
|
11
|
-
"""@public"""
|
|
12
|
-
pass
|
|
13
|
-
DescribeTrainingJob.model_rebuild()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from pydantic import Field
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import DatasetData
|
|
4
|
-
|
|
5
|
-
class GenerateDataset(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
generate_dataset: 'GenerateDatasetGenerateDataset' = Field(alias='generateDataset')
|
|
8
|
-
|
|
9
|
-
class GenerateDatasetGenerateDataset(DatasetData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
GenerateDataset.model_rebuild()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
from pydantic import Field
|
|
3
|
-
from .base_model import BaseModel
|
|
4
|
-
from .fragments import CustomScriptData
|
|
5
|
-
|
|
6
|
-
class ListCustomScripts(BaseModel):
|
|
7
|
-
"""@public"""
|
|
8
|
-
custom_scripts: List['ListCustomScriptsCustomScripts'] = Field(alias='customScripts')
|
|
9
|
-
|
|
10
|
-
class ListCustomScriptsCustomScripts(CustomScriptData):
|
|
11
|
-
"""@public"""
|
|
12
|
-
pass
|
|
13
|
-
ListCustomScripts.model_rebuild()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
from pydantic import Field
|
|
3
|
-
from .base_model import BaseModel
|
|
4
|
-
from .fragments import EvaluationJobData
|
|
5
|
-
|
|
6
|
-
class ListEvaluationJobs(BaseModel):
|
|
7
|
-
"""@public"""
|
|
8
|
-
evaluation_jobs: List['ListEvaluationJobsEvaluationJobs'] = Field(alias='evaluationJobs')
|
|
9
|
-
|
|
10
|
-
class ListEvaluationJobsEvaluationJobs(EvaluationJobData):
|
|
11
|
-
"""@public"""
|
|
12
|
-
pass
|
|
13
|
-
ListEvaluationJobs.model_rebuild()
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
from .base_model import BaseModel
|
|
3
|
-
from .fragments import PartitionData
|
|
4
|
-
|
|
5
|
-
class ListPartitions(BaseModel):
|
|
6
|
-
"""@public"""
|
|
7
|
-
partitions: List['ListPartitionsPartitions']
|
|
8
|
-
|
|
9
|
-
class ListPartitionsPartitions(PartitionData):
|
|
10
|
-
"""@public"""
|
|
11
|
-
pass
|
|
12
|
-
ListPartitions.model_rebuild()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
from typing import List
|
|
2
|
-
from pydantic import Field
|
|
3
|
-
from .base_model import BaseModel
|
|
4
|
-
from .fragments import TrainingJobData
|
|
5
|
-
|
|
6
|
-
class ListTrainingJobs(BaseModel):
|
|
7
|
-
"""@public"""
|
|
8
|
-
training_jobs: List['ListTrainingJobsTrainingJobs'] = Field(alias='trainingJobs')
|
|
9
|
-
|
|
10
|
-
class ListTrainingJobsTrainingJobs(TrainingJobData):
|
|
11
|
-
"""@public"""
|
|
12
|
-
pass
|
|
13
|
-
ListTrainingJobs.model_rebuild()
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
from uuid import UUID
|
|
3
|
-
from typing import TYPE_CHECKING
|
|
4
|
-
from typing_extensions import override
|
|
5
|
-
from adaptive_sdk.error_handling import rest_error_handler
|
|
6
|
-
from adaptive_sdk.rest import rest_types
|
|
7
|
-
from adaptive_sdk.utils import convert_optional_UUID, get_full_model_path
|
|
8
|
-
|
|
9
|
-
from .base_resource import SyncAPIResource, AsyncAPIResource, UseCaseResource
|
|
10
|
-
|
|
11
|
-
if TYPE_CHECKING:
|
|
12
|
-
from adaptive_sdk.client import Adaptive, AsyncAdaptive
|
|
13
|
-
|
|
14
|
-
ROUTE = "/completions"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class Completions(SyncAPIResource, UseCaseResource): # type: ignore[misc]
|
|
18
|
-
def __init__(self, client: Adaptive) -> None:
|
|
19
|
-
SyncAPIResource.__init__(self, client)
|
|
20
|
-
UseCaseResource.__init__(self, client)
|
|
21
|
-
|
|
22
|
-
def create(
|
|
23
|
-
self,
|
|
24
|
-
prompt: str,
|
|
25
|
-
model: str | None = None,
|
|
26
|
-
stream: bool | None = None,
|
|
27
|
-
session_id: str | UUID | None = None,
|
|
28
|
-
use_case: str | None = None,
|
|
29
|
-
user: str | UUID | None = None,
|
|
30
|
-
ab_campaign: str | None = None,
|
|
31
|
-
n: int | None = None,
|
|
32
|
-
labels: dict[str, str] | None = None,
|
|
33
|
-
) -> rest_types.GenerateResponse:
|
|
34
|
-
|
|
35
|
-
input = rest_types.GenerateInput(
|
|
36
|
-
prompt=prompt,
|
|
37
|
-
model=get_full_model_path(self.use_case_key(use_case), model),
|
|
38
|
-
stream=stream,
|
|
39
|
-
session_id=convert_optional_UUID(session_id),
|
|
40
|
-
user=convert_optional_UUID(user),
|
|
41
|
-
ab_campaign=ab_campaign,
|
|
42
|
-
n=n,
|
|
43
|
-
labels=labels,
|
|
44
|
-
)
|
|
45
|
-
r = self._rest_client.post(ROUTE, json=input.model_dump(exclude_none=True))
|
|
46
|
-
rest_error_handler(r)
|
|
47
|
-
return rest_types.GenerateResponse.model_validate(r.json())
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
class AsyncCompletions(AsyncAPIResource, UseCaseResource): # type: ignore[misc]
|
|
51
|
-
@override
|
|
52
|
-
def __init__(self, client: AsyncAdaptive) -> None:
|
|
53
|
-
AsyncAPIResource.__init__(self, client)
|
|
54
|
-
UseCaseResource.__init__(self, client)
|
|
55
|
-
|
|
56
|
-
async def create(
|
|
57
|
-
self,
|
|
58
|
-
prompt: str,
|
|
59
|
-
model: str | None = None,
|
|
60
|
-
stream: bool | None = None,
|
|
61
|
-
session_id: str | UUID | None = None,
|
|
62
|
-
use_case: str | None = None,
|
|
63
|
-
user: str | UUID | None = None,
|
|
64
|
-
ab_campaign: str | None = None,
|
|
65
|
-
n: int | None = None,
|
|
66
|
-
labels: dict[str, str] | None = None,
|
|
67
|
-
) -> rest_types.GenerateResponse:
|
|
68
|
-
|
|
69
|
-
input = rest_types.GenerateInput(
|
|
70
|
-
prompt=prompt,
|
|
71
|
-
model=get_full_model_path(self.use_case_key(use_case), model),
|
|
72
|
-
stream=stream,
|
|
73
|
-
session_id=convert_optional_UUID(session_id),
|
|
74
|
-
user=convert_optional_UUID(user),
|
|
75
|
-
ab_campaign=ab_campaign,
|
|
76
|
-
n=n,
|
|
77
|
-
labels=labels,
|
|
78
|
-
)
|
|
79
|
-
r = await self._rest_client.post(
|
|
80
|
-
ROUTE, json=input.model_dump(exclude_none=True)
|
|
81
|
-
)
|
|
82
|
-
rest_error_handler(r)
|
|
83
|
-
return rest_types.GenerateResponse.model_validate(r.json())
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
from typing import TYPE_CHECKING, Sequence, Any
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
|
|
5
|
-
from .base_resource import SyncAPIResource, AsyncAPIResource, UseCaseResource
|
|
6
|
-
from adaptive_sdk.graphql_client import (
|
|
7
|
-
CustomScriptData,
|
|
8
|
-
CustomScriptFilterInput,
|
|
9
|
-
CreateRecipeInput,
|
|
10
|
-
Upload,
|
|
11
|
-
CustomRecipeConfigInput,
|
|
12
|
-
CustomRecipeTrainingJobInput,
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
if TYPE_CHECKING:
|
|
16
|
-
from adaptive_sdk.client import Adaptive, AsyncAdaptive
|
|
17
|
-
import mimetypes
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class CustomRecipes(SyncAPIResource, UseCaseResource): # type: ignore[misc]
|
|
21
|
-
"""
|
|
22
|
-
Resource to interact with custom scripts.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
def __init__(self, client: Adaptive) -> None:
|
|
26
|
-
SyncAPIResource.__init__(self, client)
|
|
27
|
-
UseCaseResource.__init__(self, client)
|
|
28
|
-
|
|
29
|
-
def list(self, use_case: str | None = None) -> Sequence[CustomScriptData]:
|
|
30
|
-
filter = CustomScriptFilterInput()
|
|
31
|
-
return self._gql_client.list_custom_scripts(
|
|
32
|
-
use_case=self.use_case_key(use_case), filter=filter
|
|
33
|
-
).custom_scripts
|
|
34
|
-
|
|
35
|
-
def upload(
|
|
36
|
-
self,
|
|
37
|
-
file_path: str,
|
|
38
|
-
custom_script_key: str,
|
|
39
|
-
name: str | None = None,
|
|
40
|
-
use_case: str | None = None,
|
|
41
|
-
) -> CustomScriptData:
|
|
42
|
-
filename = Path(file_path).stem
|
|
43
|
-
input = CreateRecipeInput(
|
|
44
|
-
key=custom_script_key,
|
|
45
|
-
name=name or filename,
|
|
46
|
-
)
|
|
47
|
-
content_type = mimetypes.guess_type(file_path)[0] or "application/octet-stream"
|
|
48
|
-
with open(file_path, "rb") as f:
|
|
49
|
-
file_upload = Upload(
|
|
50
|
-
filename=filename, content=f, content_type=content_type
|
|
51
|
-
)
|
|
52
|
-
return self._gql_client.create_custom_script(
|
|
53
|
-
use_case=self.use_case_key(use_case), input=input, file=file_upload
|
|
54
|
-
).create_custom_script
|
|
55
|
-
|
|
56
|
-
def run_training_recipe(
|
|
57
|
-
self,
|
|
58
|
-
model: str,
|
|
59
|
-
recipe_key: str,
|
|
60
|
-
output_name: str,
|
|
61
|
-
recipe_args: Any | None = None,
|
|
62
|
-
name: str | None = None,
|
|
63
|
-
wait: bool = False,
|
|
64
|
-
use_case: str | None = None,
|
|
65
|
-
compute_pool: str | None = None,
|
|
66
|
-
):
|
|
67
|
-
config = CustomRecipeConfigInput(
|
|
68
|
-
recipe=recipe_key,
|
|
69
|
-
args=recipe_args,
|
|
70
|
-
outputName=output_name,
|
|
71
|
-
)
|
|
72
|
-
input = CustomRecipeTrainingJobInput(
|
|
73
|
-
model=model,
|
|
74
|
-
useCase=self.use_case_key(use_case),
|
|
75
|
-
name=name,
|
|
76
|
-
config=config,
|
|
77
|
-
wait=wait,
|
|
78
|
-
computePool=compute_pool,
|
|
79
|
-
)
|
|
80
|
-
return self._gql_client.create_custom_recipe_training_job(
|
|
81
|
-
input
|
|
82
|
-
).create_custom_recipe_training_job
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
class AsyncCustomRecipes(AsyncAPIResource, UseCaseResource): # type: ignore[misc]
|
|
86
|
-
"""
|
|
87
|
-
Resource to interact with custom scripts.
|
|
88
|
-
"""
|
|
89
|
-
|
|
90
|
-
def __init__(self, client: AsyncAdaptive) -> None:
|
|
91
|
-
AsyncAPIResource.__init__(self, client)
|
|
92
|
-
UseCaseResource.__init__(self, client)
|
|
93
|
-
|
|
94
|
-
async def list(self, use_case: str | None = None) -> Sequence[CustomScriptData]:
|
|
95
|
-
filter = CustomScriptFilterInput()
|
|
96
|
-
return (
|
|
97
|
-
await self._gql_client.list_custom_scripts(
|
|
98
|
-
use_case=self.use_case_key(use_case), filter=filter
|
|
99
|
-
)
|
|
100
|
-
).custom_scripts
|
|
101
|
-
|
|
102
|
-
async def upload(
|
|
103
|
-
self,
|
|
104
|
-
file_path: str,
|
|
105
|
-
custom_script_key: str,
|
|
106
|
-
name: str | None = None,
|
|
107
|
-
use_case: str | None = None,
|
|
108
|
-
) -> CustomScriptData:
|
|
109
|
-
filename = Path(file_path).stem
|
|
110
|
-
input = CreateRecipeInput(
|
|
111
|
-
key=custom_script_key,
|
|
112
|
-
name=name or filename,
|
|
113
|
-
)
|
|
114
|
-
content_type = mimetypes.guess_type(file_path)[0] or "application/octet-stream"
|
|
115
|
-
with open(file_path, "rb") as f:
|
|
116
|
-
file_upload = Upload(
|
|
117
|
-
filename=filename, content=f, content_type=content_type
|
|
118
|
-
)
|
|
119
|
-
return (
|
|
120
|
-
await self._gql_client.create_custom_script(
|
|
121
|
-
use_case=self.use_case_key(use_case), input=input, file=file_upload
|
|
122
|
-
)
|
|
123
|
-
).create_custom_script
|
|
124
|
-
|
|
125
|
-
async def run_training_recipe(
|
|
126
|
-
self,
|
|
127
|
-
model: str,
|
|
128
|
-
recipe_key: str,
|
|
129
|
-
output_name: str,
|
|
130
|
-
recipe_args: Any | None = None,
|
|
131
|
-
name: str | None = None,
|
|
132
|
-
wait: bool = False,
|
|
133
|
-
use_case: str | None = None,
|
|
134
|
-
compute_pool: str | None = None,
|
|
135
|
-
):
|
|
136
|
-
config = CustomRecipeConfigInput(
|
|
137
|
-
recipe=recipe_key,
|
|
138
|
-
args=recipe_args,
|
|
139
|
-
outputName=output_name,
|
|
140
|
-
)
|
|
141
|
-
input = CustomRecipeTrainingJobInput(
|
|
142
|
-
model=model,
|
|
143
|
-
useCase=self.use_case_key(use_case),
|
|
144
|
-
name=name,
|
|
145
|
-
config=config,
|
|
146
|
-
wait=wait,
|
|
147
|
-
computePool=compute_pool,
|
|
148
|
-
)
|
|
149
|
-
return (
|
|
150
|
-
await self._gql_client.create_custom_recipe_training_job(input)
|
|
151
|
-
).create_custom_recipe_training_job
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
from typing import TYPE_CHECKING
|
|
3
|
-
|
|
4
|
-
from .jobs import EvalJobs, AsyncEvalJobs
|
|
5
|
-
|
|
6
|
-
if TYPE_CHECKING:
|
|
7
|
-
from adaptive_sdk.client import Adaptive, AsyncAdaptive
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Evaluation:
|
|
11
|
-
def __init__(self, client: Adaptive) -> None:
|
|
12
|
-
self.jobs: EvalJobs = EvalJobs(client)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class AsyncEvaluation:
|
|
16
|
-
def __init__(self, client: AsyncAdaptive) -> None:
|
|
17
|
-
self.jobs: AsyncEvalJobs = AsyncEvalJobs(client)
|