Ryn SDK: data, model, and trainer interfaces
Project description
Ryn SDK
A unified Python SDK for data, model, and trainer workflows.
This repository mirrors the automatic release workflow used in model-registry (auto-publish to PyPI via GitHub Actions).
Default install pulls everything. Subsets are available via extras (
ryn[model],ryn[data],ryn[trainer]).
Table of Contents
- Installation
- Quick Start
- Project Structure
- Requirements Layout
- Versioning & Auto-Publish to PyPI
- Local Development
- Update Checker (Optional)
- Supported Python Versions
- Contributing
- License
Installation
Default (everything): installs the union of data + model + trainer requirements.
# Everything
pip install ryn
# Only the model stack
pip install "ryn[model]"
# Only the data stack
pip install "ryn[data]"
# Only the trainer stack
pip install "ryn[trainer]"
Notes
- Some dependencies (e.g.,
torch) may require platform-specific wheels. If you're on a GPU machine, consult the official PyTorch install guide for your CUDA/ROCm toolkit. - If you need a slim install instead, use a virtual environment and install only the extras you need.
Quick Start
import ryn
from ryn import data, model, trainer
print("Ryn version:", ryn.__version__)
# Example scaffolding (replace with your actual API calls):
# Dataset operations
# ds = data.load_dataset("your-dataset-id")
# df = data.to_pandas(ds)
# Model registry / storage operations
# model_id = model.register_model(name="my-model", version="1.0.0", metadata={"task": "classification"})
# meta = model.get_model(name="my-model", version="1.0.0")
# Training utilities
# run = trainer.train(config={"epochs": 10, "lr": 1e-3})
# metrics = trainer.evaluate(run)
The snippet above shows typical entry points. Replace with your actual functions/classes provided by
ryn.data,ryn.model, andryn.trainerin this repo.
Project Structure
ryn/
data/ # Data utilities & loaders
model/ # Model registry / storage / inference helpers
trainer/ # Training loops, trackers, and helpers
__init__.py # Exposes public API and package metadata
Requirements Layout
Dependencies are split into three groups under requirements/ and combined for the default install:
requirements/
model.txt # e.g., boto3, huggingface-hub, transformers, einops, ...
data.txt # e.g., numpy, pandas, scikit-learn, datasets, openml, ...
trainer.txt # e.g., torch, torchvision, timm, albumentations, ...
- Default install (
pip install ryn) = union(model + data + trainer). - Extras for explicit subsets:
ryn[model]ryn[data]ryn[trainer]
These groups are wired in setup.py so that PyPI metadata carries the dependency info.
Versioning & Auto-Publish to PyPI
The repository uses a CI workflow (GitHub Actions) that auto-bumps and publishes to PyPI on push to main when the following conditions are met:
- Repository variable
PUBLISH_TO_PYPIis set totrue. - The commit message contains the phrase
pipy commit -push.
Bump level is controlled via the commit message:
pipy commit -push major→ bump MAJORpipy commit -push minor→ bump MINORpipy commit -push(no keyword) → bump PATCH (default)
Workflow outline
- Read current version from PyPI.
- Compute next version (patch/minor/major).
- Update
ryn/__init__.pyandsetup.py. - Build distributions (
sdist+wheel). - Upload to PyPI using Twine.
Required repo settings
- Settings → Secrets and variables → Actions → Secrets
PYPI_API_TOKEN(PyPI token)
- Settings → Secrets and variables → Actions → Variables
PUBLISH_TO_PYPI = true
Local Development
# Clone
git clone https://github.com/AIP-MLOPS/rayen.git
cd rayen
# (Optional) Create a virtual environment
python -m venv .venv && source .venv/bin/activate # or .venv\Scripts\activate on Windows
# Install in editable mode with a subset of extras, e.g., model
pip install -e ".[model]"
# Build locally
python -m pip install --upgrade pip build twine
python -m build
twine check dist/*
If you prefer a full dev install, use
pip install -e ".[all]"(identical to default deps).
Update Checker (Optional)
The package may include a lightweight update checker that prints a hint if a newer version is available on PyPI. This check is best-effort and should never fail your import due to network issues.
Supported Python Versions
- Python 3.11+
Contributing
- Fork the repository and create a feature branch.
- Keep commits focused and meaningful.
- Open a Pull Request with a clear description and, if applicable, tests or examples.
Consider running your linter/formatter locally (e.g.,
ruff) before opening a PR.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ryn-0.2.16.tar.gz.
File metadata
- Download URL: ryn-0.2.16.tar.gz
- Upload date:
- Size: 140.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c5e43745f6e2606eef8d406aeea90886ec050567217a26b5314e46393423433
|
|
| MD5 |
a80778bd34e3a3c10e9f7eeb1e1a9383
|
|
| BLAKE2b-256 |
dda571e6b27a32a06c0d7fd83fe2a65157b04af1fad35824ffeaf8efc53bc8b6
|
File details
Details for the file ryn-0.2.16-py3-none-any.whl.
File metadata
- Download URL: ryn-0.2.16-py3-none-any.whl
- Upload date:
- Size: 194.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86f9e8dc5f7b6e7ea80729501952a7afeb61829207777e01bd12608e50e87ad9
|
|
| MD5 |
27230e3a6334927eacdbc92188458890
|
|
| BLAKE2b-256 |
8356614ce3eb70ea77855716932da2e42c51ddbfa483af5dcaefa428829a1868
|