simons-forecasting 0.1.3__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.
Files changed (106) hide show
  1. simons_forecasting-0.1.3/.gitattributes +3 -0
  2. simons_forecasting-0.1.3/.github/ISSUE_TEMPLATE/bug.yml +31 -0
  3. simons_forecasting-0.1.3/.github/ISSUE_TEMPLATE/config.yml +5 -0
  4. simons_forecasting-0.1.3/.github/ISSUE_TEMPLATE/feature.yml +16 -0
  5. simons_forecasting-0.1.3/.github/dependabot.yml +11 -0
  6. simons_forecasting-0.1.3/.github/pull_request_template.md +7 -0
  7. simons_forecasting-0.1.3/.github/workflows/ci.yml +33 -0
  8. simons_forecasting-0.1.3/.github/workflows/publish.yml +34 -0
  9. simons_forecasting-0.1.3/.gitignore +13 -0
  10. simons_forecasting-0.1.3/CHANGELOG.md +84 -0
  11. simons_forecasting-0.1.3/CITATION.cff +11 -0
  12. simons_forecasting-0.1.3/CODE_OF_CONDUCT.md +117 -0
  13. simons_forecasting-0.1.3/CONTRIBUTING.md +48 -0
  14. simons_forecasting-0.1.3/LICENSE +202 -0
  15. simons_forecasting-0.1.3/NOTICE +57 -0
  16. simons_forecasting-0.1.3/PKG-INFO +156 -0
  17. simons_forecasting-0.1.3/README.md +126 -0
  18. simons_forecasting-0.1.3/SECURITY.md +12 -0
  19. simons_forecasting-0.1.3/benchmarks/fev_bench.py +93 -0
  20. simons_forecasting-0.1.3/benchmarks/gift_eval.ipynb +246 -0
  21. simons_forecasting-0.1.3/benchmarks/time.py +129 -0
  22. simons_forecasting-0.1.3/configs/covariate-source-weights.example.json +1 -0
  23. simons_forecasting-0.1.3/configs/simons-178m-stage1.yaml +51 -0
  24. simons_forecasting-0.1.3/configs/simons-178m-stage2.yaml +73 -0
  25. simons_forecasting-0.1.3/configs/simons-178m-stage3.yaml +106 -0
  26. simons_forecasting-0.1.3/configs/simons-178m-stage4-long.yaml +116 -0
  27. simons_forecasting-0.1.3/configs/simons-178m-stage4.yaml +116 -0
  28. simons_forecasting-0.1.3/configs/simons-25m-stage1.yaml +50 -0
  29. simons_forecasting-0.1.3/configs/simons-25m-stage2.yaml +69 -0
  30. simons_forecasting-0.1.3/configs/simons-25m-stage3.yaml +106 -0
  31. simons_forecasting-0.1.3/configs/simons-25m-stage4-long.yaml +115 -0
  32. simons_forecasting-0.1.3/configs/simons-25m-stage4.yaml +115 -0
  33. simons_forecasting-0.1.3/configs/simons-297m-stage1-ext.yaml +58 -0
  34. simons_forecasting-0.1.3/configs/simons-297m-stage1.yaml +54 -0
  35. simons_forecasting-0.1.3/configs/simons-297m-stage2.yaml +74 -0
  36. simons_forecasting-0.1.3/configs/simons-297m-stage3.yaml +115 -0
  37. simons_forecasting-0.1.3/configs/simons-297m-stage4.yaml +125 -0
  38. simons_forecasting-0.1.3/configs/simons-60m-stage1.yaml +50 -0
  39. simons_forecasting-0.1.3/configs/simons-60m-stage2.yaml +69 -0
  40. simons_forecasting-0.1.3/configs/simons-60m-stage3.yaml +106 -0
  41. simons_forecasting-0.1.3/configs/simons-60m-stage4-long.yaml +115 -0
  42. simons_forecasting-0.1.3/configs/simons-60m-stage4.yaml +115 -0
  43. simons_forecasting-0.1.3/docs/DATA.md +70 -0
  44. simons_forecasting-0.1.3/docs/GETTING_STARTED.md +235 -0
  45. simons_forecasting-0.1.3/docs/MODEL.md +89 -0
  46. simons_forecasting-0.1.3/docs/TRAINING.md +317 -0
  47. simons_forecasting-0.1.3/docs/assets/benchmark-places-dark.png +0 -0
  48. simons_forecasting-0.1.3/docs/assets/benchmark-places.png +0 -0
  49. simons_forecasting-0.1.3/docs/assets/inference-time-dark.png +0 -0
  50. simons_forecasting-0.1.3/docs/assets/inference-time.png +0 -0
  51. simons_forecasting-0.1.3/examples/demo.ipynb +388 -0
  52. simons_forecasting-0.1.3/examples/finetune.ipynb +349 -0
  53. simons_forecasting-0.1.3/pyproject.toml +45 -0
  54. simons_forecasting-0.1.3/scripts/prepare_example_data.py +149 -0
  55. simons_forecasting-0.1.3/scripts/train.sh +70 -0
  56. simons_forecasting-0.1.3/src/simons/__init__.py +10 -0
  57. simons_forecasting-0.1.3/src/simons/config.py +82 -0
  58. simons_forecasting-0.1.3/src/simons/covariates.py +338 -0
  59. simons_forecasting-0.1.3/src/simons/forecast.py +578 -0
  60. simons_forecasting-0.1.3/src/simons/model.py +696 -0
  61. simons_forecasting-0.1.3/src/simons/periodicity.py +188 -0
  62. simons_forecasting-0.1.3/src/simons/predictor.py +56 -0
  63. simons_forecasting-0.1.3/src/simons/synth/__init__.py +5 -0
  64. simons_forecasting-0.1.3/src/simons/synth/augment.py +143 -0
  65. simons_forecasting-0.1.3/src/simons/synth/base.py +448 -0
  66. simons_forecasting-0.1.3/src/simons/synth/calendar.py +157 -0
  67. simons_forecasting-0.1.3/src/simons/synth/causal.py +193 -0
  68. simons_forecasting-0.1.3/src/simons/synth/covariates/__init__.py +1 -0
  69. simons_forecasting-0.1.3/src/simons/synth/covariates/classical.py +637 -0
  70. simons_forecasting-0.1.3/src/simons/synth/covariates/effects.py +155 -0
  71. simons_forecasting-0.1.3/src/simons/synth/covariates/energy.py +528 -0
  72. simons_forecasting-0.1.3/src/simons/synth/covariates/families.py +296 -0
  73. simons_forecasting-0.1.3/src/simons/synth/covariates/generic.py +342 -0
  74. simons_forecasting-0.1.3/src/simons/synth/heavy.py +234 -0
  75. simons_forecasting-0.1.3/src/simons/synth/mech.py +636 -0
  76. simons_forecasting-0.1.3/src/simons/synth/multi.py +274 -0
  77. simons_forecasting-0.1.3/src/simons/synth/nonstat.py +204 -0
  78. simons_forecasting-0.1.3/src/simons/synth/observe.py +117 -0
  79. simons_forecasting-0.1.3/src/simons/training/__init__.py +1 -0
  80. simons_forecasting-0.1.3/src/simons/training/__main__.py +77 -0
  81. simons_forecasting-0.1.3/src/simons/training/augment.py +125 -0
  82. simons_forecasting-0.1.3/src/simons/training/clusters.py +215 -0
  83. simons_forecasting-0.1.3/src/simons/training/config.py +321 -0
  84. simons_forecasting-0.1.3/src/simons/training/covariates/__init__.py +1 -0
  85. simons_forecasting-0.1.3/src/simons/training/covariates/roles.py +370 -0
  86. simons_forecasting-0.1.3/src/simons/training/covariates/stream.py +243 -0
  87. simons_forecasting-0.1.3/src/simons/training/covariates/windows.py +239 -0
  88. simons_forecasting-0.1.3/src/simons/training/data.py +319 -0
  89. simons_forecasting-0.1.3/src/simons/training/distributed.py +124 -0
  90. simons_forecasting-0.1.3/src/simons/training/mixture.py +140 -0
  91. simons_forecasting-0.1.3/src/simons/training/network.py +115 -0
  92. simons_forecasting-0.1.3/src/simons/training/objective.py +193 -0
  93. simons_forecasting-0.1.3/src/simons/training/optim.py +164 -0
  94. simons_forecasting-0.1.3/src/simons/training/packing.py +94 -0
  95. simons_forecasting-0.1.3/src/simons/training/schedule.py +117 -0
  96. simons_forecasting-0.1.3/src/simons/training/soup.py +93 -0
  97. simons_forecasting-0.1.3/src/simons/training/stitching.py +50 -0
  98. simons_forecasting-0.1.3/src/simons/training/trainer.py +571 -0
  99. simons_forecasting-0.1.3/src/simons/training/warp.py +144 -0
  100. simons_forecasting-0.1.3/tests/fixtures/covariates/cases.npz +0 -0
  101. simons_forecasting-0.1.3/tests/fixtures/covariates/config.json +38 -0
  102. simons_forecasting-0.1.3/tests/fixtures/covariates/model.safetensors +0 -0
  103. simons_forecasting-0.1.3/tests/test_covariate_training.py +516 -0
  104. simons_forecasting-0.1.3/tests/test_covariates.py +205 -0
  105. simons_forecasting-0.1.3/tests/test_forecast.py +175 -0
  106. simons_forecasting-0.1.3/tests/test_training.py +460 -0
@@ -0,0 +1,3 @@
1
+ * text=auto eol=lf
2
+ *.ipynb text eol=lf
3
+ *.sh text eol=lf
@@ -0,0 +1,31 @@
1
+ name: Bug report
2
+ description: Simons fails, returns a wrong forecast, or runs much slower than expected.
3
+ labels: [bug]
4
+ body:
5
+ - type: textarea
6
+ id: what
7
+ attributes:
8
+ label: What happened
9
+ description: The code you ran and what it printed, including the full error message.
10
+ render: python
11
+ validations:
12
+ required: true
13
+ - type: textarea
14
+ id: expected
15
+ attributes:
16
+ label: What you expected
17
+ description: The result you expected, and why.
18
+ validations:
19
+ required: true
20
+ - type: textarea
21
+ id: data
22
+ attributes:
23
+ label: Data
24
+ description: The shapes of the history and covariates, or a short script that generates data showing the problem.
25
+ - type: textarea
26
+ id: environment
27
+ attributes:
28
+ label: Environment
29
+ description: The model (for example abel-lab/Simons-60M), the Simons, Python and PyTorch versions, and the device.
30
+ validations:
31
+ required: true
@@ -0,0 +1,5 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Documentation
4
+ url: https://github.com/Abel-ai-lab/Simons/blob/main/docs/GETTING_STARTED.md
5
+ about: Input format, covariates, forecast options and fine-tuning.
@@ -0,0 +1,16 @@
1
+ name: Feature request
2
+ description: Something Simons should do, or do differently.
3
+ labels: [enhancement]
4
+ body:
5
+ - type: textarea
6
+ id: what
7
+ attributes:
8
+ label: What you need
9
+ description: The task you are trying to do, and what is missing today.
10
+ validations:
11
+ required: true
12
+ - type: textarea
13
+ id: how
14
+ attributes:
15
+ label: How it could work
16
+ description: The call or the behaviour you have in mind, if you have one.
@@ -0,0 +1,11 @@
1
+ # Monthly, grouped updates of the workflow actions. Python dependencies are left out: the package
2
+ # declares minimum versions, which should stay low, and it has no lock file to keep current.
3
+ version: 2
4
+ updates:
5
+ - package-ecosystem: github-actions
6
+ directory: /
7
+ schedule:
8
+ interval: monthly
9
+ groups:
10
+ actions:
11
+ patterns: ["*"]
@@ -0,0 +1,7 @@
1
+ ## What and why
2
+
3
+ <!-- What this changes, and the issue it belongs to. -->
4
+
5
+ ## How it was checked
6
+
7
+ <!-- Tests run, or results compared. -->
@@ -0,0 +1,33 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches: [main]
7
+
8
+ permissions:
9
+ contents: read
10
+
11
+ jobs:
12
+ test:
13
+ # Skip forks.
14
+ if: github.repository == 'Abel-ai-lab/Simons'
15
+ runs-on: ubuntu-latest
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ python-version: ["3.10", "3.13"]
20
+ steps:
21
+ - uses: actions/checkout@v7
22
+ - uses: astral-sh/setup-uv@v7
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ activate-environment: true
26
+ - name: Install
27
+ run: |
28
+ uv pip install torch --index-url https://download.pytorch.org/whl/cpu
29
+ uv pip install -e ".[dev]"
30
+ - name: Ruff
31
+ run: uvx ruff@0.14.3 check .
32
+ - name: Tests
33
+ run: python -m pytest -q
@@ -0,0 +1,34 @@
1
+ name: Publish
2
+
3
+ # Publishes simons-forecasting to PyPI when a GitHub release is published. PyPI trusts this
4
+ # workflow and environment (trusted publishing), so the repository stores no PyPI token.
5
+ on:
6
+ release:
7
+ types: [published]
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ pypi:
14
+ if: github.repository == 'Abel-ai-lab/Simons'
15
+ runs-on: ubuntu-latest
16
+ environment: pypi
17
+ permissions:
18
+ id-token: write
19
+ steps:
20
+ - uses: actions/checkout@v7
21
+ - uses: astral-sh/setup-uv@v7
22
+ with:
23
+ python-version: "3.13"
24
+ - name: Check the tag matches the version
25
+ run: |
26
+ version=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])")
27
+ if [ "v$version" != "$GITHUB_REF_NAME" ]; then
28
+ echo "Tag $GITHUB_REF_NAME does not match version $version in pyproject.toml"
29
+ exit 1
30
+ fi
31
+ - name: Build
32
+ run: uv build
33
+ - name: Publish
34
+ run: uv publish --trusted-publishing always
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.pyc
3
+ .pytest_cache/
4
+ .venv/
5
+ *.egg-info/
6
+ dist/
7
+ build/
8
+
9
+ # outputs of the README, scripts and notebook
10
+ runs/
11
+ data/
12
+ models/
13
+ results/
@@ -0,0 +1,84 @@
1
+ # Changelog
2
+
3
+ All notable changes to Simons are recorded here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow
5
+ [Semantic Versioning](https://semver.org/). The model weights have not changed since 0.1.0.
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.3] - 2026-11-26
10
+
11
+ ### Changed
12
+
13
+ - Simons is on PyPI as `simons-forecasting`: `pip install simons-forecasting`. The import name stays
14
+ `simons`. The package installs only the inference dependencies (PyTorch, NumPy, safetensors and
15
+ huggingface_hub); training and fine-tuning need the `train` extra, `pip install -e ".[train]"` in a
16
+ clone. ([#25](https://github.com/Abel-ai-lab/Simons/pull/25))
17
+ - On a CPU, period detection builds no lookup table for a context of 16,384 or 32,768 steps when
18
+ few candidate periods are needed, as with covariates on a history of a few thousand steps. The
19
+ table takes 1 GiB for Simons-25M and 60M and 4 GiB for Simons-178M and 297M. At 2 CPU threads,
20
+ Simons-297M with 16 covariates on a 2,688-step history peaks at 2.7 GiB instead of 6.6 GiB, and
21
+ without covariates on a 32,768-step history with daily and weekly cycles at 2.4 GiB instead of
22
+ 5.8 GiB. Forecasts are unchanged. ([#24](https://github.com/Abel-ai-lab/Simons/pull/24))
23
+
24
+ ### Documentation
25
+
26
+ - `docs/MODEL.md` gives the CPU memory and time of each size ([#24](https://github.com/Abel-ai-lab/Simons/pull/24)).
27
+
28
+ ## [0.1.2] - 2026-11-16
29
+
30
+ ### Changed
31
+
32
+ - With covariates, a series with at most one nonzero observed value no longer gets the
33
+ square-root test-time views. Once normalized, such a history and its square root look the same
34
+ to the model. When a covariate rose over the horizon, squaring the square-root forecast back
35
+ squared the forecast's relative growth, with upper quantiles up to about 10⁸ on some fev-bench
36
+ series. Forecasts change only for such series; forecasts without covariates are unchanged. The
37
+ scores reported for 0.1.1 used the old views.
38
+ ([#15](https://github.com/Abel-ai-lab/Simons/pull/15))
39
+
40
+ ### Documentation and tests
41
+
42
+ - `docs/DATA.md` gives each source's share of the stored observations instead of one run's
43
+ planned training-token shares ([#13](https://github.com/Abel-ai-lab/Simons/pull/13)). The README's
44
+ benchmark place table is updated ([#12](https://github.com/Abel-ai-lab/Simons/pull/12)).
45
+ - The zero-forecast test is seeded and no longer compares forecasts across batch sizes, which
46
+ failed on some machines ([#10](https://github.com/Abel-ai-lab/Simons/pull/10)).
47
+
48
+ ## [0.1.1] - 2026-11-11
49
+
50
+ ### Changed
51
+
52
+ - Covariate forecasts use less memory. Rows of a short series are kept from their own start
53
+ instead of the full context window; for Simons-297M with 256 short items and 16 covariates,
54
+ peak GPU memory drops from 17.0 GB to 7.2 GB. Forecasts are unchanged on the CPU
55
+ ([#7](https://github.com/Abel-ai-lab/Simons/pull/7)).
56
+ - A variate with no observed value in the context is forecast as zero in every quantile, instead
57
+ of a finite value of about ±670 from scaling a series without data
58
+ ([#8](https://github.com/Abel-ai-lab/Simons/pull/8)).
59
+
60
+ ### Fixed
61
+
62
+ - Forecast pass sizes count the padded tokens of covariate rows, so one pass stays within the
63
+ memory budget ([#7](https://github.com/Abel-ai-lab/Simons/pull/7)).
64
+ - A caller's `series_ids` can no longer collide with internal ids. Before, ids of -1000 or lower
65
+ could ([#7](https://github.com/Abel-ai-lab/Simons/pull/7)).
66
+
67
+ ### Documentation
68
+
69
+ - `docs/TRAINING.md` states what the full public data needs and how long Simons-25M takes to
70
+ train ([#3](https://github.com/Abel-ai-lab/Simons/pull/3)). The README links the release post,
71
+ and `docs/MODEL.md` links the TIME leaderboard
72
+ ([#5](https://github.com/Abel-ai-lab/Simons/pull/5),
73
+ [#6](https://github.com/Abel-ai-lab/Simons/pull/6)).
74
+
75
+ ## [0.1.0] - 2026-11-11
76
+
77
+ Initial release: inference and training code, the training recipe, and the weights of
78
+ Simons-25M, Simons-60M, Simons-178M and Simons-297M.
79
+
80
+ [Unreleased]: https://github.com/Abel-ai-lab/Simons/compare/v0.1.3...HEAD
81
+ [0.1.3]: https://github.com/Abel-ai-lab/Simons/compare/v0.1.2...v0.1.3
82
+ [0.1.2]: https://github.com/Abel-ai-lab/Simons/compare/v0.1.1...v0.1.2
83
+ [0.1.1]: https://github.com/Abel-ai-lab/Simons/compare/v0.1.0...v0.1.1
84
+ [0.1.0]: https://github.com/Abel-ai-lab/Simons/releases/tag/v0.1.0
@@ -0,0 +1,11 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use Simons, please cite it as below."
3
+ title: "Simons: Building Open Time Series Foundation Models through Auto-Research"
4
+ type: software
5
+ authors:
6
+ - name: "Abel AI Lab"
7
+ version: "0.1.3"
8
+ date-released: "2026-11-26"
9
+ license: Apache-2.0
10
+ url: "https://github.com/Abel-ai-lab/Simons"
11
+ repository-code: "https://github.com/Abel-ai-lab/Simons"
@@ -0,0 +1,117 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a
6
+ harassment-free experience for everyone, regardless of age, body size, visible or invisible
7
+ disability, ethnicity, sex characteristics, gender identity and expression, level of experience,
8
+ education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or
9
+ sexual identity and orientation.
10
+
11
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and
12
+ healthy community.
13
+
14
+ ## Our Standards
15
+
16
+ Examples of behavior that contributes to a positive environment for our community include:
17
+
18
+ * Demonstrating empathy and kindness toward other people
19
+ * Being respectful of differing opinions, viewpoints, and experiences
20
+ * Giving and gracefully accepting constructive feedback
21
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the
22
+ experience
23
+ * Focusing on what is best not just for us as individuals, but for the overall community
24
+
25
+ Examples of unacceptable behavior include:
26
+
27
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
28
+ * Trolling, insulting or derogatory comments, and personal or political attacks
29
+ * Public or private harassment
30
+ * Publishing others' private information, such as a physical or email address, without their
31
+ explicit permission
32
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
33
+
34
+ ## Enforcement Responsibilities
35
+
36
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior
37
+ and will take appropriate and fair corrective action in response to any behavior that they deem
38
+ inappropriate, threatening, offensive, or harmful.
39
+
40
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits,
41
+ code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and
42
+ will communicate reasons for moderation decisions when appropriate.
43
+
44
+ ## Scope
45
+
46
+ This Code of Conduct applies within all community spaces, and also applies when an individual is
47
+ officially representing the community in public spaces. Examples of representing our community
48
+ include using an official e-mail address, posting via an official social media account, or acting as
49
+ an appointed representative at an online or offline event.
50
+
51
+ ## Enforcement
52
+
53
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community
54
+ leaders responsible for enforcement at <contact@abel.ai>. All complaints will be reviewed and
55
+ investigated promptly and fairly.
56
+
57
+ All community leaders are obligated to respect the privacy and security of the reporter of any
58
+ incident.
59
+
60
+ ## Enforcement Guidelines
61
+
62
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for
63
+ any action they deem in violation of this Code of Conduct:
64
+
65
+ ### 1. Correction
66
+
67
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or
68
+ unwelcome in the community.
69
+
70
+ **Consequence**: A private, written warning from community leaders, providing clarity around the
71
+ nature of the violation and an explanation of why the behavior was inappropriate. A public apology
72
+ may be requested.
73
+
74
+ ### 2. Warning
75
+
76
+ **Community Impact**: A violation through a single incident or series of actions.
77
+
78
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people
79
+ involved, including unsolicited interaction with those enforcing the Code of Conduct, for a
80
+ specified period of time. This includes avoiding interactions in community spaces as well as
81
+ external channels like social media. Violating these terms may lead to a temporary or permanent ban.
82
+
83
+ ### 3. Temporary Ban
84
+
85
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate
86
+ behavior.
87
+
88
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the
89
+ community for a specified period of time. No public or private interaction with the people involved,
90
+ including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this
91
+ period. Violating these terms may lead to a permanent ban.
92
+
93
+ ### 4. Permanent Ban
94
+
95
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including
96
+ sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement
97
+ of classes of individuals.
98
+
99
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
100
+
101
+ ## Attribution
102
+
103
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at
104
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
105
+
106
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla
107
+ CoC].
108
+
109
+ For answers to common questions about this code of conduct, see the FAQ at
110
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
111
+ [https://www.contributor-covenant.org/translations][translations].
112
+
113
+ [homepage]: https://www.contributor-covenant.org
114
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
115
+ [Mozilla CoC]: https://github.com/mozilla/diversity
116
+ [FAQ]: https://www.contributor-covenant.org/faq
117
+ [translations]: https://www.contributor-covenant.org/translations
@@ -0,0 +1,48 @@
1
+ # Contributing
2
+
3
+ Contribute against `main` of [Abel-ai-lab/Simons](https://github.com/Abel-ai-lab/Simons).
4
+
5
+ ## Setup
6
+
7
+ On a CPU-only machine, install the CPU build of PyTorch:
8
+ `pip install torch --index-url https://download.pytorch.org/whl/cpu`. Then:
9
+
10
+ ```shell
11
+ git clone https://github.com/Abel-ai-lab/Simons && cd Simons
12
+ pip install -e ".[dev]"
13
+ ```
14
+
15
+ The tests need no GPU; they run with either PyTorch build.
16
+
17
+ ## Tests and lint
18
+
19
+ ```shell
20
+ pytest
21
+ uvx ruff@0.14.3 check . # or: pip install ruff==0.14.3 && ruff check .
22
+ ```
23
+
24
+ CI runs tests and lint on Python 3.10 and 3.13. Tests run on CPU without network access,
25
+ using generated data and `tests/fixtures`.
26
+
27
+ ## Code style
28
+
29
+ - Small modules, plain functions and dataclasses. The code should read on its own; add a short prose
30
+ docstring to public functions that need one.
31
+ - Explicit input checks that raise a `ValueError` with a clear message.
32
+ - Line length 100 and the lint rules in `pyproject.toml`. The code is not auto-formatted, so
33
+ match the layout of the code around your change.
34
+
35
+ ## Forecasts and training
36
+
37
+ Keep forecasts, training losses and weights identical. For changes that alter outputs, document
38
+ the reason and measure the effect, such as benchmark scores before and after. Put new training
39
+ features behind a config option whose default leaves the recipe unchanged.
40
+
41
+ ## Releasing
42
+
43
+ 1. Open a PR that sets the version in `pyproject.toml`, `src/simons/__init__.py` and
44
+ `CITATION.cff` (with `date-released`), and moves the `Unreleased` entries in `CHANGELOG.md`
45
+ under the new version. Merge it.
46
+ 2. Publish a GitHub release with the tag `v<version>` on that commit.
47
+ 3. Approve the `pypi` deployment in the Publish workflow run. It checks that the tag matches the
48
+ version, builds the package and uploads it to PyPI as `simons-forecasting`.
@@ -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.