clarifai 10.3.0__py3-none-any.whl → 10.3.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: clarifai
3
- Version: 10.3.0
3
+ Version: 10.3.2
4
4
  Summary: Clarifai Python SDK
5
5
  Home-page: https://github.com/Clarifai/clarifai-python
6
6
  Author: Clarifai
@@ -83,6 +83,7 @@ Give the repo a star ⭐
83
83
  * [Smart Image Search](#smart-image-search)
84
84
  * [Smart Text Search](#smart-text-search)
85
85
  * [Filters](#filters)
86
+ * [Pagination](#pagination)
86
87
  * **[Retrieval Augmented Generation (RAG)](#retrieval-augmented-generation-rag)**
87
88
  * **[More Examples](#pushpin-more-examples)**
88
89
 
@@ -163,13 +164,13 @@ dataset = app.create_dataset(dataset_id="demo_dataset")
163
164
  # execute data upload to Clarifai app dataset
164
165
  from clarifai.datasets.upload.laoders.coco_detection import COCODetectionDataLoader
165
166
  coco_dataloader = COCODetectionDataLoader("images_dir", "coco_annotation_filepath")
166
- dataset.upload_dataset(dataloader=coco_dataloader, get_upload_status=True, log_warnings =True)
167
+ dataset.upload_dataset(dataloader=coco_dataloader, get_upload_status=True)
167
168
 
168
169
 
169
170
  #Try upload and record the failed outputs in log file.
170
171
  from clarifai.datasets.upload.utils import load_module_dataloader
171
172
  cifar_dataloader = load_module_dataloader('./image_classification/cifar10')
172
- dataset.upload_dataset(dataloader=cifar_dataloader, get_upload_status=True, log_warnings =True)
173
+ dataset.upload_dataset(dataloader=cifar_dataloader, log_warnings =True)
173
174
 
174
175
  #Retry upload from logs for `upload_dataset`
175
176
  dataset.retry_upload_from_logs(dataloader=cifar_dataloader, log_file_path='log_file.log',
@@ -478,6 +479,22 @@ Input filters allows to filter by input_type, status of inputs and by inputs_dat
478
479
  results = search.query(filters=[{'input_types': ['image', 'text']}])
479
480
  ```
480
481
 
482
+ #### Pagination
483
+
484
+ Below is an example of using Search with Pagination.
485
+
486
+ ```python
487
+ # Note: CLARIFAI_PAT must be set as env variable.
488
+ from clarifai.client.search import Search
489
+ search = Search(user_id="user_id", app_id="app_id", metric="cosine", pagination=True)
490
+
491
+ # Search by image url
492
+ results = search.query(ranks=[{"image_url": "https://samples.clarifai.com/metro-north.jpg"}],page_no=2,per_page=5)
493
+
494
+ for data in results:
495
+ print(data.hits[0].input.data.image.url)
496
+ ```
497
+
481
498
  ## Retrieval Augmented Generation (RAG)
482
499
 
483
500
  You can setup and start your RAG pipeline in 4 lines of code. The setup method automatically creates a new app and the necessary components under the hood. By default it uses the [mistral-7B-Instruct](https://clarifai.com/mistralai/completion/models/mistral-7B-Instruct) model.
@@ -1,16 +1,16 @@
1
1
  clarifai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  clarifai/cli.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  clarifai/errors.py,sha256=RwzTajwds51wLD0MVlMC5kcpBnzRpreDLlazPSBZxrg,2605
4
- clarifai/versions.py,sha256=mAiLKe7P3acWV9a8JoMJZNZ_fCVMfA3wKDrVlelETJY,186
4
+ clarifai/versions.py,sha256=xPTsxHOuPIMQNAWNhgvdZmB9sZD7aV5H3-B-geWghDE,186
5
5
  clarifai/client/__init__.py,sha256=xI1U0l5AZdRThvQAXCLsd9axxyFzXXJ22m8LHqVjQRU,662
6
6
  clarifai/client/app.py,sha256=LC3rnuqr97f-S7LsJ9Q7KZnYMBHGDAq4mcFjjcPjpqo,27240
7
7
  clarifai/client/base.py,sha256=FrnSY9tSxjTxhABfBzQz5-PEppWMPbIyvSNnx8mVz8s,6919
8
8
  clarifai/client/dataset.py,sha256=wKDpON8kbOXpbfOkre5EYKXT4zEX-5xu9LgtORNuhog,29903
9
- clarifai/client/input.py,sha256=hPCMj4f2YQhXKz4ziDDoWqMVhN88JprVm0sMhKkStEI,40574
9
+ clarifai/client/input.py,sha256=Av_gPrmwa1vorDs5Pz9jUbY1MwXHYFb3NyF_a1S1aII,41630
10
10
  clarifai/client/lister.py,sha256=03KGMvs5RVyYqxLsSrWhNc34I8kiF1Ph0NeyEwu7nMU,2082
11
- clarifai/client/model.py,sha256=CYWoIsg3i0HbPrdzfto8HPklkGO12u8YnVImDExYwNY,44093
11
+ clarifai/client/model.py,sha256=QTVSeR3D3SHh8rK6kWHATy87qS8khYeXIKbs9dn5W4I,58487
12
12
  clarifai/client/module.py,sha256=360JaOasX0DZCNE_Trj0LNTr-T_tUDZLfGpz0CdIi78,4248
13
- clarifai/client/search.py,sha256=naH8bBpl5UTlJT3WdyNd9TARGlaUtDPRvFf8IIUTDQA,11062
13
+ clarifai/client/search.py,sha256=iwZqwuEodbjIOEPMIjpic8caFGg3u51RK816pr-574o,14964
14
14
  clarifai/client/user.py,sha256=EQTeotfYTNedGcbTICYOUJqKgWhfVHvaMRTJ1hdoIdQ,10372
15
15
  clarifai/client/workflow.py,sha256=e3axkhU6c6WcxK9P5tgmnV464k-afslSzsSXx6nSMgA,10560
16
16
  clarifai/client/auth/__init__.py,sha256=7EwR0NrozkAUwpUnCsqXvE_p0wqx_SelXlSpKShKJK0,136
@@ -19,28 +19,28 @@ clarifai/client/auth/register.py,sha256=2CMdBsoVLoTfjyksE6j7BM2tiEc73WKYvxnwDDgN
19
19
  clarifai/client/auth/stub.py,sha256=KIzJZ8aRB1RzXJeWHDAx19HNdBsblPPHwYLfAkgI3rY,3779
20
20
  clarifai/constants/dataset.py,sha256=OXYirr0iaoN_47V6wxO0H6ptV81y8zNGapPBz9qqD8o,516
21
21
  clarifai/constants/input.py,sha256=WcHwToUVIK9ItAhDefaSohQHCLNeR55PSjZ0BFnoZ3U,28
22
- clarifai/constants/model.py,sha256=LsMkLVkuBpfS4j4yDW9M4O7HxzRpIuSo9qU5T8Wg2Co,217
22
+ clarifai/constants/model.py,sha256=oTad43ncskVHfQ9vEbL2yy0Fac666dXr7QuO8zZXHAE,245
23
23
  clarifai/constants/rag.py,sha256=WcHwToUVIK9ItAhDefaSohQHCLNeR55PSjZ0BFnoZ3U,28
24
- clarifai/constants/search.py,sha256=_g3S-JEvuygiFfMVK3cl4Ry9erZpt8Zo4ilXL2i3DAE,52
24
+ clarifai/constants/search.py,sha256=yYEqTaFg-KdnpJE_Ytp-EPVHIIC395iNtZrpVlLIf4o,101
25
25
  clarifai/constants/workflow.py,sha256=cECq1xdvf44MCdtK2AbkiuuwhyL-6OWZdQfYbsLKy_o,33
26
26
  clarifai/datasets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  clarifai/datasets/export/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
28
  clarifai/datasets/export/inputs_annotations.py,sha256=3Bv6JsPzSeGEEJlkF1KR8qDHc_QyHF0ddvHfSiB5Pjc,9479
29
29
  clarifai/datasets/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
30
  clarifai/datasets/upload/base.py,sha256=IP4sdBRfThk2l0W1rDWciFrAJnKwVsM-gu4zEslJ2_E,2198
31
- clarifai/datasets/upload/features.py,sha256=KeVxO36WrL3uqWCN_-aex1k28C5ZRTm6G8SmTtus6KA,1571
32
- clarifai/datasets/upload/image.py,sha256=Dlt0RM9qWSi4NcbVM1EjS1sp8zfIO3xWZS6TSSLAbVY,7481
33
- clarifai/datasets/upload/text.py,sha256=ek29V18x5LqmHqc-nmAljQcud9uRjZx8IV_lDX78zsY,1980
31
+ clarifai/datasets/upload/features.py,sha256=oq0PGpAw8LEafiSkdMMl0yn-NJeZ7K_CKzpJ71b0H40,1731
32
+ clarifai/datasets/upload/image.py,sha256=pNFTThEVGIK9RNIsUuSSQE59LfO-tKkhsXSR7CONAEg,8293
33
+ clarifai/datasets/upload/text.py,sha256=CeyH0OzxdHzYj-neZzzRCXrcQCtanaKC8B3qH8Sg_gw,2053
34
34
  clarifai/datasets/upload/utils.py,sha256=h7mtN9FZXhQQbf47EXczgb-NTY2uOE9AJlE9u4-hDwI,9627
35
35
  clarifai/datasets/upload/loaders/README.md,sha256=aNRutSCTzLp2ruIZx74ZkN5AxpzwKOxMa7OzabnKpwg,2980
36
36
  clarifai/datasets/upload/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- clarifai/datasets/upload/loaders/coco_captions.py,sha256=t-IaIXukDk1mFdeeqdwe0hLrBLuaF-cZWl2aumGUAls,1297
38
- clarifai/datasets/upload/loaders/coco_detection.py,sha256=dBYl2a1D7e-N1heXbFK0bImJAuq_lPQ8nxZMa1zq-Ts,2612
37
+ clarifai/datasets/upload/loaders/coco_captions.py,sha256=YfuNXplbdoH8N9ph7RyN9MfJTtOcJBG4ie1ow6-mELA,1516
38
+ clarifai/datasets/upload/loaders/coco_detection.py,sha256=_I_yThw435KS9SH7zheBbJDK3zFgjTImBsES__ijjMk,2831
39
39
  clarifai/datasets/upload/loaders/imagenet_classification.py,sha256=LuylazxpI5V8fAPGCUxDirGpYMfxzRxix-MEWaCvwxI,1895
40
40
  clarifai/datasets/upload/loaders/xview_detection.py,sha256=hk8cZdYZimm4KOaZvBjYcC6ikURZMn51xmn7pXZT3HE,6052
41
41
  clarifai/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  clarifai/models/api.py,sha256=d3FQQlG0mNDLrfEvchqaVcq4Tgb_TqryNnJtwp3c7sE,10961
43
- clarifai/models/model_serving/README.md,sha256=Ln8hsyE38J3yiLZruKHjU_hdq9CjzzbDUAO28Xyw1dQ,4060
43
+ clarifai/models/model_serving/README.md,sha256=zXnKybVoIF_LYHKKY2vijTCaGcb2-GJ5kef2uB1WFrs,4241
44
44
  clarifai/models/model_serving/__init__.py,sha256=78fiK9LvdGvpMxICmZWqSIyS6BFATjW2s5R6_GgtbPA,645
45
45
  clarifai/models/model_serving/constants.py,sha256=uoi8TqEFkdsHhSZu90HOO3R0BmPC3G0z9qA5ER-5H7w,688
46
46
  clarifai/models/model_serving/utils.py,sha256=D2UZo90Afd9f7OGKXdjRqys_6N26psY018V7R-rcNO4,629
@@ -52,8 +52,8 @@ clarifai/models/model_serving/cli/clarifai_clis.py,sha256=sGDDj7MrlU3goWLQm4H9dC
52
52
  clarifai/models/model_serving/cli/create.py,sha256=wtKcVi8XSPN-Fx0RrSUxEwH1hm5TbZ_FrCEMIS9yszM,5598
53
53
  clarifai/models/model_serving/cli/example_cli.py,sha256=tCm0J4EI0kuuSRhEiPTuraSA-bUYwtEFEHcL1eOXzRI,1039
54
54
  clarifai/models/model_serving/cli/login.py,sha256=TYRQALJZUhNvtx2VcChO0y41YXs8-yP9BrShYb9tcOM,743
55
- clarifai/models/model_serving/cli/upload.py,sha256=ctAp_bckMLm8twO8KdilD4CnawbQ4o2FvixfBUd-91Y,6883
56
- clarifai/models/model_serving/docs/cli.md,sha256=AM45FZag3520ri4Terb0t7_MmLTs7gjHXAf7TYVZjZk,3942
55
+ clarifai/models/model_serving/cli/upload.py,sha256=aLq5Fjc2av0-MRnE6lSWmBYxvm5yseIekWLHGXAhsb8,6813
56
+ clarifai/models/model_serving/docs/cli.md,sha256=fLgyY8sYMPjYQW_q8Q9yJYB_ryDVGbzj2VouJgvkEFw,4564
57
57
  clarifai/models/model_serving/docs/concepts.md,sha256=ppQADibKQInf9JpfcH7wIpcMndTZ3618or5yzMhGNOE,9376
58
58
  clarifai/models/model_serving/docs/dependencies.md,sha256=apwg_IxDBzovtQYXRpWMU9pUqdf0VaS10yMVOYYXhoc,728
59
59
  clarifai/models/model_serving/docs/inference_parameters.md,sha256=EFBQs3OGQNH512zoLJKMfFD6WXE_Tzt_Uvts877VvpQ,4111
@@ -90,8 +90,8 @@ clarifai/modules/css.py,sha256=kadCEunmyh5h2yf0-4aysE3ZcZ6qaQcxuAgDXS96yF8,2020
90
90
  clarifai/modules/pages.py,sha256=iOoM3RNRMgXlV0qBqcdQofxoXo2RuRQh0h9c9BIS0-I,1383
91
91
  clarifai/modules/style.css,sha256=j7FNPZVhLPj35vvBksAJ90RuX5sLuqzDR5iM2WIEhiA,6073
92
92
  clarifai/rag/__init__.py,sha256=wu3PzAzo7uqgrEzuaC9lY_3gj1HFiR3GU3elZIKTT5g,40
93
- clarifai/rag/rag.py,sha256=fYCIs9WJKugRFZ6Xt468_7PE6ipE3x4DfaQzvw4EkuY,12392
94
- clarifai/rag/utils.py,sha256=aqAM120xC8DcpqWMrsKsmT9QwrKKJZYBLyDgYb8_L-8,4061
93
+ clarifai/rag/rag.py,sha256=CXhfArp0VmZcOFNTymwWT9JGeKfTKGjD-hcA50w0LgE,12401
94
+ clarifai/rag/utils.py,sha256=yr1jAcbpws4vFGBqlAwPPE7v1DRba48g8gixLFw8OhQ,4070
95
95
  clarifai/schema/search.py,sha256=JjTi8ammJgZZ2OGl4K6tIA4zEJ1Fr2ASZARXavI1j5c,2448
96
96
  clarifai/urls/helper.py,sha256=tjoMGGHuWX68DUB0pk4MEjrmFsClUAQj2jmVEM_Sy78,4751
97
97
  clarifai/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -106,9 +106,9 @@ clarifai/workflows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
106
106
  clarifai/workflows/export.py,sha256=vICRhIreqDSShxLKjHNM2JwzKsf1B4fdXB0ciMcA70k,1945
107
107
  clarifai/workflows/utils.py,sha256=nGeB_yjVgUO9kOeKTg4OBBaBz-AwXI3m-huSVj-9W18,1924
108
108
  clarifai/workflows/validate.py,sha256=yJq03MaJqi5AK3alKGJJBR89xmmjAQ31sVufJUiOqY8,2556
109
- clarifai-10.3.0.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
110
- clarifai-10.3.0.dist-info/METADATA,sha256=O4qvini2SsJNHhe2zizbmaNrl52Ch7h_3AV1IkDMjEA,18723
111
- clarifai-10.3.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
112
- clarifai-10.3.0.dist-info/entry_points.txt,sha256=qZOr_MIPG0dBBE1zringDJS_wXNGTAA_SQ-zcbmDHOw,82
113
- clarifai-10.3.0.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
114
- clarifai-10.3.0.dist-info/RECORD,,
109
+ clarifai-10.3.2.dist-info/LICENSE,sha256=mUqF_d12-qE2n41g7C5_sq-BMLOcj6CNN-jevr15YHU,555
110
+ clarifai-10.3.2.dist-info/METADATA,sha256=GKx2sjRAKNBQSHtuiKRMFgd34v9M0cRgYpRwl8o9u6s,19176
111
+ clarifai-10.3.2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
112
+ clarifai-10.3.2.dist-info/entry_points.txt,sha256=qZOr_MIPG0dBBE1zringDJS_wXNGTAA_SQ-zcbmDHOw,82
113
+ clarifai-10.3.2.dist-info/top_level.txt,sha256=wUMdCQGjkxaynZ6nZ9FAnvBUCgp5RJUVFSy2j-KYo0s,9
114
+ clarifai-10.3.2.dist-info/RECORD,,