dstrack 0.1.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.
- dstrack/__init__.py +8 -0
- dstrack/_benchmark/__init__.py +54 -0
- dstrack/_benchmark/_cli.py +114 -0
- dstrack/_benchmark/_environment.py +144 -0
- dstrack/_benchmark/_profiling.py +207 -0
- dstrack/_benchmark/_report.py +152 -0
- dstrack/_benchmark/_runner.py +196 -0
- dstrack/_benchmark/_synthetic.py +158 -0
- dstrack/_cli.py +105 -0
- dstrack/_log.py +268 -0
- dstrack/_log_render.py +282 -0
- dstrack/_logging.py +60 -0
- dstrack/_store_template.py +58 -0
- dstrack/_track.py +144 -0
- dstrack/cache.py +448 -0
- dstrack/console.py +47 -0
- dstrack/errors.py +22 -0
- dstrack/paths.py +88 -0
- dstrack/readers/__init__.py +69 -0
- dstrack/readers/_csv.py +361 -0
- dstrack/readers/_protocol.py +120 -0
- dstrack/readers/_registry.py +241 -0
- dstrack/readers/_resolve.py +140 -0
- dstrack/schemas/snapshot_v1.json +299 -0
- dstrack/snapshot/__init__.py +46 -0
- dstrack/snapshot/_builder.py +114 -0
- dstrack/snapshot/_metadata.py +154 -0
- dstrack/snapshot/_stats.py +487 -0
- dstrack/snapshot/_version.py +13 -0
- dstrack/store.py +765 -0
- dstrack/utils.py +6 -0
- dstrack-0.1.0.dist-info/METADATA +123 -0
- dstrack-0.1.0.dist-info/RECORD +36 -0
- dstrack-0.1.0.dist-info/WHEEL +4 -0
- dstrack-0.1.0.dist-info/entry_points.txt +4 -0
- dstrack-0.1.0.dist-info/licenses/LICENSE +21 -0
dstrack/utils.py
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dstrack
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python package for versioning and monitoring dataset changes throughout the machine learning lifecycle.
|
|
5
|
+
Keywords: dataset,versioning,monitoring,machine learning,mlops,data science
|
|
6
|
+
Author: Leonardo Ayala
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
20
|
+
Requires-Dist: rich>=15.0.0
|
|
21
|
+
Requires-Dist: typer>=0.26.8
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Project-URL: GitHub, https://github.com/leoyala/dstrack
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# dstrack
|
|
27
|
+
|
|
28
|
+
[](https://github.com/leoyala/dstrack/actions/workflows/unittests.yaml)
|
|
29
|
+
[](https://codecov.io/github/leoyala/dstrack)
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<img src="docs/assets/dstrack-logo.png" width="200" alt="dstrack logo">
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
A Python package for versioning and monitoring dataset changes throughout the machine learning lifecycle.
|
|
37
|
+
|
|
38
|
+
<p align="center">
|
|
39
|
+
<img src="docs/assets/cli.gif" alt="CLI example">
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
## Overview
|
|
43
|
+
|
|
44
|
+
`dstrack` helps data scientists and ML engineers track how datasets evolve over time, catching schema drift, distribution shifts, and unexpected mutations before they silently break pipelines or degrade model performance.
|
|
45
|
+
|
|
46
|
+
## What dstrack is (and isn't)
|
|
47
|
+
|
|
48
|
+
`dstrack` records *semantics* about a dataset - its schema, a content fingerprint, and per-column statistics - not the dataset itself.
|
|
49
|
+
It is not a data version control system: unlike DVC, LakeFS, or Git LFS, it never copies your files into a store or pushes them to a
|
|
50
|
+
remote, and it cannot check an old version of `data.csv` back out for you. Your data stays wherever it already lives, and `dstrack` keeps a small,
|
|
51
|
+
human-readable audit trail beside your code so you can see how that data changed and when. If you need to store and retrieve the bytes, reach for
|
|
52
|
+
DVC and use `dstrack` alongside it.
|
|
53
|
+
|
|
54
|
+
## Installation
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pip install dstrack
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Requires Python 3.11 or later.
|
|
61
|
+
|
|
62
|
+
## Getting started
|
|
63
|
+
|
|
64
|
+
Initialize a store in your project, then take your first snapshot.
|
|
65
|
+
|
|
66
|
+
**1. Create a local store** - this adds a `.dstrack/` directory at the current location:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
dstrack init
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
ℹ Generating local store structure at /path/to/.dstrack.
|
|
74
|
+
✔ Finished creating local store: /path/to/.dstrack
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
**2. Track a dataset** - point `dstrack` at a data file to snapshot it. Given a small
|
|
78
|
+
`data.csv`:
|
|
79
|
+
|
|
80
|
+
```csv
|
|
81
|
+
id,name,value
|
|
82
|
+
1,alpha,10.5
|
|
83
|
+
2,beta,20.0
|
|
84
|
+
3,gamma,15.25
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
dstrack track data.csv
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
```text
|
|
92
|
+
ℹ Reading data.csv and computing snapshot...
|
|
93
|
+
✔ Snapshot <snapshot-uuid> written (new dataset, dataset <dataset-uuid>).
|
|
94
|
+
ℹ Stored at /path/to/.dstrack/datasets/<dataset-uuid>/snapshots/<snapshot-uuid>.json
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**3. Re-track as the data changes** - running `track` again on the same path extends the
|
|
98
|
+
dataset's lineage instead of starting a new one:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
dstrack track data.csv
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
✔ Snapshot <snapshot-uuid> written (continued lineage, dataset <dataset-uuid>).
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Each snapshot captures the file's schema, a content fingerprint, and per-column
|
|
109
|
+
statistics. See the [Getting Started guide](https://leoyala.github.io/dstrack/getting_started/)
|
|
110
|
+
for options such as `--name`, `--reader`, and `--dataset-id`.
|
|
111
|
+
|
|
112
|
+
## Features
|
|
113
|
+
|
|
114
|
+
- **Dataset versioning** - snapshot a dataset and track its lineage across pipeline stages
|
|
115
|
+
- **Rich snapshots** - schema hash, content fingerprint, and per-column statistics (ranges, null rates, and more)
|
|
116
|
+
- **CSV out of the box** - pure standard-library reader, no heavy dependencies
|
|
117
|
+
- **Lightweight CLI** - a small, git-like local store you can commit alongside your code
|
|
118
|
+
|
|
119
|
+
## Roadmap
|
|
120
|
+
|
|
121
|
+
Change detection and drift monitoring are on the way - comparing snapshots, surfacing
|
|
122
|
+
schema and distribution shifts, and failing CI on drift. See the
|
|
123
|
+
[roadmap](docs/roadmap.md) for what's planned.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
dstrack/__init__.py,sha256=5Zeisv9wSQkaUWO_cF-Zvuy_FAhDnjwReDz_QhTIGow,197
|
|
2
|
+
dstrack/_benchmark/__init__.py,sha256=voqnjxMm27OpjolKikn1mK7E1Ty1e_MwoAjGgih0zOw,1553
|
|
3
|
+
dstrack/_benchmark/_cli.py,sha256=rqIZLhkJExm6vbYLKgX1KG3loww5D5p7Ake5CER7hjQ,3745
|
|
4
|
+
dstrack/_benchmark/_environment.py,sha256=mYHQf9w_u4ot7Sy32WOa2IpqUsAW-J4Au-vTzvPurOo,4435
|
|
5
|
+
dstrack/_benchmark/_profiling.py,sha256=mD61rvdx2HaJOjWMkxHDX7EW-_TKSR0gNY_7Ao_wtxw,8009
|
|
6
|
+
dstrack/_benchmark/_report.py,sha256=nOIQ6yirXTRpNHfPQA8etp8rqdP2Spcjyki76XjRP2g,5920
|
|
7
|
+
dstrack/_benchmark/_runner.py,sha256=Cnw-R605xqQd1GCP_rAQOo85OvKOkJKcQ2Lt-WmHd5g,6693
|
|
8
|
+
dstrack/_benchmark/_synthetic.py,sha256=H9dwz78USfyC5WHqedaouhfHBL1DmY4Za9eHLV9Nj6Y,5433
|
|
9
|
+
dstrack/_cli.py,sha256=0UeOHaFf5CfT_Y96epd2zTaEq7RKP0rM-hmgfDeSBJc,3092
|
|
10
|
+
dstrack/_log.py,sha256=h8rpz3z4IEwf30jzEfiTfONtA2XcV7Ti1dGqANWzm1s,9365
|
|
11
|
+
dstrack/_log_render.py,sha256=Jk16ZaD35hKbHpRJw8ISGRAiboa0h6VF2w-c1fPhywM,10131
|
|
12
|
+
dstrack/_logging.py,sha256=uyYhvYOSbi3jH-CKRF2QoSPG26xF-PAuBWeKOl5o5M4,2315
|
|
13
|
+
dstrack/_store_template.py,sha256=yyXdKC33MNZkCtNL4UNmxwra-N1HrKTzuUeR5sIEfoQ,1572
|
|
14
|
+
dstrack/_track.py,sha256=5tL7FKdNK7JtflKBCL_2q1d8TmttfvTxbf3e2xncmUE,5102
|
|
15
|
+
dstrack/cache.py,sha256=xWU8OYqAJT_8OUSzeHQG00kUELN9lzuax2RLKd-iOdA,15846
|
|
16
|
+
dstrack/console.py,sha256=s_8n8grb1QPCzsWHGQ40BEVA9JPylma0hMPYTXP47vE,1775
|
|
17
|
+
dstrack/errors.py,sha256=Yne45sRKr2nKWv62j4KRuOhmYpL8z7hWYQ7lb_9eLkc,657
|
|
18
|
+
dstrack/paths.py,sha256=Ld9jGMKD2zpoqqKCClgaC0asd1ms9EXZOIUR9DZMFa8,3212
|
|
19
|
+
dstrack/readers/__init__.py,sha256=Fe_qKSEEeYlINIC5lY-rU7brfu3uj1hFjjChpJQb8pM,2155
|
|
20
|
+
dstrack/readers/_csv.py,sha256=rKmwqoH8wthcr04Qn60G-zojFWuvzM3ajjJrU4Ww2BM,13439
|
|
21
|
+
dstrack/readers/_protocol.py,sha256=2vCMi-qN8GgMheEiSy8_WjIYcxu0Mdtt5D7rVZ_RQBM,4248
|
|
22
|
+
dstrack/readers/_registry.py,sha256=rvB3OZSyPU5emBavn7ahh4esYqRTWSXZRyIaMab-NbI,9747
|
|
23
|
+
dstrack/readers/_resolve.py,sha256=cfIq-YpoOe5tfIej4NEu_zTg8O1pugmtQ1x5Lc40poU,5385
|
|
24
|
+
dstrack/schemas/snapshot_v1.json,sha256=iQL1VeTTTwUrJ42_sga-v48EEsy67rWRyDvBYf5a6lM,10120
|
|
25
|
+
dstrack/snapshot/__init__.py,sha256=JnG98KuHadK1ysewjWfEGUl_iN8EGRNPRaagTKUvxrY,1225
|
|
26
|
+
dstrack/snapshot/_builder.py,sha256=THyjLklGIrj_N2G9H9HG2-YKRH3N9Dbw_6dG4bgWbvU,4492
|
|
27
|
+
dstrack/snapshot/_metadata.py,sha256=6kBUVorJgBc-I1n20rItxwSmLRL2TGw-9h19cOFelhQ,5302
|
|
28
|
+
dstrack/snapshot/_stats.py,sha256=ARciIbZqQCHMCnJvh7fe9Y78usOaNZ-drgfMEJsURhM,16418
|
|
29
|
+
dstrack/snapshot/_version.py,sha256=hFrKOeJ1mesMCGktPjmHY8KRiB5SxIjOvaV9oWtucb0,432
|
|
30
|
+
dstrack/store.py,sha256=WsaFEV2KvDQSCLEdQrAy_z3D23QXXDAaAMipfYFbcWw,29910
|
|
31
|
+
dstrack/utils.py,sha256=XtEolipvttQPiQvysRIjemPUAp3aUwI-bP0HByBZLfA,154
|
|
32
|
+
dstrack-0.1.0.dist-info/licenses/LICENSE,sha256=jgHqsRRq2I8KoAfJpC7PH-4-EsZ7eu79EefGRKHBrrA,1071
|
|
33
|
+
dstrack-0.1.0.dist-info/WHEEL,sha256=LxHbYWzW7e46NaLs5XCk4QzC6UTgGl9kfPztDG7w374,81
|
|
34
|
+
dstrack-0.1.0.dist-info/entry_points.txt,sha256=TINSUoU7ujJCcAXQy7HFQH_U0iSmM3Htk3qi9faJzwA,89
|
|
35
|
+
dstrack-0.1.0.dist-info/METADATA,sha256=lUzFyQp98RwNISxdSgnbDzQJyVM_HcaeDBH48t0RuB4,4472
|
|
36
|
+
dstrack-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Leonardo Ayala
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|