Skip to main content

Arcasleep

Arcascope's open source, open weights sleep models.


One Python distribution, arcasleep, carries the shared data handling, training, evaluation and release tooling (core/, the arcasleep import package) and every model family (bidoze/ and unet/, the arcasleep_bidoze and arcasleep_unet import packages). Model weights are released on the Hugging Face Hub, one repository per model variant.

Install

The base install is dependency-free: it provides the manifest tools and a working CLI, and every other command imports its dependencies on demand.

pip install arcasleep                           # CLI + manifest tools, no heavy deps
pip install "arcasleep[bidoze,inference,hub]"   # run a released BiDoze model
pip install "arcasleep[unet,train]"             # training stack (adds optax, matplotlib)
pip install "arcasleep[prep]"                   # build the feature cache
pip install "arcasleep[aws]"                    # S3 manifests and result upload
pip install "arcasleep[publish]"                # build a release bundle
pip install "arcasleep[all]"                    # installs all extras

pisces-lite and arcascope-senpy are public on PyPI; pisces-lite supplies the dataset/IO layer and the metric registry, and its [proc] extra (pulled by [prep]) the prebuilt senpy NUFFT wheel.

Commands

Every model family reads the same feature cache, so the cache and results commands are shared; training, scoring and release sit under each family:

arcasleep process          # build the feature cache (needs [prep])
arcasleep splits-plan / splits-apply
arcasleep summarize        # pool finished phases into a metrics_summary.csv
arcasleep compare          # draw a metric grid across summaries
arcasleep hypnogram        # hypnogram PNGs from prediction CSVs
arcasleep card-preview     # render a built bundle's model card to HTML
arcasleep manifest-local / manifest-s3 / upload-results

arcasleep bidoze train     # run the recipe from a feature cache
arcasleep bidoze evaluate  # score a checkpoint on a cohort
arcasleep bidoze publish   # build a safetensors release bundle, optionally upload it
arcasleep bidoze predict   # per-epoch stages for raw accelerometer files

arcasleep unet train | evaluate | publish | predict

Models

The current pediatric model variants are trained on the clinical pediatric pool described in Weaver et al. 2026. This set has subjects with no recorded diagnosis (n=37), as well as mild (n=94), moderate (n=33), and severe (n=38) obstructive sleep apnea (OSA). We are grateful to Glenn Weaver and his group for sharing their data with us.

BiDoze

Published on Hugging Face as arcascope/arcasleep-bidoze-pediatric; the model lives in bidoze/.

Wake/Light/Deep/REM predictions, plus a 5th head for identifying gaps in accelerometer.

  1. Architecture: [CNN encoder] -> [ALiBi Transformers] -> [5-head MLP].
  2. Developed via a semi-autonomous research loop using LLMs.
    1. Agents were given the goal to optimize model architecture and training regime with fixed train/test splits.
    2. "Best" as measured by the geometric mean of TST and WASO MAPE.

UNet

Published on Hugging Face as arcascope/arcasleep-unet-pediatric; the model lives in unet/.

Wake/Light/Deep/REM predictions, plus a 5th head for identifying gaps in accelerometer.

  1. Architecture: the temporal U-Net described in Olsen et al., "A flexible deep learning architecture for temporal sleep stage classification using accelerometry and photoplethysmography," IEEE TBME 2022 (doi:10.1109/TBME.2022.3187945), over raw 2-s spectrogram frames.
  2. Trained with the paper's procedure: class-balanced segment sampling and loss, early stopping on held-out subjects.

Releasing the package

The distribution is published to PyPI from CI with Trusted Publishing (OIDC): no API token is stored. .github/workflows/release.yml builds sdist + wheel from the repository root, tests the built wheel, and publishes when a GitHub Release is published for an arcasleep-vX.Y.Z tag.

The tag is the source of truth for the version: setuptools-scm reads the nearest arcasleep-vX.Y.Z tag (configured in pyproject.toml), so the distribution version and the release tag cannot drift. To release, push an arcasleep-vX.Y.Z tag and publish a GitHub Release for it -- there is no version literal to edit. The workflow fails if the tag and the built version disagree. A manual workflow_dispatch runs the build and wheel tests without publishing; commits past a tag build as the next patch dev version (X.Y.(Z+1).devN), which is what .github/workflows/dry-run-testpypi.yml rehearses against TestPyPI.

Metadata

Release files for arcasleep 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for arcasleep 0.1.1
File Size Uploaded
arcasleep-0.1.1.tar.gz 192.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for arcasleep 0.1.1
File Interpreter ABI Platform
arcasleep-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 362.1 kB

Release files / arcasleep-0.1.1.tar.gz

Download URL arcasleep-0.1.1.tar.gz
Size 192.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4ccf08af723f9ddc545a7e000b66318f8bd640a2dc93e574ebdf101ebc21c69a
BLAKE2b-256 checksum
How to use checksums
de5639430d40ce2ede6d744c5dfffdb884d98891eee3e1636901bd7739bc4a4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / arcasleep-0.1.1-py3-none-any.whl

Download URL arcasleep-0.1.1-py3-none-any.whl
Size 170.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7ef12b1ca5b23d49fbe59a56676cd83d46e970aae7f4f2c68c8051fe31d2675
BLAKE2b-256 checksum
How to use checksums
a36c3d6b7d37f8e580a8154d557423d311a2b1b502d971173ee8637b98593a41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page