langvision 0.1.44__tar.gz

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 (89) hide show
  1. langvision-0.1.44/PKG-INFO +225 -0
  2. langvision-0.1.44/README.md +156 -0
  3. langvision-0.1.44/pyproject.toml +185 -0
  4. langvision-0.1.44/setup.cfg +4 -0
  5. langvision-0.1.44/src/langvision/__init__.py +151 -0
  6. langvision-0.1.44/src/langvision/agents/__init__.py +8 -0
  7. langvision-0.1.44/src/langvision/api/__init__.py +60 -0
  8. langvision-0.1.44/src/langvision/api/client.py +866 -0
  9. langvision-0.1.44/src/langvision/api/cloud.py +330 -0
  10. langvision-0.1.44/src/langvision/auth.py +287 -0
  11. langvision-0.1.44/src/langvision/callbacks/__init__.py +0 -0
  12. langvision-0.1.44/src/langvision/callbacks/base.py +170 -0
  13. langvision-0.1.44/src/langvision/callbacks/early_stopping.py +16 -0
  14. langvision-0.1.44/src/langvision/callbacks/logging.py +17 -0
  15. langvision-0.1.44/src/langvision/callbacks/registry.py +10 -0
  16. langvision-0.1.44/src/langvision/cli/__init__.py +299 -0
  17. langvision-0.1.44/src/langvision/cli/auth.py +249 -0
  18. langvision-0.1.44/src/langvision/cli/complete_cli.py +319 -0
  19. langvision-0.1.44/src/langvision/cli/config.py +344 -0
  20. langvision-0.1.44/src/langvision/cli/evaluate.py +201 -0
  21. langvision-0.1.44/src/langvision/cli/export.py +177 -0
  22. langvision-0.1.44/src/langvision/cli/finetune.py +298 -0
  23. langvision-0.1.44/src/langvision/cli/model_zoo.py +162 -0
  24. langvision-0.1.44/src/langvision/cli/train.py +115 -0
  25. langvision-0.1.44/src/langvision/cli/utils.py +258 -0
  26. langvision-0.1.44/src/langvision/components/__init__.py +1 -0
  27. langvision-0.1.44/src/langvision/components/attention.py +61 -0
  28. langvision-0.1.44/src/langvision/components/mlp.py +10 -0
  29. langvision-0.1.44/src/langvision/components/patch_embedding.py +15 -0
  30. langvision-0.1.44/src/langvision/concepts/__init__.py +9 -0
  31. langvision-0.1.44/src/langvision/concepts/ccot.py +30 -0
  32. langvision-0.1.44/src/langvision/concepts/cot.py +29 -0
  33. langvision-0.1.44/src/langvision/concepts/dpo.py +37 -0
  34. langvision-0.1.44/src/langvision/concepts/grpo.py +25 -0
  35. langvision-0.1.44/src/langvision/concepts/lime.py +37 -0
  36. langvision-0.1.44/src/langvision/concepts/ppo.py +47 -0
  37. langvision-0.1.44/src/langvision/concepts/rlhf.py +40 -0
  38. langvision-0.1.44/src/langvision/concepts/rlvr.py +25 -0
  39. langvision-0.1.44/src/langvision/concepts/shap.py +37 -0
  40. langvision-0.1.44/src/langvision/config/__init__.py +14 -0
  41. langvision-0.1.44/src/langvision/data/__init__.py +0 -0
  42. langvision-0.1.44/src/langvision/data/datasets.py +416 -0
  43. langvision-0.1.44/src/langvision/data/enhanced_datasets.py +582 -0
  44. langvision-0.1.44/src/langvision/data/preprocessing.py +472 -0
  45. langvision-0.1.44/src/langvision/evaluation/__init__.py +542 -0
  46. langvision-0.1.44/src/langvision/example.py +5 -0
  47. langvision-0.1.44/src/langvision/export/__init__.py +394 -0
  48. langvision-0.1.44/src/langvision/facade.py +97 -0
  49. langvision-0.1.44/src/langvision/filesystem/__init__.py +15 -0
  50. langvision-0.1.44/src/langvision/inference/__init__.py +460 -0
  51. langvision-0.1.44/src/langvision/llm/__init__.py +5 -0
  52. langvision-0.1.44/src/langvision/memory/__init__.py +21 -0
  53. langvision-0.1.44/src/langvision/model_zoo.py +434 -0
  54. langvision-0.1.44/src/langvision/models/__init__.py +1 -0
  55. langvision-0.1.44/src/langvision/models/lora.py +202 -0
  56. langvision-0.1.44/src/langvision/models/model_loader.py +377 -0
  57. langvision-0.1.44/src/langvision/models/multimodal.py +297 -0
  58. langvision-0.1.44/src/langvision/models/resnet.py +303 -0
  59. langvision-0.1.44/src/langvision/models/vision_transformer.py +28 -0
  60. langvision-0.1.44/src/langvision/sync/__init__.py +16 -0
  61. langvision-0.1.44/src/langvision/telemetry/__init__.py +9 -0
  62. langvision-0.1.44/src/langvision/training/__init__.py +110 -0
  63. langvision-0.1.44/src/langvision/training/acceleration.py +102 -0
  64. langvision-0.1.44/src/langvision/training/advanced_trainer.py +478 -0
  65. langvision-0.1.44/src/langvision/training/config.py +135 -0
  66. langvision-0.1.44/src/langvision/training/fast_attention.py +424 -0
  67. langvision-0.1.44/src/langvision/training/fast_lora.py +410 -0
  68. langvision-0.1.44/src/langvision/training/fast_trainer.py +669 -0
  69. langvision-0.1.44/src/langvision/training/finetuner.py +634 -0
  70. langvision-0.1.44/src/langvision/training/memory_efficient.py +432 -0
  71. langvision-0.1.44/src/langvision/training/modules.py +27 -0
  72. langvision-0.1.44/src/langvision/training/optimal_finetuner.py +36 -0
  73. langvision-0.1.44/src/langvision/training/optimizers.py +85 -0
  74. langvision-0.1.44/src/langvision/training/trainer.py +128 -0
  75. langvision-0.1.44/src/langvision/utils/__init__.py +53 -0
  76. langvision-0.1.44/src/langvision/utils/config.py +186 -0
  77. langvision-0.1.44/src/langvision/utils/cuda.py +26 -0
  78. langvision-0.1.44/src/langvision/utils/data.py +8 -0
  79. langvision-0.1.44/src/langvision/utils/device.py +32 -0
  80. langvision-0.1.44/src/langvision/utils/hardware.py +642 -0
  81. langvision-0.1.44/src/langvision/utils/logging.py +381 -0
  82. langvision-0.1.44/src/langvision/utils/metrics.py +448 -0
  83. langvision-0.1.44/src/langvision/utils/setup.py +266 -0
  84. langvision-0.1.44/src/langvision.egg-info/PKG-INFO +225 -0
  85. langvision-0.1.44/src/langvision.egg-info/SOURCES.txt +87 -0
  86. langvision-0.1.44/src/langvision.egg-info/dependency_links.txt +1 -0
  87. langvision-0.1.44/src/langvision.egg-info/entry_points.txt +4 -0
  88. langvision-0.1.44/src/langvision.egg-info/requires.txt +43 -0
  89. langvision-0.1.44/src/langvision.egg-info/top_level.txt +1 -0
@@ -0,0 +1,225 @@
1
+ Metadata-Version: 2.4
2
+ Name: langvision
3
+ Version: 0.1.44
4
+ Summary: Efficient LoRA Fine-Tuning for Vision LLMs with advanced CLI and model zoo
5
+ Author-email: Pritesh Raj <priteshraj10@gmail.com>
6
+ Maintainer-email: Pritesh Raj <priteshraj10@gmail.com>
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/langtrain-ai/langvision
9
+ Project-URL: Documentation, https://github.com/langtrain-ai/langvision/tree/main/docs
10
+ Project-URL: Repository, https://github.com/langtrain-ai/langvision
11
+ Project-URL: Bug Tracker, https://github.com/langtrain-ai/langvision/issues
12
+ Project-URL: Source Code, https://github.com/langtrain-ai/langvision
13
+ Project-URL: Changelog, https://github.com/langtrain-ai/langvision/blob/main/CHANGELOG.md
14
+ Keywords: vision,transformer,lora,fine-tuning,deep-learning,computer-vision
15
+ Classifier: Development Status :: 4 - Beta
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: Science/Research
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.8
21
+ Classifier: Programming Language :: Python :: 3.9
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
28
+ Requires-Python: >=3.8
29
+ Description-Content-Type: text/markdown
30
+ Requires-Dist: torch>=1.10.0
31
+ Requires-Dist: torchvision>=0.11.0
32
+ Requires-Dist: numpy>=1.21.0
33
+ Requires-Dist: tqdm>=4.62.0
34
+ Requires-Dist: pyyaml>=6.0
35
+ Requires-Dist: scipy>=1.7.0
36
+ Requires-Dist: matplotlib>=3.5.0
37
+ Requires-Dist: pillow>=8.3.0
38
+ Requires-Dist: timm>=0.6.0
39
+ Requires-Dist: transformers>=4.20.0
40
+ Requires-Dist: toml>=0.10.0
41
+ Requires-Dist: scikit-learn>=1.0.0
42
+ Requires-Dist: pandas>=1.3.0
43
+ Requires-Dist: opencv-python-headless>=4.5.0
44
+ Requires-Dist: wandb>=0.13.0
45
+ Requires-Dist: rich>=13.0.0
46
+ Provides-Extra: dev
47
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
48
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
49
+ Requires-Dist: pytest-mock>=3.8.0; extra == "dev"
50
+ Requires-Dist: black>=22.0.0; extra == "dev"
51
+ Requires-Dist: isort>=5.10.0; extra == "dev"
52
+ Requires-Dist: flake8>=5.0.0; extra == "dev"
53
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
54
+ Requires-Dist: pre-commit>=2.20.0; extra == "dev"
55
+ Requires-Dist: bandit>=1.7.0; extra == "dev"
56
+ Provides-Extra: docs
57
+ Requires-Dist: sphinx>=5.0.0; extra == "docs"
58
+ Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
59
+ Requires-Dist: myst-parser>=0.18.0; extra == "docs"
60
+ Requires-Dist: sphinx-autodoc-typehints>=1.19.0; extra == "docs"
61
+ Provides-Extra: examples
62
+ Requires-Dist: jupyter>=1.0.0; extra == "examples"
63
+ Requires-Dist: ipywidgets>=7.6.0; extra == "examples"
64
+ Requires-Dist: tensorboard>=2.9.0; extra == "examples"
65
+ Requires-Dist: wandb>=0.13.0; extra == "examples"
66
+ Provides-Extra: gpu
67
+ Requires-Dist: torch>=1.10.0; extra == "gpu"
68
+ Requires-Dist: torchvision>=0.11.0; extra == "gpu"
69
+
70
+ <div align="center">
71
+
72
+ <img src="https://raw.githubusercontent.com/langtrain-ai/langvision/main/static/langvision-black.png" alt="Langvision" width="400" />
73
+
74
+ <h3>Fine-tune Vision LLMs with ease</h3>
75
+
76
+ <p>
77
+ <strong>Train LLaVA, Qwen-VL, and other vision models in minutes.</strong><br>
78
+ The simplest way to create custom multimodal AI.
79
+ </p>
80
+
81
+ <p>
82
+ <a href="https://www.producthunt.com/products/langtrain-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1049974&theme=light" alt="Product Hunt" width="200" /></a>
83
+ </p>
84
+
85
+ <p>
86
+ <a href="https://pypi.org/project/langvision/"><img src="https://img.shields.io/pypi/v/langvision.svg?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI" /></a>
87
+ <a href="https://pepy.tech/project/langvision"><img src="https://img.shields.io/pepy/dt/langvision?style=for-the-badge&logo=python&logoColor=white&label=downloads" alt="Downloads" /></a>
88
+ <a href="https://github.com/langtrain-ai/langvision/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="License" /></a>
89
+ </p>
90
+
91
+ <p>
92
+ <a href="#quick-start">Quick Start</a> •
93
+ <a href="#features">Features</a> •
94
+ <a href="#supported-models">Models</a> •
95
+ <a href="https://langtrain.xyz/docs">Docs</a>
96
+ </p>
97
+
98
+ </div>
99
+
100
+ ---
101
+
102
+ ## ⚡ Quick Start
103
+
104
+ ### 1-Click Install (Recommended)
105
+ The fastest way to get started. Installs Langvision in an isolated environment.
106
+
107
+ ```bash
108
+ curl -fsSL https://raw.githubusercontent.com/langtrain-ai/langvision/main/scripts/install.sh | bash
109
+ ```
110
+
111
+ ### Or using pip
112
+ ```bash
113
+ pip install langvision
114
+ ```
115
+
116
+ Fine-tune a vision model in **3 lines**:
117
+
118
+ ```python
119
+ from langvision import LoRATrainer
120
+
121
+ trainer = LoRATrainer(model_name="llava-hf/llava-1.5-7b-hf")
122
+ trainer.train_from_file("image_data.jsonl")
123
+ ```
124
+
125
+ Your custom vision model is ready.
126
+
127
+ ---
128
+
129
+ ## ✨ Features
130
+
131
+ <table>
132
+ <tr>
133
+ <td width="50%">
134
+
135
+ ### 🖼️ **Multimodal Training**
136
+ Train on images + text together. Perfect for VQA, image captioning, and visual reasoning.
137
+
138
+ ### 🎯 **Smart Defaults**
139
+ Optimized configurations for each model architecture. Just point and train.
140
+
141
+ ### 💾 **Efficient Memory**
142
+ LoRA + 4-bit quantization = Train 13B vision models on a single 24GB GPU.
143
+
144
+ </td>
145
+ <td width="50%">
146
+
147
+ ### 🔧 **Battle-Tested**
148
+ Production-ready code used by teams building real-world vision applications.
149
+
150
+ ### 🌐 **All Major Models**
151
+ LLaVA, Qwen-VL, CogVLM, InternVL, and more. Full compatibility.
152
+
153
+ ### ☁️ **Deploy Anywhere**
154
+ Export to GGUF, ONNX, or deploy directly to Langtrain Cloud.
155
+
156
+ </td>
157
+ </tr>
158
+ </table>
159
+
160
+ ---
161
+
162
+ ## 🤖 Supported Models
163
+
164
+ | Model | Parameters | Memory Required |
165
+ |-------|-----------|-----------------|
166
+ | LLaVA 1.5 | 7B, 13B | 8GB, 16GB |
167
+ | Qwen-VL | 7B | 8GB |
168
+ | CogVLM | 17B | 24GB |
169
+ | InternVL | 6B, 26B | 8GB, 32GB |
170
+ | Phi-3 Vision | 4.2B | 6GB |
171
+
172
+ ---
173
+
174
+ ## 📖 Full Example
175
+
176
+ ```python
177
+ from langvision import LoRATrainer
178
+ from langvision.config import TrainingConfig, LoRAConfig
179
+
180
+ # Configure training
181
+ config = TrainingConfig(
182
+ num_epochs=3,
183
+ batch_size=2,
184
+ learning_rate=2e-4,
185
+ lora=LoRAConfig(rank=16, alpha=32)
186
+ )
187
+
188
+ # Initialize trainer
189
+ trainer = LoRATrainer(
190
+ model_name="llava-hf/llava-1.5-7b-hf",
191
+ output_dir="./my-vision-model",
192
+ config=config
193
+ )
194
+
195
+ # Train on image-text data
196
+ trainer.train_from_file("training_data.jsonl")
197
+ ```
198
+
199
+ ---
200
+
201
+ ## 📝 Data Format
202
+
203
+ ```jsonl
204
+ {"image": "path/to/image1.jpg", "conversations": [{"from": "human", "value": "What's in this image?"}, {"from": "assistant", "value": "A cat sitting on a couch."}]}
205
+ ```
206
+
207
+ ---
208
+
209
+ ## 🤝 Community
210
+
211
+ <p align="center">
212
+ <a href="https://discord.gg/langtrain">Discord</a> •
213
+ <a href="https://twitter.com/langtrainai">Twitter</a> •
214
+ <a href="https://langtrain.xyz">Website</a>
215
+ </p>
216
+
217
+ ---
218
+
219
+ <div align="center">
220
+
221
+ **Built with ❤️ by [Langtrain AI](https://langtrain.xyz)**
222
+
223
+ *Making vision AI accessible to everyone.*
224
+
225
+ </div>
@@ -0,0 +1,156 @@
1
+ <div align="center">
2
+
3
+ <img src="https://raw.githubusercontent.com/langtrain-ai/langvision/main/static/langvision-black.png" alt="Langvision" width="400" />
4
+
5
+ <h3>Fine-tune Vision LLMs with ease</h3>
6
+
7
+ <p>
8
+ <strong>Train LLaVA, Qwen-VL, and other vision models in minutes.</strong><br>
9
+ The simplest way to create custom multimodal AI.
10
+ </p>
11
+
12
+ <p>
13
+ <a href="https://www.producthunt.com/products/langtrain-2" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1049974&theme=light" alt="Product Hunt" width="200" /></a>
14
+ </p>
15
+
16
+ <p>
17
+ <a href="https://pypi.org/project/langvision/"><img src="https://img.shields.io/pypi/v/langvision.svg?style=for-the-badge&logo=pypi&logoColor=white" alt="PyPI" /></a>
18
+ <a href="https://pepy.tech/project/langvision"><img src="https://img.shields.io/pepy/dt/langvision?style=for-the-badge&logo=python&logoColor=white&label=downloads" alt="Downloads" /></a>
19
+ <a href="https://github.com/langtrain-ai/langvision/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=for-the-badge" alt="License" /></a>
20
+ </p>
21
+
22
+ <p>
23
+ <a href="#quick-start">Quick Start</a> •
24
+ <a href="#features">Features</a> •
25
+ <a href="#supported-models">Models</a> •
26
+ <a href="https://langtrain.xyz/docs">Docs</a>
27
+ </p>
28
+
29
+ </div>
30
+
31
+ ---
32
+
33
+ ## ⚡ Quick Start
34
+
35
+ ### 1-Click Install (Recommended)
36
+ The fastest way to get started. Installs Langvision in an isolated environment.
37
+
38
+ ```bash
39
+ curl -fsSL https://raw.githubusercontent.com/langtrain-ai/langvision/main/scripts/install.sh | bash
40
+ ```
41
+
42
+ ### Or using pip
43
+ ```bash
44
+ pip install langvision
45
+ ```
46
+
47
+ Fine-tune a vision model in **3 lines**:
48
+
49
+ ```python
50
+ from langvision import LoRATrainer
51
+
52
+ trainer = LoRATrainer(model_name="llava-hf/llava-1.5-7b-hf")
53
+ trainer.train_from_file("image_data.jsonl")
54
+ ```
55
+
56
+ Your custom vision model is ready.
57
+
58
+ ---
59
+
60
+ ## ✨ Features
61
+
62
+ <table>
63
+ <tr>
64
+ <td width="50%">
65
+
66
+ ### 🖼️ **Multimodal Training**
67
+ Train on images + text together. Perfect for VQA, image captioning, and visual reasoning.
68
+
69
+ ### 🎯 **Smart Defaults**
70
+ Optimized configurations for each model architecture. Just point and train.
71
+
72
+ ### 💾 **Efficient Memory**
73
+ LoRA + 4-bit quantization = Train 13B vision models on a single 24GB GPU.
74
+
75
+ </td>
76
+ <td width="50%">
77
+
78
+ ### 🔧 **Battle-Tested**
79
+ Production-ready code used by teams building real-world vision applications.
80
+
81
+ ### 🌐 **All Major Models**
82
+ LLaVA, Qwen-VL, CogVLM, InternVL, and more. Full compatibility.
83
+
84
+ ### ☁️ **Deploy Anywhere**
85
+ Export to GGUF, ONNX, or deploy directly to Langtrain Cloud.
86
+
87
+ </td>
88
+ </tr>
89
+ </table>
90
+
91
+ ---
92
+
93
+ ## 🤖 Supported Models
94
+
95
+ | Model | Parameters | Memory Required |
96
+ |-------|-----------|-----------------|
97
+ | LLaVA 1.5 | 7B, 13B | 8GB, 16GB |
98
+ | Qwen-VL | 7B | 8GB |
99
+ | CogVLM | 17B | 24GB |
100
+ | InternVL | 6B, 26B | 8GB, 32GB |
101
+ | Phi-3 Vision | 4.2B | 6GB |
102
+
103
+ ---
104
+
105
+ ## 📖 Full Example
106
+
107
+ ```python
108
+ from langvision import LoRATrainer
109
+ from langvision.config import TrainingConfig, LoRAConfig
110
+
111
+ # Configure training
112
+ config = TrainingConfig(
113
+ num_epochs=3,
114
+ batch_size=2,
115
+ learning_rate=2e-4,
116
+ lora=LoRAConfig(rank=16, alpha=32)
117
+ )
118
+
119
+ # Initialize trainer
120
+ trainer = LoRATrainer(
121
+ model_name="llava-hf/llava-1.5-7b-hf",
122
+ output_dir="./my-vision-model",
123
+ config=config
124
+ )
125
+
126
+ # Train on image-text data
127
+ trainer.train_from_file("training_data.jsonl")
128
+ ```
129
+
130
+ ---
131
+
132
+ ## 📝 Data Format
133
+
134
+ ```jsonl
135
+ {"image": "path/to/image1.jpg", "conversations": [{"from": "human", "value": "What's in this image?"}, {"from": "assistant", "value": "A cat sitting on a couch."}]}
136
+ ```
137
+
138
+ ---
139
+
140
+ ## 🤝 Community
141
+
142
+ <p align="center">
143
+ <a href="https://discord.gg/langtrain">Discord</a> •
144
+ <a href="https://twitter.com/langtrainai">Twitter</a> •
145
+ <a href="https://langtrain.xyz">Website</a>
146
+ </p>
147
+
148
+ ---
149
+
150
+ <div align="center">
151
+
152
+ **Built with ❤️ by [Langtrain AI](https://langtrain.xyz)**
153
+
154
+ *Making vision AI accessible to everyone.*
155
+
156
+ </div>
@@ -0,0 +1,185 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "langvision"
7
+ version = "0.1.44"
8
+ description = "Efficient LoRA Fine-Tuning for Vision LLMs with advanced CLI and model zoo"
9
+ authors = [
10
+ { name = "Pritesh Raj", email = "priteshraj10@gmail.com" }
11
+ ]
12
+ maintainers = [
13
+ { name = "Pritesh Raj", email = "priteshraj10@gmail.com" }
14
+ ]
15
+ readme = "README.md"
16
+ license = "MIT"
17
+ requires-python = ">=3.8"
18
+ keywords = ["vision", "transformer", "lora", "fine-tuning", "deep-learning", "computer-vision"]
19
+ classifiers = [
20
+ "Development Status :: 4 - Beta",
21
+ "Intended Audience :: Developers",
22
+ "Intended Audience :: Science/Research",
23
+ "Operating System :: OS Independent",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
31
+ "Topic :: Software Development :: Libraries :: Python Modules",
32
+ "Topic :: Scientific/Engineering :: Image Processing",
33
+ ]
34
+ dependencies = [
35
+ "torch>=1.10.0",
36
+ "torchvision>=0.11.0",
37
+ "numpy>=1.21.0",
38
+ "tqdm>=4.62.0",
39
+ "pyyaml>=6.0",
40
+ "scipy>=1.7.0",
41
+ "matplotlib>=3.5.0",
42
+ "pillow>=8.3.0",
43
+ "timm>=0.6.0",
44
+ "transformers>=4.20.0",
45
+ "toml>=0.10.0",
46
+ "scikit-learn>=1.0.0",
47
+ "pandas>=1.3.0",
48
+ "opencv-python-headless>=4.5.0",
49
+ "wandb>=0.13.0",
50
+ "rich>=13.0.0",
51
+ ]
52
+
53
+ [project.optional-dependencies]
54
+ dev = [
55
+ "pytest>=7.0.0",
56
+ "pytest-cov>=4.0.0",
57
+ "pytest-mock>=3.8.0",
58
+ "black>=22.0.0",
59
+ "isort>=5.10.0",
60
+ "flake8>=5.0.0",
61
+ "mypy>=1.0.0",
62
+ "pre-commit>=2.20.0",
63
+ "bandit>=1.7.0",
64
+ ]
65
+ docs = [
66
+ "sphinx>=5.0.0",
67
+ "sphinx-rtd-theme>=1.0.0",
68
+ "myst-parser>=0.18.0",
69
+ "sphinx-autodoc-typehints>=1.19.0",
70
+ ]
71
+ examples = [
72
+ "jupyter>=1.0.0",
73
+ "ipywidgets>=7.6.0",
74
+ "tensorboard>=2.9.0",
75
+ "wandb>=0.13.0",
76
+ ]
77
+ gpu = [
78
+ "torch>=1.10.0",
79
+ "torchvision>=0.11.0",
80
+ ]
81
+
82
+ [project.urls]
83
+ Homepage = "https://github.com/langtrain-ai/langvision"
84
+ Documentation = "https://github.com/langtrain-ai/langvision/tree/main/docs"
85
+ Repository = "https://github.com/langtrain-ai/langvision"
86
+ "Bug Tracker" = "https://github.com/langtrain-ai/langvision/issues"
87
+ "Source Code" = "https://github.com/langtrain-ai/langvision"
88
+ Changelog = "https://github.com/langtrain-ai/langvision/blob/main/CHANGELOG.md"
89
+
90
+ [project.scripts]
91
+ langvision-finetune = "langvision.cli.finetune:main"
92
+ langvision-train = "langvision.cli.train:main"
93
+ langvision = "langvision.cli:main"
94
+
95
+ [tool.setuptools.packages.find]
96
+ where = ["src"]
97
+
98
+ [tool.setuptools.package-data]
99
+ langvision = ["*.pyi", "py.typed"]
100
+
101
+ [tool.black]
102
+ line-length = 88
103
+ target-version = ['py38']
104
+ include = '\.pyi?$'
105
+ extend-exclude = '''
106
+ /(
107
+ # directories
108
+ \.eggs
109
+ | \.git
110
+ | \.hg
111
+ | \.mypy_cache
112
+ | \.tox
113
+ | \.venv
114
+ | build
115
+ | dist
116
+ )/
117
+ '''
118
+
119
+ [tool.isort]
120
+ profile = "black"
121
+ multi_line_output = 3
122
+ line_length = 88
123
+ known_first_party = ["langvision"]
124
+
125
+ [tool.mypy]
126
+ python_version = "3.8"
127
+ warn_return_any = true
128
+ warn_unused_configs = true
129
+ disallow_untyped_defs = true
130
+ disallow_incomplete_defs = true
131
+ check_untyped_defs = true
132
+ disallow_untyped_decorators = true
133
+ no_implicit_optional = true
134
+ warn_redundant_casts = true
135
+ warn_unused_ignores = true
136
+ warn_no_return = true
137
+ warn_unreachable = true
138
+ strict_equality = true
139
+
140
+ [tool.pytest.ini_options]
141
+ minversion = "7.0"
142
+ addopts = "-ra -q --strict-markers --strict-config"
143
+ testpaths = ["tests"]
144
+ python_files = ["test_*.py", "*_test.py"]
145
+ python_classes = ["Test*"]
146
+ python_functions = ["test_*"]
147
+ markers = [
148
+ "slow: marks tests as slow (deselect with '-m \"not slow\"')",
149
+ "integration: marks tests as integration tests",
150
+ "unit: marks tests as unit tests",
151
+ ]
152
+
153
+ [tool.coverage.run]
154
+ source = ["src/langvision"]
155
+ omit = [
156
+ "*/tests/*",
157
+ "*/test_*",
158
+ "*/__pycache__/*",
159
+ ]
160
+
161
+ [tool.coverage.report]
162
+ exclude_lines = [
163
+ "pragma: no cover",
164
+ "def __repr__",
165
+ "if self.debug:",
166
+ "if settings.DEBUG",
167
+ "raise AssertionError",
168
+ "raise NotImplementedError",
169
+ "if 0:",
170
+ "if __name__ == .__main__.:",
171
+ "class .*\\bProtocol\\):",
172
+ "@(abc\\.)?abstractmethod",
173
+ ]
174
+
175
+ [bumpver]
176
+ current_version = "0.1.44"
177
+ version_pattern = "MAJOR.MINOR.PATCH"
178
+ commit_message = "Bump version: {old_version} → {new_version}"
179
+ tag_message = "v{new_version}"
180
+
181
+ [bumpver.file_patterns]
182
+ "pyproject.toml" = [
183
+ 'current_version = "{version}"',
184
+ 'version = "{version}"',
185
+ ]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+