clarifai 9.10.1__py3-none-any.whl → 9.10.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.
Files changed (323) hide show
  1. clarifai/client/__init__.py +3 -2
  2. clarifai/client/app.py +39 -23
  3. clarifai/client/base.py +6 -6
  4. clarifai/client/dataset.py +113 -55
  5. clarifai/client/input.py +47 -55
  6. clarifai/client/model.py +27 -25
  7. clarifai/client/module.py +13 -11
  8. clarifai/client/runner.py +5 -3
  9. clarifai/client/search.py +29 -10
  10. clarifai/client/user.py +14 -8
  11. clarifai/client/workflow.py +22 -20
  12. clarifai/constants/dataset.py +22 -0
  13. clarifai/datasets/upload/base.py +9 -7
  14. clarifai/datasets/upload/features.py +3 -3
  15. clarifai/datasets/upload/image.py +49 -50
  16. clarifai/datasets/upload/loaders/coco_captions.py +26 -80
  17. clarifai/datasets/upload/loaders/coco_detection.py +56 -115
  18. clarifai/datasets/upload/loaders/coco_segmentation.py +69 -137
  19. clarifai/datasets/upload/loaders/imagenet_classification.py +2 -3
  20. clarifai/datasets/upload/loaders/xview_detection.py +3 -3
  21. clarifai/datasets/upload/text.py +16 -16
  22. clarifai/datasets/upload/utils.py +196 -21
  23. clarifai/utils/misc.py +21 -0
  24. clarifai/versions.py +1 -1
  25. {clarifai-9.10.1.dist-info → clarifai-9.10.3.dist-info}/METADATA +3 -3
  26. clarifai-9.10.3.dist-info/RECORD +96 -0
  27. clarifai-9.10.3.dist-info/top_level.txt +1 -0
  28. clarifai/auth/__init__.py +0 -6
  29. clarifai/auth/helper.py +0 -367
  30. clarifai/auth/register.py +0 -23
  31. clarifai/auth/stub.py +0 -127
  32. clarifai/datasets/upload/examples/README.md +0 -31
  33. clarifai/datasets/upload/examples/image_classification/__init__.py +0 -0
  34. clarifai/datasets/upload/examples/image_classification/cifar10/__init__.py +0 -0
  35. clarifai/datasets/upload/examples/image_classification/cifar10/cifar_small_test.csv +0 -10
  36. clarifai/datasets/upload/examples/image_classification/cifar10/cifar_small_train.csv +0 -10
  37. clarifai/datasets/upload/examples/image_classification/cifar10/dataset.py +0 -46
  38. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_700.jpg +0 -0
  39. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_701.jpg +0 -0
  40. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_702.jpg +0 -0
  41. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_703.jpg +0 -0
  42. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_704.jpg +0 -0
  43. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_705.jpg +0 -0
  44. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_706.jpg +0 -0
  45. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_707.jpg +0 -0
  46. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_708.jpg +0 -0
  47. clarifai/datasets/upload/examples/image_classification/cifar10/images/test_batch_709.jpg +0 -0
  48. clarifai/datasets/upload/examples/image_classification/food-101/__init__.py +0 -0
  49. clarifai/datasets/upload/examples/image_classification/food-101/dataset.py +0 -39
  50. clarifai/datasets/upload/examples/image_classification/food-101/images/beignets/1420783.jpg +0 -0
  51. clarifai/datasets/upload/examples/image_classification/food-101/images/beignets/3287885.jpg +0 -0
  52. clarifai/datasets/upload/examples/image_classification/food-101/images/beignets/3617075.jpg +0 -0
  53. clarifai/datasets/upload/examples/image_classification/food-101/images/beignets/38052.jpg +0 -0
  54. clarifai/datasets/upload/examples/image_classification/food-101/images/beignets/39147.jpg +0 -0
  55. clarifai/datasets/upload/examples/image_classification/food-101/images/hamburger/139558.jpg +0 -0
  56. clarifai/datasets/upload/examples/image_classification/food-101/images/hamburger/1636096.jpg +0 -0
  57. clarifai/datasets/upload/examples/image_classification/food-101/images/hamburger/2480925.jpg +0 -0
  58. clarifai/datasets/upload/examples/image_classification/food-101/images/hamburger/3385808.jpg +0 -0
  59. clarifai/datasets/upload/examples/image_classification/food-101/images/hamburger/3647386.jpg +0 -0
  60. clarifai/datasets/upload/examples/image_classification/food-101/images/prime_rib/1826869.jpg +0 -0
  61. clarifai/datasets/upload/examples/image_classification/food-101/images/prime_rib/2243245.jpg +0 -0
  62. clarifai/datasets/upload/examples/image_classification/food-101/images/prime_rib/259212.jpg +0 -0
  63. clarifai/datasets/upload/examples/image_classification/food-101/images/prime_rib/2842688.jpg +0 -0
  64. clarifai/datasets/upload/examples/image_classification/food-101/images/prime_rib/3035414.jpg +0 -0
  65. clarifai/datasets/upload/examples/image_classification/food-101/images/ramen/1545393.jpg +0 -0
  66. clarifai/datasets/upload/examples/image_classification/food-101/images/ramen/2427642.jpg +0 -0
  67. clarifai/datasets/upload/examples/image_classification/food-101/images/ramen/3520891.jpg +0 -0
  68. clarifai/datasets/upload/examples/image_classification/food-101/images/ramen/377566.jpg +0 -0
  69. clarifai/datasets/upload/examples/image_classification/food-101/images/ramen/503504.jpg +0 -0
  70. clarifai/datasets/upload/examples/text_classification/__init__.py +0 -0
  71. clarifai/datasets/upload/examples/text_classification/imdb_dataset/__init__.py +0 -0
  72. clarifai/datasets/upload/examples/text_classification/imdb_dataset/dataset.py +0 -42
  73. clarifai/datasets/upload/examples/text_classification/imdb_dataset/test.csv +0 -201
  74. clarifai/datasets/upload/examples/text_classification/imdb_dataset/train.csv +0 -201
  75. clarifai/datasets/upload/loaders/README.md +0 -49
  76. clarifai/models/model_serving/README.md +0 -155
  77. clarifai/models/model_serving/docs/custom_config.md +0 -33
  78. clarifai/models/model_serving/docs/dependencies.md +0 -11
  79. clarifai/models/model_serving/docs/inference_parameters.md +0 -134
  80. clarifai/models/model_serving/docs/model_types.md +0 -20
  81. clarifai/models/model_serving/docs/output.md +0 -28
  82. clarifai/models/model_serving/examples/README.md +0 -7
  83. clarifai/models/model_serving/examples/image_classification/README.md +0 -9
  84. clarifai/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/README.md +0 -11
  85. clarifai/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/config.json +0 -42
  86. clarifai/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/preprocessor_config.json +0 -15
  87. clarifai/models/model_serving/examples/image_classification/age_vit/config.pbtxt +0 -23
  88. clarifai/models/model_serving/examples/image_classification/age_vit/labels.txt +0 -9
  89. clarifai/models/model_serving/examples/image_classification/age_vit/requirements.txt +0 -7
  90. clarifai/models/model_serving/examples/text_classification/README.md +0 -9
  91. clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/README.md +0 -12
  92. clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/config.json +0 -34
  93. clarifai/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/special_tokens_map.json +0 -1
  94. clarifai/models/model_serving/examples/text_classification/xlm-roberta/config.pbtxt +0 -21
  95. clarifai/models/model_serving/examples/text_classification/xlm-roberta/labels.txt +0 -3
  96. clarifai/models/model_serving/examples/text_classification/xlm-roberta/requirements.txt +0 -7
  97. clarifai/models/model_serving/examples/text_embedding/README.md +0 -9
  98. clarifai/models/model_serving/examples/text_to_image/README.md +0 -9
  99. clarifai/models/model_serving/examples/text_to_image/sd-v1.5/1/__init__.py +0 -0
  100. clarifai/models/model_serving/examples/text_to_image/sd-v1.5/1/inference.py +0 -52
  101. clarifai/models/model_serving/examples/text_to_image/sd-v1.5/1/model.py +0 -60
  102. clarifai/models/model_serving/examples/text_to_image/sd-v1.5/config.pbtxt +0 -22
  103. clarifai/models/model_serving/examples/text_to_image/sd-v1.5/requirements.txt +0 -6
  104. clarifai/models/model_serving/examples/text_to_text/README.md +0 -10
  105. clarifai/models/model_serving/examples/text_to_text/bart-summarize/config.pbtxt +0 -20
  106. clarifai/models/model_serving/examples/text_to_text/bart-summarize/requirements.txt +0 -4
  107. clarifai/models/model_serving/examples/visual_detection/README.md +0 -11
  108. clarifai/models/model_serving/examples/visual_detection/yolov5x/config.pbtxt +0 -36
  109. clarifai/models/model_serving/examples/visual_detection/yolov5x/labels.txt +0 -80
  110. clarifai/models/model_serving/examples/visual_detection/yolov5x/requirements.txt +0 -12
  111. clarifai/models/model_serving/examples/visual_embedding/README.md +0 -9
  112. clarifai/models/model_serving/examples/visual_embedding/vit-base/config.pbtxt +0 -22
  113. clarifai/models/model_serving/examples/visual_embedding/vit-base/requirements.txt +0 -5
  114. clarifai/models/model_serving/examples/visual_segmentation/README.md +0 -9
  115. clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/config.pbtxt +0 -24
  116. clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/labels.txt +0 -18
  117. clarifai/models/model_serving/examples/visual_segmentation/segformer-b2/requirements.txt +0 -5
  118. clarifai/models/model_serving/model_config/model_types_config/multimodal-embedder.yaml +0 -24
  119. clarifai/models/model_serving/model_config/model_types_config/text-classifier.yaml +0 -18
  120. clarifai/models/model_serving/model_config/model_types_config/text-embedder.yaml +0 -18
  121. clarifai/models/model_serving/model_config/model_types_config/text-to-image.yaml +0 -18
  122. clarifai/models/model_serving/model_config/model_types_config/text-to-text.yaml +0 -18
  123. clarifai/models/model_serving/model_config/model_types_config/visual-classifier.yaml +0 -18
  124. clarifai/models/model_serving/model_config/model_types_config/visual-detector.yaml +0 -28
  125. clarifai/models/model_serving/model_config/model_types_config/visual-embedder.yaml +0 -18
  126. clarifai/models/model_serving/model_config/model_types_config/visual-segmenter.yaml +0 -18
  127. clarifai/modules/README.md +0 -5
  128. clarifai/modules/style.css +0 -217
  129. clarifai-9.10.1.dist-info/RECORD +0 -386
  130. clarifai-9.10.1.dist-info/top_level.txt +0 -2
  131. clarifai_utils/__init__.py +0 -0
  132. clarifai_utils/auth/__init__.py +0 -6
  133. clarifai_utils/auth/helper.py +0 -367
  134. clarifai_utils/auth/register.py +0 -23
  135. clarifai_utils/auth/stub.py +0 -127
  136. clarifai_utils/cli.py +0 -0
  137. clarifai_utils/client/__init__.py +0 -16
  138. clarifai_utils/client/app.py +0 -684
  139. clarifai_utils/client/auth/__init__.py +0 -4
  140. clarifai_utils/client/auth/helper.py +0 -367
  141. clarifai_utils/client/auth/register.py +0 -23
  142. clarifai_utils/client/auth/stub.py +0 -127
  143. clarifai_utils/client/base.py +0 -131
  144. clarifai_utils/client/dataset.py +0 -442
  145. clarifai_utils/client/input.py +0 -892
  146. clarifai_utils/client/lister.py +0 -54
  147. clarifai_utils/client/model.py +0 -575
  148. clarifai_utils/client/module.py +0 -94
  149. clarifai_utils/client/runner.py +0 -161
  150. clarifai_utils/client/search.py +0 -239
  151. clarifai_utils/client/user.py +0 -253
  152. clarifai_utils/client/workflow.py +0 -223
  153. clarifai_utils/constants/model.py +0 -4
  154. clarifai_utils/constants/search.py +0 -2
  155. clarifai_utils/datasets/__init__.py +0 -0
  156. clarifai_utils/datasets/export/__init__.py +0 -0
  157. clarifai_utils/datasets/export/inputs_annotations.py +0 -222
  158. clarifai_utils/datasets/upload/__init__.py +0 -0
  159. clarifai_utils/datasets/upload/base.py +0 -66
  160. clarifai_utils/datasets/upload/examples/README.md +0 -31
  161. clarifai_utils/datasets/upload/examples/image_classification/__init__.py +0 -0
  162. clarifai_utils/datasets/upload/examples/image_classification/cifar10/__init__.py +0 -0
  163. clarifai_utils/datasets/upload/examples/image_classification/cifar10/cifar_small_test.csv +0 -10
  164. clarifai_utils/datasets/upload/examples/image_classification/cifar10/cifar_small_train.csv +0 -10
  165. clarifai_utils/datasets/upload/examples/image_classification/cifar10/dataset.py +0 -46
  166. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_700.jpg +0 -0
  167. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_701.jpg +0 -0
  168. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_702.jpg +0 -0
  169. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_703.jpg +0 -0
  170. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_704.jpg +0 -0
  171. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_705.jpg +0 -0
  172. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_706.jpg +0 -0
  173. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_707.jpg +0 -0
  174. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_708.jpg +0 -0
  175. clarifai_utils/datasets/upload/examples/image_classification/cifar10/images/test_batch_709.jpg +0 -0
  176. clarifai_utils/datasets/upload/examples/image_classification/food-101/__init__.py +0 -0
  177. clarifai_utils/datasets/upload/examples/image_classification/food-101/dataset.py +0 -39
  178. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/beignets/1420783.jpg +0 -0
  179. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/beignets/3287885.jpg +0 -0
  180. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/beignets/3617075.jpg +0 -0
  181. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/beignets/38052.jpg +0 -0
  182. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/beignets/39147.jpg +0 -0
  183. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/hamburger/139558.jpg +0 -0
  184. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/hamburger/1636096.jpg +0 -0
  185. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/hamburger/2480925.jpg +0 -0
  186. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/hamburger/3385808.jpg +0 -0
  187. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/hamburger/3647386.jpg +0 -0
  188. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/prime_rib/1826869.jpg +0 -0
  189. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/prime_rib/2243245.jpg +0 -0
  190. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/prime_rib/259212.jpg +0 -0
  191. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/prime_rib/2842688.jpg +0 -0
  192. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/prime_rib/3035414.jpg +0 -0
  193. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/ramen/1545393.jpg +0 -0
  194. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/ramen/2427642.jpg +0 -0
  195. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/ramen/3520891.jpg +0 -0
  196. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/ramen/377566.jpg +0 -0
  197. clarifai_utils/datasets/upload/examples/image_classification/food-101/images/ramen/503504.jpg +0 -0
  198. clarifai_utils/datasets/upload/examples/text_classification/__init__.py +0 -0
  199. clarifai_utils/datasets/upload/examples/text_classification/imdb_dataset/__init__.py +0 -0
  200. clarifai_utils/datasets/upload/examples/text_classification/imdb_dataset/dataset.py +0 -42
  201. clarifai_utils/datasets/upload/examples/text_classification/imdb_dataset/test.csv +0 -201
  202. clarifai_utils/datasets/upload/examples/text_classification/imdb_dataset/train.csv +0 -201
  203. clarifai_utils/datasets/upload/features.py +0 -44
  204. clarifai_utils/datasets/upload/image.py +0 -165
  205. clarifai_utils/datasets/upload/loaders/README.md +0 -49
  206. clarifai_utils/datasets/upload/loaders/__init__.py +0 -0
  207. clarifai_utils/datasets/upload/loaders/coco_captions.py +0 -103
  208. clarifai_utils/datasets/upload/loaders/coco_detection.py +0 -134
  209. clarifai_utils/datasets/upload/loaders/coco_segmentation.py +0 -166
  210. clarifai_utils/datasets/upload/loaders/imagenet_classification.py +0 -59
  211. clarifai_utils/datasets/upload/loaders/xview_detection.py +0 -148
  212. clarifai_utils/datasets/upload/text.py +0 -53
  213. clarifai_utils/datasets/upload/utils.py +0 -63
  214. clarifai_utils/errors.py +0 -89
  215. clarifai_utils/models/__init__.py +0 -0
  216. clarifai_utils/models/api.py +0 -283
  217. clarifai_utils/models/model_serving/README.md +0 -155
  218. clarifai_utils/models/model_serving/__init__.py +0 -12
  219. clarifai_utils/models/model_serving/cli/__init__.py +0 -12
  220. clarifai_utils/models/model_serving/cli/deploy_cli.py +0 -123
  221. clarifai_utils/models/model_serving/cli/model_zip.py +0 -61
  222. clarifai_utils/models/model_serving/cli/repository.py +0 -87
  223. clarifai_utils/models/model_serving/constants.py +0 -1
  224. clarifai_utils/models/model_serving/docs/custom_config.md +0 -33
  225. clarifai_utils/models/model_serving/docs/dependencies.md +0 -11
  226. clarifai_utils/models/model_serving/docs/inference_parameters.md +0 -134
  227. clarifai_utils/models/model_serving/docs/model_types.md +0 -20
  228. clarifai_utils/models/model_serving/docs/output.md +0 -28
  229. clarifai_utils/models/model_serving/examples/README.md +0 -7
  230. clarifai_utils/models/model_serving/examples/image_classification/README.md +0 -9
  231. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/__init__.py +0 -0
  232. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/inference.py +0 -56
  233. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/model.py +0 -61
  234. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/README.md +0 -11
  235. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/config.json +0 -42
  236. clarifai_utils/models/model_serving/examples/image_classification/age_vit/1/vit-age-classifier/preprocessor_config.json +0 -15
  237. clarifai_utils/models/model_serving/examples/image_classification/age_vit/config.pbtxt +0 -23
  238. clarifai_utils/models/model_serving/examples/image_classification/age_vit/labels.txt +0 -9
  239. clarifai_utils/models/model_serving/examples/image_classification/age_vit/requirements.txt +0 -7
  240. clarifai_utils/models/model_serving/examples/text_classification/README.md +0 -9
  241. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/__init__.py +0 -0
  242. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/inference.py +0 -55
  243. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/model.py +0 -61
  244. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/README.md +0 -12
  245. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/config.json +0 -34
  246. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/1/twitter-xlm-roberta-base-sentiment/special_tokens_map.json +0 -1
  247. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/config.pbtxt +0 -21
  248. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/labels.txt +0 -3
  249. clarifai_utils/models/model_serving/examples/text_classification/xlm-roberta/requirements.txt +0 -7
  250. clarifai_utils/models/model_serving/examples/text_embedding/README.md +0 -9
  251. clarifai_utils/models/model_serving/examples/text_to_image/README.md +0 -9
  252. clarifai_utils/models/model_serving/examples/text_to_image/sd-v1.5/1/__init__.py +0 -0
  253. clarifai_utils/models/model_serving/examples/text_to_image/sd-v1.5/1/inference.py +0 -52
  254. clarifai_utils/models/model_serving/examples/text_to_image/sd-v1.5/1/model.py +0 -60
  255. clarifai_utils/models/model_serving/examples/text_to_image/sd-v1.5/config.pbtxt +0 -22
  256. clarifai_utils/models/model_serving/examples/text_to_image/sd-v1.5/requirements.txt +0 -6
  257. clarifai_utils/models/model_serving/examples/text_to_text/README.md +0 -10
  258. clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/__init__.py +0 -0
  259. clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/inference.py +0 -47
  260. clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/1/model.py +0 -60
  261. clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/config.pbtxt +0 -20
  262. clarifai_utils/models/model_serving/examples/text_to_text/bart-summarize/requirements.txt +0 -4
  263. clarifai_utils/models/model_serving/examples/visual_detection/README.md +0 -11
  264. clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/1/inference.py +0 -72
  265. clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/1/model.py +0 -61
  266. clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/config.pbtxt +0 -36
  267. clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/labels.txt +0 -80
  268. clarifai_utils/models/model_serving/examples/visual_detection/yolov5x/requirements.txt +0 -12
  269. clarifai_utils/models/model_serving/examples/visual_embedding/README.md +0 -9
  270. clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/__init__.py +0 -0
  271. clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/inference.py +0 -51
  272. clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/1/model.py +0 -60
  273. clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/config.pbtxt +0 -22
  274. clarifai_utils/models/model_serving/examples/visual_embedding/vit-base/requirements.txt +0 -5
  275. clarifai_utils/models/model_serving/examples/visual_segmentation/README.md +0 -9
  276. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/__init__.py +0 -0
  277. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/inference.py +0 -55
  278. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/1/model.py +0 -60
  279. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/config.pbtxt +0 -24
  280. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/labels.txt +0 -18
  281. clarifai_utils/models/model_serving/examples/visual_segmentation/segformer-b2/requirements.txt +0 -5
  282. clarifai_utils/models/model_serving/model_config/__init__.py +0 -14
  283. clarifai_utils/models/model_serving/model_config/config.py +0 -302
  284. clarifai_utils/models/model_serving/model_config/inference_parameter.py +0 -124
  285. clarifai_utils/models/model_serving/model_config/model_types_config/multimodal-embedder.yaml +0 -24
  286. clarifai_utils/models/model_serving/model_config/model_types_config/text-classifier.yaml +0 -18
  287. clarifai_utils/models/model_serving/model_config/model_types_config/text-embedder.yaml +0 -18
  288. clarifai_utils/models/model_serving/model_config/model_types_config/text-to-image.yaml +0 -18
  289. clarifai_utils/models/model_serving/model_config/model_types_config/text-to-text.yaml +0 -18
  290. clarifai_utils/models/model_serving/model_config/model_types_config/visual-classifier.yaml +0 -18
  291. clarifai_utils/models/model_serving/model_config/model_types_config/visual-detector.yaml +0 -28
  292. clarifai_utils/models/model_serving/model_config/model_types_config/visual-embedder.yaml +0 -18
  293. clarifai_utils/models/model_serving/model_config/model_types_config/visual-segmenter.yaml +0 -18
  294. clarifai_utils/models/model_serving/model_config/serializer.py +0 -134
  295. clarifai_utils/models/model_serving/models/__init__.py +0 -12
  296. clarifai_utils/models/model_serving/models/default_test.py +0 -275
  297. clarifai_utils/models/model_serving/models/inference.py +0 -42
  298. clarifai_utils/models/model_serving/models/model_types.py +0 -265
  299. clarifai_utils/models/model_serving/models/output.py +0 -124
  300. clarifai_utils/models/model_serving/models/pb_model.py +0 -74
  301. clarifai_utils/models/model_serving/models/test.py +0 -64
  302. clarifai_utils/models/model_serving/pb_model_repository.py +0 -101
  303. clarifai_utils/modules/README.md +0 -5
  304. clarifai_utils/modules/__init__.py +0 -0
  305. clarifai_utils/modules/css.py +0 -60
  306. clarifai_utils/modules/pages.py +0 -42
  307. clarifai_utils/modules/style.css +0 -217
  308. clarifai_utils/runners/__init__.py +0 -0
  309. clarifai_utils/runners/example.py +0 -33
  310. clarifai_utils/schema/search.py +0 -69
  311. clarifai_utils/urls/helper.py +0 -103
  312. clarifai_utils/utils/__init__.py +0 -0
  313. clarifai_utils/utils/logging.py +0 -90
  314. clarifai_utils/utils/misc.py +0 -33
  315. clarifai_utils/utils/model_train.py +0 -157
  316. clarifai_utils/versions.py +0 -6
  317. clarifai_utils/workflows/__init__.py +0 -0
  318. clarifai_utils/workflows/export.py +0 -68
  319. clarifai_utils/workflows/utils.py +0 -59
  320. clarifai_utils/workflows/validate.py +0 -67
  321. {clarifai-9.10.1.dist-info → clarifai-9.10.3.dist-info}/LICENSE +0 -0
  322. {clarifai-9.10.1.dist-info → clarifai-9.10.3.dist-info}/WHEEL +0 -0
  323. {clarifai-9.10.1.dist-info → clarifai-9.10.3.dist-info}/entry_points.txt +0 -0
@@ -1,2 +0,0 @@
1
- clarifai
2
- clarifai_utils
File without changes
@@ -1,6 +0,0 @@
1
- # Note: clarifai.auth is just added for backwards compatibility. It will be removed in the future.
2
-
3
- from clarifai.client.auth.register import V2Stub
4
- from clarifai.client.auth.stub import create_stub
5
-
6
- __all__ = ('V2Stub', 'create_stub')
@@ -1,367 +0,0 @@
1
- import os
2
- import urllib.request
3
- from typing import Any, Dict
4
-
5
- from clarifai_grpc.channel.clarifai_channel import ClarifaiChannel
6
- from clarifai_grpc.grpc.api import resources_pb2, service_pb2_grpc
7
-
8
- DEFAULT_BASE = "https://api.clarifai.com"
9
- DEFAULT_UI = "https://clarifai.com"
10
-
11
- # Map from base domain to True / False for whether the base has https or http.
12
- # This is filled in get_stub() if it's not in there already.
13
- base_https_cache = {}
14
- ui_https_cache = {}
15
-
16
-
17
- def clear_cache() -> None:
18
- """Clears the cache."""
19
- base_https_cache.clear()
20
- ui_https_cache.clear()
21
-
22
-
23
- def https_cache(cache: dict, url: str) -> str:
24
- """This is a helper function to cache whether a url is http or https."""
25
- HTTPS = True
26
- HTTP = False
27
-
28
- # If http or https is provided, we trust that it is correct.
29
- # Note: this always stores the url without http:// or https://
30
- if url.startswith("https://"):
31
- url = url.replace("https://", "")
32
- cache[url] = HTTPS
33
- elif url.startswith("http://"):
34
- url = url.replace("http://", "")
35
- cache[url] = HTTP
36
- elif url not in cache:
37
- # We know our endpoints are https.
38
- if ".clarifai.com" in url:
39
- cache[url] = HTTPS
40
- else: # need to test it.
41
- try: # make request to https endpoint.
42
- urllib.request.urlopen("https://%s/v2/auth/methods" % url, timeout=1)
43
- cache[url] = HTTPS # cache it.
44
- except Exception as e:
45
- if "SSL" in str(e): # if ssl error then we know it's http.
46
- cache[url] = HTTP
47
- # For http urls we need host:port format.
48
- if ":" not in url:
49
- raise Exception("When providing an insecure url it must have both host:port format")
50
- else:
51
- raise Exception("Could not get a valid response from url: %s, is the API running there?"
52
- % url) from e
53
- return url
54
-
55
-
56
- class ClarifaiAuthHelper:
57
-
58
- def __init__(
59
- self,
60
- user_id: str,
61
- app_id: str,
62
- pat: str,
63
- token: str = "",
64
- base: str = DEFAULT_BASE,
65
- ui: str = DEFAULT_UI,
66
- validate: bool = True,
67
- ):
68
- """
69
- A helper to get the authorization information needed to make API calls with the grpc
70
- client to a specific app using a personal access token.
71
-
72
- There are classmethods to make this object easily from either query_params provided by streamlit or from env vars.
73
-
74
- Note: only one of personal access token (pat) or a session token (token) can be provided.
75
- Always use PATs in your code and never session tokens, those are only provided internal UI code.
76
-
77
- Args:
78
- user_id: a user id who owns the resource you want to make calls to.
79
- app_id: an app id for the application that owns the resource you want to interact with
80
- pat: a personal access token.
81
- token: a session token (internal use only, always use a PAT).
82
- base: a url to the API endpoint to hit. Examples include api.clarifai.com,
83
- https://api.clarifai.com (default), https://host:port, http://host:port, host:port (will be treated as http, not https). It's highly recommended to include the http:// or https:// otherwise we need to check the endpoint to determine if it has SSL during this __init__
84
- ui: a url to the UI. Examples include clarifai.com,
85
- https://clarifai.com (default), https://host:port, http://host:port, host:port (will be treated as http, not https). It's highly recommended to include the http:// or https:// otherwise we need to check the endpoint to determine if it has SSL during this __init__
86
- validate: whether to validate the inputs. This is useful for overriding vars then validating
87
- """
88
-
89
- self.user_id = user_id
90
- self.app_id = app_id
91
- self._pat = pat
92
- self._token = token
93
-
94
- self.set_base(base)
95
- self.set_ui(ui)
96
- if validate:
97
- self.validate()
98
-
99
- def validate(self):
100
- if self.user_id == "":
101
- raise Exception(
102
- "Need 'user_id' to not be empty in the query params or user CLARIFAI_USER_ID env var")
103
- if self.app_id == "":
104
- raise Exception(
105
- "Need 'app_id' to not be empty in the query params or user CLARIFAI_APP_ID env var")
106
- if self._pat != "" and self._token != "":
107
- raise Exception(
108
- "A personal access token OR a session token need to be provided, but you cannot provide both."
109
- )
110
- elif self._pat == "" and self._token == "":
111
- raise Exception(
112
- "Need 'pat' or 'token' in the query params or use one of the CLARIFAI_PAT or CLARIFAI_SESSION_TOKEN env vars"
113
- )
114
-
115
- @classmethod
116
- def from_streamlit(cls, st: Any) -> "ClarifaiAuthHelper":
117
- """ This is a convenient method to check the environment variables first to see if there are
118
- required variables for auth, then override them with any additional query parameters that may
119
- have been passed in.
120
-
121
- Note: if a .streamlit/secrets.toml is present then st.secrets will auto populate the
122
- corresponding environment variables and we will pick them up from there, OVERWRITING whatever
123
- matching env var that may already be present.
124
-
125
- Args:
126
- st: the streamlit package typically as: 'import streamlit as st'
127
- Returns:
128
- auth: this class instantiated
129
- """
130
- # start with the env vars (potentially loaded from secrets.toml)
131
- # Don't validate yet as we'll layer on the query params next.
132
- auth = ClarifaiAuthHelper.from_env(validate=False)
133
-
134
- # Then add in the query params.
135
- try:
136
- auth.add_streamlit_query_params(st.experimental_get_query_params())
137
- except Exception as e:
138
- st.error(e)
139
- st.stop()
140
- raise e
141
-
142
- # Then validate.
143
- try:
144
- auth.validate()
145
- except Exception as e:
146
- st.error(e)
147
- st.stop()
148
- raise e
149
-
150
- return auth
151
-
152
- @classmethod
153
- def from_streamlit_query_params(cls, query_params: Any = "") -> "ClarifaiAuthHelper":
154
- """Initialize from streamlit queryparams. The following things will be looked for:
155
- user_id: as 'user_id' in query_params
156
- app_id: as 'app_id' in query_params
157
- one of:
158
- token: as 'token' in query_params
159
- pat: as 'pat' in query_params
160
- optionally:
161
- base: as 'base' in query_params.
162
- ui: as 'ui' in query_params.
163
-
164
- """
165
-
166
- # Setup an empty one (not from env).
167
- auth = ClarifaiAuthHelper("", "", "", "", validate=False)
168
-
169
- # Then add in the query params.
170
- auth.add_streamlit_query_params(query_params)
171
-
172
- # Then validate.
173
- auth.validate()
174
-
175
- return auth
176
-
177
- def add_streamlit_query_params(self, query_params: Any = "") -> "ClarifaiAuthHelper":
178
- """Initialize from streamlit queryparams. The following things will be looked for:
179
- user_id: as 'user_id' in query_params
180
- app_id: as 'app_id' in query_params
181
- one of:
182
- token: as 'token' in query_params
183
- pat: as 'pat' in query_params
184
- optionally:
185
- base: as 'base' in query_params.
186
-
187
- Args:
188
- query_params: the streamlit.experimental_get_query_params() response or an empty dict to fall
189
- back to using env vars.
190
- """
191
- error_description = """
192
- Please check the following required query params are in the url:
193
- - 'user_id': the user ID accessing the module.
194
- - 'app_id': the app the module is being accessed from.
195
- - 'token' or 'pat': to authenticate the calling user with a session token or personal access token.
196
-
197
- Additionally, these optional params are supported:
198
- - 'base': the base domain for the API such as https://api.clarifai.com
199
- - 'ui': the overall UI domain for redirects such as https://clarifai.com
200
- """
201
-
202
- if query_params == "": # empty response from streamlit
203
- query_params = {}
204
- for k in ["user_id", "app_id", "token", "pat"]:
205
- if k in query_params and len(query_params[k]) != 1:
206
- err_str = "There should only be 1 query param value for key '%s'" % k
207
- raise Exception(err_str + error_description)
208
- if "user_id" in query_params:
209
- self.user_id = query_params["user_id"][0]
210
- if "app_id" in query_params:
211
- self.app_id = query_params["app_id"][0]
212
- if "token" in query_params:
213
- self._token = query_params["token"][0]
214
- if "pat" in query_params:
215
- self._pat = query_params["pat"][0]
216
- if "base" in query_params:
217
- self.set_base(query_params["base"][0])
218
- if "ui" in query_params:
219
- self.set_ui(query_params["ui"][0])
220
-
221
- @classmethod
222
- def from_env(cls, validate: bool = True) -> "ClarifaiAuthHelper":
223
- """Will look for the following env vars:
224
- user_id: CLARIFAI_USER_ID env var.
225
- app_id: CLARIFAI_APP_ID env var.
226
- one of:
227
- token: CLARIFAI_SESSION_TOKEN env var.
228
- pat: CLARIFAI_PAT env var.
229
- base: CLARIFAI_API_BASE env var.
230
- """
231
- user_id = os.environ.get("CLARIFAI_USER_ID", "")
232
- app_id = os.environ.get("CLARIFAI_APP_ID", "")
233
- token = os.environ.get("CLARIFAI_SESSION_TOKEN", "")
234
- pat = os.environ.get("CLARIFAI_PAT", "")
235
- base = os.environ.get("CLARIFAI_API_BASE", DEFAULT_BASE)
236
- ui = os.environ.get("CLARIFAI_UI", DEFAULT_UI)
237
- return cls(user_id, app_id, pat, token, base, ui, validate)
238
-
239
- def get_user_app_id_proto(
240
- self,
241
- user_id: str = None,
242
- app_id: str = None,
243
- ) -> resources_pb2.UserAppIDSet:
244
- """Get the gRPC metadata that contains either the session token or the PAT to use.
245
-
246
- Args:
247
- user_id: optional user_id to override the default
248
- app_id: optional app_id to override the default.
249
-
250
- Returns:
251
- metadata: the metadata need to send with all grpc API calls in the API client.
252
- """
253
- user_id = self.user_id if user_id is None else user_id
254
- app_id = self.app_id if app_id is None else app_id
255
- return resources_pb2.UserAppIDSet(user_id=user_id, app_id=app_id)
256
-
257
- @property
258
- def metadata(self):
259
- """Get the gRPC metadata that contains either the session token or the PAT to use.
260
-
261
- Returns:
262
- metadata: the metadata need to send with all grpc API calls in the API client.
263
- """
264
- if self._pat != "":
265
- return (("authorization", "Key %s" % self._pat),)
266
- elif self._token != "":
267
- return (("x-clarifai-session-token", self._token),)
268
- else:
269
- raise Exception("'token' or 'pat' needed to be provided in the query params or env vars.")
270
-
271
- def get_stub(self) -> service_pb2_grpc.V2Stub:
272
- """Get the API gRPC stub using the right channel based on the API endpoint base.
273
-
274
- Returns:
275
- stub: The service_pb2_grpc.V2Stub stub for the API.
276
- """
277
- if self._base not in base_https_cache:
278
- raise Exception("Cannot determine if base %s is https" % self._base)
279
-
280
- https = base_https_cache[self._base]
281
- if https:
282
- channel = ClarifaiChannel.get_grpc_channel(base=self._base)
283
- else:
284
- if self._base.find(":") >= 0:
285
- host, port = self._base.split(":")
286
- else:
287
- host = self._base
288
- port = 80
289
- channel = ClarifaiChannel.get_insecure_grpc_channel(base=host, port=port)
290
- stub = service_pb2_grpc.V2Stub(channel)
291
- return stub
292
-
293
- @property
294
- def ui(self) -> str:
295
- """ Return the domain for the UI. """
296
- if self._ui not in ui_https_cache:
297
- raise Exception("Cannot determine if ui %s is https" % self._ui)
298
- https = ui_https_cache[self._ui]
299
- if https:
300
- if not self._ui.startswith("https://"):
301
- return "https://" + self._ui
302
- return self._ui
303
- if not self._ui.startswith("http://"):
304
- return "http://" + self._ui
305
- return self._ui
306
-
307
- def set_base(self, base: str):
308
- """ Set the base domain for the API. """
309
- self._base = https_cache(base_https_cache, base)
310
-
311
- def set_ui(self, ui: str):
312
- """ Set the domain for the UI. """
313
- self._ui = https_cache(ui_https_cache, ui)
314
-
315
- @property
316
- def base(self) -> str:
317
- """ Return the base domain for the API. """
318
- if self._base not in base_https_cache:
319
- raise Exception("Cannot determine if base %s is https" % self._base)
320
- https = base_https_cache[self._base]
321
- if https:
322
- if not self._base.startswith("https://"):
323
- return "https://" + self._base
324
- return self._base
325
- if not self._base.startswith("http://"):
326
- return "http://" + self._base
327
- return self._base
328
-
329
- @property
330
- def pat(self) -> str:
331
- """ Return the personal access token. """
332
- return self._pat
333
-
334
- def __str__(self):
335
- return "ClarifaiAuthHelper:\n- base: %s\n- user_id: %s\n- app_id: %s\n" % (
336
- self._base,
337
- self.user_id,
338
- self.app_id,
339
- )
340
-
341
- @classmethod
342
- def required_env_vars(cls):
343
- """ Return the list of the required environment variables. """
344
- return ["CLARIFAI_USER_ID", "CLARIFAI_APP_ID", "CLARIFAI_PAT"]
345
-
346
- @classmethod
347
- def validate_secrets_dict(cls, toml_dict: Dict[str, Any]):
348
- """ Validate the secrets.toml file has been filled with non-empty values for all the auth
349
- parameters that are present.
350
-
351
- We don't load the file here so that we don't need the tomli package dependency. You can simply
352
- do:
353
- import tomli
354
-
355
- d = tomli.load(open("secrets.toml"))
356
- ClarifaiAuthHelper.validate_secrets_dict(d)
357
-
358
- """
359
- # We don't validate the bases because they have sensible defaults
360
- auth_keys = cls.required_env_vars()
361
-
362
- for k, v in toml_dict.items():
363
- if k in auth_keys:
364
- if v == "":
365
- raise Exception("'%s' in secrets.toml cannot be empty" % k)
366
- # for all the keys that are not present, they have a non empty value.
367
- return True
@@ -1,23 +0,0 @@
1
- import abc
2
- import grpc
3
-
4
- from clarifai_grpc.grpc.api import service_pb2_grpc
5
-
6
-
7
- class V2Stub(abc.ABC):
8
- """Abstract base class of clarifai api rpc client stubs"""
9
-
10
-
11
- class RpcCallable(abc.ABC):
12
- """Abstract base class of clarifai api rpc callables"""
13
-
14
-
15
- # add grpc classes as subclasses of the abcs, so they also succeed in isinstance calls
16
- def _register_classes():
17
- V2Stub.register(service_pb2_grpc.V2Stub)
18
- for name in dir(grpc):
19
- if name.endswith('Callable'):
20
- RpcCallable.register(getattr(grpc, name))
21
-
22
-
23
- _register_classes()
@@ -1,127 +0,0 @@
1
- import logging
2
- import time
3
- from concurrent.futures import ThreadPoolExecutor
4
-
5
- import grpc
6
- from clarifai_grpc.grpc.api.status import status_code_pb2
7
-
8
- from clarifai.client.auth.helper import ClarifaiAuthHelper
9
- from clarifai.client.auth.register import RpcCallable, V2Stub
10
-
11
- throttle_status_codes = {
12
- status_code_pb2.CONN_THROTTLED,
13
- status_code_pb2.CONN_EXCEED_HOURLY_LIMIT,
14
- }
15
-
16
- retry_codes_grpc = {
17
- grpc.StatusCode.UNAVAILABLE,
18
- }
19
-
20
- _threadpool = ThreadPoolExecutor(100)
21
-
22
-
23
- def create_stub(auth_helper: ClarifaiAuthHelper = None, max_retry_attempts: int = 10) -> V2Stub:
24
- """
25
- Create client stub that handles authorization and basic retries for
26
- unavailable or throttled connections.
27
-
28
- Args:
29
- auth_helper: ClarifaiAuthHelper to use for auth metadata (default: from env)
30
- max_retry_attempts: max attempts to retry rpcs with retryable failures
31
- """
32
- stub = AuthorizedStub(auth_helper)
33
- if max_retry_attempts > 0:
34
- return RetryStub(stub, max_retry_attempts)
35
- return stub
36
-
37
-
38
- class AuthorizedStub(V2Stub):
39
- """V2Stub proxy that inserts metadata authorization in rpc calls."""
40
-
41
- def __init__(self, auth_helper: ClarifaiAuthHelper = None):
42
- if auth_helper is None:
43
- auth_helper = ClarifaiAuthHelper.from_env()
44
- self.stub = auth_helper.get_stub()
45
- self.metadata = auth_helper.metadata
46
-
47
- def __getattr__(self, name):
48
- value = getattr(self.stub, name)
49
- if isinstance(value, RpcCallable):
50
- value = _AuthorizedRpcCallable(value, self.metadata)
51
- return value
52
-
53
-
54
- class _AuthorizedRpcCallable(RpcCallable):
55
- """Adds metadata(authorization header) to rpc calls"""
56
-
57
- def __init__(self, func, metadata):
58
- self.f = func
59
- self.metadata = metadata
60
-
61
- def __repr__(self):
62
- return repr(self.f)
63
-
64
- def __call__(self, *args, **kwargs):
65
- metadata = kwargs.pop('metadata', self.metadata)
66
- return self.f(*args, **kwargs, metadata=metadata)
67
-
68
- def future(self, *args, **kwargs):
69
- metadata = kwargs.pop('metadata', self.metadata)
70
- return self.f.future(*args, **kwargs, metadata=metadata)
71
-
72
- def __getattr__(self, name):
73
- return getattr(self.f, name)
74
-
75
-
76
- class RetryStub(V2Stub):
77
- """
78
- V2Stub proxy that retries requests (currently on unavailable server or throttle codes)
79
- """
80
-
81
- def __init__(self, stub, max_attempts=10, backoff_time=5):
82
- self.stub = stub
83
- self.max_attempts = max_attempts
84
- self.backoff_time = backoff_time
85
-
86
- def __getattr__(self, name):
87
- value = getattr(self.stub, name)
88
- if isinstance(value, RpcCallable):
89
- value = _RetryRpcCallable(value, self.max_attempts, self.backoff_time)
90
- return value
91
-
92
-
93
- class _RetryRpcCallable(RpcCallable):
94
- """Retries rpc calls on unavailable server or throttle codes"""
95
-
96
- def __init__(self, func, max_attempts, backoff_time):
97
- self.f = func
98
- self.max_attempts = max_attempts
99
- self.backoff_time = backoff_time
100
-
101
- def __repr__(self):
102
- return repr(self.f)
103
-
104
- def __call__(self, *args, **kwargs):
105
- attempt = 0
106
- while attempt < self.max_attempts:
107
- attempt += 1
108
- if attempt != 1:
109
- time.sleep(self.backoff_time) # TODO better backoff between attempts
110
- try:
111
- response = self.f(*args, **kwargs)
112
- if (response.status.code in throttle_status_codes) and attempt < self.max_attempts:
113
- logging.debug('Retrying with status %s' % str(response.status))
114
- else:
115
- return response
116
- except grpc.RpcError as e:
117
- if (e.code() in retry_codes_grpc) and attempt < self.max_attempts:
118
- logging.debug('Retrying with status %s' % e.code())
119
- else:
120
- raise
121
-
122
- def future(self, *args, **kwargs):
123
- # TODO use single result event loop thread with asyncio
124
- return _threadpool.submit(self, *args, **kwargs)
125
-
126
- def __getattr__(self, name):
127
- return getattr(self.f, name)
clarifai_utils/cli.py DELETED
File without changes
@@ -1,16 +0,0 @@
1
- # Note: V2Stub, create_stub is just added for backwards compatibility. It will be removed in the future.
2
- from clarifai.client.app import App
3
- from clarifai.client.auth.register import V2Stub
4
- from clarifai.client.auth.stub import create_stub
5
- from clarifai.client.base import BaseClient
6
- from clarifai.client.dataset import Dataset
7
- from clarifai.client.lister import Lister
8
- from clarifai.client.model import Model
9
- from clarifai.client.module import Module
10
- from clarifai.client.user import User
11
- from clarifai.client.workflow import Workflow
12
-
13
- __all__ = [
14
- 'V2Stub', 'create_stub', 'User', 'App', 'Model', 'Workflow', 'Module', 'Lister', 'Dataset',
15
- 'BaseClient'
16
- ]