prolearn 0.1.0.dev0__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.
- prolearn-0.1.0.dev0/.codecov.yml +8 -0
- prolearn-0.1.0.dev0/.github/workflows/ci.yml +61 -0
- prolearn-0.1.0.dev0/.github/workflows/docs.yml +41 -0
- prolearn-0.1.0.dev0/.github/workflows/release.yml +66 -0
- prolearn-0.1.0.dev0/.gitignore +15 -0
- prolearn-0.1.0.dev0/.pre-commit-config.yaml +26 -0
- prolearn-0.1.0.dev0/AGENTS.md +56 -0
- prolearn-0.1.0.dev0/CHANGELOG.md +12 -0
- prolearn-0.1.0.dev0/CITATION.cff +131 -0
- prolearn-0.1.0.dev0/CLAUDE.md +1 -0
- prolearn-0.1.0.dev0/CONTRIBUTING.md +37 -0
- prolearn-0.1.0.dev0/LICENSE +32 -0
- prolearn-0.1.0.dev0/PKG-INFO +63 -0
- prolearn-0.1.0.dev0/README.md +34 -0
- prolearn-0.1.0.dev0/docs/api.rst +17 -0
- prolearn-0.1.0.dev0/docs/conf.py +49 -0
- prolearn-0.1.0.dev0/docs/index.md +19 -0
- prolearn-0.1.0.dev0/examples/README.rst +4 -0
- prolearn-0.1.0.dev0/examples/plot_version.py +10 -0
- prolearn-0.1.0.dev0/pyproject.toml +118 -0
- prolearn-0.1.0.dev0/src/prolearn/__init__.py +10 -0
- prolearn-0.1.0.dev0/src/prolearn/py.typed +0 -0
- prolearn-0.1.0.dev0/src/prolearn/resources.py +711 -0
- prolearn-0.1.0.dev0/src/prolearn/result.schema.json +396 -0
- prolearn-0.1.0.dev0/src/prolearn/results.py +118 -0
- prolearn-0.1.0.dev0/tests/test_package.py +10 -0
- prolearn-0.1.0.dev0/tests/test_resources.py +986 -0
- prolearn-0.1.0.dev0/tests/test_result_files.py +28 -0
- prolearn-0.1.0.dev0/tests/test_results.py +205 -0
- prolearn-0.1.0.dev0/uv.lock +3355 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
20
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
21
|
+
- run: uv sync --locked
|
|
22
|
+
- run: uv run pre-commit run --all-files --show-diff-on-failure
|
|
23
|
+
|
|
24
|
+
test:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
permissions:
|
|
27
|
+
contents: read
|
|
28
|
+
id-token: write
|
|
29
|
+
strategy:
|
|
30
|
+
fail-fast: false
|
|
31
|
+
matrix:
|
|
32
|
+
python: ["3.11", "3.12", "3.13", "3.14"]
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
35
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
36
|
+
with:
|
|
37
|
+
python-version: ${{ matrix.python }}
|
|
38
|
+
- run: uv sync --locked --extra torch --extra energy
|
|
39
|
+
- run: uv run pytest --cov --cov-report=xml
|
|
40
|
+
- if: matrix.python == '3.13'
|
|
41
|
+
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
|
42
|
+
with:
|
|
43
|
+
files: coverage.xml
|
|
44
|
+
use_oidc: true
|
|
45
|
+
|
|
46
|
+
docs:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
50
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
51
|
+
- run: uv sync --locked
|
|
52
|
+
- run: uv run sphinx-build -W --keep-going docs docs/_build/html
|
|
53
|
+
|
|
54
|
+
build:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
58
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
59
|
+
- run: uv build
|
|
60
|
+
- name: Import the built wheel in a clean environment
|
|
61
|
+
run: uv run --isolated --no-project --with dist/*.whl python -c "import prolearn; print(prolearn.__version__)"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: pages
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
pages: read
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
22
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
23
|
+
- run: uv sync --locked
|
|
24
|
+
- run: uv run sphinx-build -W --keep-going docs docs/_build/html
|
|
25
|
+
- uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
|
|
26
|
+
- uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
|
|
27
|
+
with:
|
|
28
|
+
path: docs/_build/html
|
|
29
|
+
|
|
30
|
+
deploy:
|
|
31
|
+
needs: build
|
|
32
|
+
runs-on: ubuntu-latest
|
|
33
|
+
permissions:
|
|
34
|
+
pages: write
|
|
35
|
+
id-token: write
|
|
36
|
+
environment:
|
|
37
|
+
name: github-pages
|
|
38
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
39
|
+
steps:
|
|
40
|
+
- id: deployment
|
|
41
|
+
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
15
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
16
|
+
- name: Check the tag matches the package version
|
|
17
|
+
run: test "v$(uv version --short)" = "${{ github.ref_name }}"
|
|
18
|
+
- run: uv build
|
|
19
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
20
|
+
with:
|
|
21
|
+
name: dist
|
|
22
|
+
path: dist/
|
|
23
|
+
|
|
24
|
+
testpypi:
|
|
25
|
+
needs: build
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
environment: testpypi
|
|
28
|
+
permissions:
|
|
29
|
+
id-token: write
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
32
|
+
with:
|
|
33
|
+
name: dist
|
|
34
|
+
path: dist/
|
|
35
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
36
|
+
with:
|
|
37
|
+
repository-url: https://test.pypi.org/legacy/
|
|
38
|
+
|
|
39
|
+
check-testpypi:
|
|
40
|
+
needs: testpypi
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0
|
|
44
|
+
- name: Install from TestPyPI in a clean environment
|
|
45
|
+
# prolearn comes from TestPyPI alone, and its dependencies from PyPI alone.
|
|
46
|
+
run: |
|
|
47
|
+
venv="$RUNNER_TEMP/venv"
|
|
48
|
+
requirement="prolearn==${GITHUB_REF_NAME#v}"
|
|
49
|
+
uv venv "$venv"
|
|
50
|
+
uv pip install --python "$venv" --no-deps \
|
|
51
|
+
--default-index https://test.pypi.org/simple/ "$requirement"
|
|
52
|
+
uv pip install --python "$venv" "$requirement"
|
|
53
|
+
"$venv/bin/python" -c "import prolearn; print(prolearn.__version__)"
|
|
54
|
+
|
|
55
|
+
pypi:
|
|
56
|
+
needs: check-testpypi
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
environment: pypi
|
|
59
|
+
permissions:
|
|
60
|
+
id-token: write
|
|
61
|
+
steps:
|
|
62
|
+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
63
|
+
with:
|
|
64
|
+
name: dist
|
|
65
|
+
path: dist/
|
|
66
|
+
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
9
|
+
rev: 9026c9127e153371d7a78dfcb0c45ae2046a3d10 # frozen: v0.17.6
|
|
10
|
+
hooks:
|
|
11
|
+
- id: ruff-check
|
|
12
|
+
args: [--fix]
|
|
13
|
+
- id: ruff-format
|
|
14
|
+
- repo: https://github.com/codespell-project/codespell
|
|
15
|
+
rev: 57b21406f092110c18776e39b0bda50d37c945c8 # frozen: v2.4.3
|
|
16
|
+
hooks:
|
|
17
|
+
- id: codespell
|
|
18
|
+
additional_dependencies: [tomli]
|
|
19
|
+
- repo: local
|
|
20
|
+
hooks:
|
|
21
|
+
- id: pyrefly
|
|
22
|
+
name: pyrefly
|
|
23
|
+
entry: uv run --frozen pyrefly check
|
|
24
|
+
language: system
|
|
25
|
+
types: [python]
|
|
26
|
+
pass_filenames: false
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Agent instructions
|
|
2
|
+
|
|
3
|
+
These rules apply to every agent working in this repo, from any lab. Read them before starting a task.
|
|
4
|
+
|
|
5
|
+
## Design
|
|
6
|
+
|
|
7
|
+
- The package design and its decisions are kept by the maintainer and are not in this repo.
|
|
8
|
+
- Ask the maintainer about every design decision a task needs, in the task's issue. Do not settle a choice yourself, even one with a conventional default.
|
|
9
|
+
- Write code only after every question the task needs is answered.
|
|
10
|
+
- Before writing an algorithm's code, write its pseudocode for its page in the docs' Algorithms section, and get the maintainer's confirmation.
|
|
11
|
+
|
|
12
|
+
## Code provenance and licenses
|
|
13
|
+
|
|
14
|
+
- Write all code new. Do not copy, port or adapt code from other projects.
|
|
15
|
+
- A dependency, imported by `src/prolearn/` or shipped in its wheel, needs a license compatible with BSD-3-Clause.
|
|
16
|
+
- A subprocess baseline needs only a license that permits the use. It is installed separately and never vendored or shipped. A runner script that imports it lives outside the wheel and runs as its own process.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
- One task gets one GitHub issue, one branch, one worktree and one pull request.
|
|
21
|
+
- Branch from the latest `origin/main`. Do not edit the main checkout.
|
|
22
|
+
- Claim a task by assigning its issue before starting. Leave tasks another agent has claimed.
|
|
23
|
+
- Keep each pull request to one purpose, and add its user-facing changes to `CHANGELOG.md` under "Unreleased".
|
|
24
|
+
- Before asking to merge, update the branch from `main` and rerun the checks.
|
|
25
|
+
- A pull request merges after CI passes and a model from a different lab reviews it. The maintainer merges.
|
|
26
|
+
- Keep runtime state (run folders, caches, databases) inside your worktree. Run any server on a free port.
|
|
27
|
+
- Remove your worktree after its pull request merges or closes.
|
|
28
|
+
|
|
29
|
+
## Results and figures
|
|
30
|
+
|
|
31
|
+
- Every result file is JSON with a `resources` block: wall-clock time, FLOPs, peak memory, energy where measured, hardware, library versions, and the git SHA with a flag for uncommitted changes.
|
|
32
|
+
- Draw figures from the result files, never from a live run.
|
|
33
|
+
- Every results plot shows the Bayes-optimal level and the chance level when they can be computed, and at least one baseline method.
|
|
34
|
+
- Color marks the method family. Every arm of a family shares its color, which is the same in every figure.
|
|
35
|
+
- Line style marks the variant within a family: solid with time features, dashed without. Further variants take further line styles.
|
|
36
|
+
- On a plot with one family, that family is red. Across families, the palette in `prolearn.plotting` fixes each family's color.
|
|
37
|
+
|
|
38
|
+
## Tooling
|
|
39
|
+
|
|
40
|
+
- Python 3.11–3.14, managed with `uv`. `uv.lock` is committed.
|
|
41
|
+
- `hatchling` builds the package. The version is static in `pyproject.toml`.
|
|
42
|
+
- `ruff`, with a line length of 88 and the rule set in `pyproject.toml`.
|
|
43
|
+
- `pyrefly` for types, at its default levels plus the errors listed in `pyproject.toml`.
|
|
44
|
+
- numpydoc docstrings on every public module, class and function.
|
|
45
|
+
- `pytest` with `hypothesis`. CI fails a pull request that lowers coverage by more than 1% from `main`.
|
|
46
|
+
- pre-commit runs whitespace and YAML checks, `ruff`, `pyrefly` and `codespell`.
|
|
47
|
+
- CI runs on Ubuntu.
|
|
48
|
+
|
|
49
|
+
Run the checks before opening a pull request:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uv sync
|
|
53
|
+
uv run pre-commit run --all-files
|
|
54
|
+
uv run pytest --cov
|
|
55
|
+
uv run sphinx-build -W --keep-going docs docs/_build/html
|
|
56
|
+
```
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Each pull request adds its user-facing changes under "Unreleased".
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- `prolearn.resources.ResourceMeter`, which records the time, FLOPs, energy, memory and updates of each call a learner makes, as readings labeled measured, estimated or absent. Its `resources()` block also records the energy source, idle power and any other load on the machine.
|
|
10
|
+
- `prolearn.results`, which validates result files against a JSON Schema shipped with the package, and saves and loads them.
|
|
11
|
+
- `jsonschema` as a dependency, `prolearn[torch]` for torch FLOP counts and device memory, and `prolearn[energy]`, which reads energy counters through Zeus.
|
|
12
|
+
- Package skeleton, tooling, CI, Sphinx documentation site with an examples gallery and release workflow.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: prolearn
|
|
3
|
+
message: >-
|
|
4
|
+
If you use prolearn, please cite the software and the prospective
|
|
5
|
+
learning papers listed under references.
|
|
6
|
+
type: software
|
|
7
|
+
authors:
|
|
8
|
+
- given-names: Joshua T.
|
|
9
|
+
family-names: Vogelstein
|
|
10
|
+
repository-code: https://github.com/neurodata/prolearn
|
|
11
|
+
license: BSD-3-Clause
|
|
12
|
+
version: 0.1.0.dev0
|
|
13
|
+
references:
|
|
14
|
+
- type: article
|
|
15
|
+
title: Toward a science of prospective learning
|
|
16
|
+
authors:
|
|
17
|
+
- {family-names: Kording, given-names: Konrad P.}
|
|
18
|
+
- {family-names: Vogelstein, given-names: Joshua T.}
|
|
19
|
+
- {family-names: Chaudhari, given-names: Pratik}
|
|
20
|
+
- {family-names: Verstynen, given-names: Timothy}
|
|
21
|
+
journal: Neuron
|
|
22
|
+
volume: 113
|
|
23
|
+
issue: 24
|
|
24
|
+
start: 4103
|
|
25
|
+
end: 4106
|
|
26
|
+
year: 2025
|
|
27
|
+
doi: 10.1016/j.neuron.2025.11.010
|
|
28
|
+
- type: conference-paper
|
|
29
|
+
title: "Prospective Learning: Principled Extrapolation to the Future"
|
|
30
|
+
authors:
|
|
31
|
+
- {family-names: De Silva, given-names: Ashwin}
|
|
32
|
+
- {family-names: Ramesh, given-names: Rahul}
|
|
33
|
+
- {family-names: Ungar, given-names: Lyle}
|
|
34
|
+
- {family-names: Shuler, given-names: Marshall Hussain}
|
|
35
|
+
- {family-names: Cowan, given-names: Noah J.}
|
|
36
|
+
- {family-names: Platt, given-names: Michael}
|
|
37
|
+
- {family-names: Li, given-names: Chen}
|
|
38
|
+
- {family-names: Isik, given-names: Leyla}
|
|
39
|
+
- {family-names: Roh, given-names: Seung-Eon}
|
|
40
|
+
- {family-names: Charles, given-names: Adam}
|
|
41
|
+
- {family-names: Venkataraman, given-names: Archana}
|
|
42
|
+
- {family-names: Caffo, given-names: Brian}
|
|
43
|
+
- {family-names: How, given-names: Javier J.}
|
|
44
|
+
- {family-names: Kebschull, given-names: Justus M.}
|
|
45
|
+
- {family-names: Krakauer, given-names: John W.}
|
|
46
|
+
- {family-names: Bichuch, given-names: Maxim}
|
|
47
|
+
- {family-names: Kinfu, given-names: Kaleab Alemayehu}
|
|
48
|
+
- {family-names: Yezerets, given-names: Eva}
|
|
49
|
+
- {family-names: Jayaraman, given-names: Dinesh}
|
|
50
|
+
- {family-names: Shin, given-names: Jong M.}
|
|
51
|
+
- {family-names: Villar, given-names: Soledad}
|
|
52
|
+
- {family-names: Phillips, given-names: Ian}
|
|
53
|
+
- {family-names: Priebe, given-names: Carey E.}
|
|
54
|
+
- {family-names: Hartung, given-names: Thomas}
|
|
55
|
+
- {family-names: Miller, given-names: Michael I.}
|
|
56
|
+
- {family-names: Dey, given-names: Jayanta}
|
|
57
|
+
- {family-names: Huang, given-names: Ningyuan}
|
|
58
|
+
- {family-names: Eaton, given-names: Eric}
|
|
59
|
+
- {family-names: Etienne-Cummings, given-names: Ralph}
|
|
60
|
+
- {family-names: Ogburn, given-names: Elizabeth L.}
|
|
61
|
+
- {family-names: Burns, given-names: Randal}
|
|
62
|
+
- {family-names: Osuagwu, given-names: Onyema}
|
|
63
|
+
- {family-names: Mensh, given-names: Brett}
|
|
64
|
+
- {family-names: Muotri, given-names: Alysson R.}
|
|
65
|
+
- {family-names: Brown, given-names: Julia}
|
|
66
|
+
- {family-names: White, given-names: Chris}
|
|
67
|
+
- {family-names: Yang, given-names: Weiwei}
|
|
68
|
+
- {family-names: Rusu, given-names: Andrei A.}
|
|
69
|
+
- {family-names: Verstynen, given-names: Timothy}
|
|
70
|
+
- {family-names: Kording, given-names: Konrad P.}
|
|
71
|
+
- {family-names: Chaudhari, given-names: Pratik}
|
|
72
|
+
- {family-names: Vogelstein, given-names: Joshua T.}
|
|
73
|
+
collection-title: Proceedings of The 2nd Conference on Lifelong Learning Agents
|
|
74
|
+
publisher: {name: PMLR}
|
|
75
|
+
volume: 232
|
|
76
|
+
start: 347
|
|
77
|
+
end: 357
|
|
78
|
+
year: 2023
|
|
79
|
+
url: https://proceedings.mlr.press/v232/de-silva23a.html
|
|
80
|
+
- type: conference-paper
|
|
81
|
+
title: "Prospective learning: Learning for a dynamic future"
|
|
82
|
+
authors:
|
|
83
|
+
- {family-names: De Silva, given-names: Ashwin}
|
|
84
|
+
- {family-names: Ramesh, given-names: Rahul}
|
|
85
|
+
- {family-names: Yang, given-names: Rubing}
|
|
86
|
+
- {family-names: Yu, given-names: Siyu}
|
|
87
|
+
- {family-names: Vogelstein, given-names: Joshua T.}
|
|
88
|
+
- {family-names: Chaudhari, given-names: Pratik}
|
|
89
|
+
collection-title: Advances in Neural Information Processing Systems 37
|
|
90
|
+
volume: 37
|
|
91
|
+
start: 123055
|
|
92
|
+
end: 123090
|
|
93
|
+
year: 2024
|
|
94
|
+
doi: 10.52202/079017-3911
|
|
95
|
+
- type: conference-paper
|
|
96
|
+
title: Prospective learning in retrospect
|
|
97
|
+
authors:
|
|
98
|
+
- {family-names: Bai, given-names: Yuxin}
|
|
99
|
+
- {family-names: Shuai, given-names: Cecelia}
|
|
100
|
+
- {family-names: De Silva, given-names: Ashwin}
|
|
101
|
+
- {family-names: Yu, given-names: Siyu}
|
|
102
|
+
- {family-names: Chaudhari, given-names: Pratik}
|
|
103
|
+
- {family-names: Vogelstein, given-names: Joshua T.}
|
|
104
|
+
collection-title: Lecture Notes in Computer Science
|
|
105
|
+
publisher: {name: Springer Nature Switzerland}
|
|
106
|
+
start: 17
|
|
107
|
+
end: 29
|
|
108
|
+
year: 2026
|
|
109
|
+
doi: 10.1007/978-3-032-00686-8_3
|
|
110
|
+
- type: conference-paper
|
|
111
|
+
title: Optimal control of the future via prospective learning with control
|
|
112
|
+
authors:
|
|
113
|
+
- {family-names: Bai, given-names: Y.}
|
|
114
|
+
- {family-names: Acharyya, given-names: A.}
|
|
115
|
+
- {family-names: De Silva, given-names: A.}
|
|
116
|
+
- {family-names: Shen, given-names: Z.}
|
|
117
|
+
- {family-names: Hassett, given-names: J.}
|
|
118
|
+
- {family-names: Vogelstein, given-names: J. T.}
|
|
119
|
+
collection-title: Proceedings of the 8th Annual Learning for Dynamics and Control Conference
|
|
120
|
+
publisher: {name: PMLR}
|
|
121
|
+
volume: 331
|
|
122
|
+
start: 1157
|
|
123
|
+
end: 1180
|
|
124
|
+
year: 2026
|
|
125
|
+
url: https://proceedings.mlr.press/v331/bai26a.html
|
|
126
|
+
- {type: software, title: prolearn0, authors: [{name: neurodata}], repository-code: "https://github.com/neurodata/prolearn0"}
|
|
127
|
+
- {type: software, title: prolearn2, authors: [{name: neurodata}], repository-code: "https://github.com/neurodata/prolearn2"}
|
|
128
|
+
- {type: software, title: procontrol, authors: [{name: neurodata}], repository-code: "https://github.com/neurodata/procontrol"}
|
|
129
|
+
- {type: software, title: ProspectiveLearningwithControl, authors: [{name: neurodata}], repository-code: "https://github.com/neurodata/ProspectiveLearningwithControl"}
|
|
130
|
+
- {type: software, title: ProspectiveForaging, authors: [{name: neurodata}], repository-code: "https://github.com/neurodata/ProspectiveForaging"}
|
|
131
|
+
- {type: software, title: ProL, authors: [{name: Yuxin Bai}], repository-code: "https://github.com/YuxinB/ProL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Pull requests are welcome from anyone. The maintainer reviews and merges them.
|
|
4
|
+
|
|
5
|
+
## Before you start
|
|
6
|
+
|
|
7
|
+
Open an issue, or comment on an existing one, describing what you plan to change. The maintainer may decline a change that does not fit the package's direction.
|
|
8
|
+
|
|
9
|
+
## Set up
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/neurodata/prolearn.git
|
|
13
|
+
cd prolearn
|
|
14
|
+
uv sync
|
|
15
|
+
uv run pre-commit install
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Make a change
|
|
19
|
+
|
|
20
|
+
- Branch from the latest `main`. Keep each pull request to one purpose.
|
|
21
|
+
- Write numpydoc docstrings on every public module, class and function.
|
|
22
|
+
- Add tests. CI fails a pull request that lowers coverage by more than 1% from `main`.
|
|
23
|
+
- Add your user-facing changes to `CHANGELOG.md` under "Unreleased".
|
|
24
|
+
|
|
25
|
+
Run the checks before opening a pull request:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv run pre-commit run --all-files
|
|
29
|
+
uv run pytest --cov
|
|
30
|
+
uv run sphinx-build -W --keep-going docs docs/_build/html
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Agents follow the rules in [AGENTS.md](AGENTS.md).
|
|
34
|
+
|
|
35
|
+
## Copyright
|
|
36
|
+
|
|
37
|
+
Contributions are licensed under BSD-3-Clause, the license in [LICENSE](LICENSE). Copyright is held by the prolearn developers: the commit authors in the git history, which governs. To list them, run `git shortlog -sne` in a clone. GitHub's [contributors page](https://github.com/neurodata/prolearn/graphs/contributors) is a convenience and may be incomplete.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, The prolearn developers.
|
|
4
|
+
The developers are the commit authors in the git history, which governs.
|
|
5
|
+
To list them, run `git shortlog -sne` in a clone. GitHub's contributors
|
|
6
|
+
page, https://github.com/neurodata/prolearn/graphs/contributors, is a
|
|
7
|
+
convenience and may be incomplete.
|
|
8
|
+
|
|
9
|
+
Redistribution and use in source and binary forms, with or without
|
|
10
|
+
modification, are permitted provided that the following conditions are met:
|
|
11
|
+
|
|
12
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
13
|
+
list of conditions and the following disclaimer.
|
|
14
|
+
|
|
15
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
16
|
+
this list of conditions and the following disclaimer in the documentation
|
|
17
|
+
and/or other materials provided with the distribution.
|
|
18
|
+
|
|
19
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
20
|
+
contributors may be used to endorse or promote products derived from
|
|
21
|
+
this software without specific prior written permission.
|
|
22
|
+
|
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
24
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
25
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
26
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
27
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
28
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
29
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
30
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
31
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
32
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: prolearn
|
|
3
|
+
Version: 0.1.0.dev0
|
|
4
|
+
Summary: Prospective learning in Python
|
|
5
|
+
Project-URL: Homepage, https://github.com/neurodata/prolearn
|
|
6
|
+
Project-URL: Documentation, https://neurodata.github.io/prolearn/
|
|
7
|
+
Project-URL: Source, https://github.com/neurodata/prolearn
|
|
8
|
+
Project-URL: Issues, https://github.com/neurodata/prolearn/issues
|
|
9
|
+
Author: Joshua T. Vogelstein
|
|
10
|
+
License-Expression: BSD-3-Clause
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: jsonschema>=4.18
|
|
23
|
+
Provides-Extra: energy
|
|
24
|
+
Requires-Dist: zeus>=0.17; (sys_platform != 'darwin') and extra == 'energy'
|
|
25
|
+
Requires-Dist: zeus[apple]>=0.17; (sys_platform == 'darwin') and extra == 'energy'
|
|
26
|
+
Provides-Extra: torch
|
|
27
|
+
Requires-Dist: torch>=2.6; extra == 'torch'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# prolearn
|
|
31
|
+
|
|
32
|
+
The code for the NeurIPS 2024 paper "Prospective Learning: Learning for a Dynamic Future" is in [neurodata/prolearn0](https://github.com/neurodata/prolearn0).
|
|
33
|
+
|
|
34
|
+
`prolearn` is a Python package for prospective learning. It is in early development, and it has no public API yet.
|
|
35
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pip install prolearn
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
For development, clone the repo and run `uv sync`. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
43
|
+
|
|
44
|
+
## Papers
|
|
45
|
+
|
|
46
|
+
- Kording, Vogelstein, Chaudhari and Verstynen. "Toward a science of prospective learning." *Neuron* 113(24):4103–4106, 2025. [doi:10.1016/j.neuron.2025.11.010](https://doi.org/10.1016/j.neuron.2025.11.010)
|
|
47
|
+
- De Silva et al. "Prospective Learning: Principled Extrapolation to the Future." *Proceedings of the 2nd Conference on Lifelong Learning Agents*, PMLR 232:347–357, 2023. [proceedings.mlr.press/v232/de-silva23a](https://proceedings.mlr.press/v232/de-silva23a.html)
|
|
48
|
+
- De Silva, Ramesh, Yang, Yu, Vogelstein and Chaudhari. "Prospective learning: Learning for a dynamic future." *Advances in Neural Information Processing Systems 37*, 2024. [doi:10.52202/079017-3911](https://doi.org/10.52202/079017-3911)
|
|
49
|
+
- Bai, Shuai, De Silva, Yu, Chaudhari and Vogelstein. "Prospective learning in retrospect." *Lecture Notes in Computer Science*, 17–29, 2026. [doi:10.1007/978-3-032-00686-8_3](https://doi.org/10.1007/978-3-032-00686-8_3)
|
|
50
|
+
- Bai, Acharyya, De Silva, Shen, Hassett and Vogelstein. "Optimal control of the future via prospective learning with control." *Proceedings of the 8th Annual Learning for Dynamics and Control Conference*, PMLR 331:1157–1180, 2026. [proceedings.mlr.press/v331/bai26a](https://proceedings.mlr.press/v331/bai26a.html)
|
|
51
|
+
|
|
52
|
+
## Earlier code
|
|
53
|
+
|
|
54
|
+
- [neurodata/prolearn0](https://github.com/neurodata/prolearn0)
|
|
55
|
+
- [neurodata/prolearn2](https://github.com/neurodata/prolearn2)
|
|
56
|
+
- [neurodata/procontrol](https://github.com/neurodata/procontrol)
|
|
57
|
+
- [neurodata/ProspectiveLearningwithControl](https://github.com/neurodata/ProspectiveLearningwithControl)
|
|
58
|
+
- [neurodata/ProspectiveForaging](https://github.com/neurodata/ProspectiveForaging)
|
|
59
|
+
- [YuxinB/ProL](https://github.com/YuxinB/ProL)
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
BSD-3-Clause. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# prolearn
|
|
2
|
+
|
|
3
|
+
The code for the NeurIPS 2024 paper "Prospective Learning: Learning for a Dynamic Future" is in [neurodata/prolearn0](https://github.com/neurodata/prolearn0).
|
|
4
|
+
|
|
5
|
+
`prolearn` is a Python package for prospective learning. It is in early development, and it has no public API yet.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install prolearn
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For development, clone the repo and run `uv sync`. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
14
|
+
|
|
15
|
+
## Papers
|
|
16
|
+
|
|
17
|
+
- Kording, Vogelstein, Chaudhari and Verstynen. "Toward a science of prospective learning." *Neuron* 113(24):4103–4106, 2025. [doi:10.1016/j.neuron.2025.11.010](https://doi.org/10.1016/j.neuron.2025.11.010)
|
|
18
|
+
- De Silva et al. "Prospective Learning: Principled Extrapolation to the Future." *Proceedings of the 2nd Conference on Lifelong Learning Agents*, PMLR 232:347–357, 2023. [proceedings.mlr.press/v232/de-silva23a](https://proceedings.mlr.press/v232/de-silva23a.html)
|
|
19
|
+
- De Silva, Ramesh, Yang, Yu, Vogelstein and Chaudhari. "Prospective learning: Learning for a dynamic future." *Advances in Neural Information Processing Systems 37*, 2024. [doi:10.52202/079017-3911](https://doi.org/10.52202/079017-3911)
|
|
20
|
+
- Bai, Shuai, De Silva, Yu, Chaudhari and Vogelstein. "Prospective learning in retrospect." *Lecture Notes in Computer Science*, 17–29, 2026. [doi:10.1007/978-3-032-00686-8_3](https://doi.org/10.1007/978-3-032-00686-8_3)
|
|
21
|
+
- Bai, Acharyya, De Silva, Shen, Hassett and Vogelstein. "Optimal control of the future via prospective learning with control." *Proceedings of the 8th Annual Learning for Dynamics and Control Conference*, PMLR 331:1157–1180, 2026. [proceedings.mlr.press/v331/bai26a](https://proceedings.mlr.press/v331/bai26a.html)
|
|
22
|
+
|
|
23
|
+
## Earlier code
|
|
24
|
+
|
|
25
|
+
- [neurodata/prolearn0](https://github.com/neurodata/prolearn0)
|
|
26
|
+
- [neurodata/prolearn2](https://github.com/neurodata/prolearn2)
|
|
27
|
+
- [neurodata/procontrol](https://github.com/neurodata/procontrol)
|
|
28
|
+
- [neurodata/ProspectiveLearningwithControl](https://github.com/neurodata/ProspectiveLearningwithControl)
|
|
29
|
+
- [neurodata/ProspectiveForaging](https://github.com/neurodata/ProspectiveForaging)
|
|
30
|
+
- [YuxinB/ProL](https://github.com/YuxinB/ProL)
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
BSD-3-Clause. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""Sphinx configuration for the prolearn documentation."""
|
|
2
|
+
|
|
3
|
+
import prolearn
|
|
4
|
+
|
|
5
|
+
project = "prolearn"
|
|
6
|
+
author = "The prolearn developers"
|
|
7
|
+
copyright = "2026, The prolearn developers"
|
|
8
|
+
release = prolearn.__version__
|
|
9
|
+
version = release
|
|
10
|
+
|
|
11
|
+
extensions = [
|
|
12
|
+
"sphinx.ext.autodoc",
|
|
13
|
+
"sphinx.ext.autosummary",
|
|
14
|
+
"sphinx.ext.intersphinx",
|
|
15
|
+
"sphinx.ext.mathjax",
|
|
16
|
+
"numpydoc",
|
|
17
|
+
"myst_parser",
|
|
18
|
+
"sphinx_gallery.gen_gallery",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
|
|
22
|
+
exclude_patterns = ["_build", "auto_examples/*.ipynb", "auto_examples/*.py"]
|
|
23
|
+
|
|
24
|
+
myst_enable_extensions = ["dollarmath", "amsmath"]
|
|
25
|
+
|
|
26
|
+
autosummary_generate = True
|
|
27
|
+
numpydoc_show_class_members = False
|
|
28
|
+
|
|
29
|
+
intersphinx_mapping = {
|
|
30
|
+
"python": ("https://docs.python.org/3", None),
|
|
31
|
+
"numpy": ("https://numpy.org/doc/stable", None),
|
|
32
|
+
"sklearn": ("https://scikit-learn.org/stable", None),
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
sphinx_gallery_conf: dict[str, object] = {
|
|
36
|
+
"examples_dirs": "../examples",
|
|
37
|
+
"gallery_dirs": "auto_examples",
|
|
38
|
+
"doc_module": ("prolearn",),
|
|
39
|
+
"backreferences_dir": "generated/backreferences",
|
|
40
|
+
"reference_url": {"prolearn": None},
|
|
41
|
+
"filename_pattern": r"/plot_",
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
html_theme = "pydata_sphinx_theme"
|
|
45
|
+
html_title = "prolearn"
|
|
46
|
+
html_theme_options = {
|
|
47
|
+
"github_url": "https://github.com/neurodata/prolearn",
|
|
48
|
+
"navigation_with_keys": False,
|
|
49
|
+
}
|