aioway 0.3__tar.gz → 0.3.2__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 (277) hide show
  1. {aioway-0.3 → aioway-0.3.2}/.github/workflows/pre-commit.yaml +1 -1
  2. {aioway-0.3 → aioway-0.3.2}/Makefile +2 -2
  3. {aioway-0.3/src/aioway.egg-info → aioway-0.3.2}/PKG-INFO +7 -3
  4. {aioway-0.3 → aioway-0.3.2}/notebooks/aten.py +17 -10
  5. {aioway-0.3 → aioway-0.3.2}/notebooks/attributes.py +2 -2
  6. {aioway-0.3 → aioway-0.3.2}/notebooks/disable_ops.py +1 -1
  7. {aioway-0.3 → aioway-0.3.2}/notebooks/grads.py +1 -1
  8. aioway-0.3.2/notebooks/history.py +51 -0
  9. {aioway-0.3 → aioway-0.3.2}/notebooks/mnist.py +7 -5
  10. aioway-0.3.2/notebooks/print_torch_ops.py +96 -0
  11. {aioway-0.3 → aioway-0.3.2}/notebooks/state_dicts.py +1 -0
  12. {aioway-0.3 → aioway-0.3.2}/pdm.lock +1013 -946
  13. {aioway-0.3 → aioway-0.3.2}/pyproject.toml +19 -19
  14. {aioway-0.3 → aioway-0.3.2}/src/aioway/_thunks.py +0 -3
  15. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/__init__.py +1 -4
  16. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/platforms.py +1 -1
  17. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/profs.py +4 -3
  18. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/renders.py +0 -49
  19. aioway-0.3.2/src/aioway/_utils/sets.py +227 -0
  20. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/signs.py +71 -1
  21. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/types.py +2 -109
  22. {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/typing.py +6 -0
  23. {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/entrypoint.py +8 -9
  24. aioway-0.3.2/src/aioway/cc/README.md +3 -0
  25. aioway-0.3.2/src/aioway/cc/__init__.py +10 -0
  26. aioway-0.3.2/src/aioway/cc/args.py +73 -0
  27. aioway-0.3.2/src/aioway/cc/deductions/__init__.py +6 -0
  28. aioway-0.3.2/src/aioway/cc/deductions/containers.py +21 -0
  29. aioway-0.3/src/aioway/instrs/deducts.py → aioway-0.3.2/src/aioway/cc/deductions/deductions.py +73 -73
  30. aioway-0.3.2/src/aioway/cc/deductions/dense.py +56 -0
  31. aioway-0.3.2/src/aioway/cc/deductions/losses.py +26 -0
  32. aioway-0.3.2/src/aioway/cc/deductions/miscs.py +43 -0
  33. aioway-0.3.2/src/aioway/cc/deductions/sliding.py +41 -0
  34. aioway-0.3.2/src/aioway/cc/emits/_utils.py +38 -0
  35. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/compound.py +9 -8
  36. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/convs.py +18 -22
  37. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/emitters.py +12 -10
  38. aioway-0.3.2/src/aioway/cc/emits/linear.py +177 -0
  39. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/__init__.py +1 -1
  40. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/contrastive.py +24 -1
  41. aioway-0.3/src/aioway/compilers/emits/losses/losses.py → aioway-0.3.2/src/aioway/cc/emits/losses/routes.py +29 -2
  42. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/norms.py +22 -9
  43. aioway-0.3/src/aioway/schemas/modules.py → aioway-0.3.2/src/aioway/cc/hashes.py +1 -1
  44. aioway-0.3.2/src/aioway/cc/ir/__init__.py +7 -0
  45. aioway-0.3/src/aioway/_utils/dags.py → aioway-0.3.2/src/aioway/cc/ir/_utils.py +15 -41
  46. aioway-0.3.2/src/aioway/cc/ir/calls.py +93 -0
  47. aioway-0.3.2/src/aioway/cc/ir/dags.py +420 -0
  48. aioway-0.3.2/src/aioway/cc/ir/execs.py +209 -0
  49. aioway-0.3.2/src/aioway/cc/ir/modules.py +168 -0
  50. aioway-0.3.2/src/aioway/cc/ir/queries.py +25 -0
  51. aioway-0.3/src/aioway/_modules.py → aioway-0.3.2/src/aioway/cc/rebuild.py +7 -10
  52. aioway-0.3.2/src/aioway/cc/regs.py +118 -0
  53. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc/rewrites}/__init__.py +2 -1
  54. aioway-0.3.2/src/aioway/cc/rewrites/matchers.py +105 -0
  55. aioway-0.3.2/src/aioway/cc/rewrites/morphing.py +60 -0
  56. aioway-0.3.2/src/aioway/cc/rewrites/rewrites.py +41 -0
  57. aioway-0.3.2/src/aioway/cc/signs.py +27 -0
  58. aioway-0.3.2/src/aioway/contrib/__init__.py +3 -0
  59. aioway-0.3/src/aioway/dsets/discovery.py → aioway-0.3.2/src/aioway/contrib/dsets.py +1 -1
  60. {aioway-0.3/src/aioway/dsets → aioway-0.3.2/src/aioway/contrib}/mnist.py +1 -1
  61. aioway-0.3.2/src/aioway/io/__init__.py +4 -0
  62. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/_av.py +4 -1
  63. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/audios.py +6 -7
  64. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/images.py +3 -4
  65. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/texts.py +3 -1
  66. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/videos.py +6 -5
  67. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/__init__.py +0 -2
  68. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/comps.py +5 -5
  69. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/dsets.py +4 -2
  70. aioway-0.3.2/src/aioway/t/README.md +5 -0
  71. aioway-0.3.2/src/aioway/t/__init__.py +17 -0
  72. aioway-0.3.2/src/aioway/t/_utils.py +79 -0
  73. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/__init__.py +0 -1
  74. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/aten.py +5 -3
  75. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/binary.py +1 -1
  76. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/fn.py +9 -9
  77. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/getitem.py +1 -1
  78. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/__init__.py +2 -4
  79. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/_bases.py +0 -1
  80. aioway-0.3/src/aioway/schemas/renders.py → aioway-0.3.2/src/aioway/t/attrs/_utils.py +16 -3
  81. aioway-0.3.2/src/aioway/t/attrs/attrs.py +434 -0
  82. aioway-0.3.2/src/aioway/t/attrs/caches.py +104 -0
  83. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/devices.py +0 -3
  84. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/dtypes.py +0 -2
  85. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/shapes.py +3 -13
  86. aioway-0.3.2/src/aioway/t/discovery.py +61 -0
  87. {aioway-0.3/src/aioway/modes/aten → aioway-0.3.2/src/aioway/t}/guards.py +30 -4
  88. aioway-0.3.2/src/aioway/t/lists.py +119 -0
  89. aioway-0.3.2/src/aioway/t/nested.py +105 -0
  90. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/__init__.py +1 -3
  91. aioway-0.3/src/aioway/modes/fake.py → aioway-0.3.2/src/aioway/t/overrides/contexts.py +7 -43
  92. aioway-0.3.2/src/aioway/t/overrides/fake.py +157 -0
  93. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/modes.py +7 -18
  94. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/toggles.py +2 -0
  95. aioway-0.3.2/src/aioway/t/routes.py +137 -0
  96. aioway-0.3.2/src/aioway/t/sessions/__init__.py +4 -0
  97. aioway-0.3/src/aioway/_costs.py → aioway-0.3.2/src/aioway/t/sessions/costs.py +2 -1
  98. aioway-0.3.2/src/aioway/t/tspecs/__init__.py +16 -0
  99. aioway-0.3.2/src/aioway/t/tspecs/_utils.py +44 -0
  100. aioway-0.3/src/aioway/tspecs/gym.py → aioway-0.3.2/src/aioway/t/tspecs/boxes.py +12 -39
  101. aioway-0.3.2/src/aioway/t/tspecs/coercions.py +153 -0
  102. aioway-0.3.2/src/aioway/t/tspecs/gym.py +84 -0
  103. aioway-0.3.2/src/aioway/t/tspecs/losses.py +37 -0
  104. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/media.py +1 -2
  105. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/tspecs.py +0 -10
  106. aioway-0.3.2/src/aioway/t/visitors.py +70 -0
  107. {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/__init__.py +1 -0
  108. aioway-0.3.2/src/aioway/tasks/distils.py +26 -0
  109. aioway-0.3.2/src/aioway/tasks/expls/__init__.py +4 -0
  110. aioway-0.3.2/src/aioway/tasks/expls/expls.py +102 -0
  111. aioway-0.3.2/src/aioway/tasks/expls/inputs.py +46 -0
  112. aioway-0.3.2/src/aioway/tasks/losses.py +49 -0
  113. {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/static.py +11 -23
  114. {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/steps.py +2 -2
  115. aioway-0.3.2/src/aioway/tasks/supervised.py +1 -0
  116. aioway-0.3.2/src/aioway/tasks/tasks.py +43 -0
  117. {aioway-0.3 → aioway-0.3.2/src/aioway.egg-info}/PKG-INFO +7 -3
  118. aioway-0.3.2/src/aioway.egg-info/SOURCES.txt +233 -0
  119. {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/requires.txt +7 -2
  120. aioway-0.3.2/src/aioway.egg-info/scm_file_list.json +230 -0
  121. aioway-0.3.2/src/aioway.egg-info/scm_version.json +8 -0
  122. aioway-0.3.2/tests/__init__.py +1 -0
  123. aioway-0.3.2/tests/_utils/test_sets.py +170 -0
  124. aioway-0.3.2/tests/cc/emits/losses/test_contrastive.py +38 -0
  125. aioway-0.3.2/tests/cc/emits/losses/test_losses.py +32 -0
  126. {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_compound.py +1 -1
  127. {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_convs.py +7 -7
  128. {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_linear.py +27 -16
  129. {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_norms.py +16 -3
  130. aioway-0.3.2/tests/cc/ir/conftest.py +40 -0
  131. aioway-0.3.2/tests/cc/ir/test_calls.py +224 -0
  132. aioway-0.3.2/tests/cc/ir/test_dags.py +66 -0
  133. aioway-0.3.2/tests/cc/ir/test_execs.py +45 -0
  134. aioway-0.3.2/tests/cc/ir/test_modules.py +179 -0
  135. aioway-0.3.2/tests/cc/rewrites/test_matchers.py +37 -0
  136. aioway-0.3.2/tests/cc/rewrites/test_morphing.py +62 -0
  137. aioway-0.3.2/tests/cc/test_args.py +28 -0
  138. aioway-0.3.2/tests/cc/test_deductions.py +61 -0
  139. aioway-0.3/tests/schemas/test_modules.py → aioway-0.3.2/tests/cc/test_hashes.py +2 -2
  140. aioway-0.3/tests/test_modules.py → aioway-0.3.2/tests/cc/test_rebuilds.py +7 -8
  141. {aioway-0.3 → aioway-0.3.2}/tests/conftest.py +54 -9
  142. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_audios.py +5 -3
  143. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_collate.py +1 -1
  144. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_images.py +4 -2
  145. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_texts.py +2 -2
  146. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_videos.py +4 -2
  147. aioway-0.3.2/tests/mock.py +1 -0
  148. {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_devices.py +1 -1
  149. {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_dtypes.py +1 -1
  150. {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_layouts.py +1 -1
  151. aioway-0.3.2/tests/t/attrs/test_schemas.py +121 -0
  152. {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_shapes.py +1 -1
  153. aioway-0.3.2/tests/t/overrides/test_utils.py +163 -0
  154. {aioway-0.3/tests → aioway-0.3.2/tests/t/sessions}/test_costs.py +1 -1
  155. aioway-0.3/tests/test_sess.py → aioway-0.3.2/tests/t/sessions/test_sessions.py +1 -1
  156. aioway-0.3.2/tests/t/test_discovery.py +42 -0
  157. aioway-0.3.2/tests/t/test_lists.py +80 -0
  158. aioway-0.3.2/tests/t/test_nested.py +163 -0
  159. aioway-0.3/tests/tspecs/test_gym.py → aioway-0.3.2/tests/t/tspecs/test_boxes.py +1 -1
  160. aioway-0.3.2/tests/t/tspecs/test_gym.py +105 -0
  161. {aioway-0.3/tests → aioway-0.3.2/tests/t}/tspecs/test_types.py +1 -1
  162. aioway-0.3.2/tests/tasks/test_distils.py +35 -0
  163. aioway-0.3.2/tests/tasks/test_expls.py +42 -0
  164. {aioway-0.3 → aioway-0.3.2}/tests/test_api.py +4 -2
  165. aioway-0.3/notebooks/deductor_for_instrs.py +0 -42
  166. aioway-0.3/notebooks/print_torch_ops.py +0 -42
  167. aioway-0.3/src/aioway/__init__.py +0 -21
  168. aioway-0.3/src/aioway/_utils/decomps.py +0 -207
  169. aioway-0.3/src/aioway/_utils/logging.py +0 -49
  170. aioway-0.3/src/aioway/compilers/emits/linear.py +0 -143
  171. aioway-0.3/src/aioway/compilers/rewrites.py +0 -17
  172. aioway-0.3/src/aioway/instrs/__init__.py +0 -11
  173. aioway-0.3/src/aioway/instrs/containers.py +0 -57
  174. aioway-0.3/src/aioway/instrs/instrs.py +0 -128
  175. aioway-0.3/src/aioway/instrs/layers/README.md +0 -7
  176. aioway-0.3/src/aioway/instrs/layers/__init__.py +0 -8
  177. aioway-0.3/src/aioway/instrs/layers/actives.py +0 -87
  178. aioway-0.3/src/aioway/instrs/layers/dense.py +0 -139
  179. aioway-0.3/src/aioway/instrs/layers/dropouts.py +0 -63
  180. aioway-0.3/src/aioway/instrs/layers/embs.py +0 -51
  181. aioway-0.3/src/aioway/instrs/layers/norms.py +0 -90
  182. aioway-0.3/src/aioway/instrs/layers/sliding.py +0 -263
  183. aioway-0.3/src/aioway/instrs/losses.py +0 -134
  184. aioway-0.3/src/aioway/instrs/nn.py +0 -43
  185. aioway-0.3/src/aioway/instrs/rl.py +0 -67
  186. aioway-0.3/src/aioway/modes/hists.py +0 -195
  187. aioway-0.3/src/aioway/modes/tracking.py +0 -212
  188. aioway-0.3/src/aioway/schemas/attrs.py +0 -238
  189. aioway-0.3/src/aioway/schemas/schemas.py +0 -83
  190. aioway-0.3/src/aioway/schemas/utils.py +0 -14
  191. aioway-0.3/src/aioway/tspecs/__init__.py +0 -7
  192. aioway-0.3/src/aioway/tspecs/composed.py +0 -38
  193. aioway-0.3/src/aioway.egg-info/SOURCES.txt +0 -199
  194. aioway-0.3/src/aioway.egg-info/scm_file_list.json +0 -196
  195. aioway-0.3/src/aioway.egg-info/scm_version.json +0 -8
  196. aioway-0.3/tests/_utils/test_dags.py +0 -22
  197. aioway-0.3/tests/_utils/test_decomps.py +0 -104
  198. aioway-0.3/tests/instrs/test_deducts.py +0 -72
  199. aioway-0.3/tests/instrs/test_losses.py +0 -20
  200. aioway-0.3/tests/losses/test_contrastive.py +0 -17
  201. aioway-0.3/tests/losses/test_losses.py +0 -12
  202. aioway-0.3/tests/mock.py +0 -50
  203. aioway-0.3/tests/modes/test_fate.py +0 -79
  204. aioway-0.3/tests/modes/test_history.py +0 -93
  205. aioway-0.3/tests/modes/test_thunks.py +0 -50
  206. aioway-0.3/tests/test_mock.py +0 -54
  207. {aioway-0.3 → aioway-0.3.2}/.gitattributes +0 -0
  208. {aioway-0.3 → aioway-0.3.2}/.github/workflows/publish.yaml +0 -0
  209. {aioway-0.3 → aioway-0.3.2}/.github/workflows/unit-test.yaml +0 -0
  210. {aioway-0.3 → aioway-0.3.2}/.github/workflows/website.yaml +0 -0
  211. {aioway-0.3 → aioway-0.3.2}/.gitignore +0 -0
  212. {aioway-0.3 → aioway-0.3.2}/CITATIONS.cff +0 -0
  213. {aioway-0.3 → aioway-0.3.2}/CODEOWNERS +0 -0
  214. {aioway-0.3 → aioway-0.3.2}/CODE_OF_CONDUCT.md +0 -0
  215. {aioway-0.3 → aioway-0.3.2}/CONTRIBUTING.md +0 -0
  216. {aioway-0.3 → aioway-0.3.2}/LICENSE.md +0 -0
  217. {aioway-0.3 → aioway-0.3.2}/README.md +0 -0
  218. {aioway-0.3 → aioway-0.3.2}/assets/architecture.excalidraw +0 -0
  219. {aioway-0.3 → aioway-0.3.2}/assets/architecture.svg +0 -0
  220. {aioway-0.3 → aioway-0.3.2}/ci/cleanup-github.sh +0 -0
  221. {aioway-0.3 → aioway-0.3.2}/ci/docs.sh +0 -0
  222. {aioway-0.3 → aioway-0.3.2}/ci/echo-run.sh +0 -0
  223. {aioway-0.3 → aioway-0.3.2}/ci/group-actions.py +0 -0
  224. {aioway-0.3 → aioway-0.3.2}/ci/install-linux.sh +0 -0
  225. {aioway-0.3 → aioway-0.3.2}/ci/install-mac.sh +0 -0
  226. {aioway-0.3 → aioway-0.3.2}/docs/.nojekyll +0 -0
  227. {aioway-0.3 → aioway-0.3.2}/docs/CNAME +0 -0
  228. {aioway-0.3 → aioway-0.3.2}/docs/Makefile +0 -0
  229. {aioway-0.3 → aioway-0.3.2}/docs/README.md +0 -0
  230. {aioway-0.3 → aioway-0.3.2}/docs/_coverpage.md +0 -0
  231. {aioway-0.3 → aioway-0.3.2}/docs/coverpage.css +0 -0
  232. {aioway-0.3 → aioway-0.3.2}/docs/dev/conf.py +0 -0
  233. {aioway-0.3 → aioway-0.3.2}/docs/dev/index.md +0 -0
  234. {aioway-0.3 → aioway-0.3.2}/docs/dev/index.rst +0 -0
  235. {aioway-0.3 → aioway-0.3.2}/docs/index.html +0 -0
  236. {aioway-0.3 → aioway-0.3.2}/media/.gitkeep +0 -0
  237. {aioway-0.3 → aioway-0.3.2}/media/file_example_JPG_2500kB.jpg +0 -0
  238. {aioway-0.3 → aioway-0.3.2}/media/file_example_MP3_5MG.mp3 +0 -0
  239. {aioway-0.3 → aioway-0.3.2}/media/file_example_MP4_1920_18MG.mp4 +0 -0
  240. {aioway-0.3 → aioway-0.3.2}/media/file_example_PNG_3MB.png +0 -0
  241. {aioway-0.3 → aioway-0.3.2}/media/in_search_of_lost_time.txt +0 -0
  242. {aioway-0.3 → aioway-0.3.2}/notebooks/hello.py +0 -0
  243. {aioway-0.3 → aioway-0.3.2}/notebooks/missing_values.py +0 -0
  244. {aioway-0.3 → aioway-0.3.2}/setup.cfg +0 -0
  245. {aioway-0.3/tests → aioway-0.3.2/src/aioway}/__init__.py +0 -0
  246. {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/__init__.py +0 -0
  247. {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/fast.py +0 -0
  248. {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/items.py +0 -0
  249. {aioway-0.3 → aioway-0.3.2}/src/aioway/api.py +0 -0
  250. {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/__init__.py +0 -0
  251. {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/server.py +0 -0
  252. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/__init__.py +0 -0
  253. {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/recon.py +0 -0
  254. {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/__init__.py +0 -0
  255. {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/exceptions.py +0 -0
  256. {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/raising.py +0 -0
  257. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/__init__.py +0 -0
  258. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/_bases.py +0 -0
  259. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/collates.py +0 -0
  260. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/README.md +0 -0
  261. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/README.md +0 -0
  262. {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/layouts.py +0 -0
  263. {aioway-0.3/src/aioway/_utils → aioway-0.3.2/src/aioway/t}/hooks.py +0 -0
  264. {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/README.md +0 -0
  265. /aioway-0.3/src/aioway/_sess.py → /aioway-0.3.2/src/aioway/t/sessions/sessions.py +0 -0
  266. {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/README.md +0 -0
  267. /aioway-0.3/src/aioway/tspecs/utils.py → /aioway-0.3.2/src/aioway/t/tspecs/sampling.py +0 -0
  268. {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/nmf.py +0 -0
  269. {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/rl.py +0 -0
  270. {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/dependency_links.txt +0 -0
  271. {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/top_level.txt +0 -0
  272. {aioway-0.3 → aioway-0.3.2}/tests/_utils/test_signs.py +0 -0
  273. {aioway-0.3 → aioway-0.3.2}/tests/_utils/test_types.py +0 -0
  274. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/conftest.py +0 -0
  275. {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_media.py +0 -0
  276. {aioway-0.3 → aioway-0.3.2}/tests/test_ci.py +0 -0
  277. {aioway-0.3 → aioway-0.3.2}/tests/test_notebooks.py +0 -0
@@ -39,4 +39,4 @@ jobs:
39
39
  cache: true
40
40
 
41
41
  - name: ⌨️ Type checking
42
- run: make setup install mypy
42
+ run: make setup install pyrefly
@@ -60,8 +60,8 @@ black:
60
60
  isort:
61
61
  @$(SH) pdm run isort . $(CHECK_FLAG)
62
62
 
63
- mypy:
64
- @$(SH) pdm run mypy --install-types --non-interactive src
63
+ pyrefly:
64
+ @$(SH) pdm run pyrefly check src notebooks tests
65
65
 
66
66
 
67
67
  sphinx:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aioway
3
- Version: 0.3
3
+ Version: 0.3.2
4
4
  Summary: AI on the way
5
5
  Author-email: RenChu Wang <patrick1031wang@gmail.com>
6
6
  License-Expression: Apache-2.0
@@ -12,17 +12,21 @@ Requires-Dist: pandas>=3
12
12
  Requires-Dist: torch>=2
13
13
  Requires-Dist: tensordict>=0.11
14
14
  Requires-Dist: torchvision>=0.25
15
+ Requires-Dist: torchrl>=0.13
15
16
  Requires-Dist: rich>=14
16
17
  Requires-Dist: pillow>=12
17
18
  Requires-Dist: av>=17
18
19
  Requires-Dist: transformers>=5
19
20
  Requires-Dist: tokenizers>=0.22
20
- Requires-Dist: torchrl>=0.13
21
- Requires-Dist: gymnasium>=1
21
+ Requires-Dist: datasets>=5
22
22
  Requires-Dist: lightning>=2
23
+ Requires-Dist: captum>=0.9
24
+ Requires-Dist: loguru>=0.7
23
25
  Provides-Extra: networkx
24
26
  Requires-Dist: networkx>=3; extra == "networkx"
25
27
  Requires-Dist: matplotlib>=3; extra == "networkx"
28
+ Provides-Extra: gym
29
+ Requires-Dist: gymnasium>=1; extra == "gym"
26
30
  Provides-Extra: faiss
27
31
  Requires-Dist: faiss-cpu>=1; extra == "faiss"
28
32
  Provides-Extra: sklearn
@@ -12,12 +12,20 @@
12
12
  # name: python3
13
13
  # ---
14
14
 
15
+ import contextlib as ctxl
16
+
15
17
  # %%
16
18
  import torch
17
19
 
18
- from aioway._utils import *
19
- from aioway.modes import *
20
- from aioway.schemas import *
20
+ from aioway.t import PrintTorchDisp, PrintTorchFunc, fake_mode, route_aten_thunk
21
+
22
+
23
+ # %%
24
+ @ctxl.contextmanager
25
+ def track_torch_fake_thunks():
26
+ with fake_mode(), route_aten_thunk.activate():
27
+ yield
28
+
21
29
 
22
30
  # %%
23
31
  dispatch_print = PrintTorchDisp()
@@ -29,33 +37,32 @@ with fake_mode():
29
37
  b = torch.randn(3, 4)
30
38
 
31
39
  # %%
32
- with fake_fn() as hists, dispatch_print.activate():
40
+ with track_torch_fake_thunks(), dispatch_print.activate():
33
41
  a + b
34
42
 
35
43
  # %%
36
- with fake_fn() as hists, dispatch_print.activate():
44
+ with track_torch_fake_thunks(), dispatch_print.activate():
37
45
  c = a + b
38
46
  d = a + c
39
47
  e = a + d
40
48
  f = d + b
41
49
  g = e + f
42
50
 
43
- hists.dispatch
44
51
 
45
52
  # %%
46
- with fake_fn(), dispatch_print.activate():
53
+ with track_torch_fake_thunks(), dispatch_print.activate():
47
54
  3 - a
48
55
 
49
56
  # %%
50
- with fake_fn(), dispatch_print.activate():
57
+ with track_torch_fake_thunks(), dispatch_print.activate():
51
58
  a[a > 0]
52
59
 
53
60
  # %%
54
- with fake_fn(), dispatch_print.activate():
61
+ with track_torch_fake_thunks(), dispatch_print.activate():
55
62
  torch.stack([a, a, a])
56
63
 
57
64
  # %%
58
- with fake_fn(), dispatch_print.activate():
65
+ with track_torch_fake_thunks(), dispatch_print.activate():
59
66
  torch.cat([a, a, a], dim=-1)
60
67
 
61
68
  # %%
@@ -19,7 +19,7 @@ import pickle
19
19
  import torch
20
20
 
21
21
  # %%
22
- from aioway.schemas import Attr
22
+ from aioway.t import parse_attr
23
23
 
24
24
  # %%
25
25
 
@@ -27,7 +27,7 @@ from aioway.schemas import Attr
27
27
  t = torch.randn(5, 7, 9).to(torch.float16).requires_grad_()
28
28
 
29
29
  # %%
30
- a = Attr.parse(t)
30
+ a = parse_attr(t)
31
31
  a
32
32
 
33
33
  # %%
@@ -16,7 +16,7 @@
16
16
  import torch
17
17
 
18
18
  # %%
19
- from aioway.modes import PrintTorchDisp, PrintTorchFunc, mode_off
19
+ from aioway.t import PrintTorchDisp, PrintTorchFunc, mode_off
20
20
 
21
21
  # %%
22
22
  a = torch.randn(3, 4)
@@ -16,7 +16,7 @@
16
16
  # %%
17
17
  import torch
18
18
 
19
- from aioway.modes import TorchDispMode
19
+ from aioway.t import TorchDispMode
20
20
 
21
21
 
22
22
  # %%
@@ -0,0 +1,51 @@
1
+ # ---
2
+ # jupyter:
3
+ # jupytext:
4
+ # formats: py:percent
5
+ # text_representation:
6
+ # extension: .py
7
+ # format_name: percent
8
+ # format_version: '1.3'
9
+ # jupytext_version: 1.19.5
10
+ # kernelspec:
11
+ # display_name: Python 3 (ipykernel)
12
+ # language: python
13
+ # name: python3
14
+ # ---
15
+
16
+ # %%
17
+ import torch
18
+ from rich import pretty
19
+ from torch import nn
20
+
21
+ # %%
22
+ pretty.install()
23
+
24
+ # %%
25
+ from aioway.cc import track_module_thunks
26
+ from aioway.cc.ir.queries import IndexQuery
27
+ from aioway.t import fake_mode
28
+
29
+ # %%
30
+ with fake_mode():
31
+ module = nn.Sequential(
32
+ linear1 := nn.Linear(3, 5),
33
+ relu := nn.ReLU(),
34
+ seq2 := nn.Sequential(
35
+ linear3 := nn.Linear(5, 7),
36
+ linear4 := nn.Linear(7, 9),
37
+ ),
38
+ )
39
+ input = torch.randn(100, 3)
40
+
41
+ # %%
42
+ with track_module_thunks() as hist:
43
+ output = module(input)
44
+
45
+ hist
46
+
47
+ # %%
48
+ list(hist.dag())
49
+
50
+ # %%
51
+ list(IndexQuery([0, 1, 2])(hist.dag()))
@@ -13,6 +13,7 @@
13
13
  # name: python3
14
14
  # ---
15
15
 
16
+ # %%
16
17
  import typing
17
18
 
18
19
  import lightning as L
@@ -21,10 +22,11 @@ from torch import nn, optim
21
22
  from torch.utils import data as dutils
22
23
  from torchrl.data import tensor_specs as tspecs
23
24
 
24
- from aioway.compilers import ClfLogitHead, linear_regression
25
- from aioway.dsets import DatasetIdxDset, Dset, InputTarget, MnistDataset
26
- from aioway.trainers import StaticTrainer, TrainCfg
27
- from aioway.tspecs import as_tspec
25
+ from aioway.cc import ClfLogitHead, linear_regression
26
+ from aioway.contrib.mnist import MnistDataset
27
+ from aioway.io import DatasetIdxDset, Dset, InputTarget
28
+ from aioway.t import as_tspec
29
+ from aioway.tasks import StaticTrainer, TrainCfg
28
30
 
29
31
 
30
32
  # %%
@@ -66,7 +68,7 @@ def main(batch_size: int):
66
68
 
67
69
  module = ClfLogitHead(linear_regression)(
68
70
  as_tspec(dset.input_tspec), as_tspec(dset.target_tspec)
69
- ).module()
71
+ )
70
72
 
71
73
  optimizer = optim.AdamW(module.parameters())
72
74
  loss_func = nn.CrossEntropyLoss()
@@ -0,0 +1,96 @@
1
+ # ---
2
+ # jupyter:
3
+ # jupytext:
4
+ # text_representation:
5
+ # extension: .py
6
+ # format_name: percent
7
+ # format_version: '1.3'
8
+ # jupytext_version: 1.19.5
9
+ # kernelspec:
10
+ # display_name: Python 3 (ipykernel)
11
+ # language: python
12
+ # name: python3
13
+ # ---
14
+
15
+ # %%
16
+ import tensordict as td
17
+ import torch
18
+
19
+ # %%
20
+ from aioway.t import PrintTorchDisp, PrintTorchFunc, fake_mode
21
+
22
+ # %%
23
+ a = torch.randn(3, 4)
24
+ b = torch.randn(1, 1)
25
+
26
+ # %%
27
+ with PrintTorchDisp().activate(), PrintTorchFunc().activate():
28
+ c = a + b
29
+
30
+ # %%
31
+ c
32
+
33
+ # %%
34
+ with fake_mode():
35
+ a = torch.randn(3, 4)
36
+ b = torch.randn(1, 1)
37
+
38
+ # %%
39
+ with PrintTorchDisp().activate(), PrintTorchFunc().activate():
40
+ c = a + b
41
+
42
+ # %%
43
+ c
44
+
45
+ # %%
46
+ d = torch.randn_like(c)
47
+ d
48
+
49
+ # %% [markdown]
50
+ # ## TensorDicts
51
+
52
+ # %%
53
+ with PrintTorchDisp().activate(), PrintTorchFunc().activate():
54
+ tdict = td.TensorDict({"c": c, "d": d})
55
+ tdict
56
+
57
+ # %%
58
+ with PrintTorchDisp().activate(), PrintTorchFunc().activate():
59
+ tdict.auto_batch_size_()
60
+ tdict
61
+
62
+ # %%
63
+ with PrintTorchDisp().activate(), PrintTorchFunc().activate():
64
+ tdict.auto_batch_size_()
65
+ tdict
66
+
67
+ # %%
68
+ with PrintTorchDisp(rich=True).activate(), PrintTorchFunc().activate():
69
+ double = tdict + tdict
70
+ double
71
+
72
+ # %%
73
+ with PrintTorchDisp(rich=True).activate(), PrintTorchFunc().activate():
74
+ double = tdict % tdict
75
+ double
76
+
77
+ # %% [markdown]
78
+ # Seems like `tensordict` operations are not captured by `torch` functions (as `td.*` functions), as expected.
79
+ #
80
+ # It does translate `torch` calls to weird `_foreach_add` calls for `+`,
81
+ # but `%` seems unoptimized and calls `remainder` multiple times.
82
+
83
+ # %% [markdown]
84
+ # ## `torch.cond`
85
+
86
+ # %%
87
+ torch.cond
88
+
89
+ # %%
90
+ with PrintTorchDisp(rich=True).activate(), PrintTorchFunc().activate():
91
+ r = torch.cond(1, lambda: a, lambda: b)
92
+
93
+ r
94
+
95
+ # %% [markdown]
96
+ # Nothing shows up!
@@ -14,6 +14,7 @@
14
14
 
15
15
  # %%
16
16
  from torch import nn
17
+ from torch.nn import functional as F
17
18
 
18
19
 
19
20
  # %%