Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Bug report
description: Report a reproducible framework failure
body:
- type: markdown
attributes:
value: Use synthetic inputs and redact secrets. For vulnerabilities, follow SECURITY.md.
- type: textarea
id: version
attributes:
label: Version and environment
description: Commit/release, Python, OS, optional dependencies and hardware if relevant.
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Minimal reproduction
description: Command, minimal config/plugin and synthetic inputs. Include expected and actual behavior.
validations:
required: true
- type: textarea
id: evidence
attributes:
label: Relevant receipts or traceback
description: Redacted excerpt only; no API keys, private datasets or full raw requests.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/method_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Method or architecture proposal
description: Propose an algorithm adapter or shared runtime capability
body:
- type: textarea
id: problem
attributes:
label: Intended behavior and motivation
validations:
required: true
- type: textarea
id: integration
attributes:
label: Integration boundary
description: Controller/Lab/component replacement, or a new core scheduling/recovery/resource semantic? Link the method and proposed validation.
validations:
required: true
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Describe the concrete problem and the resulting behavior.

Include relevant validation and skips. If public contracts, configuration,
artifact formats or recovery behavior change, describe the compatibility impact.
For algorithm adapters, state deviations from the reference and separate
simulated execution, actual training and measured quality gains.

Preserve third-party notices. Do not include credentials, model weights,
downloaded datasets or private run logs.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
offline:
name: Offline / ${{ matrix.os }} / Python ${{ matrix.python }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python: ['3.12', '3.13']
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6
with:
node-version: '22'
- run: python -m pip install -e '.[dev]'
- run: python -m unittest discover -s tests -t . -q
env:
PYTHONPATH: src
- run: node --test tests/monitor/frontend/*.test.js
- run: ruff check --select E9,F63,F7,F82 src tests examples experiments tools
- run: python tools/check_docs.py

packages:
name: Source and wheel packages
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
with:
python-version: '3.12'
- run: python -m pip install 'build>=1.2,<2' 'twine>=6,<7'
- run: python -m build --outdir dist/core .
- run: python -m build --outdir dist/monitor src/rsimonitor
- run: python -m twine check --strict dist/core/* dist/monitor/*
- run: >-
python tools/smoke_wheels.py
--core-wheel dist/core/rsisys-0.1.0-py3-none-any.whl
--monitor-wheel dist/monitor/rsimonitor-0.1.0-py3-none-any.whl
--core-sdist dist/core/rsisys-0.1.0.tar.gz
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ __pycache__/
build/
dist/
.env
.env.*
!.env.example
.venv/
.ruff_cache/
.pytest_cache/
.DS_Store

# Local run databases, artifacts and snapshots
runs/
Expand Down
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changelog

## 0.1.0 — initial research release (prepared, not yet tagged)

- Public controller/Lab registration and independent JSON configurations, with
library-external plugins through `rsisys.api`.
- Built-in `single_loop`, `meta_agent`, `rest_em`, `rrsi`, `seal` and `ttrl`
controllers; reusable mathematical, harness and local-process Labs.
- Operation authorization, structured receipts, provenance, owned cleanup and
explicitly adapted snapshot/recovery support.
- Optional harness/memory adapters and an independent read-only `rsimonitor`.
- CPU quickstarts, GPU experiment recipes and scoped result reports. SEAL and
TTRL completed small two-round runs; no paper-level performance gains were
reproduced.
- Apache-2.0 licensing, contribution/security guidance, CI and clean installed
wheel validation for the core and monitor packages.
- Registration discovery through `Registry.describe()` / `rsisys catalog`.
- Independent `output_subdir` for multiple SEAL/TTRL Labs. ReMe's pinned VCS
runtime is installed with `requirements/reme.txt`, separately from the core.
- Close the SQLite connection when schema initialization fails, including
malformed snapshot databases, before returning ownership to the caller.
- Canonicalize an isolated executable's parent while preserving its virtualenv
entrypoint, so relative interpreter paths and directory aliases can execute
against the explicitly mounted runtime.
- Add the SEAL paper profile with native Trainer/SFTTrainer, semantic grading,
disjoint round datasets and seed-averaged selection. Add registered `ttrl_verl`
controller/Lab for the pinned official full-parameter training schedule.
These adapters do not establish paper-level gains.
- Deliver exact typed terminal operation feedback independently of text evidence
projection, so large native failures retain their matching operation and data.
- Add optional registered FT-Agent and AIDE research controllers, with native
policy code pinned upstream and execution/feedback through registered Labs.
FT-Agent uses a local GSM8K/native LLaMA-Factory reference adaptation; AIDE
uses a GSM8K LLM-program task. Their recipes document scope and differences;
neither integration establishes the original papers' performance gains.
- Separate the public controller/Lab architecture from default meta-agent
implementation details, and document each method's fidelity and validation.
Archive historical raw requests, logs and temporary probes outside the release
tree while retaining dated review conclusions and third-party attribution.
- Terminate owned GPU-worker process groups even when the launcher has already
exited, so TERM-ignoring descendants cannot outlive a completed operation.
- Stabilize Linux regression fixtures for procfs disappearance during cleanup
and runtime-file hashing within the medical evaluation test budget.

Current limits: weight-evolution recipes are synchronous and do not support
automatic restart; multi-Lab GPU leasing remains future core work. The optional
verl backend requires pinned upstream source and an isolated environment.
See [compatibility](docs/compatibility.md).
8 changes: 8 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cff-version: 1.2.0
message: "If you use RSISys in research, cite this software and the original methods you evaluate."
type: software
title: RSISys
authors:
- name: RSISys contributors
repository-code: "https://github.com/satsuki2486441738/RSISys"
license: Apache-2.0
18 changes: 18 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Community expectations

Keep discussions respectful and focused on the work. Welcome questions and
different levels of experience. Critique behavior, evidence and implementation
choices without attacking people.

Harassment, discriminatory remarks, threats, deliberate disruption and sharing
another person's private information are not acceptable. Do not post private
run data, credentials or personal information in reports.

Maintainers may remove inappropriate content, limit participation or close
discussions to protect the community. Report conduct concerns to the repository
owner through an available private GitHub channel; if none is available, request
a private contact without publishing the details. Maintainers should handle
reports discreetly and apply these expectations consistently.

These expectations apply to project issues, pull requests and other official
project spaces, including maintainers' participation.
58 changes: 58 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Contributing

RSISys is an early research framework. Small, independently reviewable changes
are welcome. Describe the problem, resulting behavior and validation in a pull
request. For large changes to scheduling, recovery or public contracts, open
an issue explaining the intended behavior first.

## Development

Use Python 3.12 or 3.13 on Linux or macOS. From a checkout:

```sh
python3.12 -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
PYTHONPATH=src python -m unittest discover -s tests -t . -q
node --test tests/monitor/frontend/*.test.js
ruff check --select E9,F63,F7,F82 src tests examples experiments tools
```

The default tests require no GPU, model endpoint, API key or downloaded weights.
Optional integrations are explicitly skipped when their dependencies or opt-in
flags are missing; report skips with results. Node 22 is used in CI for the
monitor tests. See [tests](tests/README.md) for integration commands.

## Where changes belong

- New algorithms implement a controller and a Lab through `rsisys.api`. Prefer
a library-external registration file for your own method. Reusable built-ins
belong in `src/rsisys/controllers` and `src/rsisys/labs`.
- Harness, memory, scorer and training engine choices live inside those modules.
The controller owns algorithm decisions; the host must not select candidates
from scores on the algorithm's behalf.
- Shared scheduling, delivery, persistence, cancellation and resource ownership
belong in the core. Registration does not implement new runtime semantics.
- `examples` contains quickstarts and interface tutorials; `experiments` contains
model/data recipes and honest result reports; `tests` contains maintained
regression checks. Formal protocols belong under `src`, never in test fixtures.

Add focused regression coverage for changed behavior, especially failures,
resource cleanup and state transitions. Use synthetic fixtures. Keep model
weights, raw datasets, credentials, temporary probes and run outputs out of Git.
Do not rewrite unrelated code to satisfy a style preference.

## API and experiment changes

Document public behavior changes in [CHANGELOG.md](CHANGELOG.md). During 0.x,
pin a commit or release for long experiments; see [compatibility](docs/compatibility.md).
Do not claim automatic recovery without a state adapter and reconciliation test.
Separate simulated execution, actual optimizer updates and measured improvement.
Record algorithm deviations, model/data revisions, splits, seeds and hardware.

Contributions are accepted under the project's Apache-2.0 license. Preserve
upstream notices and describe the source of adapted material. Never include
third-party code, data or weights unless their redistribution terms permit it.
Be respectful and specific in reviews; report security issues through
[SECURITY.md](SECURITY.md), without posting credentials or private logs publicly.
Community expectations are described in [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
Loading
Loading