superb-ai-onprem 0.6.2__py3-none-any.whl → 0.7.0__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.
Potentially problematic release.
This version of superb-ai-onprem might be problematic. Click here for more details.
- spb_onprem/_version.py +2 -2
- spb_onprem/activities/entities/activity.py +24 -17
- spb_onprem/activities/entities/activity_history.py +15 -12
- spb_onprem/data/entities/annotation.py +16 -13
- spb_onprem/data/entities/data.py +31 -17
- spb_onprem/data/entities/data_meta.py +1 -1
- spb_onprem/data/entities/data_slice.py +12 -9
- spb_onprem/data/entities/frame.py +12 -9
- spb_onprem/data/entities/prediction.py +7 -5
- spb_onprem/data/entities/scene.py +9 -7
- spb_onprem/data/enums/data_meta_type.py +0 -1
- spb_onprem/data/params/data_list.py +240 -49
- spb_onprem/data/params/update_data.py +5 -6
- spb_onprem/data/params/update_data_slice.py +17 -6
- spb_onprem/data/queries.py +10 -41
- spb_onprem/data/service.py +7 -37
- spb_onprem/datasets/entities/dataset.py +13 -7
- spb_onprem/exports/entities/export.py +18 -15
- spb_onprem/slices/entities/slice.py +13 -10
- superb_ai_onprem-0.7.0.dist-info/METADATA +285 -0
- {superb_ai_onprem-0.6.2.dist-info → superb_ai_onprem-0.7.0.dist-info}/RECORD +24 -24
- superb_ai_onprem-0.6.2.dist-info/METADATA +0 -246
- {superb_ai_onprem-0.6.2.dist-info → superb_ai_onprem-0.7.0.dist-info}/WHEEL +0 -0
- {superb_ai_onprem-0.6.2.dist-info → superb_ai_onprem-0.7.0.dist-info}/licenses/LICENSE +0 -0
- {superb_ai_onprem-0.6.2.dist-info → superb_ai_onprem-0.7.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: superb-ai-onprem
|
|
3
|
+
Version: 0.7.0
|
|
4
|
+
Summary: Python SDK for Superb AI On-premise
|
|
5
|
+
Home-page: https://github.com/Superb-AI-Suite/superb-ai-onprem-python
|
|
6
|
+
Author: Superb AI
|
|
7
|
+
Author-email: support@superb-ai.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Requires-Python: >=3.8
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: requests>=2.22.0
|
|
15
|
+
Requires-Dist: urllib3>=1.21.1
|
|
16
|
+
Requires-Dist: pydantic>=1.8.0
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: requires-dist
|
|
25
|
+
Dynamic: requires-python
|
|
26
|
+
Dynamic: summary
|
|
27
|
+
|
|
28
|
+
# 🚀 Superb AI On-premise Python SDK
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+

|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
**Superb AI On-premise Python SDK** is a comprehensive Python library that provides a simple and intuitive interface to interact with your on-premise Superb AI installation. Build powerful data management, annotation, and machine learning workflows with ease.
|
|
35
|
+
|
|
36
|
+
## 🌟 Key Features
|
|
37
|
+
|
|
38
|
+
- **🗂️ Dataset Management**: Create, organize, and manage your datasets
|
|
39
|
+
- **📊 Data Operations**: Upload, annotate, and manipulate your data with powerful filtering
|
|
40
|
+
- **🔍 Advanced Filtering**: Sophisticated filtering system for precise data queries
|
|
41
|
+
- **🏷️ Annotation Management**: Handle annotations and versions seamlessly
|
|
42
|
+
- **📤 Export & Import**: Flexible data export and content management
|
|
43
|
+
- **⚡ Activity Tracking**: Monitor and manage long-running tasks
|
|
44
|
+
- **🔧 Slice Management**: Organize data into logical groups
|
|
45
|
+
|
|
46
|
+
## 🔧 Installation
|
|
47
|
+
|
|
48
|
+
### Step 1: Install the SDK
|
|
49
|
+
|
|
50
|
+
Install the SDK using pip:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install superb-ai-onprem
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Requirements:**
|
|
57
|
+
- Python 3.7 or higher
|
|
58
|
+
- Active Superb AI On-premise installation
|
|
59
|
+
|
|
60
|
+
> ⚠️ **Important**: The SDK will not work without this configuration file. Make sure to replace the values with your actual credentials from your Superb AI administrator.
|
|
61
|
+
|
|
62
|
+
## 🚀 Quick Start
|
|
63
|
+
|
|
64
|
+
Get up and running with Superb AI SDK in minutes:
|
|
65
|
+
|
|
66
|
+
### Step 1: Authentication Setup
|
|
67
|
+
|
|
68
|
+
First, set up your authentication credentials:
|
|
69
|
+
|
|
70
|
+
**Option A: Config file (Recommended for local development)**
|
|
71
|
+
```bash
|
|
72
|
+
# Create config directory
|
|
73
|
+
mkdir -p ~/.spb
|
|
74
|
+
|
|
75
|
+
# Create config file
|
|
76
|
+
cat > ~/.spb/onprem-config << EOF
|
|
77
|
+
[default]
|
|
78
|
+
host=https://your-superb-ai-host.com
|
|
79
|
+
access_key=your-access-key
|
|
80
|
+
access_key_secret=your-access-key-secret
|
|
81
|
+
EOF
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 2: Your First Workflow
|
|
85
|
+
|
|
86
|
+
```python
|
|
87
|
+
from spb_onprem import DatasetService, DataService
|
|
88
|
+
|
|
89
|
+
# Initialize services
|
|
90
|
+
dataset_service = DatasetService()
|
|
91
|
+
data_service = DataService()
|
|
92
|
+
|
|
93
|
+
# 1. Find existing datasets
|
|
94
|
+
datasets, cursor, total = dataset_service.get_dataset_list(length=10)
|
|
95
|
+
print(f"📂 Found {total} datasets")
|
|
96
|
+
|
|
97
|
+
if datasets:
|
|
98
|
+
# Use the first available dataset
|
|
99
|
+
dataset = datasets[0]
|
|
100
|
+
print(f"✅ Using dataset: {dataset.name} (ID: {dataset.id})")
|
|
101
|
+
|
|
102
|
+
# 2. Get data list from the dataset
|
|
103
|
+
data_list, cursor, total = data_service.get_data_list(
|
|
104
|
+
dataset_id=dataset.id,
|
|
105
|
+
length=10
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
print(f"📊 Dataset contains {total} data items")
|
|
109
|
+
|
|
110
|
+
# 3. Display data information
|
|
111
|
+
for i, data in enumerate(data_list, 1):
|
|
112
|
+
print(f" {i}. Key: {data.key}, Type: {data.type}, ID: {data.id}")
|
|
113
|
+
|
|
114
|
+
if total > len(data_list):
|
|
115
|
+
print(f" ... and {total - len(data_list)} more items")
|
|
116
|
+
else:
|
|
117
|
+
print("❌ No datasets found. Please create a dataset first.")
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**🎉 Congratulations!** You've successfully:
|
|
121
|
+
- ✅ Connected to your Superb AI instance
|
|
122
|
+
- ✅ Found existing datasets
|
|
123
|
+
- ✅ Retrieved and displayed data information
|
|
124
|
+
|
|
125
|
+
Ready for more? Check out our [comprehensive documentation](#-documentation) below!
|
|
126
|
+
|
|
127
|
+
## 📚 Module Documentation
|
|
128
|
+
|
|
129
|
+
### 🏗️ Core Modules
|
|
130
|
+
|
|
131
|
+
Comprehensive guides for each SDK module with detailed examples and best practices:
|
|
132
|
+
|
|
133
|
+
| Module | Purpose | Key Features | Documentation |
|
|
134
|
+
|--------|---------|--------------|---------------|
|
|
135
|
+
| **📁 Datasets** | Dataset lifecycle management | Create, organize, manage data collections | [📂 Dataset Guide](spb_onprem/datasets/README.md) |
|
|
136
|
+
| **📊 Data** | Individual data management | CRUD operations, advanced filtering, annotations | [📊 Data Guide](spb_onprem/data/README.md) |
|
|
137
|
+
| **🔪 Slices** | Data organization & filtering | Create filtered views, team collaboration | [� Slice Guide](spb_onprem/slices/README.md) |
|
|
138
|
+
| **⚡ Activities** | Workflow & task management | Process automation, progress tracking | [⚡ Activity Guide](spb_onprem/activities/README.md) |
|
|
139
|
+
| **📤 Exports** | Data & annotation export | Multi-format export (COCO, YOLO, Custom) | [📤 Export Guide](spb_onprem/exports/README.md) |
|
|
140
|
+
|
|
141
|
+
### 🎯 Getting Started Paths
|
|
142
|
+
|
|
143
|
+
Choose your learning path based on your use case:
|
|
144
|
+
|
|
145
|
+
#### **📊 Data Management Workflow**
|
|
146
|
+
1. Start with [� Datasets](spb_onprem/datasets/README.md) - Create and organize your data collections
|
|
147
|
+
2. Then explore [📊 Data](spb_onprem/data/README.md) - Manage individual items and annotations
|
|
148
|
+
3. Use [🔪 Slices](spb_onprem/slices/README.md) - Organize data into logical groups
|
|
149
|
+
|
|
150
|
+
#### **🚀 ML Pipeline Integration**
|
|
151
|
+
1. Begin with [� Data](spb_onprem/data/README.md) - Understand data structure and filtering
|
|
152
|
+
2. Configure [⚡ Activities](spb_onprem/activities/README.md) - Automate labeling and review workflows
|
|
153
|
+
3. Setup [� Exports](spb_onprem/exports/README.md) - Export to ML training formats
|
|
154
|
+
|
|
155
|
+
#### **👥 Team Collaboration**
|
|
156
|
+
1. Setup [📁 Datasets](spb_onprem/datasets/README.md) - Organize team projects
|
|
157
|
+
2. Create [🔪 Slices](spb_onprem/slices/README.md) - Assign work to team members
|
|
158
|
+
3. Implement [⚡ Activities](spb_onprem/activities/README.md) - Track progress and quality
|
|
159
|
+
|
|
160
|
+
### 🔧 Advanced Features
|
|
161
|
+
|
|
162
|
+
Each module includes:
|
|
163
|
+
- **🎯 Quick Start Examples** - Get running immediately
|
|
164
|
+
- **📋 Detailed Entity Documentation** - Pydantic models with comprehensive field descriptions
|
|
165
|
+
- **🔍 Advanced Usage Patterns** - Best practices and complex workflows
|
|
166
|
+
- **🔗 Cross-Module Integration** - How modules work together
|
|
167
|
+
- **⚡ Performance Tips** - Optimization recommendations
|
|
168
|
+
|
|
169
|
+
### 🌐 Module Relationships
|
|
170
|
+
|
|
171
|
+
```
|
|
172
|
+
📁 Datasets (containers)
|
|
173
|
+
├── 📊 Data (individual items)
|
|
174
|
+
│ ├── 🔪 Slices (filtered views)
|
|
175
|
+
│ └── ⚡ Activities (processing workflows)
|
|
176
|
+
└── 📤 Exports (output formats)
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### ⚠️ Deprecated Modules
|
|
180
|
+
|
|
181
|
+
| Module | Status | Migration Path |
|
|
182
|
+
|--------|--------|----------------|
|
|
183
|
+
| **ModelService** | 🚫 Deprecated | Use external ML frameworks |
|
|
184
|
+
| **PredictionService** | 🚫 Deprecated | Use [📊 Data](spb_onprem/data/README.md) prediction entities |
|
|
185
|
+
| **InferService** | 🚫 Deprecated | Use [⚡ Activities](spb_onprem/activities/README.md) for inference workflows |
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## ⚠️ Error Handling
|
|
192
|
+
|
|
193
|
+
The SDK provides specific error types for different scenarios:
|
|
194
|
+
|
|
195
|
+
```python
|
|
196
|
+
from spb_onprem.exceptions import (
|
|
197
|
+
BadParameterError,
|
|
198
|
+
NotFoundError,
|
|
199
|
+
UnknownError
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
try:
|
|
203
|
+
dataset = dataset_service.get_dataset(dataset_id="non-existent-id")
|
|
204
|
+
except NotFoundError:
|
|
205
|
+
print("Dataset not found")
|
|
206
|
+
except BadParameterError as e:
|
|
207
|
+
print(f"Invalid parameter: {e}")
|
|
208
|
+
except UnknownError as e:
|
|
209
|
+
print(f"An unexpected error occurred: {e}")
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## 🧪 Requirements
|
|
214
|
+
|
|
215
|
+
- Python >= 3.7
|
|
216
|
+
- requests >= 2.22.0
|
|
217
|
+
- urllib3 >= 1.21.1
|
|
218
|
+
- pydantic >= 1.8.0
|
|
219
|
+
|
|
220
|
+
## 🤝 Contributing
|
|
221
|
+
|
|
222
|
+
We welcome contributions to the Superb AI On-premise SDK! Here's how you can help:
|
|
223
|
+
|
|
224
|
+
### Development Setup
|
|
225
|
+
|
|
226
|
+
1. **Clone the repository:**
|
|
227
|
+
```bash
|
|
228
|
+
git clone https://github.com/Superb-AI-Suite/superb-ai-onprem-python.git
|
|
229
|
+
cd superb-ai-onprem-python
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
2. **Install development dependencies:**
|
|
233
|
+
```bash
|
|
234
|
+
pip install -e ".[dev]"
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### Contribution Guidelines
|
|
238
|
+
|
|
239
|
+
- **Code Style:** Follow PEP 8 guidelines
|
|
240
|
+
- **Testing:** Add tests for new features
|
|
241
|
+
- **Documentation:** Update docstrings and README
|
|
242
|
+
- **Pull Requests:** Use descriptive titles and include test results
|
|
243
|
+
|
|
244
|
+
### Reporting Issues
|
|
245
|
+
|
|
246
|
+
When reporting issues, please include:
|
|
247
|
+
- SDK version (`spb_onprem.__version__`)
|
|
248
|
+
- Python version
|
|
249
|
+
- Error messages and stack traces
|
|
250
|
+
- Minimal reproduction example
|
|
251
|
+
- Expected vs actual behavior
|
|
252
|
+
|
|
253
|
+
## 📞 Support
|
|
254
|
+
|
|
255
|
+
### Community Support
|
|
256
|
+
- **GitHub Issues:** [Report bugs and request features](https://github.com/Superb-AI-Suite/superb-ai-onprem-python/issues)
|
|
257
|
+
- **Documentation:** [Official API documentation](https://docs.superb-ai.com)
|
|
258
|
+
|
|
259
|
+
### Enterprise Support
|
|
260
|
+
- **Technical Support:** Contact your Superb AI representative
|
|
261
|
+
- **Custom Integration:** Professional services available
|
|
262
|
+
- **Training:** SDK workshops and onboarding sessions
|
|
263
|
+
|
|
264
|
+
### Quick Help
|
|
265
|
+
|
|
266
|
+
**Common Issues:**
|
|
267
|
+
- **Authentication errors:** Check config file format and credentials
|
|
268
|
+
- **Connection issues:** Verify host URL and network connectivity
|
|
269
|
+
- **Import errors:** Ensure SDK is properly installed (`pip install superb-ai-onprem`)
|
|
270
|
+
- **Performance issues:** Use appropriate pagination and filtering
|
|
271
|
+
|
|
272
|
+
**Need immediate help?** Check our [FAQ section](https://docs.superb-ai.com/faq) or contact support.
|
|
273
|
+
|
|
274
|
+
## 📄 License
|
|
275
|
+
|
|
276
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
**🚀 Ready to build something amazing?** Start with our [Quick Start Guide](#-quick-start) and explore the powerful features of Superb AI On-premise SDK!
|
|
281
|
+
|
|
282
|
+
<div align="center">
|
|
283
|
+
<sub>Built with ❤️ by the <a href="https://superb-ai.com">Superb AI</a> team</sub>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
spb_onprem/__init__.py,sha256=hgeMIWnsrFOX7W5AtVwIBcD8LSwvk5puKtpfRMH4iTo,3223
|
|
2
|
-
spb_onprem/_version.py,sha256=
|
|
2
|
+
spb_onprem/_version.py,sha256=uLbRjFSUZAgfl7V7O8zKV5Db36k7tz87ZIVq3l2SWs0,704
|
|
3
3
|
spb_onprem/base_model.py,sha256=XLtyoxRBs68LrvbFH8V4EvQGPc2W17koC310MnS37jc,442
|
|
4
4
|
spb_onprem/base_service.py,sha256=_6aLM_zn4Ycd7nAc_BA395KmxH5lcSxd7gmgG9DdOf4,6518
|
|
5
5
|
spb_onprem/base_types.py,sha256=5HO6uy6qf08b4KSElwIaGy7UkoQG2KqVO6gcHbsqqSo,269
|
|
@@ -10,8 +10,8 @@ spb_onprem/activities/__init__.py,sha256=iTHUza8mtiBd_QEPH-0tzrOsd_VSwSQNMbzVWfe
|
|
|
10
10
|
spb_onprem/activities/queries.py,sha256=L01PRDUQdbbIGoKP_M-CmZ1ORQzuq9NOr-rdWLW0ejE,6083
|
|
11
11
|
spb_onprem/activities/service.py,sha256=jWfgAZGrULR8IETdPtUoNjwJDm-Zs8ZiC23eQEYBveA,11431
|
|
12
12
|
spb_onprem/activities/entities/__init__.py,sha256=lJXPl4UqurNscZOYBcCMfRZBp27JKbPEbab5iXtL3ME,237
|
|
13
|
-
spb_onprem/activities/entities/activity.py,sha256=
|
|
14
|
-
spb_onprem/activities/entities/activity_history.py,sha256=
|
|
13
|
+
spb_onprem/activities/entities/activity.py,sha256=gjir5T_w_r8wayUCEUtQTHEKTTiSp4ac45OCJToUmoA,2285
|
|
14
|
+
spb_onprem/activities/entities/activity_history.py,sha256=rS_Oq6Q9k2ANO4boKoqFipExOgmB4Wc7wkqM4KB3K_8,1658
|
|
15
15
|
spb_onprem/activities/params/__init__.py,sha256=n3WqTKu19S1KKDmcXg_18x42-AyVw1AbrM1dJj6WBBQ,802
|
|
16
16
|
spb_onprem/activities/params/activities.py,sha256=FUsuPIinnk_4yjvcOox5rkmcZHcz2lk2UT1A2pRoOD0,1500
|
|
17
17
|
spb_onprem/activities/params/activity.py,sha256=I1xiXuMsTGL4qYWw_MoqU3ik3j1AKJVepvXETeU_TWI,1075
|
|
@@ -32,18 +32,18 @@ spb_onprem/contents/params/create.py,sha256=JLMbNiIecOsVvVSYY6DfUpWjZxZKuO9-NSpu
|
|
|
32
32
|
spb_onprem/contents/params/delete_content.py,sha256=_M9d6FJpA47_pcM5YyHbMmTZv1F2wUwPryQTL9RxZwM,298
|
|
33
33
|
spb_onprem/contents/params/get_download_url.py,sha256=3oaiqmjJRxw0U59SoTxoih1pcU-cuQvcU-g89lCcqtQ,98
|
|
34
34
|
spb_onprem/data/__init__.py,sha256=5XKxNm2BlKufrX5uRQreUEzJ-nerTrozKpG1RJL5wt8,68
|
|
35
|
-
spb_onprem/data/queries.py,sha256=
|
|
36
|
-
spb_onprem/data/service.py,sha256=
|
|
35
|
+
spb_onprem/data/queries.py,sha256=X7wQr8O1qNHstTLK5DG9PzwyuyIZHfrF4SQnhRzf2io,16676
|
|
36
|
+
spb_onprem/data/service.py,sha256=I6DkcltPe08OBxpBQ-9rOIWzDlIqPn59et1J4PhHm0c,25098
|
|
37
37
|
spb_onprem/data/entities/__init__.py,sha256=ZQ2YWAHIan2ZLa1z5ozPSJwW3pqdlsJCxmAT3NuG89c,376
|
|
38
|
-
spb_onprem/data/entities/annotation.py,sha256=
|
|
39
|
-
spb_onprem/data/entities/data.py,sha256=
|
|
40
|
-
spb_onprem/data/entities/data_meta.py,sha256=
|
|
41
|
-
spb_onprem/data/entities/data_slice.py,sha256=
|
|
42
|
-
spb_onprem/data/entities/frame.py,sha256=
|
|
43
|
-
spb_onprem/data/entities/prediction.py,sha256=
|
|
44
|
-
spb_onprem/data/entities/scene.py,sha256=
|
|
38
|
+
spb_onprem/data/entities/annotation.py,sha256=Pxgm1sybX98PXdNhpRxL-ce2xXnU_SHJtHlvQneT_uo,1253
|
|
39
|
+
spb_onprem/data/entities/data.py,sha256=tUyKVrPgycD6-wQonGBXqse3AUux-VzlgePBFBz9DwE,2367
|
|
40
|
+
spb_onprem/data/entities/data_meta.py,sha256=Cm9JQ4nv8LZwJaKcmNxxvuRUOvncKnzHW0cpoLYUAMA,1044
|
|
41
|
+
spb_onprem/data/entities/data_slice.py,sha256=2j6NrO3iE7JRe1EOUokPY--tPe-52-QfFRsyKfaI--0,1204
|
|
42
|
+
spb_onprem/data/entities/frame.py,sha256=ue62YvdKg0L-561zgOB1KrMi5H3x-I99larcFk7CW9s,990
|
|
43
|
+
spb_onprem/data/entities/prediction.py,sha256=W1QidDkpYgxQyPZqlChBJZF_QP1mLVFr8gUnffmLHnQ,758
|
|
44
|
+
spb_onprem/data/entities/scene.py,sha256=6C-m2kYPisHP8CAFNF8YeIPaIRb5iLliqlrM64Qd7t4,756
|
|
45
45
|
spb_onprem/data/enums/__init__.py,sha256=WU1u6MTcYyMFseeGtVnWzKwa2mzXpDoSM8O8O6U1f8o,267
|
|
46
|
-
spb_onprem/data/enums/data_meta_type.py,sha256=
|
|
46
|
+
spb_onprem/data/enums/data_meta_type.py,sha256=vFPAZACPtFrJnzCW_F6ZheWa-Tc5w0yNvQz0iOXDBYQ,305
|
|
47
47
|
spb_onprem/data/enums/data_status.py,sha256=uV_yLtigSmht-tKFaLwvO4MpV5j4GzwuBRDILGrxMBA,292
|
|
48
48
|
spb_onprem/data/enums/data_type.py,sha256=9ErNmOK-RIOrhyt25SE2WVPSx_nTxt3ncTG5UtW92iM,225
|
|
49
49
|
spb_onprem/data/enums/scene_type.py,sha256=pTibjST4nJc3ylUrjQifYBdtLIcS2D0q71bdhyDjbIk,205
|
|
@@ -53,7 +53,7 @@ spb_onprem/data/params/change_data_reviewer.py,sha256=dFix3NfS2_8lpaoWxz6anLEJWM
|
|
|
53
53
|
spb_onprem/data/params/change_data_status.py,sha256=34gGtmTJT8wiDDpHOgQYvgP0-ziuYEBDFlpfY8SAZtI,593
|
|
54
54
|
spb_onprem/data/params/create_data.py,sha256=aL6Bwd9talB2rnmdHbR9QkUx1Msni07-6aoBkhGoivM,1827
|
|
55
55
|
spb_onprem/data/params/data.py,sha256=ZPJRjCbkjOCV73NxlGm5DxbSaNOAztVBRZRE8FFQ9mw,779
|
|
56
|
-
spb_onprem/data/params/data_list.py,sha256=
|
|
56
|
+
spb_onprem/data/params/data_list.py,sha256=1pMIIYweBWx55Yvf2JWORfmBjzMCbGK_YYQEvT4CSSs,15193
|
|
57
57
|
spb_onprem/data/params/delete_annotation_version.py,sha256=R_jBVujor-09VS1Aa8yGP14R8nJ2Aa9OmmKezC4gz4c,457
|
|
58
58
|
spb_onprem/data/params/delete_data.py,sha256=D0tXTVbQogAhB49dHIxrX1r934kbtaJ_HOylJhLZVzA,324
|
|
59
59
|
spb_onprem/data/params/delete_prediction.py,sha256=X3sV2mrSUqg8FOlZYRtb0o1hAwFos48ydFK2Il8UCp4,479
|
|
@@ -69,8 +69,8 @@ spb_onprem/data/params/insert_slice_annotation_version.py,sha256=KinI05UaaQWcv-1
|
|
|
69
69
|
spb_onprem/data/params/remove_data_from_slice.py,sha256=UjoQH0gTdm1nE1DafUmq3CP1nzHiCwDUnytQ6oBcZAA,478
|
|
70
70
|
spb_onprem/data/params/remove_data_meta.py,sha256=nlj2Ln9CtdS4Si8TmETZlQoAU62nCTCLbZR2_yE3yB8,1847
|
|
71
71
|
spb_onprem/data/params/update_annotation.py,sha256=zEmXYlBBYeC8A9eNyGidSw2XbgLd-pgvRZK5eui2plA,787
|
|
72
|
-
spb_onprem/data/params/update_data.py,sha256=
|
|
73
|
-
spb_onprem/data/params/update_data_slice.py,sha256=
|
|
72
|
+
spb_onprem/data/params/update_data.py,sha256=ICVhM4oxyH5dAcVpUaquS9_PkMa0cLRg7kHmLuildJA,1273
|
|
73
|
+
spb_onprem/data/params/update_data_slice.py,sha256=GTKsJv-xsP9YXvHe_cyuzOtz4stFIC4tO2097fo4nbQ,743
|
|
74
74
|
spb_onprem/data/params/update_frames.py,sha256=AluCJDUJelq_yrXR3DjkwWF-82qQukvERkIE-qNjO8I,1226
|
|
75
75
|
spb_onprem/data/params/update_scene.py,sha256=zMJFUHF3vz_hVSkkVEwHwdZBjWRbRxgTQFtsBowAg-k,930
|
|
76
76
|
spb_onprem/data/params/update_slice_annotation.py,sha256=7eu2DFvznOv0HuvKiZTHDOTS2UijyTjbEiqLBbUncfE,607
|
|
@@ -80,7 +80,7 @@ spb_onprem/datasets/__init__.py,sha256=Sjrb1tewB3CoODtHjRYOe-w2HpZi9UgbCyE2p8MzH
|
|
|
80
80
|
spb_onprem/datasets/queries.py,sha256=-qsAaD19ESZ-qsbBEao19FM4b0LgLWYHQQXlpP5Lbos,2207
|
|
81
81
|
spb_onprem/datasets/service.py,sha256=1qVX3oBtM4ZQ6HWxOsdJQjcgwAwqdKKpPVK7L7xKPWs,4407
|
|
82
82
|
spb_onprem/datasets/entities/__init__.py,sha256=yx5tsyX4GLYrjqx6-ZEoceJ7jxQzIh15OgyFFCs7vow,59
|
|
83
|
-
spb_onprem/datasets/entities/dataset.py,sha256=
|
|
83
|
+
spb_onprem/datasets/entities/dataset.py,sha256=iiwhoK4gba4yw_rv0nzZk5PDC5VjlQkpruKeqMqFfNE,985
|
|
84
84
|
spb_onprem/datasets/params/__init__.py,sha256=uqy7QijSgvOzrRY0xIg9GxRUo5Bquscs3dTiboLeTCM,370
|
|
85
85
|
spb_onprem/datasets/params/create_dataset.py,sha256=YGhLvY4arthjZwKQ28HLv7ch0Gd2lJ-vyGHBZnMuy4E,719
|
|
86
86
|
spb_onprem/datasets/params/dataset.py,sha256=WTOUl5M5cc6rtTwhLw_z31Cs209LkBq8Ja4LJGzrmGE,668
|
|
@@ -91,7 +91,7 @@ spb_onprem/exports/__init__.py,sha256=l_eUjnrFJXs-vdOeMNiWYK-UdJkxArv7hxmKDG4Dfi
|
|
|
91
91
|
spb_onprem/exports/queries.py,sha256=sFT6VX2UwAYyVNkiBteQ_JtKYnhMrt64ww_NuXhUhLM,4084
|
|
92
92
|
spb_onprem/exports/service.py,sha256=UuMoBsc_rzwimaxgBYFeRx4zUjlvzl7bA2FsrQZpZPo,7125
|
|
93
93
|
spb_onprem/exports/entities/__init__.py,sha256=_w5Qs_9Dvmy8_tweOmEpGmlMHx8m70rDSl94o7oTfmk,94
|
|
94
|
-
spb_onprem/exports/entities/export.py,sha256=
|
|
94
|
+
spb_onprem/exports/entities/export.py,sha256=jsTOjXiV4LFC5T1enCkZYyxNhifxz9E5mvRgyQ7y1YQ,1872
|
|
95
95
|
spb_onprem/exports/params/__init__.py,sha256=F4X2go6V1vZ_pts5thKwW8Gal8otgv6FlLYSMDmPaMg,471
|
|
96
96
|
spb_onprem/exports/params/create_export.py,sha256=vC6qmGETQNQ9PIbe7ayarEe0KuBwylWupBqQOlsDD8E,2594
|
|
97
97
|
spb_onprem/exports/params/delete_export.py,sha256=EusUB86HNLtFYu4gIDJqZsODRETtTYhgxznjFHfxywc,664
|
|
@@ -122,7 +122,7 @@ spb_onprem/slices/__init__.py,sha256=xgpNGYzqgwQ8C-Bgw9AZWMAgBW38UU-U4Wube8hkodI
|
|
|
122
122
|
spb_onprem/slices/queries.py,sha256=13JcjACvCg7AbdGfUODDJeq77gGZlNjngFB-9UmgLZk,3080
|
|
123
123
|
spb_onprem/slices/service.py,sha256=TKXOeFlEwGpbLLHV4GThUkAm3hp3IgexQ84y4_ak0T4,6393
|
|
124
124
|
spb_onprem/slices/entities/__init__.py,sha256=fXBFWw9NI0DkTORkHczs_oFPqE9MVISOsAqnN4-euh0,52
|
|
125
|
-
spb_onprem/slices/entities/slice.py,sha256=
|
|
125
|
+
spb_onprem/slices/entities/slice.py,sha256=NgYsoqGhp1W2c7ig5jDPAHMP8ktYzfoBwx6a2IXPMfI,1186
|
|
126
126
|
spb_onprem/slices/params/__init__.py,sha256=NFimX_7wDtqFda5q5W5PtiBCgDwH3iEQHijz2BY7Loc,476
|
|
127
127
|
spb_onprem/slices/params/create_slice.py,sha256=qUpX60A72Uht0SzN7b2-QSKvd_MSEV5T9kYIVk_td8A,1009
|
|
128
128
|
spb_onprem/slices/params/delete_slice.py,sha256=IDtHOopLuNli6lAkDU6oQk5xx3LMmy4mjXGCMbVeKFQ,618
|
|
@@ -132,7 +132,7 @@ spb_onprem/slices/params/update_slice.py,sha256=kryOmCnRTQ_OU0qDKgugppLrpeUpuLwm
|
|
|
132
132
|
spb_onprem/users/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
133
133
|
spb_onprem/users/entities/__init__.py,sha256=X8HZsCTlQnuPszok3AwI-i7bsQi0Ehul5L_2jZaol5E,57
|
|
134
134
|
spb_onprem/users/entities/auth.py,sha256=_KP-7yUErBxhJMm-dE3ObprPEG6e0JI2qNg6g8aK1qM,3371
|
|
135
|
-
superb_ai_onprem-0.
|
|
135
|
+
superb_ai_onprem-0.7.0.dist-info/licenses/LICENSE,sha256=CdinbFiHKGkGl6cPde6WgXhMuzyUXEG6tzy2-7udZ8o,1066
|
|
136
136
|
tests/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
137
137
|
tests/activities/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
138
138
|
tests/activities/real_test.py,sha256=0gQHg7rIEuZndGZyNHMWSD5nUZPMsUGigfCjWFxMthQ,1786
|
|
@@ -153,7 +153,7 @@ tests/models/__init__.py,sha256=Z2naiUgIjI-nHGsldwze1BqpV5JfDKTaBk-vg6_h6t4,21
|
|
|
153
153
|
tests/models/test_model_service.py,sha256=lQKFPHlfxhqcnrKHz6l2sGp53lpmC_kCHgQ-sXBbgMw,7556
|
|
154
154
|
tests/predictions/__init__.py,sha256=mFAXy0xOEXVYM7quYfIhwSih3kcEDdD4rLPq5G91Igg,26
|
|
155
155
|
tests/predictions/test_prediction_service.py,sha256=u2MYXNXSXKRAbv-Rz7sV0roitbD2h5U5ZIAaqeFMA1M,12632
|
|
156
|
-
superb_ai_onprem-0.
|
|
157
|
-
superb_ai_onprem-0.
|
|
158
|
-
superb_ai_onprem-0.
|
|
159
|
-
superb_ai_onprem-0.
|
|
156
|
+
superb_ai_onprem-0.7.0.dist-info/METADATA,sha256=SrjHIR99kRHNn-Cg62qIMhD2S_RE8ZC7TEcdi_OQJNI,9627
|
|
157
|
+
superb_ai_onprem-0.7.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
158
|
+
superb_ai_onprem-0.7.0.dist-info/top_level.txt,sha256=LbqU6FjWKaxO7FPS5-71e3OIS8VgBi5VrtQMWFOW25Q,17
|
|
159
|
+
superb_ai_onprem-0.7.0.dist-info/RECORD,,
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: superb-ai-onprem
|
|
3
|
-
Version: 0.6.2
|
|
4
|
-
Summary: Python SDK for Superb AI On-premise
|
|
5
|
-
Home-page: https://github.com/Superb-AI-Suite/superb-ai-onprem-python
|
|
6
|
-
Author: Superb AI
|
|
7
|
-
Author-email: support@superb-ai.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.8
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
License-File: LICENSE
|
|
14
|
-
Requires-Dist: requests>=2.22.0
|
|
15
|
-
Requires-Dist: urllib3>=1.21.1
|
|
16
|
-
Requires-Dist: pydantic>=1.8.0
|
|
17
|
-
Dynamic: author
|
|
18
|
-
Dynamic: author-email
|
|
19
|
-
Dynamic: classifier
|
|
20
|
-
Dynamic: description
|
|
21
|
-
Dynamic: description-content-type
|
|
22
|
-
Dynamic: home-page
|
|
23
|
-
Dynamic: license-file
|
|
24
|
-
Dynamic: requires-dist
|
|
25
|
-
Dynamic: requires-python
|
|
26
|
-
Dynamic: summary
|
|
27
|
-
|
|
28
|
-
# Superb AI On-premise SDK
|
|
29
|
-
|
|
30
|
-
Python SDK for Superb AI's On-premise solution. This SDK provides a simple interface to interact with your on-premise Superb AI installation.
|
|
31
|
-
|
|
32
|
-
## Installation
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
pip install superb-ai-onprem
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Quick Start
|
|
39
|
-
|
|
40
|
-
```python
|
|
41
|
-
from spb_onprem import DatasetService, DataService
|
|
42
|
-
from spb_onprem.data.enums import DataType
|
|
43
|
-
|
|
44
|
-
# Initialize services
|
|
45
|
-
dataset_service = DatasetService()
|
|
46
|
-
data_service = DataService()
|
|
47
|
-
|
|
48
|
-
# Create a dataset
|
|
49
|
-
dataset = dataset_service.create_dataset(
|
|
50
|
-
name="my-dataset",
|
|
51
|
-
description="My first dataset"
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
# Upload an image with annotation
|
|
55
|
-
with open("image.jpg", "rb") as f:
|
|
56
|
-
image_data = BytesIO(f.read())
|
|
57
|
-
|
|
58
|
-
data = data_service.create_image_data(
|
|
59
|
-
dataset_id=dataset.id,
|
|
60
|
-
key="image_1",
|
|
61
|
-
image_content=image_data,
|
|
62
|
-
annotation={
|
|
63
|
-
"labels": ["car", "person"],
|
|
64
|
-
"boxes": [
|
|
65
|
-
{"x": 100, "y": 100, "width": 200, "height": 200}
|
|
66
|
-
]
|
|
67
|
-
}
|
|
68
|
-
)
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Features
|
|
72
|
-
|
|
73
|
-
- Dataset Management
|
|
74
|
-
- Create, update, and delete datasets
|
|
75
|
-
- List and filter datasets
|
|
76
|
-
- Data Management
|
|
77
|
-
- Upload images with annotations
|
|
78
|
-
- Update annotations
|
|
79
|
-
- Add/remove data from slices
|
|
80
|
-
- Manage metadata
|
|
81
|
-
- Slice Management
|
|
82
|
-
- Create and manage data slices
|
|
83
|
-
- Filter and organize your data
|
|
84
|
-
|
|
85
|
-
## Usage Examples
|
|
86
|
-
|
|
87
|
-
### Dataset Operations
|
|
88
|
-
|
|
89
|
-
```python
|
|
90
|
-
from spb_onprem import DatasetService
|
|
91
|
-
from spb_onprem import DatasetsFilter, DatasetsFilterOptions
|
|
92
|
-
|
|
93
|
-
# Initialize service
|
|
94
|
-
dataset_service = DatasetService()
|
|
95
|
-
|
|
96
|
-
# Create a dataset
|
|
97
|
-
dataset = dataset_service.create_dataset(
|
|
98
|
-
name="my-dataset",
|
|
99
|
-
description="Dataset description"
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
# List datasets with filtering
|
|
103
|
-
filter = DatasetsFilter(
|
|
104
|
-
must_filter=DatasetsFilterOptions(
|
|
105
|
-
name_contains="test"
|
|
106
|
-
)
|
|
107
|
-
)
|
|
108
|
-
datasets = dataset_service.get_datasets(filter=filter)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
### Data Operations
|
|
112
|
-
|
|
113
|
-
```python
|
|
114
|
-
from spb_onprem import DataService
|
|
115
|
-
from spb_onprem import DataListFilter, DataFilterOptions
|
|
116
|
-
|
|
117
|
-
# Initialize service
|
|
118
|
-
data_service = DataService()
|
|
119
|
-
|
|
120
|
-
# List data with filtering
|
|
121
|
-
filter = DataListFilter(
|
|
122
|
-
must_filter=DataFilterOptions(
|
|
123
|
-
key_contains="image_",
|
|
124
|
-
annotation_exists=True
|
|
125
|
-
)
|
|
126
|
-
)
|
|
127
|
-
data_list = data_service.get_data_list(
|
|
128
|
-
dataset_id="your-dataset-id",
|
|
129
|
-
filter=filter
|
|
130
|
-
)
|
|
131
|
-
|
|
132
|
-
# Update annotation
|
|
133
|
-
data_service.update_annotation(
|
|
134
|
-
dataset_id="your-dataset-id",
|
|
135
|
-
data_id="your-data-id",
|
|
136
|
-
annotation={
|
|
137
|
-
"labels": ["updated_label"],
|
|
138
|
-
"boxes": [...]
|
|
139
|
-
}
|
|
140
|
-
)
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### Slice Operations
|
|
144
|
-
|
|
145
|
-
```python
|
|
146
|
-
from spb_onprem import SliceService
|
|
147
|
-
|
|
148
|
-
# Initialize service
|
|
149
|
-
slice_service = SliceService()
|
|
150
|
-
|
|
151
|
-
# Create a slice
|
|
152
|
-
slice = slice_service.create_slice(
|
|
153
|
-
dataset_id="your-dataset-id",
|
|
154
|
-
name="validation-set",
|
|
155
|
-
description="Validation data slice"
|
|
156
|
-
)
|
|
157
|
-
|
|
158
|
-
# Add data to slice
|
|
159
|
-
data_service.add_data_to_slice(
|
|
160
|
-
dataset_id="your-dataset-id",
|
|
161
|
-
data_id="your-data-id",
|
|
162
|
-
slice_id=slice.id
|
|
163
|
-
)
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Error Handling
|
|
167
|
-
|
|
168
|
-
The SDK provides specific error types for different scenarios:
|
|
169
|
-
|
|
170
|
-
```python
|
|
171
|
-
from spb_onprem.exceptions import (
|
|
172
|
-
BadParameterError,
|
|
173
|
-
NotFoundError,
|
|
174
|
-
UnknownError
|
|
175
|
-
)
|
|
176
|
-
|
|
177
|
-
try:
|
|
178
|
-
dataset = dataset_service.get_dataset(dataset_id="non-existent-id")
|
|
179
|
-
except NotFoundError:
|
|
180
|
-
print("Dataset not found")
|
|
181
|
-
except BadParameterError as e:
|
|
182
|
-
print(f"Invalid parameter: {e}")
|
|
183
|
-
except UnknownError as e:
|
|
184
|
-
print(f"An unexpected error occurred: {e}")
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Configuration
|
|
188
|
-
|
|
189
|
-
The SDK supports two authentication methods:
|
|
190
|
-
|
|
191
|
-
### 1. Config File Authentication (Default)
|
|
192
|
-
|
|
193
|
-
Create a config file at `~/.spb/onprem-config`:
|
|
194
|
-
|
|
195
|
-
```ini
|
|
196
|
-
[default]
|
|
197
|
-
host=https://your-onprem-host
|
|
198
|
-
access_key=your-access-key
|
|
199
|
-
access_key_secret=your-access-key-secret
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
This is the default authentication method when `SUPERB_SYSTEM_SDK=false` or not set.
|
|
203
|
-
|
|
204
|
-
### 2. Environment Variables (for Airflow DAGs)
|
|
205
|
-
|
|
206
|
-
When running in an Airflow DAG or other system environments, you can use environment variables for authentication. This method is activated by setting `SUPERB_SYSTEM_SDK=true`.
|
|
207
|
-
|
|
208
|
-
Required environment variables:
|
|
209
|
-
```bash
|
|
210
|
-
# Enable system SDK mode
|
|
211
|
-
export SUPERB_SYSTEM_SDK=true
|
|
212
|
-
|
|
213
|
-
# Set the host URL (either one is required)
|
|
214
|
-
export SUPERB_SYSTEM_SDK_HOST=https://your-superb-ai-host
|
|
215
|
-
# or
|
|
216
|
-
export SUNRISE_SERVER_URL=https://your-superb-ai-host
|
|
217
|
-
|
|
218
|
-
# Set the user email
|
|
219
|
-
export SUPERB_SYSTEM_SDK_USER_EMAIL=user@example.com
|
|
220
|
-
```
|
|
221
|
-
|
|
222
|
-
You can set these environment variables:
|
|
223
|
-
- Directly in your shell
|
|
224
|
-
- In your Airflow DAG configuration
|
|
225
|
-
- Through your deployment environment
|
|
226
|
-
- Using a `.env` file with your preferred method of loading environment variables
|
|
227
|
-
|
|
228
|
-
Note:
|
|
229
|
-
- When `SUPERB_SYSTEM_SDK=true`, the SDK will ignore the config file (`~/.spb/onprem-config`) and use environment variables exclusively.
|
|
230
|
-
- When `SUPERB_SYSTEM_SDK=false` or not set, the SDK will look for authentication credentials in `~/.spb/onprem-config`.
|
|
231
|
-
|
|
232
|
-
## Requirements
|
|
233
|
-
|
|
234
|
-
- Python >= 3.7
|
|
235
|
-
- requests >= 2.22.0
|
|
236
|
-
- urllib3 >= 1.21.1
|
|
237
|
-
- pydantic >= 1.8.0
|
|
238
|
-
|
|
239
|
-
## License
|
|
240
|
-
|
|
241
|
-
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
242
|
-
|
|
243
|
-
## Support
|
|
244
|
-
|
|
245
|
-
For support or feature requests, please contact the Superb AI team or create an issue in this repository.
|
|
246
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|