tysirai 0.0.1__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 (176) hide show
  1. tysirai-0.0.1/.gitignore +13 -0
  2. tysirai-0.0.1/LICENSE +204 -0
  3. tysirai-0.0.1/NOTICE +5 -0
  4. tysirai-0.0.1/PKG-INFO +138 -0
  5. tysirai-0.0.1/README.md +88 -0
  6. tysirai-0.0.1/native/README.md +3 -0
  7. tysirai-0.0.1/pyproject.toml +104 -0
  8. tysirai-0.0.1/src/tysirai/__init__.py +10 -0
  9. tysirai-0.0.1/src/tysirai/__main__.py +6 -0
  10. tysirai-0.0.1/src/tysirai/api.py +1 -0
  11. tysirai-0.0.1/src/tysirai/backends/__init__.py +1 -0
  12. tysirai-0.0.1/src/tysirai/backends/dlpack.py +4 -0
  13. tysirai-0.0.1/src/tysirai/backends/external.py +1 -0
  14. tysirai-0.0.1/src/tysirai/backends/jax.py +4 -0
  15. tysirai-0.0.1/src/tysirai/backends/numpy_cv.py +4 -0
  16. tysirai-0.0.1/src/tysirai/backends/onnx.py +4 -0
  17. tysirai-0.0.1/src/tysirai/backends/sklearn.py +4 -0
  18. tysirai-0.0.1/src/tysirai/backends/tensorflow.py +4 -0
  19. tysirai-0.0.1/src/tysirai/catalog/__init__.py +1 -0
  20. tysirai-0.0.1/src/tysirai/catalog/annotators.py +1 -0
  21. tysirai-0.0.1/src/tysirai/catalog/cards.py +4 -0
  22. tysirai-0.0.1/src/tysirai/catalog/fetch.py +4 -0
  23. tysirai-0.0.1/src/tysirai/catalog/governance.py +1 -0
  24. tysirai-0.0.1/src/tysirai/catalog/instances.py +1 -0
  25. tysirai-0.0.1/src/tysirai/catalog/overlaps.py +4 -0
  26. tysirai-0.0.1/src/tysirai/catalog/scanner.py +1 -0
  27. tysirai-0.0.1/src/tysirai/catalog/splits.py +1 -0
  28. tysirai-0.0.1/src/tysirai/catalog/tiers.py +1 -0
  29. tysirai-0.0.1/src/tysirai/catalog/views.py +1 -0
  30. tysirai-0.0.1/src/tysirai/classical/__init__.py +1 -0
  31. tysirai-0.0.1/src/tysirai/classical/encoders.py +4 -0
  32. tysirai-0.0.1/src/tysirai/classical/estimators.py +4 -0
  33. tysirai-0.0.1/src/tysirai/classical/features.py +4 -0
  34. tysirai-0.0.1/src/tysirai/classical/subspace.py +4 -0
  35. tysirai-0.0.1/src/tysirai/cli/__init__.py +4 -0
  36. tysirai-0.0.1/src/tysirai/cli/boards.py +1 -0
  37. tysirai-0.0.1/src/tysirai/cli/data.py +1 -0
  38. tysirai-0.0.1/src/tysirai/cli/eval.py +1 -0
  39. tysirai-0.0.1/src/tysirai/cli/hosts.py +1 -0
  40. tysirai-0.0.1/src/tysirai/cli/main.py +176 -0
  41. tysirai-0.0.1/src/tysirai/cli/models.py +1 -0
  42. tysirai-0.0.1/src/tysirai/cli/packs.py +1 -0
  43. tysirai-0.0.1/src/tysirai/cli/runs.py +1 -0
  44. tysirai-0.0.1/src/tysirai/cli/train.py +1 -0
  45. tysirai-0.0.1/src/tysirai/core/__init__.py +1 -0
  46. tysirai-0.0.1/src/tysirai/core/compat/__init__.py +1 -0
  47. tysirai-0.0.1/src/tysirai/core/compat/dtr.py +1 -0
  48. tysirai-0.0.1/src/tysirai/core/compose.py +1 -0
  49. tysirai-0.0.1/src/tysirai/core/executor.py +115 -0
  50. tysirai-0.0.1/src/tysirai/core/graph.py +386 -0
  51. tysirai-0.0.1/src/tysirai/core/model.py +174 -0
  52. tysirai-0.0.1/src/tysirai/core/node.py +106 -0
  53. tysirai-0.0.1/src/tysirai/core/registry.py +233 -0
  54. tysirai-0.0.1/src/tysirai/core/schema/__init__.py +29 -0
  55. tysirai-0.0.1/src/tysirai/core/schema/export.py +24 -0
  56. tysirai-0.0.1/src/tysirai/core/schema/graph.py +172 -0
  57. tysirai-0.0.1/src/tysirai/core/schema/migrate.py +86 -0
  58. tysirai-0.0.1/src/tysirai/core/schema/nodes.py +75 -0
  59. tysirai-0.0.1/src/tysirai/core/schema/runtime.py +35 -0
  60. tysirai-0.0.1/src/tysirai/core/taxonomy.py +1 -0
  61. tysirai-0.0.1/src/tysirai/core/types.py +242 -0
  62. tysirai-0.0.1/src/tysirai/core/versions.py +46 -0
  63. tysirai-0.0.1/src/tysirai/data/__init__.py +1 -0
  64. tysirai-0.0.1/src/tysirai/data/axes.py +1 -0
  65. tysirai-0.0.1/src/tysirai/data/codecs/__init__.py +4 -0
  66. tysirai-0.0.1/src/tysirai/data/frames.py +1 -0
  67. tysirai-0.0.1/src/tysirai/data/items.py +1 -0
  68. tysirai-0.0.1/src/tysirai/data/loaders.py +4 -0
  69. tysirai-0.0.1/src/tysirai/data/modalities/__init__.py +1 -0
  70. tysirai-0.0.1/src/tysirai/data/modalities/image.py +1 -0
  71. tysirai-0.0.1/src/tysirai/data/modalities/text.py +1 -0
  72. tysirai-0.0.1/src/tysirai/data/readers/__init__.py +4 -0
  73. tysirai-0.0.1/src/tysirai/data/readers/image.py +4 -0
  74. tysirai-0.0.1/src/tysirai/data/readers/layout.py +4 -0
  75. tysirai-0.0.1/src/tysirai/data/readers/lmdb.py +4 -0
  76. tysirai-0.0.1/src/tysirai/data/readers/tables.py +4 -0
  77. tysirai-0.0.1/src/tysirai/data/storage.py +4 -0
  78. tysirai-0.0.1/src/tysirai/data/transforms.py +4 -0
  79. tysirai-0.0.1/src/tysirai/eval/__init__.py +1 -0
  80. tysirai-0.0.1/src/tysirai/eval/cache.py +4 -0
  81. tysirai-0.0.1/src/tysirai/eval/complexity.py +4 -0
  82. tysirai-0.0.1/src/tysirai/eval/evaluator.py +1 -0
  83. tysirai-0.0.1/src/tysirai/eval/metrics/__init__.py +4 -0
  84. tysirai-0.0.1/src/tysirai/eval/metrics/classification.py +4 -0
  85. tysirai-0.0.1/src/tysirai/eval/metrics/regression.py +4 -0
  86. tysirai-0.0.1/src/tysirai/eval/metrics/text.py +4 -0
  87. tysirai-0.0.1/src/tysirai/eval/protocol.py +4 -0
  88. tysirai-0.0.1/src/tysirai/eval/stats.py +4 -0
  89. tysirai-0.0.1/src/tysirai/hosts/__init__.py +1 -0
  90. tysirai-0.0.1/src/tysirai/hosts/base.py +4 -0
  91. tysirai-0.0.1/src/tysirai/hosts/config.py +4 -0
  92. tysirai-0.0.1/src/tysirai/hosts/exporters/__init__.py +1 -0
  93. tysirai-0.0.1/src/tysirai/hosts/exporters/huggingface.py +4 -0
  94. tysirai-0.0.1/src/tysirai/hosts/filesystem.py +4 -0
  95. tysirai-0.0.1/src/tysirai/hosts/huggingface.py +4 -0
  96. tysirai-0.0.1/src/tysirai/hosts/integrity.py +4 -0
  97. tysirai-0.0.1/src/tysirai/hosts/names.py +4 -0
  98. tysirai-0.0.1/src/tysirai/models/__init__.py +1 -0
  99. tysirai-0.0.1/src/tysirai/models/adapters/__init__.py +1 -0
  100. tysirai-0.0.1/src/tysirai/models/adapters/open_clip.py +4 -0
  101. tysirai-0.0.1/src/tysirai/models/adapters/timm.py +4 -0
  102. tysirai-0.0.1/src/tysirai/models/adapters/torchvision.py +4 -0
  103. tysirai-0.0.1/src/tysirai/models/adapters/transformers.py +4 -0
  104. tysirai-0.0.1/src/tysirai/models/cards.py +4 -0
  105. tysirai-0.0.1/src/tysirai/models/fidelity.py +1 -0
  106. tysirai-0.0.1/src/tysirai/models/remake.py +1 -0
  107. tysirai-0.0.1/src/tysirai/models/remap.py +4 -0
  108. tysirai-0.0.1/src/tysirai/models/safety.py +4 -0
  109. tysirai-0.0.1/src/tysirai/models/scanner.py +1 -0
  110. tysirai-0.0.1/src/tysirai/nodes/__init__.py +9 -0
  111. tysirai-0.0.1/src/tysirai/nodes/backbones.py +4 -0
  112. tysirai-0.0.1/src/tysirai/nodes/decode.py +4 -0
  113. tysirai-0.0.1/src/tysirai/nodes/glue.py +1 -0
  114. tysirai-0.0.1/src/tysirai/nodes/heads.py +45 -0
  115. tysirai-0.0.1/src/tysirai/nodes/preprocess.py +4 -0
  116. tysirai-0.0.1/src/tysirai/packs/__init__.py +1 -0
  117. tysirai-0.0.1/src/tysirai/packs/age/__init__.py +1 -0
  118. tysirai-0.0.1/src/tysirai/packs/age/blueprints/.gitkeep +0 -0
  119. tysirai-0.0.1/src/tysirai/packs/age/faces.py +4 -0
  120. tysirai-0.0.1/src/tysirai/packs/age/metrics.py +4 -0
  121. tysirai-0.0.1/src/tysirai/packs/age/pack.yaml +3 -0
  122. tysirai-0.0.1/src/tysirai/packs/age/protocols/.gitkeep +0 -0
  123. tysirai-0.0.1/src/tysirai/packs/age/recipes/.gitkeep +0 -0
  124. tysirai-0.0.1/src/tysirai/packs/age/taxonomy.yaml +1 -0
  125. tysirai-0.0.1/src/tysirai/packs/age/views/.gitkeep +0 -0
  126. tysirai-0.0.1/src/tysirai/packs/str/__init__.py +1 -0
  127. tysirai-0.0.1/src/tysirai/packs/str/blueprints/.gitkeep +0 -0
  128. tysirai-0.0.1/src/tysirai/packs/str/nodes.py +4 -0
  129. tysirai-0.0.1/src/tysirai/packs/str/pack.yaml +3 -0
  130. tysirai-0.0.1/src/tysirai/packs/str/protocols/.gitkeep +0 -0
  131. tysirai-0.0.1/src/tysirai/packs/str/recipes/.gitkeep +0 -0
  132. tysirai-0.0.1/src/tysirai/packs/str/taxonomy.yaml +1 -0
  133. tysirai-0.0.1/src/tysirai/packs/str/tokenizers.py +1 -0
  134. tysirai-0.0.1/src/tysirai/packs/str/views/.gitkeep +0 -0
  135. tysirai-0.0.1/src/tysirai/py.typed +0 -0
  136. tysirai-0.0.1/src/tysirai/runtime/__init__.py +1 -0
  137. tysirai-0.0.1/src/tysirai/runtime/control.py +1 -0
  138. tysirai-0.0.1/src/tysirai/runtime/links.py +1 -0
  139. tysirai-0.0.1/src/tysirai/runtime/placement.py +4 -0
  140. tysirai-0.0.1/src/tysirai/runtime/serve/__init__.py +1 -0
  141. tysirai-0.0.1/src/tysirai/runtime/stream.py +1 -0
  142. tysirai-0.0.1/src/tysirai/train/__init__.py +1 -0
  143. tysirai-0.0.1/src/tysirai/train/adapters.py +4 -0
  144. tysirai-0.0.1/src/tysirai/train/checkpoint.py +4 -0
  145. tysirai-0.0.1/src/tysirai/train/features.py +1 -0
  146. tysirai-0.0.1/src/tysirai/train/losses/__init__.py +4 -0
  147. tysirai-0.0.1/src/tysirai/train/losses/classification.py +4 -0
  148. tysirai-0.0.1/src/tysirai/train/losses/distribution.py +4 -0
  149. tysirai-0.0.1/src/tysirai/train/losses/ordinal.py +4 -0
  150. tysirai-0.0.1/src/tysirai/train/losses/regression.py +4 -0
  151. tysirai-0.0.1/src/tysirai/train/losses/sequence.py +4 -0
  152. tysirai-0.0.1/src/tysirai/train/parallel.py +4 -0
  153. tysirai-0.0.1/src/tysirai/train/recipe.py +4 -0
  154. tysirai-0.0.1/src/tysirai/train/shards.py +4 -0
  155. tysirai-0.0.1/src/tysirai/train/sweep.py +4 -0
  156. tysirai-0.0.1/src/tysirai/train/trainer.py +4 -0
  157. tysirai-0.0.1/src/tysirai/vlm/__init__.py +1 -0
  158. tysirai-0.0.1/src/tysirai/vlm/generate.py +4 -0
  159. tysirai-0.0.1/src/tysirai/vlm/parsers.py +1 -0
  160. tysirai-0.0.1/src/tysirai/vlm/prompts.py +4 -0
  161. tysirai-0.0.1/tests/conftest.py +35 -0
  162. tysirai-0.0.1/tests/equivalence/.gitkeep +0 -0
  163. tysirai-0.0.1/tests/fidelity/.gitkeep +0 -0
  164. tysirai-0.0.1/tests/fixtures/.gitkeep +0 -0
  165. tysirai-0.0.1/tests/integration/.gitkeep +0 -0
  166. tysirai-0.0.1/tests/unit/test_cli.py +147 -0
  167. tysirai-0.0.1/tests/unit/test_examples.py +39 -0
  168. tysirai-0.0.1/tests/unit/test_executor.py +138 -0
  169. tysirai-0.0.1/tests/unit/test_graph.py +179 -0
  170. tysirai-0.0.1/tests/unit/test_migrate.py +74 -0
  171. tysirai-0.0.1/tests/unit/test_model.py +97 -0
  172. tysirai-0.0.1/tests/unit/test_package.py +35 -0
  173. tysirai-0.0.1/tests/unit/test_registry.py +222 -0
  174. tysirai-0.0.1/tests/unit/test_schema.py +145 -0
  175. tysirai-0.0.1/tests/unit/test_types.py +99 -0
  176. tysirai-0.0.1/tests/zoo/.gitkeep +0 -0
@@ -0,0 +1,13 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ build/
5
+ dist/
6
+ .venv/
7
+ .pytest_cache/
8
+ .ruff_cache/
9
+ .mypy_cache/
10
+ runs/
11
+ *.safetensors
12
+ *.pt
13
+ *.ckpt
tysirai-0.0.1/LICENSE ADDED
@@ -0,0 +1,204 @@
1
+ Copyright 2026 Salah Eddine Bekhouche and the TysirAI contributors
2
+
3
+
4
+ Apache License
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ 1. Definitions.
11
+
12
+ "License" shall mean the terms and conditions for use, reproduction,
13
+ and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by
16
+ the copyright owner that is granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based on (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and Derivative Works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, patent, trademark, and
105
+ attribution notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" text file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE text file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright statement to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "printed page" as the copyright notice for easier
190
+ identification within third-party archives.
191
+
192
+ Copyright [yyyy] [name of copyright owner]
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
tysirai-0.0.1/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ TysirAI
2
+ Copyright 2026 Salah Eddine Bekhouche and the TysirAI contributors
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+ Models and datasets referenced by the framework keep their own licenses, recorded in their cards.
tysirai-0.0.1/PKG-INFO ADDED
@@ -0,0 +1,138 @@
1
+ Metadata-Version: 2.5
2
+ Name: tysirai
3
+ Version: 0.0.1
4
+ Summary: One framework for the datasets and models of a field: load, evaluate, train, compose.
5
+ Project-URL: Homepage, https://tysirai.com
6
+ Project-URL: Repository, https://github.com/tysirai/tysirai
7
+ Project-URL: Issues, https://github.com/tysirai/tysirai/issues
8
+ Author: Salah Eddine Bekhouche
9
+ License-Expression: Apache-2.0
10
+ License-File: LICENSE
11
+ License-File: NOTICE
12
+ Keywords: benchmark,computer vision,deep learning,graph,pytorch
13
+ Classifier: Development Status :: 2 - Pre-Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
21
+ Requires-Python: >=3.11
22
+ Requires-Dist: numpy>=1.26
23
+ Requires-Dist: packaging>=24.0
24
+ Requires-Dist: pydantic>=2.7
25
+ Requires-Dist: pyyaml>=6.0
26
+ Requires-Dist: rich>=13.7
27
+ Requires-Dist: safetensors>=0.4
28
+ Requires-Dist: torch>=2.4
29
+ Requires-Dist: typer>=0.12
30
+ Provides-Extra: classical
31
+ Provides-Extra: data
32
+ Provides-Extra: dev
33
+ Requires-Dist: mypy>=1.11; extra == 'dev'
34
+ Requires-Dist: pre-commit>=3.7; extra == 'dev'
35
+ Requires-Dist: pytest-cov>=5; extra == 'dev'
36
+ Requires-Dist: pytest>=8; extra == 'dev'
37
+ Requires-Dist: ruff>=0.6; extra == 'dev'
38
+ Requires-Dist: types-pyyaml; extra == 'dev'
39
+ Provides-Extra: face
40
+ Provides-Extra: hf
41
+ Provides-Extra: jax
42
+ Provides-Extra: onnx
43
+ Provides-Extra: report
44
+ Provides-Extra: tensorflow
45
+ Provides-Extra: text
46
+ Provides-Extra: train
47
+ Provides-Extra: vision
48
+ Provides-Extra: vlm
49
+ Description-Content-Type: text/markdown
50
+
51
+ # TysirAI
52
+
53
+ **One framework from research to deployment.** TysirAI loads the major datasets of a field in a uniform way, runs old and new models (including vision-language models) under one protocol, trains new methods with little code, and reports results that are traceable to their predictions.
54
+
55
+ > **Status:** early development. v0.0.1 provides the graph format, validation, the reference executor and local save and load. Models, datasets, hosts and training come in the next releases.
56
+
57
+ ## Install
58
+
59
+ ```bash
60
+ pip install tysirai
61
+ tysirai --version
62
+ ```
63
+
64
+ From source (for development, or before a release is on PyPI):
65
+
66
+ ```bash
67
+ git clone https://github.com/tysirai/tysirai
68
+ cd tysirai
69
+ pip install .
70
+ ```
71
+
72
+ With uv, run `uv sync` instead, and prefix the commands below with `uv run` (for example
73
+ `uv run tysirai --version`), or activate `.venv` first.
74
+
75
+ Python 3.11 or newer and PyTorch 2.4 or newer.
76
+
77
+ ## Quickstart
78
+
79
+ A model is a graph of nodes declared in JSON or YAML:
80
+
81
+ ```json
82
+ {
83
+ "schema": "graph/1",
84
+ "inputs": {"x": "features"},
85
+ "nodes": {
86
+ "proj": {"type": "torch.nn.Linear", "args": {"in_features": 16, "out_features": 8}, "inputs": {"x": "x"}},
87
+ "act": {"type": "torch.nn.ReLU", "inputs": {"x": "proj:out"}},
88
+ "head": {"type": "cls.LinearHead@1", "args": {"in_features": 8, "num_classes": 3},
89
+ "inputs": {"features": "act:out"}}
90
+ },
91
+ "outputs": {"cls:probs": "head:probs", "cls:label": "head:label"}
92
+ }
93
+ ```
94
+
95
+ ```bash
96
+ tysirai validate classifier.json # no weights loaded; errors name the node and the field
97
+ tysirai describe classifier.json # public inputs, outputs and parameters
98
+ tysirai render classifier.json -f mermaid
99
+ ```
100
+
101
+ ```python
102
+ import torch
103
+ from tysirai.core.model import GraphModel
104
+
105
+ model = GraphModel("classifier.json")
106
+ out = model(x=torch.randn(4, 16))
107
+ model.save_pretrained("my-classifier") # config.json, model.safetensors, tysirai.json
108
+ same = GraphModel.from_pretrained("my-classifier")
109
+ ```
110
+
111
+ More in [docs/quickstart.md](docs/quickstart.md) and [docs/graph-format.md](docs/graph-format.md).
112
+
113
+ ## What it will do
114
+
115
+ - **One graph for every model.** A model is a typed graph of modules, declared in JSON. The same graph is trained, evaluated, attached inside larger stacks, and later served.
116
+ - **End-to-end stacks.** Published components (a detector, an aligner, an age model, a VLM) are attached into one system, with per-component error attribution.
117
+ - **Protocols as configuration.** Splits, preprocessing, metrics and post-processing are versioned files saved with every result.
118
+ - **Catalogs, not hosted data.** Dataset and model cards describe where data and weights come from; a local scanner checks your own copy.
119
+ - **Leaderboards built from predictions.** Every row is a model of our organization, run by us, with its predictions and uncertainty; snapshots are citable.
120
+ - **Old and new methods together.** Classical methods (LBP, SVM), deep models in PyTorch, JAX or ONNX, and VLMs under the same protocol.
121
+
122
+ ## First domains
123
+
124
+ 1. Scene text recognition (11 specialized models, 5 VLMs, 18 datasets).
125
+ 2. Age estimation.
126
+
127
+ ## Contributing
128
+
129
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Every change is a pull request that closes one issue.
130
+
131
+ ## Links
132
+
133
+ - Hugging Face: [huggingface.co/tysirai](https://huggingface.co/tysirai)
134
+ - Website: [tysirai.com](https://tysirai.com)
135
+
136
+ ## License
137
+
138
+ TysirAI is released under the [Apache License 2.0](LICENSE). Models and datasets referenced by the framework keep their own licenses, which are recorded in their cards.
@@ -0,0 +1,88 @@
1
+ # TysirAI
2
+
3
+ **One framework from research to deployment.** TysirAI loads the major datasets of a field in a uniform way, runs old and new models (including vision-language models) under one protocol, trains new methods with little code, and reports results that are traceable to their predictions.
4
+
5
+ > **Status:** early development. v0.0.1 provides the graph format, validation, the reference executor and local save and load. Models, datasets, hosts and training come in the next releases.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ pip install tysirai
11
+ tysirai --version
12
+ ```
13
+
14
+ From source (for development, or before a release is on PyPI):
15
+
16
+ ```bash
17
+ git clone https://github.com/tysirai/tysirai
18
+ cd tysirai
19
+ pip install .
20
+ ```
21
+
22
+ With uv, run `uv sync` instead, and prefix the commands below with `uv run` (for example
23
+ `uv run tysirai --version`), or activate `.venv` first.
24
+
25
+ Python 3.11 or newer and PyTorch 2.4 or newer.
26
+
27
+ ## Quickstart
28
+
29
+ A model is a graph of nodes declared in JSON or YAML:
30
+
31
+ ```json
32
+ {
33
+ "schema": "graph/1",
34
+ "inputs": {"x": "features"},
35
+ "nodes": {
36
+ "proj": {"type": "torch.nn.Linear", "args": {"in_features": 16, "out_features": 8}, "inputs": {"x": "x"}},
37
+ "act": {"type": "torch.nn.ReLU", "inputs": {"x": "proj:out"}},
38
+ "head": {"type": "cls.LinearHead@1", "args": {"in_features": 8, "num_classes": 3},
39
+ "inputs": {"features": "act:out"}}
40
+ },
41
+ "outputs": {"cls:probs": "head:probs", "cls:label": "head:label"}
42
+ }
43
+ ```
44
+
45
+ ```bash
46
+ tysirai validate classifier.json # no weights loaded; errors name the node and the field
47
+ tysirai describe classifier.json # public inputs, outputs and parameters
48
+ tysirai render classifier.json -f mermaid
49
+ ```
50
+
51
+ ```python
52
+ import torch
53
+ from tysirai.core.model import GraphModel
54
+
55
+ model = GraphModel("classifier.json")
56
+ out = model(x=torch.randn(4, 16))
57
+ model.save_pretrained("my-classifier") # config.json, model.safetensors, tysirai.json
58
+ same = GraphModel.from_pretrained("my-classifier")
59
+ ```
60
+
61
+ More in [docs/quickstart.md](docs/quickstart.md) and [docs/graph-format.md](docs/graph-format.md).
62
+
63
+ ## What it will do
64
+
65
+ - **One graph for every model.** A model is a typed graph of modules, declared in JSON. The same graph is trained, evaluated, attached inside larger stacks, and later served.
66
+ - **End-to-end stacks.** Published components (a detector, an aligner, an age model, a VLM) are attached into one system, with per-component error attribution.
67
+ - **Protocols as configuration.** Splits, preprocessing, metrics and post-processing are versioned files saved with every result.
68
+ - **Catalogs, not hosted data.** Dataset and model cards describe where data and weights come from; a local scanner checks your own copy.
69
+ - **Leaderboards built from predictions.** Every row is a model of our organization, run by us, with its predictions and uncertainty; snapshots are citable.
70
+ - **Old and new methods together.** Classical methods (LBP, SVM), deep models in PyTorch, JAX or ONNX, and VLMs under the same protocol.
71
+
72
+ ## First domains
73
+
74
+ 1. Scene text recognition (11 specialized models, 5 VLMs, 18 datasets).
75
+ 2. Age estimation.
76
+
77
+ ## Contributing
78
+
79
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Every change is a pull request that closes one issue.
80
+
81
+ ## Links
82
+
83
+ - Hugging Face: [huggingface.co/tysirai](https://huggingface.co/tysirai)
84
+ - Website: [tysirai.com](https://tysirai.com)
85
+
86
+ ## License
87
+
88
+ TysirAI is released under the [Apache License 2.0](LICENSE). Models and datasets referenced by the framework keep their own licenses, which are recorded in their cards.
@@ -0,0 +1,3 @@
1
+ # native
2
+
3
+ Rust crate (PyO3 + maturin), later, only for parts of the engine that profiling shows are too slow. The Python executor stays the reference.
@@ -0,0 +1,104 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "tysirai"
7
+ version = "0.0.1"
8
+ description = "One framework for the datasets and models of a field: load, evaluate, train, compose."
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE", "NOTICE"]
12
+ authors = [{ name = "Salah Eddine Bekhouche" }]
13
+ requires-python = ">=3.11"
14
+ keywords = ["deep learning", "computer vision", "benchmark", "graph", "pytorch"]
15
+ classifiers = [
16
+ "Development Status :: 2 - Pre-Alpha",
17
+ "Intended Audience :: Science/Research",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ "Programming Language :: Python :: 3.13",
23
+ "Topic :: Scientific/Engineering :: Artificial Intelligence",
24
+ ]
25
+ dependencies = [
26
+ "torch>=2.4",
27
+ "safetensors>=0.4",
28
+ "pydantic>=2.7",
29
+ "numpy>=1.26",
30
+ "pyyaml>=6.0",
31
+ "typer>=0.12",
32
+ "rich>=13.7",
33
+ "packaging>=24.0",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://tysirai.com"
38
+ Repository = "https://github.com/tysirai/tysirai"
39
+ Issues = "https://github.com/tysirai/tysirai/issues"
40
+
41
+ # Extras are named after the capability they install, never after a domain pack.
42
+ # Each pack declares the extras it needs in src/tysirai/packs/<pack>/pack.yaml.
43
+ # Empty extras are filled by the issue that first needs them.
44
+ [project.optional-dependencies]
45
+ hf = []
46
+ vision = []
47
+ text = []
48
+ face = []
49
+ vlm = []
50
+ train = []
51
+ classical = []
52
+ data = []
53
+ report = []
54
+ jax = []
55
+ tensorflow = []
56
+ onnx = []
57
+ dev = [
58
+ "pytest>=8",
59
+ "pytest-cov>=5",
60
+ "ruff>=0.6",
61
+ "mypy>=1.11",
62
+ "pre-commit>=3.7",
63
+ "types-PyYAML",
64
+ ]
65
+
66
+ [project.scripts]
67
+ tysirai = "tysirai.cli.main:app"
68
+
69
+ # Node plugins: each entry point names a module that registers its nodes when imported.
70
+ [project.entry-points."tysirai.nodes"]
71
+ builtin = "tysirai.nodes"
72
+
73
+ [tool.hatch.build.targets.wheel]
74
+ packages = ["src/tysirai"]
75
+
76
+ [tool.hatch.build.targets.sdist]
77
+ include = ["src/tysirai", "tests", "README.md", "LICENSE", "NOTICE", "pyproject.toml"]
78
+
79
+ # CPU wheels of torch for development and CI; this does not affect users who install from PyPI.
80
+ [[tool.uv.index]]
81
+ name = "pytorch-cpu"
82
+ url = "https://download.pytorch.org/whl/cpu"
83
+ explicit = true
84
+
85
+ [tool.uv.sources]
86
+ torch = [{ index = "pytorch-cpu" }]
87
+
88
+ [tool.ruff]
89
+ line-length = 100
90
+ target-version = "py311"
91
+
92
+ [tool.ruff.lint]
93
+ select = ["E", "F", "W", "I", "UP", "B", "SIM", "RUF"]
94
+
95
+ [tool.mypy]
96
+ python_version = "3.11"
97
+ packages = ["tysirai"]
98
+ mypy_path = "src"
99
+ ignore_missing_imports = true
100
+ warn_unused_ignores = true
101
+
102
+ [tool.pytest.ini_options]
103
+ testpaths = ["tests"]
104
+ addopts = "-ra"
@@ -0,0 +1,10 @@
1
+ """TysirAI: one framework for the datasets and models of a field."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("tysirai")
7
+ except PackageNotFoundError: # running from a source tree without installation
8
+ __version__ = "0.0.0+unknown"
9
+
10
+ __all__ = ["__version__"]
@@ -0,0 +1,6 @@
1
+ """Entry point for `python -m tysirai`."""
2
+
3
+ from tysirai.cli.main import app
4
+
5
+ if __name__ == "__main__":
6
+ app()
@@ -0,0 +1 @@
1
+ """High-level functions: load, build, evaluate, train, scan."""
@@ -0,0 +1 @@
1
+ """Foreign backends as nodes."""
@@ -0,0 +1,4 @@
1
+ """Zero-copy tensor exchange between backends.
2
+
3
+ Built on: DLPack (torch.from_dlpack).
4
+ """
@@ -0,0 +1 @@
1
+ """External processes and services as nodes."""
@@ -0,0 +1,4 @@
1
+ """JAX nodes.
2
+
3
+ Built on: jax, flax.
4
+ """
@@ -0,0 +1,4 @@
1
+ """NumPy and OpenCV functions as nodes.
2
+
3
+ Built on: numpy, opencv.
4
+ """
@@ -0,0 +1,4 @@
1
+ """ONNX nodes and export.
2
+
3
+ Built on: onnx, onnxruntime.
4
+ """
@@ -0,0 +1,4 @@
1
+ """scikit-learn estimators as nodes.
2
+
3
+ Built on: scikit-learn, skops.
4
+ """
@@ -0,0 +1,4 @@
1
+ """TensorFlow and Keras nodes.
2
+
3
+ Built on: tensorflow, keras.
4
+ """
@@ -0,0 +1 @@
1
+ """Dataset catalog: cards, views, splits, governance, tiers, scanner."""
@@ -0,0 +1 @@
1
+ """Raw annotations, aggregation rules, layer versions, errata."""
@@ -0,0 +1,4 @@
1
+ """Dataset cards: layers, schemes, fingerprints.
2
+
3
+ Built on: pydantic, PyYAML.
4
+ """
@@ -0,0 +1,4 @@
1
+ """Download, checksum and cache of dataset files.
2
+
3
+ Built on: pooch, fsspec.
4
+ """
@@ -0,0 +1 @@
1
+ """Allowed uses, removal lists, lineage, audit."""
@@ -0,0 +1 @@
1
+ """Annotation levels, instances, relations, prediction-label matching."""
@@ -0,0 +1,4 @@
1
+ """Overlap index between datasets.
2
+
3
+ Built on: imagehash, xxhash.
4
+ """
@@ -0,0 +1 @@
1
+ """Local scanner: signatures, variants, manifests, data registry."""
@@ -0,0 +1 @@
1
+ """Split files, split rules, leakage checks."""
@@ -0,0 +1 @@
1
+ """Catalog tiers (core, lab, community), search order, overlays."""