hirundo 0.1.18__py3-none-any.whl → 0.2.3.post1__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 +28 -8
- hirundo/_constraints.py +3 -4
- hirundo/_headers.py +1 -1
- hirundo/_http.py +53 -0
- hirundo/_iter_sse_retrying.py +8 -5
- hirundo/_llm_pipeline.py +153 -0
- hirundo/_run_checking.py +283 -0
- hirundo/_urls.py +1 -0
- hirundo/cli.py +8 -11
- hirundo/dataset_enum.py +2 -0
- hirundo/{dataset_optimization.py → dataset_qa.py} +213 -256
- hirundo/{dataset_optimization_results.py → dataset_qa_results.py} +7 -7
- hirundo/git.py +8 -10
- hirundo/labeling.py +22 -19
- hirundo/storage.py +26 -26
- hirundo/unlearning_llm.py +599 -0
- hirundo/unzip.py +12 -13
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/METADATA +59 -20
- hirundo-0.2.3.post1.dist-info/RECORD +28 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/WHEEL +1 -1
- hirundo-0.1.18.dist-info/RECORD +0 -25
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/entry_points.txt +0 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/licenses/LICENSE +0 -0
- {hirundo-0.1.18.dist-info → hirundo-0.2.3.post1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hirundo
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.3.post1
|
|
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
|
|
@@ -13,12 +13,12 @@ License: MIT License
|
|
|
13
13
|
|
|
14
14
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
15
15
|
|
|
16
|
-
Project-URL: Homepage, https://github.com/Hirundo-io/hirundo-
|
|
16
|
+
Project-URL: Homepage, https://github.com/Hirundo-io/hirundo-python-sdk
|
|
17
17
|
Keywords: dataset,machine learning,data science,data engineering
|
|
18
18
|
Classifier: License :: OSI Approved :: MIT License
|
|
19
19
|
Classifier: Programming Language :: Python
|
|
20
20
|
Classifier: Programming Language :: Python :: 3
|
|
21
|
-
Requires-Python: >=3.
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
22
|
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
24
|
Requires-Dist: pyyaml>=6.0.1
|
|
@@ -32,6 +32,11 @@ Requires-Dist: httpx>=0.27.0
|
|
|
32
32
|
Requires-Dist: stamina>=24.2.0
|
|
33
33
|
Requires-Dist: httpx-sse>=0.4.0
|
|
34
34
|
Requires-Dist: tqdm>=4.66.5
|
|
35
|
+
Requires-Dist: h11>=0.16.0
|
|
36
|
+
Requires-Dist: requests>=2.32.4
|
|
37
|
+
Requires-Dist: urllib3>=2.6.3
|
|
38
|
+
Requires-Dist: setuptools>=78.1.1
|
|
39
|
+
Requires-Dist: docutils<0.22.0
|
|
35
40
|
Provides-Extra: dev
|
|
36
41
|
Requires-Dist: pyyaml>=6.0.1; extra == "dev"
|
|
37
42
|
Requires-Dist: types-PyYAML>=6.0.12; extra == "dev"
|
|
@@ -46,13 +51,18 @@ Requires-Dist: stamina>=24.2.0; extra == "dev"
|
|
|
46
51
|
Requires-Dist: httpx-sse>=0.4.0; extra == "dev"
|
|
47
52
|
Requires-Dist: pytest>=8.2.0; extra == "dev"
|
|
48
53
|
Requires-Dist: pytest-asyncio>=0.23.6; extra == "dev"
|
|
49
|
-
Requires-Dist: uv>=0.
|
|
54
|
+
Requires-Dist: uv>=0.9.6; extra == "dev"
|
|
50
55
|
Requires-Dist: pre-commit>=3.7.1; extra == "dev"
|
|
56
|
+
Requires-Dist: basedpyright==1.37.1; extra == "dev"
|
|
51
57
|
Requires-Dist: virtualenv>=20.6.6; extra == "dev"
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Requires-Dist:
|
|
58
|
+
Requires-Dist: authlib>=1.6.6; extra == "dev"
|
|
59
|
+
Requires-Dist: ruff>=0.12.0; extra == "dev"
|
|
60
|
+
Requires-Dist: bumpver>=2025.1131; extra == "dev"
|
|
54
61
|
Requires-Dist: platformdirs>=4.3.6; extra == "dev"
|
|
55
|
-
Requires-Dist:
|
|
62
|
+
Requires-Dist: cryptography>=44.0.1; extra == "dev"
|
|
63
|
+
Requires-Dist: jinja2>=3.1.6; extra == "dev"
|
|
64
|
+
Requires-Dist: filelock>=3.20.1; extra == "dev"
|
|
65
|
+
Requires-Dist: marshmallow>=3.26.2; extra == "dev"
|
|
56
66
|
Provides-Extra: docs
|
|
57
67
|
Requires-Dist: sphinx>=7.4.7; extra == "docs"
|
|
58
68
|
Requires-Dist: sphinx-autobuild>=2024.9.3; extra == "docs"
|
|
@@ -61,19 +71,24 @@ Requires-Dist: autodoc_pydantic>=2.2.0; extra == "docs"
|
|
|
61
71
|
Requires-Dist: furo; extra == "docs"
|
|
62
72
|
Requires-Dist: sphinx-multiversion; extra == "docs"
|
|
63
73
|
Requires-Dist: esbonio; extra == "docs"
|
|
64
|
-
Requires-Dist: starlette
|
|
74
|
+
Requires-Dist: starlette>=0.49.1; extra == "docs"
|
|
65
75
|
Requires-Dist: markupsafe>=3.0.2; extra == "docs"
|
|
76
|
+
Requires-Dist: jinja2>=3.1.6; extra == "docs"
|
|
66
77
|
Provides-Extra: pandas
|
|
67
78
|
Requires-Dist: pandas>=2.2.3; extra == "pandas"
|
|
68
79
|
Provides-Extra: polars
|
|
69
80
|
Requires-Dist: polars>=1.0.0; extra == "polars"
|
|
81
|
+
Provides-Extra: transformers
|
|
82
|
+
Requires-Dist: transformers>=4.57.3; extra == "transformers"
|
|
83
|
+
Requires-Dist: peft>=0.18.1; extra == "transformers"
|
|
84
|
+
Requires-Dist: accelerate>=1.12.0; extra == "transformers"
|
|
70
85
|
Dynamic: license-file
|
|
71
86
|
|
|
72
87
|
# Hirundo
|
|
73
88
|
|
|
74
|
-
This package exposes access to Hirundo APIs for dataset
|
|
89
|
+
This package exposes access to Hirundo APIs for dataset QA for Machine Learning.
|
|
75
90
|
|
|
76
|
-
Dataset
|
|
91
|
+
Dataset QA is currently available for datasets labelled for classification and object detection.
|
|
77
92
|
|
|
78
93
|
Support dataset storage configs include:
|
|
79
94
|
|
|
@@ -138,13 +153,37 @@ You can install the codebase with a simple `pip install hirundo` to install the
|
|
|
138
153
|
|
|
139
154
|
## Usage
|
|
140
155
|
|
|
141
|
-
|
|
156
|
+
### Unlearning LLM behavior
|
|
157
|
+
|
|
158
|
+
Make sure to install the `transformers` extra, i.e. `pip install hirundo[transformers]` or `uv pip install hirundo[transformers]` if you have `uv` installed which is much faster than `pip`.
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
llm = LlmModel(
|
|
162
|
+
model_name="Nemotron-Flash-1B",
|
|
163
|
+
model_source=HuggingFaceTransformersModel(
|
|
164
|
+
model_name="nvidia/Nemotron-Flash-1B",
|
|
165
|
+
),
|
|
166
|
+
)
|
|
167
|
+
llm_id = llm.create()
|
|
168
|
+
run_info = BiasRunInfo(
|
|
169
|
+
bias_type=BiasType.ALL,
|
|
170
|
+
)
|
|
171
|
+
run_id = LlmUnlearningRun.launch(
|
|
172
|
+
llm_id,
|
|
173
|
+
run_info,
|
|
174
|
+
)
|
|
175
|
+
new_adapter = llm.get_hf_pipeline_for_run(run_id)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Dataset QA
|
|
179
|
+
|
|
180
|
+
#### Classification example:
|
|
142
181
|
|
|
143
182
|
```python
|
|
144
183
|
from hirundo import (
|
|
145
184
|
HirundoCSV,
|
|
146
185
|
LabelingType,
|
|
147
|
-
|
|
186
|
+
QADataset,
|
|
148
187
|
StorageGCP,
|
|
149
188
|
StorageConfig,
|
|
150
189
|
StorageTypes,
|
|
@@ -155,7 +194,7 @@ gcp_bucket = StorageGCP(
|
|
|
155
194
|
project="Hirundo-global",
|
|
156
195
|
credentials_json=json.loads(os.environ["GCP_CREDENTIALS"]),
|
|
157
196
|
)
|
|
158
|
-
test_dataset =
|
|
197
|
+
test_dataset = QADataset(
|
|
159
198
|
name="TEST-GCP cifar 100 classification dataset",
|
|
160
199
|
labeling_type=LabelingType.SINGLE_LABEL_CLASSIFICATION,
|
|
161
200
|
storage_config=StorageConfig(
|
|
@@ -170,19 +209,19 @@ test_dataset = OptimizationDataset(
|
|
|
170
209
|
classes=cifar100_classes,
|
|
171
210
|
)
|
|
172
211
|
|
|
173
|
-
test_dataset.
|
|
212
|
+
test_dataset.run_qa()
|
|
174
213
|
results = test_dataset.check_run()
|
|
175
214
|
print(results)
|
|
176
215
|
```
|
|
177
216
|
|
|
178
|
-
Object detection example:
|
|
217
|
+
#### Object detection example:
|
|
179
218
|
|
|
180
219
|
```python
|
|
181
220
|
from hirundo import (
|
|
182
221
|
GitRepo,
|
|
183
222
|
HirundoCSV,
|
|
184
223
|
LabelingType,
|
|
185
|
-
|
|
224
|
+
QADataset,
|
|
186
225
|
StorageGit,
|
|
187
226
|
StorageConfig,
|
|
188
227
|
StorageTypes,
|
|
@@ -195,7 +234,7 @@ git_storage = StorageGit(
|
|
|
195
234
|
),
|
|
196
235
|
branch="main",
|
|
197
236
|
)
|
|
198
|
-
test_dataset =
|
|
237
|
+
test_dataset = QADataset(
|
|
199
238
|
name="TEST-HuggingFace-BDD-100k-validation-OD-validation-dataset",
|
|
200
239
|
labeling_type=LabelingType.OBJECT_DETECTION,
|
|
201
240
|
storage_config=StorageConfig(
|
|
@@ -211,13 +250,13 @@ test_dataset = OptimizationDataset(
|
|
|
211
250
|
),
|
|
212
251
|
)
|
|
213
252
|
|
|
214
|
-
test_dataset.
|
|
253
|
+
test_dataset.run_qa()
|
|
215
254
|
results = test_dataset.check_run()
|
|
216
255
|
print(results)
|
|
217
256
|
```
|
|
218
257
|
|
|
219
|
-
Note: Currently we only support the main CPython release 3.
|
|
258
|
+
Note: Currently we only support the main CPython release 3.10, 3.11, 3.12 & 3.13. PyPy support may be introduced in the future.
|
|
220
259
|
|
|
221
260
|
## Further documentation
|
|
222
261
|
|
|
223
|
-
To learn more about how to use this library, please visit the [http://docs.hirundo.io/](documentation) or see the [Google Colab examples](https://github.com/Hirundo-io/hirundo-
|
|
262
|
+
To learn more about how to use this library, please visit the [http://docs.hirundo.io/](documentation) or see the [Google Colab examples](https://github.com/Hirundo-io/hirundo-python-sdk/tree/main/notebooks).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
hirundo/__init__.py,sha256=24ZHcfCcVCcCWj-nOCjIwY44fFzLgt0B9vMx99CMxKE,1694
|
|
2
|
+
hirundo/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
3
|
+
hirundo/_constraints.py,sha256=aaNb3vUQIS4JT9skLtSocgJpBb4HfteykQhMMp3qTrk,5963
|
|
4
|
+
hirundo/_dataframe.py,sha256=sXEEbCNcLi83wyU9ii884YikCzfASo_3nnrDxhuCv7U,758
|
|
5
|
+
hirundo/_env.py,sha256=efX2sjvYlHkFr2Lcstelei67YSTFpVGT0l08ZsfiMuE,622
|
|
6
|
+
hirundo/_headers.py,sha256=Cwha8gXEQNXL2lc9Lb1klLotkMLD82XOpAdX33TLVj8,521
|
|
7
|
+
hirundo/_http.py,sha256=0kfoznumU3jinHhJIpB6qn5Mt4a3kso59GNXVbpWH7M,2267
|
|
8
|
+
hirundo/_iter_sse_retrying.py,sha256=39GUf7y0o_h_BBJbfjEMZGZV85pZrDzgDyiSU4do9LI,4709
|
|
9
|
+
hirundo/_llm_pipeline.py,sha256=vHTpzrzmM-lHp1qa9gmOAk91IA3-2mYttLigS61br-M,5222
|
|
10
|
+
hirundo/_run_checking.py,sha256=uJSldQKOhF4jqkKRDHX36Y46jUK0F1PFlCEPG0mzCu4,9129
|
|
11
|
+
hirundo/_timeouts.py,sha256=gE58NU0t2e4KgKq2sk5rZcezDJAkgvRIbM5AVYFY6Ho,86
|
|
12
|
+
hirundo/_urls.py,sha256=BjGMTQtsAWdZDtFdSV2L14rGiohi78U_1GEB4G3DwUA,1393
|
|
13
|
+
hirundo/cli.py,sha256=T0RNpY8AKyfVdV9wjWjVRt6gEGICciXWqdBJC3eOD4c,7719
|
|
14
|
+
hirundo/dataset_enum.py,sha256=fNMYsiu6yyhyjpbKHeY2NfL6VX7LhcYypB7a4EXV5ZM,1291
|
|
15
|
+
hirundo/dataset_qa.py,sha256=jnSBF-J4rcL7Q23oJKOCOI1ryE84dKRe2QDkfeJfQRE,28150
|
|
16
|
+
hirundo/dataset_qa_results.py,sha256=HgUitmHbxE-DlZLNA2JR-1x0TPMkXobKYUYNc1Jpduw,1068
|
|
17
|
+
hirundo/git.py,sha256=He9t5ZIhrrQ56zYCuwGVQ1SffiSmGK1hV0NvmghPIhk,6477
|
|
18
|
+
hirundo/labeling.py,sha256=OroBchxsHR4RI-FuqwTatsGFaYINIYsBNg0L0PkuAkA,5165
|
|
19
|
+
hirundo/logger.py,sha256=MUqrYp0fBlxWFhGl6P5t19_uqO7T_PNhrLN5bqY3i7s,275
|
|
20
|
+
hirundo/storage.py,sha256=Q4TMoJR8NEbvI8CI8nCerUmlBncWqkAbTL2BvUBC5P0,15763
|
|
21
|
+
hirundo/unlearning_llm.py,sha256=Be_ks2aeQTzkPESe2K7RfPPtFkuzlTA7Q3Eq_jzAGxg,19594
|
|
22
|
+
hirundo/unzip.py,sha256=VEUsZxmZrU0Qn2q8YX0hdPIjKFLAtfPKbIhQtZxJSnA,8151
|
|
23
|
+
hirundo-0.2.3.post1.dist-info/licenses/LICENSE,sha256=fusGGjqT2RGlU6kbkaOk7d-gDnsjk17wq67AO0mwBZI,1065
|
|
24
|
+
hirundo-0.2.3.post1.dist-info/METADATA,sha256=Dicj3i_n1fOawy4SyeZd7MjahMOosFtQYwlLTMBnRWM,10497
|
|
25
|
+
hirundo-0.2.3.post1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
26
|
+
hirundo-0.2.3.post1.dist-info/entry_points.txt,sha256=4ZtnA_Nl1Af8fLnHp3lwjbGDEGU1S6ujb_JwtuQ7ZPM,44
|
|
27
|
+
hirundo-0.2.3.post1.dist-info/top_level.txt,sha256=cmyNqrNZOAYxnywJGFI1AJBLe4SkH8HGsfFx6ncdrbI,8
|
|
28
|
+
hirundo-0.2.3.post1.dist-info/RECORD,,
|
hirundo-0.1.18.dist-info/RECORD
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
hirundo/__init__.py,sha256=1Uy9UZhaZPQQSMfAOJ0A_Of70tM8_MDq-HHdhrmpO6g,1301
|
|
2
|
-
hirundo/__main__.py,sha256=wcCrL4PjG51r5wVKqJhcoJPTLfHW0wNbD31DrUN0MWI,28
|
|
3
|
-
hirundo/_constraints.py,sha256=tgJfvp7ydyXilT8ViNk837rNRlpOVXLLeCSMt_YUUYA,6013
|
|
4
|
-
hirundo/_dataframe.py,sha256=sXEEbCNcLi83wyU9ii884YikCzfASo_3nnrDxhuCv7U,758
|
|
5
|
-
hirundo/_env.py,sha256=efX2sjvYlHkFr2Lcstelei67YSTFpVGT0l08ZsfiMuE,622
|
|
6
|
-
hirundo/_headers.py,sha256=3hybpD_X4SODv3cFZPt9AjGY2vvZaag5OKT3z1SHSjA,521
|
|
7
|
-
hirundo/_http.py,sha256=izlnuxStyPugjTAbD8Lo30tA4lZJ5d3kOENNduqrbX4,573
|
|
8
|
-
hirundo/_iter_sse_retrying.py,sha256=U331_wZRIbVzi-jnMqo8bp9jBC8MtFBLEs-X0ZvhSDw,4634
|
|
9
|
-
hirundo/_timeouts.py,sha256=gE58NU0t2e4KgKq2sk5rZcezDJAkgvRIbM5AVYFY6Ho,86
|
|
10
|
-
hirundo/_urls.py,sha256=0C85EbL0T-Bj25vJwjNs_obUG8ROSADpmbFdTAyhzlw,1375
|
|
11
|
-
hirundo/cli.py,sha256=5Tn0eXZGG92BR9HJYUaYozjFbS1t6UTw_I2R0tZBE04,7824
|
|
12
|
-
hirundo/dataset_enum.py,sha256=QnS3fy1OF4wvUtiIAHubKRhc611idS8huopEEolgqEM,1217
|
|
13
|
-
hirundo/dataset_optimization.py,sha256=fXi8MeI0PWwSyc5NuOzCrkgXT_mz24NV-dGOHDPkBR0,31256
|
|
14
|
-
hirundo/dataset_optimization_results.py,sha256=A9YyF5zaZXVtzeDE08I_05v90dhZQADpSjDcS_6eLMc,1129
|
|
15
|
-
hirundo/git.py,sha256=8LVnF4WCjZsxMHoRaVxbLiDAKpGCBEwlcZp7a30n9Zo,6573
|
|
16
|
-
hirundo/labeling.py,sha256=zXQCaqfdaLIG4qbzFGbb94L3FDdRMpdzHwbrDJE07Yk,5006
|
|
17
|
-
hirundo/logger.py,sha256=MUqrYp0fBlxWFhGl6P5t19_uqO7T_PNhrLN5bqY3i7s,275
|
|
18
|
-
hirundo/storage.py,sha256=y7cr_dngkfZq0gKnwWxrSqUXb1SycGpwFRVmS9Cn3h8,15942
|
|
19
|
-
hirundo/unzip.py,sha256=XJqvt2m5pWR-G-fnzgW75VOdd-K4_Rw2r4wiEhZgKZA,8245
|
|
20
|
-
hirundo-0.1.18.dist-info/licenses/LICENSE,sha256=fusGGjqT2RGlU6kbkaOk7d-gDnsjk17wq67AO0mwBZI,1065
|
|
21
|
-
hirundo-0.1.18.dist-info/METADATA,sha256=F_F0-EfUxVVCcgFue_hwCtxfIfmqBlwnpvzELuhMkAc,9302
|
|
22
|
-
hirundo-0.1.18.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
-
hirundo-0.1.18.dist-info/entry_points.txt,sha256=4ZtnA_Nl1Af8fLnHp3lwjbGDEGU1S6ujb_JwtuQ7ZPM,44
|
|
24
|
-
hirundo-0.1.18.dist-info/top_level.txt,sha256=cmyNqrNZOAYxnywJGFI1AJBLe4SkH8HGsfFx6ncdrbI,8
|
|
25
|
-
hirundo-0.1.18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|