hirundo 0.1.8__py3-none-any.whl → 0.1.9__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.
- hirundo/__init__.py +17 -9
- hirundo/_constraints.py +34 -2
- hirundo/_http.py +7 -2
- hirundo/_iter_sse_retrying.py +61 -17
- hirundo/dataset_optimization.py +421 -83
- hirundo/enum.py +8 -5
- hirundo/git.py +85 -20
- hirundo/storage.py +233 -62
- {hirundo-0.1.8.dist-info → hirundo-0.1.9.dist-info}/METADATA +78 -42
- hirundo-0.1.9.dist-info/RECORD +20 -0
- {hirundo-0.1.8.dist-info → hirundo-0.1.9.dist-info}/WHEEL +1 -1
- hirundo-0.1.8.dist-info/RECORD +0 -20
- {hirundo-0.1.8.dist-info → hirundo-0.1.9.dist-info}/LICENSE +0 -0
- {hirundo-0.1.8.dist-info → hirundo-0.1.9.dist-info}/entry_points.txt +0 -0
- {hirundo-0.1.8.dist-info → hirundo-0.1.9.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hirundo
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.9
|
|
4
4
|
Summary: This package is used to interface with Hirundo's platform. It provides a simple API to optimize your ML datasets.
|
|
5
5
|
Author-email: Hirundo <dev@hirundo.io>
|
|
6
6
|
License: MIT License
|
|
@@ -47,17 +47,23 @@ Requires-Dist: stamina>=24.2.0; extra == "dev"
|
|
|
47
47
|
Requires-Dist: httpx-sse>=0.4.0; extra == "dev"
|
|
48
48
|
Requires-Dist: pytest>=8.2.0; extra == "dev"
|
|
49
49
|
Requires-Dist: pytest-asyncio>=0.23.6; extra == "dev"
|
|
50
|
-
Requires-Dist: uv; extra == "dev"
|
|
50
|
+
Requires-Dist: uv>=0.5.8; extra == "dev"
|
|
51
51
|
Requires-Dist: pre-commit>=3.7.1; extra == "dev"
|
|
52
|
-
Requires-Dist:
|
|
52
|
+
Requires-Dist: virtualenv>=20.6.6; extra == "dev"
|
|
53
|
+
Requires-Dist: ruff>=0.8.2; extra == "dev"
|
|
53
54
|
Requires-Dist: bumpver; extra == "dev"
|
|
55
|
+
Requires-Dist: platformdirs>=4.3.6; extra == "dev"
|
|
56
|
+
Requires-Dist: safety>=3.2.13; extra == "dev"
|
|
54
57
|
Provides-Extra: docs
|
|
55
58
|
Requires-Dist: sphinx>=7.4.7; extra == "docs"
|
|
56
59
|
Requires-Dist: sphinx-autobuild>=2024.4.16; extra == "docs"
|
|
57
60
|
Requires-Dist: sphinx-click>=5.0.1; extra == "docs"
|
|
58
|
-
Requires-Dist:
|
|
61
|
+
Requires-Dist: autodoc_pydantic>=2.2.0; extra == "docs"
|
|
59
62
|
Requires-Dist: furo; extra == "docs"
|
|
60
63
|
Requires-Dist: sphinx-multiversion; extra == "docs"
|
|
64
|
+
Requires-Dist: esbonio; extra == "docs"
|
|
65
|
+
Requires-Dist: starlette>0.40.0; extra == "docs"
|
|
66
|
+
Requires-Dist: markupsafe>=3.0.2; extra == "docs"
|
|
61
67
|
|
|
62
68
|
# Hirundo
|
|
63
69
|
|
|
@@ -66,7 +72,7 @@ This package exposes access to Hirundo APIs for dataset optimization for Machine
|
|
|
66
72
|
Dataset optimization is currently available for datasets labelled for classification and object detection.
|
|
67
73
|
|
|
68
74
|
|
|
69
|
-
Support dataset storage
|
|
75
|
+
Support dataset storage configs include:
|
|
70
76
|
- Google Cloud (GCP) Storage
|
|
71
77
|
- Amazon Web Services (AWS) S3
|
|
72
78
|
- Git LFS (Large File Storage) repositories (e.g. GitHub or HuggingFace)
|
|
@@ -107,27 +113,33 @@ You can install the codebase with a simple `pip install hirundo` to install the
|
|
|
107
113
|
## Usage
|
|
108
114
|
|
|
109
115
|
Classification example:
|
|
110
|
-
```
|
|
111
|
-
from hirundo
|
|
112
|
-
|
|
113
|
-
|
|
116
|
+
```python
|
|
117
|
+
from hirundo import (
|
|
118
|
+
HirundoCSV,
|
|
119
|
+
LabelingType,
|
|
120
|
+
OptimizationDataset,
|
|
121
|
+
StorageGCP,
|
|
122
|
+
StorageConfig,
|
|
123
|
+
StorageTypes,
|
|
124
|
+
)
|
|
114
125
|
|
|
126
|
+
gcp_bucket = StorageGCP(
|
|
127
|
+
bucket_name="cifar100bucket",
|
|
128
|
+
project="Hirundo-global",
|
|
129
|
+
credentials_json=json.loads(os.environ["GCP_CREDENTIALS"]),
|
|
130
|
+
)
|
|
115
131
|
test_dataset = OptimizationDataset(
|
|
116
132
|
name="TEST-GCP cifar 100 classification dataset",
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
),
|
|
127
|
-
),
|
|
128
|
-
path="/pytorch-cifar/data",
|
|
133
|
+
labeling_type=LabelingType.SINGLE_LABEL_CLASSIFICATION,
|
|
134
|
+
storage_config=StorageConfig(
|
|
135
|
+
name="cifar100bucket",
|
|
136
|
+
type=StorageTypes.GCP,
|
|
137
|
+
gcp=gcp_bucket,
|
|
138
|
+
),
|
|
139
|
+
data_root_url=gcp_bucket.get_url(path="/pytorch-cifar/data"),
|
|
140
|
+
labeling_info=HirundoCSV(
|
|
141
|
+
csv_url=gcp_bucket.get_url(path="/pytorch-cifar/data/cifar100.csv"),
|
|
129
142
|
),
|
|
130
|
-
dataset_metadata_path="cifar100.csv",
|
|
131
143
|
classes=cifar100_classes,
|
|
132
144
|
)
|
|
133
145
|
|
|
@@ -139,29 +151,53 @@ print(results)
|
|
|
139
151
|
|
|
140
152
|
Object detection example:
|
|
141
153
|
|
|
142
|
-
```
|
|
143
|
-
from hirundo
|
|
144
|
-
|
|
145
|
-
|
|
154
|
+
```python
|
|
155
|
+
from hirundo import (
|
|
156
|
+
GitRepo,
|
|
157
|
+
HirundoCSV,
|
|
158
|
+
LabelingType,
|
|
159
|
+
OptimizationDataset,
|
|
160
|
+
StorageGit,
|
|
161
|
+
StorageConfig,
|
|
162
|
+
StorageTypes,
|
|
163
|
+
)
|
|
146
164
|
|
|
165
|
+
git_storage = StorageGit(
|
|
166
|
+
repo=GitRepo(
|
|
167
|
+
name="BDD-100k-validation-dataset",
|
|
168
|
+
repository_url="https://git@hf.co/datasets/hirundo-io/bdd100k-validation-only.git",
|
|
169
|
+
),
|
|
170
|
+
branch="main",
|
|
171
|
+
)
|
|
147
172
|
test_dataset = OptimizationDataset(
|
|
148
|
-
name=
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
branch="main",
|
|
160
|
-
),
|
|
173
|
+
name="TEST-HuggingFace-BDD-100k-validation-OD-validation-dataset",
|
|
174
|
+
labeling_type=LabelingType.OBJECT_DETECTION,
|
|
175
|
+
storage_config=StorageConfig(
|
|
176
|
+
name="BDD-100k-validation-dataset",
|
|
177
|
+
type=StorageTypes.GIT,
|
|
178
|
+
git=git_storage,
|
|
179
|
+
),
|
|
180
|
+
data_root_url=git_storage.get_url(path="/BDD100K Val from Hirundo.zip/bdd100k"),
|
|
181
|
+
labeling_info=HirundoCSV(
|
|
182
|
+
csv_url=git_storage.get_url(
|
|
183
|
+
path="/BDD100K Val from Hirundo.zip/bdd100k/bdd100k.csv"
|
|
161
184
|
),
|
|
162
|
-
path="/BDD100K Val from Hirundo.zip/bdd100k",
|
|
163
185
|
),
|
|
164
|
-
|
|
186
|
+
classes=[
|
|
187
|
+
"traffic light",
|
|
188
|
+
"traffic sign",
|
|
189
|
+
"car",
|
|
190
|
+
"pedestrian",
|
|
191
|
+
"bus",
|
|
192
|
+
"truck",
|
|
193
|
+
"rider",
|
|
194
|
+
"bicycle",
|
|
195
|
+
"motorcycle",
|
|
196
|
+
"train",
|
|
197
|
+
"other vehicle",
|
|
198
|
+
"other person",
|
|
199
|
+
"trailer",
|
|
200
|
+
],
|
|
165
201
|
)
|
|
166
202
|
|
|
167
203
|
test_dataset.run_optimization()
|
|
@@ -173,4 +209,4 @@ Note: Currently we only support the main CPython release 3.9, 3.10 and 3.11. PyP
|
|
|
173
209
|
|
|
174
210
|
## Further documentation
|
|
175
211
|
|
|
176
|
-
To learn about
|
|
212
|
+
To learn more about how to use this library, please visit the [http://docs.hirundo.io/](documentation) or see the Google Colab examples.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
hirundo/__init__.py,sha256=U_wcm3e0r1T66OQ7KHlWaOiwlPxf6e4RkTxA5uvaOOA,781
|
|
2
|
+
hirundo/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
3
|
+
hirundo/_constraints.py,sha256=gRv7fXwtjPGqYWIhkVYxu1B__3PdlYRqFyDkTpa9f74,1032
|
|
4
|
+
hirundo/_env.py,sha256=dXUFPeEL1zPe-eBdWD4_WZvlgiY2cpWuVDzf41Qjuto,609
|
|
5
|
+
hirundo/_headers.py,sha256=ggTyBwVT3nGyPidCcmYMX6pv0idzMxCI2S1BJQE-Bbs,253
|
|
6
|
+
hirundo/_http.py,sha256=izlnuxStyPugjTAbD8Lo30tA4lZJ5d3kOENNduqrbX4,573
|
|
7
|
+
hirundo/_iter_sse_retrying.py,sha256=U331_wZRIbVzi-jnMqo8bp9jBC8MtFBLEs-X0ZvhSDw,4634
|
|
8
|
+
hirundo/_timeouts.py,sha256=IfX8-mrLp809-A_xSLv1DhIqZnO-Qvy4FcTtOtvqLog,42
|
|
9
|
+
hirundo/cli.py,sha256=4-pdV483zqRJl8d-R9p_9YOGlehOnoMJzb3XAAdPRb0,6634
|
|
10
|
+
hirundo/dataset_optimization.py,sha256=CuSrauzXiSa4kGBREao3nn-vmLVwMKTeHM7yEXesuso,33756
|
|
11
|
+
hirundo/enum.py,sha256=ZEYBP-lrlVqfNWptlmw7JgLNhCyDirtWWPtoMvtg2AE,531
|
|
12
|
+
hirundo/git.py,sha256=zzpEHGqoQXwOBQzNSmyf5lpUMc2FbomPqiokwMc4M8o,6777
|
|
13
|
+
hirundo/logger.py,sha256=MUqrYp0fBlxWFhGl6P5t19_uqO7T_PNhrLN5bqY3i7s,275
|
|
14
|
+
hirundo/storage.py,sha256=RsEmtbn79_iCY7pE1AKcBoAEqzXNkOc_UPUTaxSE0BM,16075
|
|
15
|
+
hirundo-0.1.9.dist-info/LICENSE,sha256=fusGGjqT2RGlU6kbkaOk7d-gDnsjk17wq67AO0mwBZI,1065
|
|
16
|
+
hirundo-0.1.9.dist-info/METADATA,sha256=8jjs7OGtVZZwFmyfdFGoTxC-de-1V6OLFJW26pYOB2E,8363
|
|
17
|
+
hirundo-0.1.9.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
18
|
+
hirundo-0.1.9.dist-info/entry_points.txt,sha256=4ZtnA_Nl1Af8fLnHp3lwjbGDEGU1S6ujb_JwtuQ7ZPM,44
|
|
19
|
+
hirundo-0.1.9.dist-info/top_level.txt,sha256=cmyNqrNZOAYxnywJGFI1AJBLe4SkH8HGsfFx6ncdrbI,8
|
|
20
|
+
hirundo-0.1.9.dist-info/RECORD,,
|
hirundo-0.1.8.dist-info/RECORD
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
hirundo/__init__.py,sha256=EINZmdlmNjdW_dM85wksapRxGL-pPC49OYvKUBRtxQk,707
|
|
2
|
-
hirundo/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
3
|
-
hirundo/_constraints.py,sha256=-RAUV9GnCsaT9pLGSqYglKOeK0joPBBexGTo87j5nkI,425
|
|
4
|
-
hirundo/_env.py,sha256=dXUFPeEL1zPe-eBdWD4_WZvlgiY2cpWuVDzf41Qjuto,609
|
|
5
|
-
hirundo/_headers.py,sha256=ggTyBwVT3nGyPidCcmYMX6pv0idzMxCI2S1BJQE-Bbs,253
|
|
6
|
-
hirundo/_http.py,sha256=INrHX7ncpXS9vdyjrske3B5vUKL5ke9SIY6daffahtE,350
|
|
7
|
-
hirundo/_iter_sse_retrying.py,sha256=0u-jJe5vHCZegImKBB1rpI9O1BnN7oWJytdabl34ih4,3345
|
|
8
|
-
hirundo/_timeouts.py,sha256=IfX8-mrLp809-A_xSLv1DhIqZnO-Qvy4FcTtOtvqLog,42
|
|
9
|
-
hirundo/cli.py,sha256=4-pdV483zqRJl8d-R9p_9YOGlehOnoMJzb3XAAdPRb0,6634
|
|
10
|
-
hirundo/dataset_optimization.py,sha256=I2AzkSns_MLwlwI4mGGxaJB6OUG3pv7VJ5uFAtcJdTM,21825
|
|
11
|
-
hirundo/enum.py,sha256=-3w09g-_yRYIMiM8VA_Nb07WoQXf5IjyERTGonzNDs0,457
|
|
12
|
-
hirundo/git.py,sha256=Dbp0ALJYhLDgkmI_5u9iVyE_xEHIxoUTeZdpU8iau_4,4884
|
|
13
|
-
hirundo/logger.py,sha256=MUqrYp0fBlxWFhGl6P5t19_uqO7T_PNhrLN5bqY3i7s,275
|
|
14
|
-
hirundo/storage.py,sha256=xifT6xuFCJpVp5wB-ZZkzKz9HbVcMNrllj10vXlU1vU,9845
|
|
15
|
-
hirundo-0.1.8.dist-info/LICENSE,sha256=fusGGjqT2RGlU6kbkaOk7d-gDnsjk17wq67AO0mwBZI,1065
|
|
16
|
-
hirundo-0.1.8.dist-info/METADATA,sha256=heoP6t876hsxEih-RzaIjGtcLZl8UOpcwExnjQ8thU4,7841
|
|
17
|
-
hirundo-0.1.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
18
|
-
hirundo-0.1.8.dist-info/entry_points.txt,sha256=4ZtnA_Nl1Af8fLnHp3lwjbGDEGU1S6ujb_JwtuQ7ZPM,44
|
|
19
|
-
hirundo-0.1.8.dist-info/top_level.txt,sha256=cmyNqrNZOAYxnywJGFI1AJBLe4SkH8HGsfFx6ncdrbI,8
|
|
20
|
-
hirundo-0.1.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|