ohagi 1.0.0__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 (135) hide show
  1. ohagi-1.0.0/AUTHORS +4 -0
  2. ohagi-1.0.0/CHANGELOG.md +43 -0
  3. ohagi-1.0.0/CITATION.bib +8 -0
  4. ohagi-1.0.0/CITATION.cff +10 -0
  5. ohagi-1.0.0/CONTRIBUTING.md +172 -0
  6. ohagi-1.0.0/LICENSE +201 -0
  7. ohagi-1.0.0/MANIFEST.in +4 -0
  8. ohagi-1.0.0/NOTICE +12 -0
  9. ohagi-1.0.0/PKG-INFO +233 -0
  10. ohagi-1.0.0/README.md +169 -0
  11. ohagi-1.0.0/assets/hardnet-architecture.png +0 -0
  12. ohagi-1.0.0/assets/ohagi-logo.png +0 -0
  13. ohagi-1.0.0/docs/BUILD.md +40 -0
  14. ohagi-1.0.0/docs/COMPATIBILITY.md +34 -0
  15. ohagi-1.0.0/docs/CONFIGURATION.md +25 -0
  16. ohagi-1.0.0/docs/ECOSYSTEM.md +18 -0
  17. ohagi-1.0.0/docs/INFERENCE.md +38 -0
  18. ohagi-1.0.0/docs/INSTALL.md +28 -0
  19. ohagi-1.0.0/docs/MIGRATION.md +24 -0
  20. ohagi-1.0.0/docs/PROBLEM.md +37 -0
  21. ohagi-1.0.0/docs/PUBLISHING.md +114 -0
  22. ohagi-1.0.0/docs/_static/custom.css +7 -0
  23. ohagi-1.0.0/docs/api/backbones.rst +23 -0
  24. ohagi-1.0.0/docs/api/checkpoints.rst +9 -0
  25. ohagi-1.0.0/docs/api/index.rst +14 -0
  26. ohagi-1.0.0/docs/api/inference.rst +12 -0
  27. ohagi-1.0.0/docs/api/losses.rst +12 -0
  28. ohagi-1.0.0/docs/api/model.rst +17 -0
  29. ohagi-1.0.0/docs/artifacts.md +39 -0
  30. ohagi-1.0.0/docs/changelog.rst +7 -0
  31. ohagi-1.0.0/docs/citations.rst +8 -0
  32. ohagi-1.0.0/docs/conf.py +55 -0
  33. ohagi-1.0.0/docs/contributing.rst +7 -0
  34. ohagi-1.0.0/docs/examples/deployment.py +27 -0
  35. ohagi-1.0.0/docs/examples/deployment.rst +12 -0
  36. ohagi-1.0.0/docs/examples/index.rst +8 -0
  37. ohagi-1.0.0/docs/examples/quickstart.py +42 -0
  38. ohagi-1.0.0/docs/examples/quickstart.rst +25 -0
  39. ohagi-1.0.0/docs/index.rst +50 -0
  40. ohagi-1.0.0/docs/license.rst +11 -0
  41. ohagi-1.0.0/docs/requirements.txt +8 -0
  42. ohagi-1.0.0/docs/user-guide/index.rst +11 -0
  43. ohagi-1.0.0/pyproject.toml +75 -0
  44. ohagi-1.0.0/setup.cfg +4 -0
  45. ohagi-1.0.0/src/ohagi/__init__.py +65 -0
  46. ohagi-1.0.0/src/ohagi/_projection_aliases.py +198 -0
  47. ohagi-1.0.0/src/ohagi/_utils/__init__.py +8 -0
  48. ohagi-1.0.0/src/ohagi/_utils/serialization.py +68 -0
  49. ohagi-1.0.0/src/ohagi/_utils/tree.py +23 -0
  50. ohagi-1.0.0/src/ohagi/compat/__init__.py +5 -0
  51. ohagi-1.0.0/src/ohagi/compat/aliases.py +87 -0
  52. ohagi-1.0.0/src/ohagi/compat/paths.py +9 -0
  53. ohagi-1.0.0/src/ohagi/compat/plugins.py +94 -0
  54. ohagi-1.0.0/src/ohagi/data/__init__.py +4 -0
  55. ohagi-1.0.0/src/ohagi/data/batching.py +70 -0
  56. ohagi-1.0.0/src/ohagi/data/sampling.py +259 -0
  57. ohagi-1.0.0/src/ohagi/execution/__init__.py +7 -0
  58. ohagi-1.0.0/src/ohagi/execution/inference.py +17 -0
  59. ohagi-1.0.0/src/ohagi/export/__init__.py +48 -0
  60. ohagi-1.0.0/src/ohagi/export/artifacts.py +38 -0
  61. ohagi-1.0.0/src/ohagi/export/manifest.py +15 -0
  62. ohagi-1.0.0/src/ohagi/export/weights.py +86 -0
  63. ohagi-1.0.0/src/ohagi/inference.py +355 -0
  64. ohagi-1.0.0/src/ohagi/io/__init__.py +8 -0
  65. ohagi-1.0.0/src/ohagi/io/_orbax_compat.py +40 -0
  66. ohagi-1.0.0/src/ohagi/io/checkpoints.py +83 -0
  67. ohagi-1.0.0/src/ohagi/io/orbax.py +124 -0
  68. ohagi-1.0.0/src/ohagi/losses/__init__.py +40 -0
  69. ohagi-1.0.0/src/ohagi/losses/config.py +103 -0
  70. ohagi-1.0.0/src/ohagi/losses/core.py +204 -0
  71. ohagi-1.0.0/src/ohagi/losses/lagrangian.py +73 -0
  72. ohagi-1.0.0/src/ohagi/losses/residual.py +12 -0
  73. ohagi-1.0.0/src/ohagi/metrics/__init__.py +26 -0
  74. ohagi-1.0.0/src/ohagi/model_types.py +34 -0
  75. ohagi-1.0.0/src/ohagi/models/__init__.py +3 -0
  76. ohagi-1.0.0/src/ohagi/models/composition.py +27 -0
  77. ohagi-1.0.0/src/ohagi/models/projected.py +116 -0
  78. ohagi-1.0.0/src/ohagi/nn/__init__.py +68 -0
  79. ohagi-1.0.0/src/ohagi/nn/adapters/__init__.py +11 -0
  80. ohagi-1.0.0/src/ohagi/nn/adapters/flax.py +34 -0
  81. ohagi-1.0.0/src/ohagi/nn/adapters/flax_functional.py +100 -0
  82. ohagi-1.0.0/src/ohagi/nn/adapters/linen.py +51 -0
  83. ohagi-1.0.0/src/ohagi/nn/adapters/projected_mlp.py +24 -0
  84. ohagi-1.0.0/src/ohagi/nn/backbone.py +66 -0
  85. ohagi-1.0.0/src/ohagi/nn/config.py +143 -0
  86. ohagi-1.0.0/src/ohagi/nn/layers/__init__.py +58 -0
  87. ohagi-1.0.0/src/ohagi/nn/layers/activations.py +50 -0
  88. ohagi-1.0.0/src/ohagi/nn/layers/combinators.py +100 -0
  89. ohagi-1.0.0/src/ohagi/nn/layers/core.py +94 -0
  90. ohagi-1.0.0/src/ohagi/nn/layers/linear.py +62 -0
  91. ohagi-1.0.0/src/ohagi/nn/mlp.py +113 -0
  92. ohagi-1.0.0/src/ohagi/nn/outputs.py +81 -0
  93. ohagi-1.0.0/src/ohagi/optim/__init__.py +4 -0
  94. ohagi-1.0.0/src/ohagi/reporting/__init__.py +3 -0
  95. ohagi-1.0.0/src/ohagi/reporting/history.py +33 -0
  96. ohagi-1.0.0/src/ohagi/serialization/__init__.py +5 -0
  97. ohagi-1.0.0/src/ohagi/serialization/_jax.py +55 -0
  98. ohagi-1.0.0/src/ohagi/serialization/bundle.py +47 -0
  99. ohagi-1.0.0/src/ohagi/serialization/metadata.py +20 -0
  100. ohagi-1.0.0/src/ohagi/serialization/predictor.py +345 -0
  101. ohagi-1.0.0/src/ohagi/serialization/problem.py +98 -0
  102. ohagi-1.0.0/src/ohagi/training/__init__.py +69 -0
  103. ohagi-1.0.0/src/ohagi/training/_batch.py +120 -0
  104. ohagi-1.0.0/src/ohagi/training/_engine.py +95 -0
  105. ohagi-1.0.0/src/ohagi/training/config.py +65 -0
  106. ohagi-1.0.0/src/ohagi/training/engine.py +204 -0
  107. ohagi-1.0.0/src/ohagi/training/logging.py +155 -0
  108. ohagi-1.0.0/src/ohagi/training/projected.py +2438 -0
  109. ohagi-1.0.0/src/ohagi/training/runner.py +24 -0
  110. ohagi-1.0.0/src/ohagi/training/schedules.py +33 -0
  111. ohagi-1.0.0/src/ohagi/training/state.py +90 -0
  112. ohagi-1.0.0/src/ohagi/training/stateful.py +121 -0
  113. ohagi-1.0.0/src/ohagi/training/steps.py +229 -0
  114. ohagi-1.0.0/src/ohagi/transforms/__init__.py +6 -0
  115. ohagi-1.0.0/src/ohagi/transforms/scaling.py +60 -0
  116. ohagi-1.0.0/src/ohagi.egg-info/PKG-INFO +233 -0
  117. ohagi-1.0.0/src/ohagi.egg-info/SOURCES.txt +133 -0
  118. ohagi-1.0.0/src/ohagi.egg-info/dependency_links.txt +1 -0
  119. ohagi-1.0.0/src/ohagi.egg-info/requires.txt +46 -0
  120. ohagi-1.0.0/src/ohagi.egg-info/top_level.txt +1 -0
  121. ohagi-1.0.0/tests/test_checkpoints.py +70 -0
  122. ohagi-1.0.0/tests/test_engine.py +87 -0
  123. ohagi-1.0.0/tests/test_engine_inference_contracts.py +242 -0
  124. ohagi-1.0.0/tests/test_extension_contracts.py +104 -0
  125. ohagi-1.0.0/tests/test_inference.py +73 -0
  126. ohagi-1.0.0/tests/test_layers.py +168 -0
  127. ohagi-1.0.0/tests/test_losses.py +134 -0
  128. ohagi-1.0.0/tests/test_optional.py +81 -0
  129. ohagi-1.0.0/tests/test_optional_stateful.py +122 -0
  130. ohagi-1.0.0/tests/test_predictor_definitions.py +158 -0
  131. ohagi-1.0.0/tests/test_projected_training.py +221 -0
  132. ohagi-1.0.0/tests/test_readme.py +16 -0
  133. ohagi-1.0.0/tests/test_runtime_configurations.py +30 -0
  134. ohagi-1.0.0/tests/test_sampling.py +130 -0
  135. ohagi-1.0.0/tests/test_support.py +196 -0
ohagi-1.0.0/AUTHORS ADDED
@@ -0,0 +1,4 @@
1
+ SOULS-TAMU contributors
2
+
3
+ Upstream research authors include Rahul Golder,
4
+ Bimol Nath Roy, and M. M. Faruque Hasan. See CITATION.bib and NOTICE.
@@ -0,0 +1,43 @@
1
+ # Changelog
2
+
3
+ Notable changes to OHAGI are recorded here. This history starts with the
4
+ initial public version; internal development steps are not separate releases.
5
+ The initial release is still in preparation, so no release date is assigned.
6
+
7
+ ## 1.0.0 — Unreleased
8
+
9
+ - Promote the shared-stack implementation to `main`; preserve the previous main in `v0.1.0`.
10
+ - Align main-branch installation links, badges and citation metadata.
11
+
12
+ ### Added
13
+
14
+ - Added stateful update-rejection, early-stopping, compiled-epoch, metadata-validation
15
+ and extension-registry regression tests.
16
+
17
+ - API, numerical, frontend integration, dependency review, documentation,
18
+ quality regression and informational performance workflows.
19
+
20
+ - Expanded numerical, training, artifact and optional-adapter regression tests,
21
+ with an inclusive 90% combined statement-and-branch coverage gate.
22
+
23
+ - Cross-platform CPU CI for Linux, Windows and Apple Silicon macOS, with
24
+ baseline/current JAX, runtime configuration artifacts and ARM64 coverage.
25
+
26
+ - GitHub Actions CI for numerical tests, package checks and Ruff, with measured
27
+ branch coverage reporting and scheduled Python CodeQL analysis.
28
+
29
+ - A shared JAX learning engine for the KKTHN, DAEHN and NLPOPTNet frontends,
30
+ with framework-specific problem definitions supplied by those packages.
31
+ - Projected neural models using PURIN's projection algorithms and kernels.
32
+ - Functional JAX backbones and optional Flax backbone adapters.
33
+ - Shared training, optimizer and batching utilities, with optional Optax
34
+ integration and Orbax training checkpoints.
35
+ - A shared JAX model bundle for export and loading through `metadata.json`,
36
+ supporting repeated single-instance inference.
37
+ - Python package metadata, an executable quick start, model artifact
38
+ documentation and contribution guidance.
39
+ - Apache-2.0 licensing and machine-readable software citation metadata.
40
+
41
+ ### Fixed
42
+
43
+ - Preserve training-state buffers when discarding a donated Flax warmup update.
@@ -0,0 +1,8 @@
1
+ @misc{ohagi,
2
+ author = {{SOULS-TAMU contributors}},
3
+ title = {{OHAGI}: A shared {JAX} engine for hard-constrained neural networks},
4
+ howpublished = {Computer software},
5
+ version = {1.0.0},
6
+ url = {https://github.com/SOULS-TAMU/Ohagi},
7
+ note = {Version 1.0.0, initial release in preparation. Licensed under Apache-2.0}
8
+ }
@@ -0,0 +1,10 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use OHAGI, please cite this software. A BibTeX entry is available in CITATION.bib."
3
+ type: software
4
+ title: "OHAGI: A shared JAX engine for hard-constrained neural networks"
5
+ authors:
6
+ - name: "SOULS-TAMU contributors"
7
+ version: "1.0.0"
8
+ url: "https://github.com/SOULS-TAMU/Ohagi"
9
+ repository-code: "https://github.com/SOULS-TAMU/Ohagi"
10
+ license: Apache-2.0
@@ -0,0 +1,172 @@
1
+ # Contributing to OHAGI
2
+
3
+ Thank you for helping improve OHAGI. Bug reports, documentation fixes,
4
+ examples and numerical improvements are welcome. This guide accompanies
5
+ the first public version of the project.
6
+
7
+ ## Before you start
8
+
9
+ For a small fix, open a focused pull request. For a new public API, dependency
10
+ or change to numerical behavior, open an issue first so the design can be
11
+ discussed before implementation.
12
+
13
+ Bug reports should include a minimal reproducer, the expected and observed
14
+ behavior, package versions, device, precision settings and random seed.
15
+ Include the traceback when an exception occurs. Remove private data and
16
+ credentials from examples and logs.
17
+
18
+ ## Development setup
19
+
20
+ Use Python 3.10 or newer in an isolated environment. With sibling OHAGI and
21
+ PURIN source checkouts, run the following from their parent directory:
22
+
23
+ ```sh
24
+ python -m pip install -e ./purin -e "./ohagi[dev]"
25
+ ```
26
+
27
+ Install optional features only when needed:
28
+
29
+ ```sh
30
+ python -m pip install -e "./ohagi[flax,orbax,optax,plotting]"
31
+ ```
32
+
33
+ For frontend integration work, also install the relevant KKTHN, DAEHN or
34
+ NLPOPTNet checkout in editable mode. Follow the
35
+ [JAX installation instructions](https://docs.jax.dev/en/latest/installation.html)
36
+ for your device. See the [README](README.md) for a runnable quick start.
37
+
38
+ ## Keep responsibilities clear
39
+
40
+ OHAGI owns the shared learning engine: backbone adapters, training, model
41
+ export and metadata-driven inference. PURIN owns projection algorithms and
42
+ numerical kernels. KKTHN, DAEHN and NLPOPTNet own their problem definitions
43
+ and framework-specific policies.
44
+
45
+ Keep these dependencies directed toward the shared libraries. Do not add
46
+ frontend imports to OHAGI or copy projection solvers into it. Reuse the
47
+ shared engine instead of introducing a separate training or inference path.
48
+
49
+ ## Code and documentation
50
+
51
+ Use descriptive names, small functions and Google-style docstrings for
52
+ public APIs. Document array shapes, coordinate conventions, residual signs
53
+ and gradient behavior where they affect callers. Explain mathematical
54
+ choices and invariants in comments; avoid restating the code.
55
+
56
+ Run these checks from the OHAGI directory:
57
+
58
+ ```sh
59
+ python -m ruff format --check src
60
+ python -m ruff check --select F,E9 src
61
+ ```
62
+
63
+ Use `python -m ruff format src` to apply formatting. Keep unrelated formatting
64
+ changes out of a pull request, and leave benchmark scripts unchanged unless
65
+ the proposed change specifically concerns them.
66
+
67
+ ## Validate your change
68
+
69
+ Include a focused regression test or a reproducible validation script with
70
+ the pull request. Record the commands, environment and results so another
71
+ contributor can repeat the checks. Run the README quick start for changes
72
+ that affect installation or the public workflow.
73
+
74
+ Match validation to the affected behavior:
75
+
76
+ | Change | Required comparison |
77
+ | --- | --- |
78
+ | Numerical or projection interfaces | Outputs, parameter gradients and constraint residuals against the previous implementation. |
79
+ | Training or checkpoint handling | Training histories and parameters, including resumed versus uninterrupted training. |
80
+ | Export or inference | Export, reload through `metadata.json` in a fresh process, and repeated single-instance predictions. |
81
+ | Public interfaces | Signatures, aliases and the relevant unchanged frontend benchmark scripts. |
82
+ | Restructuring or documentation | Confirm executable behavior is unchanged; check examples and links. |
83
+
84
+ Use identical inputs, seeds, JAX versions, devices and precision settings for
85
+ numerical comparisons. Report tolerances explicitly and investigate any
86
+ difference. Separate intentional numerical changes from restructuring.
87
+ For inference timing, warm up compilation and synchronize device execution.
88
+
89
+ The [model artifact guide](docs/artifacts.md) describes inference bundles
90
+ and training checkpoints. Preserve their documented contracts.
91
+
92
+ ## Packaging checks
93
+
94
+ From the OHAGI directory, build and validate distributions:
95
+
96
+ ```sh
97
+ python -m pip install build twine
98
+ python -m build
99
+ python -m twine check dist/*
100
+ ```
101
+
102
+ Install the built wheel in a separate environment with PURIN available and
103
+ exercise the affected public workflow. Do not commit environments, caches,
104
+ build output, generated results or checkpoints.
105
+
106
+ ## Pull request checklist
107
+
108
+ - Explain the problem and the resulting behavior.
109
+ - Keep the change focused and identify any compatibility implications.
110
+ - Include reproducible validation results and numerical tolerances.
111
+ - Update documentation and the appropriate unreleased changelog entry.
112
+ - Preserve benchmark APIs and metadata-driven inference unless an API change
113
+ has been explicitly agreed.
114
+
115
+ Contributions are provided under the project's [Apache-2.0 license](LICENSE).
116
+ Preserve relevant attribution in [AUTHORS](AUTHORS) and [NOTICE](NOTICE).
117
+ Keep [CITATION.bib](CITATION.bib) and [CITATION.cff](CITATION.cff) consistent.
118
+ The CFF metadata supports GitHub's citation panel; BibTeX remains available directly.
119
+
120
+ ## Automated checks
121
+
122
+ CI runs the full numerical suite on CPU across these configurations:
123
+
124
+ | Platform | Python | JAX configuration |
125
+ | --- | --- | --- |
126
+ | Linux x86-64, Windows x86-64, macOS Apple Silicon | 3.10–3.14 | Newest compatible dependencies for each interpreter. |
127
+ | Linux x86-64, Windows x86-64, macOS Apple Silicon | 3.12 | JAX/JAXlib 0.6.2 baseline. |
128
+ | Linux ARM64 | 3.13 | Newest compatible dependencies. |
129
+
130
+ The configuration tests additionally exercise float32/float64, eager/JIT
131
+ execution and batch sizes one and four for the equality projection and
132
+ functional backbone interfaces. Full solver regression tests use float64.
133
+ Ruff runs on Linux; wheel and source-distribution builds and installation
134
+ checks run on Linux, Windows and macOS. Each core test job uploads its OS,
135
+ architecture, Python, package versions and JAX devices as a diagnostic artifact.
136
+ The test suite is in `tests/`. CPU results do not establish GPU/TPU support.
137
+
138
+ Flax, Optax and Orbax have separate integration jobs on all three OSes.
139
+ Another job exports float32/float64 inference bundles on Linux and reloads
140
+ the same artifacts on Linux, Windows and macOS using the exporter's JAX
141
+ version. It exercises repeated single-instance inference from `metadata.json`.
142
+
143
+ Install the test dependencies with `python -m pip install ".[test]"`, then run:
144
+
145
+ ```sh
146
+ python -m pip install ".[test,flax,orbax,optax,plotting]"
147
+ python -m pytest -q --cov=ohagi --cov-branch --cov-report=term-missing --cov-report=xml --cov-report=json
148
+ ```
149
+
150
+ Coverage measures the entire package, including unexecuted modules. The badge
151
+ combines statement and branch coverage from the Linux x86-64 / Python 3.12 / current-JAX full test run, including the optional adapters.
152
+ Reports are retained as workflow artifacts; the badge and measured totals are
153
+ published to `codex/coverage` after successful trusted pushes to `main`.
154
+ Pull requests run checks with read-only repository access and do not publish
155
+ coverage. No third-party coverage account or additional secret is required.
156
+
157
+ CodeQL runs extended Python security analysis on pushes, pull requests and a
158
+ weekly schedule. Its badge reports workflow execution status; inspect code
159
+ scanning alerts separately. GitHub Actions dependencies are pinned to commits
160
+ and monitored by Dependabot.
161
+
162
+ The combined statement-and-branch coverage floor is 90%. All source modules,
163
+ including optional adapters and unexecuted files, remain in the denominator.
164
+ Do not omit modules to improve the score.
165
+
166
+ ## Compatibility and quality regression checks
167
+
168
+ Additional workflows protect public APIs, numerical results and frontend
169
+ integration, validate documentation and dependency changes, and publish code
170
+ quality and performance reports. See the [validation policies](.github/validation/README.md)
171
+ for thresholds, existing baselines and reproduction instructions. Timing changes
172
+ are informational; correctness and quality regressions fail their checks.
ohagi-1.0.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 MM Faruque Hasan, Bimol Nath Roy and Rahul Golder
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ include AUTHORS CHANGELOG.md CITATION.bib CITATION.cff CONTRIBUTING.md NOTICE
2
+
3
+ recursive-include docs *.rst *.md *.py *.css *.html *.json *.txt *.png
4
+ recursive-include assets *.png *.svg
ohagi-1.0.0/NOTICE ADDED
@@ -0,0 +1,12 @@
1
+ OHAGI
2
+
3
+ Copyright (c) 2025 SOULS-TAMU
4
+
5
+ Part of the HardNet stack maintained from SOULS-TAMU implementations.
6
+ KKT-HardNet, DAEHN, and NLPOpt-Net contributions retain their
7
+ upstream authorship and applicable license terms.
8
+ Original repositories: https://github.com/SOULS-TAMU/kkt-hardnet
9
+ and https://github.com/SOULS-TAMU/nlpoptnet.
10
+
11
+ The current project is licensed under the Apache License, Version 2.0.
12
+ See LICENSE for the full terms.