clarifai 11.1.4rc2__py3-none-any.whl → 11.1.5rc1__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.
Files changed (46) hide show
  1. clarifai/__init__.py +1 -1
  2. clarifai/cli/__pycache__/model.cpython-310.pyc +0 -0
  3. clarifai/cli/model.py +46 -10
  4. clarifai/client/model.py +89 -364
  5. clarifai/client/model_client.py +400 -0
  6. clarifai/client/workflow.py +2 -2
  7. clarifai/datasets/upload/loaders/__pycache__/__init__.cpython-310.pyc +0 -0
  8. clarifai/datasets/upload/loaders/__pycache__/coco_detection.cpython-310.pyc +0 -0
  9. clarifai/rag/__pycache__/rag.cpython-310.pyc +0 -0
  10. clarifai/runners/__init__.py +2 -7
  11. clarifai/runners/__pycache__/__init__.cpython-310.pyc +0 -0
  12. clarifai/runners/__pycache__/server.cpython-310.pyc +0 -0
  13. clarifai/runners/dockerfile_template/Dockerfile.template +4 -32
  14. clarifai/runners/models/__pycache__/base_typed_model.cpython-310.pyc +0 -0
  15. clarifai/runners/models/__pycache__/model_builder.cpython-310.pyc +0 -0
  16. clarifai/runners/models/__pycache__/model_class.cpython-310.pyc +0 -0
  17. clarifai/runners/models/__pycache__/model_run_locally.cpython-310.pyc +0 -0
  18. clarifai/runners/models/__pycache__/model_runner.cpython-310.pyc +0 -0
  19. clarifai/runners/models/__pycache__/model_servicer.cpython-310.pyc +0 -0
  20. clarifai/runners/models/model_builder.py +47 -20
  21. clarifai/runners/models/model_class.py +249 -25
  22. clarifai/runners/models/model_run_locally.py +5 -2
  23. clarifai/runners/models/model_runner.py +2 -0
  24. clarifai/runners/models/model_servicer.py +11 -2
  25. clarifai/runners/server.py +26 -9
  26. clarifai/runners/utils/__pycache__/const.cpython-310.pyc +0 -0
  27. clarifai/runners/utils/__pycache__/data_handler.cpython-310.pyc +0 -0
  28. clarifai/runners/utils/__pycache__/method_signatures.cpython-310.pyc +0 -0
  29. clarifai/runners/utils/__pycache__/serializers.cpython-310.pyc +0 -0
  30. clarifai/runners/utils/const.py +1 -1
  31. clarifai/runners/utils/data_handler.py +308 -205
  32. clarifai/runners/utils/method_signatures.py +437 -0
  33. clarifai/runners/utils/serializers.py +132 -0
  34. clarifai/utils/evaluation/__pycache__/__init__.cpython-310.pyc +0 -0
  35. clarifai/utils/evaluation/__pycache__/helpers.cpython-310.pyc +0 -0
  36. clarifai/utils/evaluation/__pycache__/main.cpython-310.pyc +0 -0
  37. clarifai/utils/misc.py +12 -0
  38. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/METADATA +3 -2
  39. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/RECORD +43 -36
  40. clarifai/runners/models/base_typed_model.py +0 -238
  41. clarifai/runners/models/model_upload.py +0 -607
  42. clarifai/runners/utils/#const.py# +0 -30
  43. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/LICENSE +0 -0
  44. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/WHEEL +0 -0
  45. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/entry_points.txt +0 -0
  46. {clarifai-11.1.4rc2.dist-info → clarifai-11.1.5rc1.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- clarifai/__init__.py,sha256=5OapSO2V91rqpOHdVy0RsIMd_yhKwAFpy7L2nTUB7hM,26
1
+ clarifai/__init__.py,sha256=5B7b93t2VQEf7mnj6P0kUJcGZiWQD7DaL9EA8x7K2I4,26
2
2
  clarifai/cli.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  clarifai/errors.py,sha256=RwzTajwds51wLD0MVlMC5kcpBnzRpreDLlazPSBZxrg,2605
4
4
  clarifai/versions.py,sha256=jctnczzfGk_S3EnVqb2FjRKfSREkNmvNEwAAa_VoKiQ,222
@@ -12,14 +12,14 @@ clarifai/cli/__main__.py~,sha256=ozwaF8wYiURORkuFhk0_wsDPUYZjH547Wz9eVk-4nro,70
12
12
  clarifai/cli/base.py,sha256=eaUsp7S1e2dslC437Hjk7gUBQsng13ID3N3lkYotB2U,3403
13
13
  clarifai/cli/compute_cluster.py,sha256=N2dNQNJEPg9nxsb8x2igEzYuGRzjn7l4kNttjFIxmhI,1827
14
14
  clarifai/cli/deployment.py,sha256=sUEuz5-rtozMx8deVcJXLi6lHsP2jc8x3y2MpUAVfqY,2506
15
- clarifai/cli/model.py,sha256=yu4VBm8dNL2al2MrLq7Ohrkx92zRNTh9soLdkwNOKx4,10643
15
+ clarifai/cli/model.py,sha256=nxi7i21H5sNKLCvlJsP0oHS9-EBTbyN2gIC0aVERkI4,11990
16
16
  clarifai/cli/nodepool.py,sha256=yihxS_rIFoBBKzRlqBX8Ab42iPpBMJrJFsk8saph6ms,3049
17
17
  clarifai/cli/__pycache__/__init__.cpython-310.pyc,sha256=4ksYQqqaAMCKwyxNsG7hfJGjXDc8y78s9n7AxCEaTQo,160
18
18
  clarifai/cli/__pycache__/__main__.cpython-310.pyc,sha256=CM9FOqcSyt-DLnck7FovGDxqT4FPkge7ggq61EsRjjA,250
19
19
  clarifai/cli/__pycache__/base.cpython-310.pyc,sha256=a7mN_r511p_Ao8aXrWU9KPSe8wkDZJW4p8UhlD6EoB8,3151
20
20
  clarifai/cli/__pycache__/compute_cluster.cpython-310.pyc,sha256=NHLAcVEwqUhci0KB5DpnPWUqXcCttpWrA3F5zld4qN8,1985
21
21
  clarifai/cli/__pycache__/deployment.cpython-310.pyc,sha256=AhfbPlwjjj_TmC2UayjuRbNr00dOukDl6NfLhm2rIng,2278
22
- clarifai/cli/__pycache__/model.cpython-310.pyc,sha256=Xv9ztIWC9wG2Yx9HB46gcBk6L34zpvQJFeDHmevuXLg,7978
22
+ clarifai/cli/__pycache__/model.cpython-310.pyc,sha256=Rory2IgsnFWkAiHMM3XkA-zShxX_zHwEWTKFP1V1Weo,8542
23
23
  clarifai/cli/__pycache__/nodepool.cpython-310.pyc,sha256=nEmM-s1HFg7xM5x-bpnqHFWAVLWj0J0ZskYtd6NSq20,2473
24
24
  clarifai/client/__init__.py,sha256=xI1U0l5AZdRThvQAXCLsd9axxyFzXXJ22m8LHqVjQRU,662
25
25
  clarifai/client/app.py,sha256=6pckYme1urV2YJjLIYfeZ-vH0Z5YSQa51jzIMcEfwug,38342
@@ -29,12 +29,13 @@ clarifai/client/dataset.py,sha256=y3zKT_VhP1gyN3OO-b3cPeW21ZXyKbQ7ZJkEG06bsTU,32
29
29
  clarifai/client/deployment.py,sha256=w7Y6pA1rYG4KRK1SwusRZc2sQRXlG8wezuVdzSWpCo0,2586
30
30
  clarifai/client/input.py,sha256=obMAHMDU1OwfXZ8KraOnGFlWzlW-3F7Ob_2lcOQMlhY,46339
31
31
  clarifai/client/lister.py,sha256=03KGMvs5RVyYqxLsSrWhNc34I8kiF1Ph0NeyEwu7nMU,2082
32
- clarifai/client/model.py,sha256=0HC22i8RCjkC2lwRKnokMR6eaSt9_XXbi1Oim4sZVk4,88620
32
+ clarifai/client/model.py,sha256=aZFeU4rjTIjC9IlWmJ-Gg9lHLrHDVKXWv80AFYdPEhc,75127
33
+ clarifai/client/model_client.py,sha256=OfJvOvP-n61WrB-ZdtJVYkeM8HtM1T388V4yhP8OVJc,15494
33
34
  clarifai/client/module.py,sha256=FTkm8s9m-EaTKN7g9MnLhGJ9eETUfKG7aWZ3o1RshYs,4204
34
35
  clarifai/client/nodepool.py,sha256=la3vTFrO4LX8zm2eQ5jqf2L0-kQ63Dano8FibadoZbk,10152
35
36
  clarifai/client/search.py,sha256=GaPWN6JmTQGZaCHr6U1yv0zqR6wKFl7i9IVLg2ul1CI,14254
36
37
  clarifai/client/user.py,sha256=WOv66ww2wx9isIge3V-xTHCkqC6akl2jEGAxzT_Ugfs,17642
37
- clarifai/client/workflow.py,sha256=BOmA1ilHxsw-yl_ZE1NOEshzV7owavnXTIG2UOD6PuA,12163
38
+ clarifai/client/workflow.py,sha256=5VjZ2D8cudLznR8yhrwNawOmjxUhkJllZMKM6pn-4gs,12170
38
39
  clarifai/client/__pycache__/__init__.cpython-310.pyc,sha256=sjcH3Oc-vVFHbcem6LRCcjDRdT5dXQUHptNByd1Y6xc,887
39
40
  clarifai/client/__pycache__/app.cpython-310.pyc,sha256=vvLJXma0JaP5rVWHrCGDJMa_ocnHYZ2h022C03AQvak,23570
40
41
  clarifai/client/__pycache__/base.cpython-310.pyc,sha256=wzkJM4ZlSCOjYvxlXS0Aq7VEGLjWqDxMdgFfOLTJi6k,6088
@@ -90,6 +91,8 @@ clarifai/datasets/upload/loaders/coco_captions.py,sha256=YfuNXplbdoH8N9ph7RyN9Mf
90
91
  clarifai/datasets/upload/loaders/coco_detection.py,sha256=_I_yThw435KS9SH7zheBbJDK3zFgjTImBsES__ijjMk,2831
91
92
  clarifai/datasets/upload/loaders/imagenet_classification.py,sha256=i7W5F6FTB3LwLmhPgjZHmbCbS3l4LmjsuBFKtjxl1pU,1962
92
93
  clarifai/datasets/upload/loaders/xview_detection.py,sha256=hk8cZdYZimm4KOaZvBjYcC6ikURZMn51xmn7pXZT3HE,6052
94
+ clarifai/datasets/upload/loaders/__pycache__/__init__.cpython-310.pyc,sha256=-H40c9g_Ogcbc8Vwd0oPnMBvjvkWsOwk7ClZ9tLrFps,180
95
+ clarifai/datasets/upload/loaders/__pycache__/coco_detection.cpython-310.pyc,sha256=-p_2VcLY140ZZpa-7HUcYyVyomg5JEd7QF2O6qGBg_A,2854
93
96
  clarifai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
94
97
  clarifai/models/api.py,sha256=d3FQQlG0mNDLrfEvchqaVcq4Tgb_TqryNnJtwp3c7sE,10961
95
98
  clarifai/models/__pycache__/__init__.cpython-310.pyc,sha256=zKs_C3koRzmCtCEoPKOXKb8mnTTbTghIzRhHUnb_6oM,163
@@ -121,44 +124,45 @@ clarifai/rag/__init__.py,sha256=wu3PzAzo7uqgrEzuaC9lY_3gj1HFiR3GU3elZIKTT5g,40
121
124
  clarifai/rag/rag.py,sha256=bqUWnfdf91OYMucEK0_rJXDwg0oKjz5c7eda-9CPXu8,12680
122
125
  clarifai/rag/utils.py,sha256=yr1jAcbpws4vFGBqlAwPPE7v1DRba48g8gixLFw8OhQ,4070
123
126
  clarifai/rag/__pycache__/__init__.cpython-310.pyc,sha256=xAV8OBmLU6qidHU5fr1p2OvQc5N4sy6X1W6ToAUX3mw,213
124
- clarifai/rag/__pycache__/rag.cpython-310.pyc,sha256=a46wbk0s9On4CHKUso-wBCiscINER6X4Anka1yVW04w,9519
127
+ clarifai/rag/__pycache__/rag.cpython-310.pyc,sha256=_xylc1DvMu1KYcDr-dtfUU2uzUjL29Uq3mRH-Iu7_h0,9738
125
128
  clarifai/rag/__pycache__/utils.cpython-310.pyc,sha256=IDUXR7Iv4KfHSY3sbx_bgPdJQn2ozyRCuz01EUTmCUw,3694
126
- clarifai/runners/__init__.py,sha256=FcTqyCvPn9lJFDsi2eGZ-YL8LgPhJmRAS8K5Wobk03s,411
127
- clarifai/runners/server.py,sha256=Wp3bUHNudFV3Ew2egU7X6f3TCTbBgV__15Rw2yd9jY0,3649
128
- clarifai/runners/__pycache__/__init__.cpython-310.pyc,sha256=fDW5OMOxp7N8ZekWweAcxkEZM1Cs1QbIpkG258VJtBI,530
129
- clarifai/runners/__pycache__/server.cpython-310.pyc,sha256=a6yFsRHEWmPhlvVlBx4AhsOms7Q4If62hhmldpW_d6Q,3644
129
+ clarifai/runners/__init__.py,sha256=cDJ31l41dDsqW4Xn6sFMkKxxdIMTnGH9IW6sVkq0TNw,207
130
+ clarifai/runners/server.py,sha256=xHDLdhQApCgYG19QOKXqJNCGNyw1Vsvobq3UdryDrVc,4132
131
+ clarifai/runners/__pycache__/__init__.cpython-310.pyc,sha256=VGSCzJUpHYJvSUMVIKhz3kmq0X5Kt8KFC6RnngonzDc,530
132
+ clarifai/runners/__pycache__/server.cpython-310.pyc,sha256=HfZ6_Vrr5q78nznFqP_aWhPENplHIol_qPaf8lLlotE,3229
130
133
  clarifai/runners/dockerfile_template/Dockerfile.debug,sha256=sRlfRmSLE_TiLORcVRx-3-B0vvSNeUYgm0CCrWmLvAA,667
131
134
  clarifai/runners/dockerfile_template/Dockerfile.debug~,sha256=7YOVg3adIaiudfSkfLGeyxt-FfIBbD3UIIYccrIVJTs,426
132
- clarifai/runners/dockerfile_template/Dockerfile.template,sha256=L2SSEBqkJcOtf02r0jrH1nzjcgVB0eRYx2gDLBU2iEs,3171
135
+ clarifai/runners/dockerfile_template/Dockerfile.template,sha256=cibinDDE4uRGt2d2ho2T7CduSeDF6R2n7U4_4MAouPw,2521
133
136
  clarifai/runners/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
- clarifai/runners/models/base_typed_model.py,sha256=0QCWxch8CcyJSKvE1D4PILd2RSnQZHTmx4DXlQQ6dpo,7856
135
- clarifai/runners/models/model_builder.py,sha256=f3OS6mnDAWf4PvugCrED4-deAA0ea7y06ZDtdUKmfoI,32004
136
- clarifai/runners/models/model_class.py,sha256=9JSPAr4U4K7xI0kSl-q0mHB06zknm2OR-8XIgBCto94,1611
137
- clarifai/runners/models/model_run_locally.py,sha256=den2rmw7gDS7VIssz7cpoSDzPdw0yunLnmxPv0jiEbs,20638
138
- clarifai/runners/models/model_runner.py,sha256=PyxwK-33hLlhkD07tTXkjWZ_iNlZHl9_8AZ2W7WfExI,6097
139
- clarifai/runners/models/model_servicer.py,sha256=jtQmtGeQlvQ5ttMvVw7CMnNzq-rLkTaxR2IWF9SnHwk,2808
140
- clarifai/runners/models/model_upload.py,sha256=VjJgNNBPP9O7LkNCXxOqa0lTW1M7k6XKVyI6XlLdXIc,25095
137
+ clarifai/runners/models/model_builder.py,sha256=UCAeJiP_fRFfIuVI1sOge7LMwe-psgvdBuZ0LsJQMpM,33062
138
+ clarifai/runners/models/model_class.py,sha256=S-Bgs9c5SKzbg20ZaBFZ5XMLfgGahdgkhSli-b3wlN8,10658
139
+ clarifai/runners/models/model_run_locally.py,sha256=V770O-7yQQQlh80u48NZTEHkX3gj1HyclHbu1tjvaQ8,20864
140
+ clarifai/runners/models/model_runner.py,sha256=qyc73pe4xc9BsUKHwnOyC9g-RNCARiFis4GTh-yg0vg,6219
141
+ clarifai/runners/models/model_servicer.py,sha256=A--b1P71PBCAMJCpy_-fpNDkfCVdvdMh1LleW15dSas,3037
141
142
  clarifai/runners/models/__pycache__/__init__.cpython-310.pyc,sha256=GTFjzypyx5wnDGqxYeY01iya1CELKb5fOFBFLV031yU,171
142
- clarifai/runners/models/__pycache__/base_typed_model.cpython-310.pyc,sha256=CubexZ9Ie7mrZcER8LE9V_KKESZgXZJS_JYxq5kYYMg,8271
143
- clarifai/runners/models/__pycache__/model_builder.cpython-310.pyc,sha256=Y0KPtyrWfsToC3xLd36owymVdHueO_MbxmeYDizrcBM,25834
144
- clarifai/runners/models/__pycache__/model_class.cpython-310.pyc,sha256=OxOQDH4G_XXvXCOChWLjONFVcDWdr6T00JjQvKx1AgA,1889
145
- clarifai/runners/models/__pycache__/model_run_locally.cpython-310.pyc,sha256=35VGAU78qM0T6pVmIoHNhIe0pWrU5JOQtNF7xwp8wGE,17073
146
- clarifai/runners/models/__pycache__/model_runner.cpython-310.pyc,sha256=OqkMwm5-oq9oOJOBaFWscG_yDOPXsZl3cpvZOnP8hMI,4964
147
- clarifai/runners/models/__pycache__/model_servicer.cpython-310.pyc,sha256=w5kENnKCiiZSpZF6g7N1wljHbnan3pi_mhZBm_VvD4Q,2489
143
+ clarifai/runners/models/__pycache__/base_typed_model.cpython-310.pyc,sha256=7yG3KnWmyOBjHF6eTXPO-P8nKZXf8pOXozFu1eCL0ws,8271
144
+ clarifai/runners/models/__pycache__/model_builder.cpython-310.pyc,sha256=0i6pT3F86bi6XX3TlkxoKPKvSs5dDnEpXWmnKselYZo,26683
145
+ clarifai/runners/models/__pycache__/model_class.cpython-310.pyc,sha256=beH4ssWg-EX2xO9yB2H-UzwvfN87TZIoxRpX7D1Rpaw,1889
146
+ clarifai/runners/models/__pycache__/model_run_locally.cpython-310.pyc,sha256=maLshBrvhTy0C6grT26JPAA14P-nD9WDWN25E2BErsE,16976
147
+ clarifai/runners/models/__pycache__/model_runner.cpython-310.pyc,sha256=FkdOM1ZovcqILVO1Hqbus2QtlvEbC3L_Ams3UhTHHFA,4964
148
+ clarifai/runners/models/__pycache__/model_servicer.cpython-310.pyc,sha256=9QTYk4zVHBUtlTfkH3WaE6frNdN6ba57EVj4bKe18YA,2501
148
149
  clarifai/runners/models/__pycache__/model_upload.cpython-310.pyc,sha256=erkIUHtJv1ohMOFT8EAJuVfBsEY4o0GxpeXrZqjrfGk,21046
149
- clarifai/runners/utils/#const.py#,sha256=H47gAAI93H0juXaz5dAXg2mPF5SmCxP8GXXVDVe49DU,929
150
150
  clarifai/runners/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
151
- clarifai/runners/utils/const.py,sha256=xnPeVuUHQ1K-LoEfhLCmzOV6UQoPS1jqDqQJ5h0IvPU,1024
152
- clarifai/runners/utils/data_handler.py,sha256=sxy9zlAgI6ETuxCQhUgEXAn2GCsaW1GxpK6GTaMne0g,6966
151
+ clarifai/runners/utils/const.py,sha256=bwj-Pcw558-pasdIFbNhnkn-9oiCdojYH1fNTTUG2gU,1048
152
+ clarifai/runners/utils/data_handler.py,sha256=zCA_C3mbxgMroqrygMa5xsyuMF476mgd697MUPlOR0E,8327
153
153
  clarifai/runners/utils/data_utils.py,sha256=R1iQ82TuQ9JwxCJk8yEB1Lyb0BYVhVbWJI9YDi1zGOs,318
154
154
  clarifai/runners/utils/loader.py,sha256=SgNHMwRmCCymFQm8aDp73NmIUHhM-N60CBlTKbPzmVc,7470
155
+ clarifai/runners/utils/method_signatures.py,sha256=BmljuTasajCFeEhwGjYqe5O6G2p3zLU1dGVC95_N9uw,16778
156
+ clarifai/runners/utils/serializers.py,sha256=ZtI32AI2Vcjri54KNwBZ0CmTpaJOTfJ5I5mSI5nTQLY,3928
155
157
  clarifai/runners/utils/url_fetcher.py,sha256=v_8JOWmkyFAzsBulsieKX7Nfjy1Yg7wGSZeqfEvw2cg,1640
156
158
  clarifai/runners/utils/__pycache__/__init__.cpython-310.pyc,sha256=PRPZOzUV5Z8grWizu5RKOkki0iLYxZDJBgsLfmCcieE,170
157
- clarifai/runners/utils/__pycache__/const.cpython-310.pyc,sha256=GgQl29lAOr6MJnjA03f5myvcemWXhQL6NQfkmknlvKQ,872
158
- clarifai/runners/utils/__pycache__/data_handler.cpython-310.pyc,sha256=YVncnM0NaHeMaZAyALxaHCdtUT6n5E3BI99-54Bs6HM,7961
159
+ clarifai/runners/utils/__pycache__/const.cpython-310.pyc,sha256=EBpjmzlqWBxRGqu_KXeVx80uDslhufrErs57SbLr3DE,953
160
+ clarifai/runners/utils/__pycache__/data_handler.cpython-310.pyc,sha256=REXKSnzTcwbRu09ygCQ_41EdpJa-lmTkc5oMx8nL07U,7961
159
161
  clarifai/runners/utils/__pycache__/data_utils.cpython-310.pyc,sha256=1e6NiK6bnJiiAo2KPsDmm91BSlbI3mVkQZKbDfh5hBI,642
160
162
  clarifai/runners/utils/__pycache__/loader.cpython-310.pyc,sha256=X1MwgLanVXLs-QLot1X145A36W29ONXZRZe5q6_jARo,7319
161
163
  clarifai/runners/utils/__pycache__/logging.cpython-310.pyc,sha256=VV0KFcnuYpFFtaG4EeDIgg7c4QEsBLo-eX_NnsyFEhA,331
164
+ clarifai/runners/utils/__pycache__/method_signatures.cpython-310.pyc,sha256=YQwROEZupQao2V6oNRiXi4IeWyk1iZRs07jsKsxtzO0,12882
165
+ clarifai/runners/utils/__pycache__/serializers.cpython-310.pyc,sha256=9chtKBxIfQmUrJo284HV4307Ltul8fqfuoPzzPU_NGs,5277
162
166
  clarifai/runners/utils/__pycache__/url_fetcher.cpython-310.pyc,sha256=jFxVdOmm7DCkgatv1GwIXeefHthpvlkg4ybBlMnmxss,1739
163
167
  clarifai/schema/search.py,sha256=JjTi8ammJgZZ2OGl4K6tIA4zEJ1Fr2ASZARXavI1j5c,2448
164
168
  clarifai/schema/__pycache__/search.cpython-310.pyc,sha256=aYuMHmn0ovwmeOhTDj7QAURrQAjlyLm1CwKaz6xktZU,2484
@@ -168,7 +172,7 @@ clarifai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
168
172
  clarifai/utils/cli.py,sha256=CdcLsF00KdfA-BgMIbO-u88gUF9Ts1n0TDDZS-oImp8,1949
169
173
  clarifai/utils/constants.py,sha256=MG_iHnSwNEyUZOpvsrTicNwaT4CIjmlK_Ixk_qqEX8g,142
170
174
  clarifai/utils/logging.py,sha256=CVy8OsLrlbg-b8qe88kb1yO_9wi9wRYfF-QkIaN9xE8,11936
171
- clarifai/utils/misc.py,sha256=FTmjnjkvytSVb712J2qndVDYD8XUL70LE-G-5PNL3m4,2601
175
+ clarifai/utils/misc.py,sha256=4aNOHPTNdX-WGxuNab8qKePoCMUnscd-aN_dQEIVSWk,2933
172
176
  clarifai/utils/model_train.py,sha256=Mndqy5GNu7kjQHjDyNVyamL0hQFLGSHcWhOuPyOvr1w,8005
173
177
  clarifai/utils/__pycache__/__init__.cpython-310.pyc,sha256=Q8oK40IQ32SEvd407TGiOQBVbhwcw7_LPevp0mEUr9Y,159
174
178
  clarifai/utils/__pycache__/logging.cpython-310.pyc,sha256=IK3h-kOoiCWg467LkZFnAjIpndUKOqW8j-KzFhx_icY,3183
@@ -178,6 +182,9 @@ clarifai/utils/evaluation/__init__.py,sha256=PYkurUrXrGevByj7RFb6CoU1iC7fllyQSfn
178
182
  clarifai/utils/evaluation/helpers.py,sha256=aZeHLI7oSmU5YDWQp5GdkYW5qbHx37nV9xwunKTAwWM,18549
179
183
  clarifai/utils/evaluation/main.py,sha256=sQAuMk0lPclXCYvy_rS7rYteo2xh9Ju13VNvbyGt_VM,15779
180
184
  clarifai/utils/evaluation/testset_annotation_parser.py,sha256=iZfLw6oR1qgJ3MHMbOZXcGBLu7btSDn0VqdiAzpIm4g,5002
185
+ clarifai/utils/evaluation/__pycache__/__init__.cpython-310.pyc,sha256=-C838xXeNrzhCh0xIqfftuPKDC9h_ssyxXUmpFIniK8,241
186
+ clarifai/utils/evaluation/__pycache__/helpers.cpython-310.pyc,sha256=nUdaa4nCkTOl7oDZYO-jox2xnk3RBmeMH0q0JX4COmM,16758
187
+ clarifai/utils/evaluation/__pycache__/main.cpython-310.pyc,sha256=AIl_NUII-0bIzBo59fwt6JM5URRFerSzlgIUbsBdO-A,14849
181
188
  clarifai/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
182
189
  clarifai/workflows/export.py,sha256=vICRhIreqDSShxLKjHNM2JwzKsf1B4fdXB0ciMcA70k,1945
183
190
  clarifai/workflows/utils.py,sha256=nGeB_yjVgUO9kOeKTg4OBBaBz-AwXI3m-huSVj-9W18,1924
@@ -186,9 +193,9 @@ clarifai/workflows/__pycache__/__init__.cpython-310.pyc,sha256=oRKg6B7Z-wWQy0EW2
186
193
  clarifai/workflows/__pycache__/export.cpython-310.pyc,sha256=cNmGLnww7xVpm4htd1vRhQJoEZ1dhpN1oD8iLLAtVzM,2418
187
194
  clarifai/workflows/__pycache__/utils.cpython-310.pyc,sha256=rm2kWk4a3GOKWoerXpEAEeRvGhEe7wPd0ZZ6jHtEGqY,1925
188
195
  clarifai/workflows/__pycache__/validate.cpython-310.pyc,sha256=QA1i6YdDpY824cqtQvkEaFPpaCa2iqfOwFouqwZfAKY,2139
189
- clarifai-11.1.4rc2.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
190
- clarifai-11.1.4rc2.dist-info/METADATA,sha256=ATJvWHHlwjNR80XlRNvonuRfPNoznpqZlgcbpkMYNas,22198
191
- clarifai-11.1.4rc2.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
192
- clarifai-11.1.4rc2.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
193
- clarifai-11.1.4rc2.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
194
- clarifai-11.1.4rc2.dist-info/RECORD,,
196
+ clarifai-11.1.5rc1.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
197
+ clarifai-11.1.5rc1.dist-info/METADATA,sha256=0gulnBxVFgowYwuRa_TxiyNRYZ5X1pXIi5q02DRz4_k,22229
198
+ clarifai-11.1.5rc1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
199
+ clarifai-11.1.5rc1.dist-info/entry_points.txt,sha256=X9FZ4Z-i_r2Ud1RpZ9sNIFYuu_-9fogzCMCRUD9hyX0,51
200
+ clarifai-11.1.5rc1.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
201
+ clarifai-11.1.5rc1.dist-info/RECORD,,
@@ -1,238 +0,0 @@
1
- import itertools
2
- from typing import Any, Dict, Iterator, List, Tuple
3
-
4
- import numpy as np
5
- from clarifai_grpc.grpc.api import resources_pb2, service_pb2
6
- from clarifai_grpc.grpc.api.service_pb2 import PostModelOutputsRequest
7
- from google.protobuf import json_format
8
-
9
- from ..utils.data_handler import InputDataHandler, OutputDataHandler
10
- from .model_class import ModelClass
11
-
12
-
13
- class AnyAnyModel(ModelClass):
14
-
15
- def load_model(self):
16
- """
17
- Load inference time artifacts that are called frequently .e.g. models, tokenizers, etc.
18
- in this method so they are loaded only once for faster inference.
19
- """
20
- raise NotImplementedError
21
-
22
- def parse_input_request(
23
- self, input_request: service_pb2.PostModelOutputsRequest) -> Tuple[List[Dict], Dict]:
24
- list_input_dict = [
25
- InputDataHandler.from_proto(input).to_python() for input in input_request.inputs
26
- ]
27
- inference_params = json_format.MessageToDict(
28
- input_request.model.model_version.output_info.params)
29
-
30
- return list_input_dict, inference_params
31
-
32
- def convert_output_to_proto(self, outputs: list):
33
- assert (isinstance(outputs, Iterator) or isinstance(outputs, list) or
34
- isinstance(outputs, tuple)), "outputs must be an Iterator"
35
- output_protos = []
36
- for output in outputs:
37
- if isinstance(output, OutputDataHandler):
38
- output = output.proto
39
- elif isinstance(output, resources_pb2.Output):
40
- pass
41
- else:
42
- raise NotImplementedError
43
- output_protos.append(output)
44
-
45
- return service_pb2.MultiOutputResponse(outputs=output_protos)
46
-
47
- def predict_wrapper(
48
- self, request: service_pb2.PostModelOutputsRequest) -> service_pb2.MultiOutputResponse:
49
- list_dict_input, inference_params = self.parse_input_request(request)
50
- outputs = self.predict(list_dict_input, inference_parameters=inference_params)
51
- return self.convert_output_to_proto(outputs)
52
-
53
- def generate_wrapper(
54
- self, request: PostModelOutputsRequest) -> Iterator[service_pb2.MultiOutputResponse]:
55
- list_dict_input, inference_params = self.parse_input_request(request)
56
- outputs = self.generate(list_dict_input, inference_parameters=inference_params)
57
- for output in outputs:
58
- yield self.convert_output_to_proto(output)
59
-
60
- def _preprocess_stream(
61
- self, request: Iterator[PostModelOutputsRequest]) -> Iterator[Tuple[List[Dict], List[Dict]]]:
62
- """Return generator of processed data (from proto to python) and inference parameters like predict and generate"""
63
- for i, req in enumerate(request):
64
- input_data, _ = self.parse_input_request(req)
65
- yield input_data
66
-
67
- def stream_wrapper(self, request: Iterator[PostModelOutputsRequest]
68
- ) -> Iterator[service_pb2.MultiOutputResponse]:
69
- first_request = next(request)
70
- _, inference_params = self.parse_input_request(first_request)
71
- request_iterator = itertools.chain([first_request], request)
72
- outputs = self.stream(self._preprocess_stream(request_iterator), inference_params)
73
- for output in outputs:
74
- yield self.convert_output_to_proto(output)
75
-
76
- def predict(self, input_data: List[Dict],
77
- inference_parameters: Dict[str, Any] = {}) -> List[OutputDataHandler]:
78
- """
79
- Prediction method.
80
-
81
- Args:
82
- -----
83
- - input_data: is list of dict where key is input type name.
84
- * image: np.ndarray
85
- * text: str
86
- * audio: bytes
87
-
88
- - inference_parameters (Dict[str, Union[bool, str, float, int]]): your inference parameters.
89
-
90
- Returns:
91
- --------
92
- List of OutputDataHandler
93
- """
94
- raise NotImplementedError
95
-
96
- def generate(self, input_data: List[Dict],
97
- inference_parameters: Dict[str, Any] = {}) -> Iterator[List[OutputDataHandler]]:
98
- """
99
- Generate method.
100
-
101
- Args:
102
- -----
103
- - input_data: is list of dict where key is input type name.
104
- * image: np.ndarray
105
- * text: str
106
- * audio: bytes
107
-
108
- - inference_parameters (Dict[str, Union[bool, str, float, int]]): your inference parameters.
109
-
110
- Yield:
111
- --------
112
- List of OutputDataHandler
113
- """
114
- raise NotImplementedError
115
-
116
- def stream(self, inputs: Iterator[List[Dict[str, Any]]],
117
- inference_params: Dict[str, Any]) -> Iterator[List[OutputDataHandler]]:
118
- """
119
- Stream method.
120
-
121
- Args:
122
- -----
123
- input_request: is an Iterator of Tuple which
124
- - First element (List[Dict[str, Union[np.ndarray, str, bytes]]]) is list of dict input data type which keys and values are:
125
- * image: np.ndarray
126
- * text: str
127
- * audio: bytes
128
-
129
- - Second element (Dict[str, Union[bool, str, float, int]]): is a dict of inference_parameters
130
-
131
- Yield:
132
- --------
133
- List of OutputDataHandler
134
- """
135
- raise NotImplementedError
136
-
137
-
138
- class VisualInputModel(AnyAnyModel):
139
-
140
- def parse_input_request(
141
- self, input_request: service_pb2.PostModelOutputsRequest) -> Tuple[List[Dict], Dict]:
142
- list_input_dict = [
143
- InputDataHandler.from_proto(input).image(format="np") for input in input_request.inputs
144
- ]
145
- inference_params = json_format.MessageToDict(
146
- input_request.model.model_version.output_info.params)
147
-
148
- return list_input_dict, inference_params
149
-
150
- def load_model(self):
151
- """
152
- Load inference time artifacts that are called frequently .e.g. models, tokenizers, etc.
153
- in this method so they are loaded only once for faster inference.
154
- """
155
- raise NotImplementedError
156
-
157
- def predict(self, input_data: List[np.ndarray],
158
- inference_parameters: Dict[str, Any] = {}) -> List[OutputDataHandler]:
159
- """
160
- Prediction method.
161
-
162
- Args:
163
- -----
164
- - input_data(List[np.ndarray]): is list of image as np.ndarray type
165
- - inference_parameters (Dict[str, Union[bool, str, float, int]]): your inference parameters.
166
-
167
- Returns:
168
- --------
169
- List of OutputDataHandler
170
- """
171
- raise NotImplementedError
172
-
173
-
174
- class TextInputModel(AnyAnyModel):
175
-
176
- def load_model(self):
177
- """
178
- Load inference time artifacts that are called frequently .e.g. models, tokenizers, etc.
179
- in this method so they are loaded only once for faster inference.
180
- """
181
- raise NotImplementedError
182
-
183
- def parse_input_request(
184
- self, input_request: service_pb2.PostModelOutputsRequest) -> Tuple[List[Dict], Dict]:
185
- list_input_text = [InputDataHandler.from_proto(input).text for input in input_request.inputs]
186
- inference_params = json_format.MessageToDict(
187
- input_request.model.model_version.output_info.params)
188
-
189
- return list_input_text, inference_params
190
-
191
- def predict(self, input_data: List[str],
192
- inference_parameters: Dict[str, Any] = {}) -> List[OutputDataHandler]:
193
- """
194
- Prediction method.
195
-
196
- Args:
197
- -----
198
- - input_data(List[str]): is list of text as str type
199
- - inference_parameters (Dict[str, Union[bool, str, float, int]]): your inference parameters.
200
-
201
- Returns:
202
- --------
203
- List of OutputDataHandler
204
- """
205
- raise NotImplementedError
206
-
207
- def generate(self, input_data: List[str],
208
- inference_parameters: Dict[str, Any] = {}) -> Iterator[List[OutputDataHandler]]:
209
- """
210
- Prediction method.
211
-
212
- Args:
213
- -----
214
- - input_data(List[str]): is list of text as str type
215
- - inference_parameters (Dict[str, Union[bool, str, float, int]]): your inference parameters.
216
-
217
- Yield:
218
- --------
219
- List of OutputDataHandler
220
- """
221
- raise NotImplementedError
222
-
223
- def stream(self, inputs: Iterator[List[str]],
224
- inference_params: Dict[str, Any]) -> Iterator[List[OutputDataHandler]]:
225
- """
226
- Stream method.
227
-
228
- Args:
229
- -----
230
- input_request: is an Iterator of Tuple which
231
- - First element (List[str]) is list of input text:
232
- - Second element (Dict[str, Union[bool, str, float, int]]): is a dict of inference_parameters
233
-
234
- Yield:
235
- --------
236
- List of OutputDataHandler
237
- """
238
- raise NotImplementedError