signal-dataset 0.2.0__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.
- signal_dataset-0.2.0/.github/ISSUE_TEMPLATE/bug.yml +15 -0
- signal_dataset-0.2.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- signal_dataset-0.2.0/.github/ISSUE_TEMPLATE/docs.yml +9 -0
- signal_dataset-0.2.0/.github/ISSUE_TEMPLATE/feature.yml +11 -0
- signal_dataset-0.2.0/.github/pull_request_template.md +10 -0
- signal_dataset-0.2.0/.github/workflows/ci.yml +75 -0
- signal_dataset-0.2.0/.github/workflows/docs.yml +29 -0
- signal_dataset-0.2.0/.github/workflows/release.yml +47 -0
- signal_dataset-0.2.0/.gitignore +10 -0
- signal_dataset-0.2.0/CHANGELOG.md +14 -0
- signal_dataset-0.2.0/CODE_OF_CONDUCT.md +14 -0
- signal_dataset-0.2.0/CONTRIBUTING.md +12 -0
- signal_dataset-0.2.0/GOVERNANCE.md +13 -0
- signal_dataset-0.2.0/LICENSE +202 -0
- signal_dataset-0.2.0/MIGRATION.md +49 -0
- signal_dataset-0.2.0/PKG-INFO +92 -0
- signal_dataset-0.2.0/README.md +74 -0
- signal_dataset-0.2.0/ROADMAP.md +16 -0
- signal_dataset-0.2.0/SECURITY.md +14 -0
- signal_dataset-0.2.0/SUPPORT.md +12 -0
- signal_dataset-0.2.0/benchmarks/benchmark_core.py +82 -0
- signal_dataset-0.2.0/docs/api.md +106 -0
- signal_dataset-0.2.0/docs/architecture.md +32 -0
- signal_dataset-0.2.0/docs/concepts/compatibility.md +12 -0
- signal_dataset-0.2.0/docs/concepts/layout.md +26 -0
- signal_dataset-0.2.0/docs/concepts/model.md +37 -0
- signal_dataset-0.2.0/docs/conventions.md +5 -0
- signal_dataset-0.2.0/docs/how-to/annotations.md +35 -0
- signal_dataset-0.2.0/docs/how-to/direct-access.md +17 -0
- signal_dataset-0.2.0/docs/how-to/distributed-writing.md +40 -0
- signal_dataset-0.2.0/docs/how-to/gcs.md +26 -0
- signal_dataset-0.2.0/docs/how-to/grain.md +91 -0
- signal_dataset-0.2.0/docs/how-to/pytorch.md +95 -0
- signal_dataset-0.2.0/docs/how-to/selection.md +37 -0
- signal_dataset-0.2.0/docs/index.md +27 -0
- signal_dataset-0.2.0/docs/quickstart.md +44 -0
- signal_dataset-0.2.0/docs/specification.md +143 -0
- signal_dataset-0.2.0/examples/__init__.py +1 -0
- signal_dataset-0.2.0/examples/templates.py +34 -0
- signal_dataset-0.2.0/mkdocs.yml +24 -0
- signal_dataset-0.2.0/pyproject.toml +73 -0
- signal_dataset-0.2.0/rfcs/0000-template.md +13 -0
- signal_dataset-0.2.0/src/signal_dataset/__init__.py +66 -0
- signal_dataset-0.2.0/src/signal_dataset/_internal/__init__.py +1 -0
- signal_dataset-0.2.0/src/signal_dataset/_internal/constants.py +11 -0
- signal_dataset-0.2.0/src/signal_dataset/_internal/json.py +93 -0
- signal_dataset-0.2.0/src/signal_dataset/_internal/policy.py +40 -0
- signal_dataset-0.2.0/src/signal_dataset/annotation/__init__.py +28 -0
- signal_dataset-0.2.0/src/signal_dataset/annotation/catalog.py +321 -0
- signal_dataset-0.2.0/src/signal_dataset/annotation/codec.py +74 -0
- signal_dataset-0.2.0/src/signal_dataset/annotation/model.py +169 -0
- signal_dataset-0.2.0/src/signal_dataset/annotation/publisher.py +456 -0
- signal_dataset-0.2.0/src/signal_dataset/config.py +78 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/__init__.py +21 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/_reference.py +76 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/control_io.py +54 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/layout.py +209 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/publication.py +166 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/reader.py +282 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/shard.py +129 -0
- signal_dataset-0.2.0/src/signal_dataset/dataset/view.py +187 -0
- signal_dataset-0.2.0/src/signal_dataset/errors.py +21 -0
- signal_dataset-0.2.0/src/signal_dataset/py.typed +1 -0
- signal_dataset-0.2.0/src/signal_dataset/record/__init__.py +29 -0
- signal_dataset-0.2.0/src/signal_dataset/record/codec.py +144 -0
- signal_dataset-0.2.0/src/signal_dataset/record/contracts.py +16 -0
- signal_dataset-0.2.0/src/signal_dataset/record/descriptor.py +95 -0
- signal_dataset-0.2.0/src/signal_dataset/record/metadata.py +130 -0
- signal_dataset-0.2.0/src/signal_dataset/record/model.py +182 -0
- signal_dataset-0.2.0/src/signal_dataset/record/validation.py +174 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/__init__.py +30 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/_local_paths.py +253 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/array_record.py +88 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/contracts.py +75 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/gcs.py +131 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/local.py +182 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/paths.py +66 -0
- signal_dataset-0.2.0/src/signal_dataset/storage/reference.py +39 -0
- signal_dataset-0.2.0/tests/test_annotations.py +588 -0
- signal_dataset-0.2.0/tests/test_architecture.py +106 -0
- signal_dataset-0.2.0/tests/test_compatibility_contract.py +129 -0
- signal_dataset-0.2.0/tests/test_control_io.py +39 -0
- signal_dataset-0.2.0/tests/test_dataset.py +282 -0
- signal_dataset-0.2.0/tests/test_foundation.py +278 -0
- signal_dataset-0.2.0/tests/test_gcs_backend.py +179 -0
- signal_dataset-0.2.0/tests/test_hardening.py +384 -0
- signal_dataset-0.2.0/tests/test_properties.py +136 -0
- signal_dataset-0.2.0/tests/test_public_api.py +70 -0
- signal_dataset-0.2.0/tests/test_selection.py +132 -0
- signal_dataset-0.2.0/tests/test_templates.py +16 -0
- signal_dataset-0.2.0/tests/testgrain.py +153 -0
- signal_dataset-0.2.0/uv.lock +1413 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a reproducible Signal Dataset defect
|
|
3
|
+
body:
|
|
4
|
+
- type: textarea
|
|
5
|
+
attributes: {label: Description}
|
|
6
|
+
validations: {required: true}
|
|
7
|
+
- type: input
|
|
8
|
+
attributes: {label: signal-dataset version}
|
|
9
|
+
validations: {required: true}
|
|
10
|
+
- type: input
|
|
11
|
+
attributes: {label: Python and operating system}
|
|
12
|
+
validations: {required: true}
|
|
13
|
+
- type: textarea
|
|
14
|
+
attributes: {label: Minimal reproducer and exception}
|
|
15
|
+
validations: {required: true}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security vulnerability
|
|
4
|
+
url: https://github.com/superpose-labs/signal-dataset/security/advisories/new
|
|
5
|
+
about: Report vulnerabilities privately; do not open a public issue.
|
|
6
|
+
- name: Support guidance
|
|
7
|
+
url: https://github.com/superpose-labs/signal-dataset/blob/main/SUPPORT.md
|
|
8
|
+
about: Read the information needed for support requests.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
name: Documentation issue
|
|
2
|
+
description: Report unclear, missing, or incorrect documentation
|
|
3
|
+
body:
|
|
4
|
+
- type: input
|
|
5
|
+
attributes: {label: Page or section}
|
|
6
|
+
validations: {required: true}
|
|
7
|
+
- type: textarea
|
|
8
|
+
attributes: {label: Problem and suggested improvement}
|
|
9
|
+
validations: {required: true}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
name: Feature or design proposal
|
|
2
|
+
description: Propose a capability or public design change
|
|
3
|
+
body:
|
|
4
|
+
- type: textarea
|
|
5
|
+
attributes: {label: Problem and users}
|
|
6
|
+
validations: {required: true}
|
|
7
|
+
- type: textarea
|
|
8
|
+
attributes: {label: Proposed behavior and alternatives}
|
|
9
|
+
validations: {required: true}
|
|
10
|
+
- type: textarea
|
|
11
|
+
attributes: {label: Compatibility or format impact}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest]
|
|
15
|
+
python: ["3.11", "3.12", "3.13"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
18
|
+
- uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff # v6
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python }}
|
|
21
|
+
enable-cache: true
|
|
22
|
+
- run: uv sync --all-extras --dev --locked
|
|
23
|
+
- run: uv run pytest --cov=signal_dataset --cov-branch --cov-report=term-missing --cov-fail-under=90
|
|
24
|
+
- run: uv run ruff check .
|
|
25
|
+
- run: uv run mypy src/signal_dataset
|
|
26
|
+
- run: uv build
|
|
27
|
+
- run: uv run python benchmarks/benchmark_core.py > benchmark-results.json
|
|
28
|
+
- name: Wheel and sdist journeys
|
|
29
|
+
run: |
|
|
30
|
+
uv venv .journey-wheel
|
|
31
|
+
uv pip install --python .journey-wheel/bin/python dist/*.whl
|
|
32
|
+
.journey-wheel/bin/python - <<'PY'
|
|
33
|
+
import tempfile
|
|
34
|
+
import numpy as np
|
|
35
|
+
import signal_dataset as s
|
|
36
|
+
root = tempfile.mkdtemp() + "/journey.sds"
|
|
37
|
+
record = s.Record("one", {"x": s.Field(np.arange(2), (s.Axis("sample", 2),))})
|
|
38
|
+
shard = s.write_shard([record], root)
|
|
39
|
+
assert s.publish(root, [shard], dataset_id="journey", snapshot_id="run")[0].id == "one"
|
|
40
|
+
try:
|
|
41
|
+
s.storage.GCSObjectStore()
|
|
42
|
+
except ImportError as exc:
|
|
43
|
+
assert "gcs" in str(exc)
|
|
44
|
+
else:
|
|
45
|
+
raise AssertionError("base wheel unexpectedly includes the GCS extra")
|
|
46
|
+
PY
|
|
47
|
+
uv venv .journey-gcs
|
|
48
|
+
uv pip install --python .journey-gcs/bin/python "$(find dist -name '*.whl' -print -quit)[gcs]"
|
|
49
|
+
.journey-gcs/bin/python - <<'PY'
|
|
50
|
+
from google.cloud import storage
|
|
51
|
+
from signal_dataset.storage import GCSObjectStore
|
|
52
|
+
class Client: pass
|
|
53
|
+
assert storage is not None
|
|
54
|
+
assert GCSObjectStore(client=Client()) is not None
|
|
55
|
+
PY
|
|
56
|
+
mkdir .journey-sdist
|
|
57
|
+
! tar -tzf dist/*.tar.gz | grep '/.hypothesis/'
|
|
58
|
+
tar -xzf dist/*.tar.gz -C .journey-sdist
|
|
59
|
+
cd "$(find .journey-sdist -mindepth 1 -maxdepth 1 -type d -print -quit)"
|
|
60
|
+
uv run --isolated pytest
|
|
61
|
+
- name: Validate benchmark results
|
|
62
|
+
run: |
|
|
63
|
+
python - <<'PY'
|
|
64
|
+
import json, math
|
|
65
|
+
value = json.load(open("benchmark-results.json"))
|
|
66
|
+
assert value["record_count"] > 1 and value["shard_count"] > 1
|
|
67
|
+
samples = [value["encode_s"], value["decode_s"], value["open_s"], value["metadata_read_s"], *value["random_read_s"]]
|
|
68
|
+
assert len(value["random_ordinals"]) == len(value["random_read_s"])
|
|
69
|
+
assert len(set(value["random_ordinals"])) > 1
|
|
70
|
+
assert all(math.isfinite(item) and item >= 0 for item in samples)
|
|
71
|
+
PY
|
|
72
|
+
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
73
|
+
with:
|
|
74
|
+
name: benchmarks-${{ matrix.os }}-py${{ matrix.python }}
|
|
75
|
+
path: benchmark-results.json
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
permissions:
|
|
7
|
+
contents: read
|
|
8
|
+
jobs:
|
|
9
|
+
build:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
13
|
+
- uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff # v6
|
|
14
|
+
- run: uv sync --all-extras --dev --locked
|
|
15
|
+
- run: uv run mkdocs build --strict
|
|
16
|
+
- uses: lycheeverse/lychee-action@e7477775783ea5526144ba13e8db5eec57747ce8 # v2.9.0
|
|
17
|
+
with:
|
|
18
|
+
args: --no-progress --retry-wait-time 2 --max-retries 3 README.md docs/*.md docs/**/*.md *.md
|
|
19
|
+
deploy:
|
|
20
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
21
|
+
needs: build
|
|
22
|
+
permissions:
|
|
23
|
+
contents: write
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
27
|
+
- uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff # v6
|
|
28
|
+
- run: uv sync --all-extras --dev --locked
|
|
29
|
+
- run: uv run mkdocs gh-deploy --force
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
tags: ["v*"]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
id-token: write
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
if: github.repository == 'superpose-labs/signal-dataset'
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment: pypi
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
|
15
|
+
- uses: astral-sh/setup-uv@d0d8abe699bfb85fec6de9f7adb5ae17292296ff # v6
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.13"
|
|
18
|
+
- name: Verify tag matches package version
|
|
19
|
+
run: |
|
|
20
|
+
version=$(uv version --short)
|
|
21
|
+
test "${GITHUB_REF_NAME}" = "v${version}"
|
|
22
|
+
grep -F "## ${version}" CHANGELOG.md
|
|
23
|
+
! grep -F "## ${version} — Unreleased" CHANGELOG.md
|
|
24
|
+
- run: uv sync --all-extras --dev --locked
|
|
25
|
+
- run: uv run pytest --cov=signal_dataset --cov-branch --cov-fail-under=90
|
|
26
|
+
- run: uv run ruff check .
|
|
27
|
+
- run: uv run mypy src/signal_dataset
|
|
28
|
+
- run: uv run mkdocs build --strict
|
|
29
|
+
- run: uv build
|
|
30
|
+
- name: Verify built wheel
|
|
31
|
+
run: |
|
|
32
|
+
uv venv .release-check
|
|
33
|
+
uv pip install --python .release-check/bin/python dist/*.whl
|
|
34
|
+
expected="${GITHUB_REF_NAME#v}"
|
|
35
|
+
.release-check/bin/python -c 'import signal_dataset, sys; assert signal_dataset.__version__ == sys.argv[1]' "$expected"
|
|
36
|
+
- name: Repeat artifact journeys
|
|
37
|
+
run: |
|
|
38
|
+
uv venv .release-base
|
|
39
|
+
uv pip install --python .release-base/bin/python dist/*.whl
|
|
40
|
+
.release-base/bin/python -c 'import signal_dataset; signal_dataset.storage.GCSObjectStore()' 2>&1 | grep "gcs"
|
|
41
|
+
uv venv .release-gcs
|
|
42
|
+
uv pip install --python .release-gcs/bin/python "$(find dist -name '*.whl' -print -quit)[gcs]"
|
|
43
|
+
.release-gcs/bin/python -c 'from google.cloud import storage; from signal_dataset.storage import GCSObjectStore; assert storage and GCSObjectStore(client=object())'
|
|
44
|
+
mkdir .release-sdist
|
|
45
|
+
tar -xzf dist/*.tar.gz -C .release-sdist
|
|
46
|
+
! find .release-sdist -path '*/.hypothesis/*' -print -quit | grep .
|
|
47
|
+
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.2.0 — 2026-08-12
|
|
4
|
+
|
|
5
|
+
- Reorganized the Python API into record, storage, dataset, and annotation namespaces.
|
|
6
|
+
- Standardized extension contracts and `object_store` terminology.
|
|
7
|
+
- Preserved persisted record and dataset layout version 0.1.
|
|
8
|
+
- Strengthened annotation catalog, descriptor, and mapped-index validation.
|
|
9
|
+
- Expanded compatibility, packaging, platform, and community documentation.
|
|
10
|
+
|
|
11
|
+
## 0.1.0 — 2026-08-12
|
|
12
|
+
|
|
13
|
+
- Initial experimental release of the profile-free record model, SafeTensors codec, immutable
|
|
14
|
+
ArrayRecord datasets, deterministic indexed reads, and local/GCS storage.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
We pledge to make participation in Signal Dataset welcoming and harassment-free, regardless of
|
|
4
|
+
background, identity, experience, or viewpoint. Be respectful, assume good intent while addressing
|
|
5
|
+
impact, keep technical criticism specific, and do not publish private information.
|
|
6
|
+
|
|
7
|
+
Maintainers may edit or remove abusive, threatening, discriminatory, or persistently disruptive
|
|
8
|
+
contributions and may temporarily or permanently restrict participation. Report conduct concerns
|
|
9
|
+
privately through the repository's GitHub private-reporting form, prefixing the title `CONDUCT:`.
|
|
10
|
+
The active maintainer team receives reports. Any maintainer named in or materially conflicted with a
|
|
11
|
+
report must recuse; the remaining maintainer, or an uninvolved Superpose Labs administrator, owns
|
|
12
|
+
the response. Reports are handled confidentially and without retaliation.
|
|
13
|
+
|
|
14
|
+
This policy applies in project spaces and when representing the project elsewhere.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Install the locked development environment with `uv sync --all-extras --dev`. Before opening a
|
|
4
|
+
pull request, run `uv run ruff check .`, `uv run mypy src/signal_dataset`, and `uv run pytest`.
|
|
5
|
+
|
|
6
|
+
Changes to a public API or persisted convention require an RFC in `rfcs/`. Keep the core format
|
|
7
|
+
profile-free and avoid dependencies on generation or training frameworks.
|
|
8
|
+
|
|
9
|
+
Follow the dependency direction in `docs/architecture.md`: logical values/codecs belong in
|
|
10
|
+
`record`, transport/container extensions in `storage`, dataset orchestration in `dataset`, and
|
|
11
|
+
snapshot-aligned derived data in `annotation`. Pull requests should include focused tests,
|
|
12
|
+
user-facing documentation for behavior changes, and a changelog entry for external changes.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
Superpose Labs maintains the experimental 0.x releases. Maintainers review compatibility,
|
|
4
|
+
security, and format changes in public. Material persisted-format changes use repository RFCs.
|
|
5
|
+
|
|
6
|
+
Maintainers may merge routine fixes after review and passing checks. Public API, security-boundary,
|
|
7
|
+
governance, and compatibility decisions require explicit maintainer approval; persisted-format
|
|
8
|
+
changes additionally require an accepted RFC. RFCs record alternatives and migration impact.
|
|
9
|
+
|
|
10
|
+
Release managers verify the tag, changelog, locked environment, documentation, artifacts, and
|
|
11
|
+
installed-package journeys before approving the protected PyPI environment. Maintainer access is
|
|
12
|
+
earned through sustained technical and community contributions. If Superpose Labs can no longer
|
|
13
|
+
maintain the project, it will seek active community successors and document the transfer publicly.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Migrating from 0.1 to 0.2
|
|
2
|
+
|
|
3
|
+
Package 0.2 is a deliberate Python API cleanup. Persisted dataset layout and record encoding remain
|
|
4
|
+
version 0.1; republishing data is not required.
|
|
5
|
+
|
|
6
|
+
| 0.1 API | 0.2 API |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| `BaseCodec` | `signal_dataset.record.RecordCodec` |
|
|
9
|
+
| `BaseObjectStore` | `signal_dataset.storage.ObjectStore` |
|
|
10
|
+
| `BaseShardStore` | `signal_dataset.storage.ShardStore` |
|
|
11
|
+
| `encode_record`, `decode_record` | `signal_dataset.record.encode`, `.decode` |
|
|
12
|
+
| `open_dataset` | `signal_dataset.open` |
|
|
13
|
+
| `backend=` | `object_store=` |
|
|
14
|
+
| `write_annotation_shard` | `signal_dataset.annotation.write_shard` |
|
|
15
|
+
| `publish_annotation_shards` | `signal_dataset.annotation.publish_shards` |
|
|
16
|
+
| top-level `LocalObjectStore` | `signal_dataset.storage.LocalObjectStore` |
|
|
17
|
+
| top-level `GCSObjectStore` | `signal_dataset.storage.GCSObjectStore` |
|
|
18
|
+
| top-level `ArrayRecordShardStore` | `signal_dataset.storage.ArrayRecordShardStore` |
|
|
19
|
+
| top-level `RecordShardWriter` | `signal_dataset.dataset.RecordShardWriter` |
|
|
20
|
+
| top-level `SafeTensorsRecordCodec` | `signal_dataset.record.SafeTensorsRecordCodec` |
|
|
21
|
+
| top-level `RecordMetadataCodec` | `signal_dataset.record.RecordMetadataCodec` |
|
|
22
|
+
| top-level `SafeTensorsAnnotationCodec` | `signal_dataset.annotation.SafeTensorsAnnotationCodec` |
|
|
23
|
+
|
|
24
|
+
The compatibility aliases `StorageBackend`, `LocalBackend`, `GcsBackend`, `ShardStore` (old alias),
|
|
25
|
+
and `ArrayRecordStore` were removed. Import concrete implementations from `signal_dataset.storage`.
|
|
26
|
+
|
|
27
|
+
Before:
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
class Store(sds.BaseObjectStore): ...
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
dataset = sds.open_dataset(uri, backend=Store())
|
|
34
|
+
writer = sds.RecordShardWriter(objects=Store(), shards=custom_shards)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
After:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from signal_dataset.dataset import RecordShardWriter
|
|
41
|
+
from signal_dataset.storage import ObjectStore
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Store(ObjectStore): ...
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
dataset = sds.open(uri, object_store=Store())
|
|
48
|
+
writer = RecordShardWriter(object_store=Store(), shard_store=custom_shards)
|
|
49
|
+
```
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: signal-dataset
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: An open, profile-free format and Python library for large-scale multidimensional signal datasets.
|
|
5
|
+
Project-URL: Documentation, https://superpose-labs.github.io/signal-dataset/
|
|
6
|
+
Project-URL: Issues, https://github.com/superpose-labs/signal-dataset/issues
|
|
7
|
+
Project-URL: Repository, https://github.com/superpose-labs/signal-dataset
|
|
8
|
+
Author: Superpose Labs
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: <3.14,>=3.11
|
|
12
|
+
Requires-Dist: array-record<0.9,>=0.8.3
|
|
13
|
+
Requires-Dist: numpy<2.5,>=1.26
|
|
14
|
+
Requires-Dist: safetensors<0.9,>=0.5
|
|
15
|
+
Provides-Extra: gcs
|
|
16
|
+
Requires-Dist: google-cloud-storage<4,>=3; extra == 'gcs'
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# Signal Dataset
|
|
20
|
+
|
|
21
|
+
Immutable, indexed storage for multidimensional signal records on local filesystems and GCS.
|
|
22
|
+
Numerical fields use SafeTensors; ArrayRecord provides random access.
|
|
23
|
+
|
|
24
|
+
> **Status:** experimental 0.x software. The Python API may make documented breaking changes
|
|
25
|
+
> between minor releases. Persisted-format compatibility is versioned separately.
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
import numpy as np
|
|
29
|
+
import signal_dataset as sds
|
|
30
|
+
|
|
31
|
+
record = sds.Record(
|
|
32
|
+
id="capture-0042",
|
|
33
|
+
fields={
|
|
34
|
+
"iq": sds.Field(
|
|
35
|
+
np.zeros((4, 4096), dtype=np.complex64),
|
|
36
|
+
axes=(sds.Axis("channel", 4), sds.Axis("time", 4096)),
|
|
37
|
+
)
|
|
38
|
+
},
|
|
39
|
+
metadata={"sample_rate_hz": 20_000_000},
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
shard = sds.write_shard([record], "captures.sds", work_id="worker-000")
|
|
43
|
+
dataset = sds.publish(
|
|
44
|
+
"captures.sds",
|
|
45
|
+
[shard],
|
|
46
|
+
dataset_id="captures",
|
|
47
|
+
snapshot_id="run-001",
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
assert dataset[0].id == "capture-0042"
|
|
51
|
+
assert dataset.record_metadata[0]["iq"].shape == (4, 4096)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
`dataset.record_metadata[index]` reads the aligned metadata shard without fetching signal tensors.
|
|
55
|
+
Readers follow generation-pinned manifests and never list directories or GCS prefixes.
|
|
56
|
+
|
|
57
|
+
See the [quickstart](docs/quickstart.md), [annotation example](docs/how-to/annotations.md), and
|
|
58
|
+
[distributed-writing guide](docs/how-to/distributed-writing.md).
|
|
59
|
+
|
|
60
|
+
## Install
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
uv add signal-dataset
|
|
64
|
+
uv add 'signal-dataset[gcs]' # GCS transport
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Equivalent pip commands are `pip install signal-dataset` and
|
|
68
|
+
`pip install 'signal-dataset[gcs]'`.
|
|
69
|
+
|
|
70
|
+
Python 3.11–3.13 on Linux and macOS are supported. Windows is not currently supported because the
|
|
71
|
+
local atomic-publication implementation uses POSIX filesystem primitives.
|
|
72
|
+
|
|
73
|
+
## Design
|
|
74
|
+
|
|
75
|
+
- Immutable, root-last publication: readers observe no dataset or a complete snapshot.
|
|
76
|
+
- Lazy ordinal random access without directory or bucket-prefix discovery.
|
|
77
|
+
- Tensor-free aligned metadata reads.
|
|
78
|
+
- Storage and shard-container extension contracts.
|
|
79
|
+
- Profile-free records: no modality, training framework, or split policy is embedded in the core.
|
|
80
|
+
|
|
81
|
+
The project does not provide mutable datasets, distributed scheduling, authorization, retention,
|
|
82
|
+
or batching policy. See the [architecture](docs/architecture.md), [format compatibility
|
|
83
|
+
contract](docs/concepts/compatibility.md), and [roadmap](ROADMAP.md).
|
|
84
|
+
|
|
85
|
+
Signal Dataset is use-case agnostic. It has no training-framework, modality, or split-policy
|
|
86
|
+
dependency.
|
|
87
|
+
|
|
88
|
+
## Community
|
|
89
|
+
|
|
90
|
+
Read [CONTRIBUTING.md](CONTRIBUTING.md) before proposing changes. Use GitHub Issues for reproducible
|
|
91
|
+
bugs and design discussion, and follow [SECURITY.md](SECURITY.md) for private vulnerability reports.
|
|
92
|
+
Participation is governed by the [Code of Conduct](CODE_OF_CONDUCT.md).
|