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.
- {aioway-0.3 → aioway-0.3.2}/.github/workflows/pre-commit.yaml +1 -1
- {aioway-0.3 → aioway-0.3.2}/Makefile +2 -2
- {aioway-0.3/src/aioway.egg-info → aioway-0.3.2}/PKG-INFO +7 -3
- {aioway-0.3 → aioway-0.3.2}/notebooks/aten.py +17 -10
- {aioway-0.3 → aioway-0.3.2}/notebooks/attributes.py +2 -2
- {aioway-0.3 → aioway-0.3.2}/notebooks/disable_ops.py +1 -1
- {aioway-0.3 → aioway-0.3.2}/notebooks/grads.py +1 -1
- aioway-0.3.2/notebooks/history.py +51 -0
- {aioway-0.3 → aioway-0.3.2}/notebooks/mnist.py +7 -5
- aioway-0.3.2/notebooks/print_torch_ops.py +96 -0
- {aioway-0.3 → aioway-0.3.2}/notebooks/state_dicts.py +1 -0
- {aioway-0.3 → aioway-0.3.2}/pdm.lock +1013 -946
- {aioway-0.3 → aioway-0.3.2}/pyproject.toml +19 -19
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_thunks.py +0 -3
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/__init__.py +1 -4
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/platforms.py +1 -1
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/profs.py +4 -3
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/renders.py +0 -49
- aioway-0.3.2/src/aioway/_utils/sets.py +227 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/signs.py +71 -1
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/types.py +2 -109
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_utils/typing.py +6 -0
- {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/entrypoint.py +8 -9
- aioway-0.3.2/src/aioway/cc/README.md +3 -0
- aioway-0.3.2/src/aioway/cc/__init__.py +10 -0
- aioway-0.3.2/src/aioway/cc/args.py +73 -0
- aioway-0.3.2/src/aioway/cc/deductions/__init__.py +6 -0
- aioway-0.3.2/src/aioway/cc/deductions/containers.py +21 -0
- aioway-0.3/src/aioway/instrs/deducts.py → aioway-0.3.2/src/aioway/cc/deductions/deductions.py +73 -73
- aioway-0.3.2/src/aioway/cc/deductions/dense.py +56 -0
- aioway-0.3.2/src/aioway/cc/deductions/losses.py +26 -0
- aioway-0.3.2/src/aioway/cc/deductions/miscs.py +43 -0
- aioway-0.3.2/src/aioway/cc/deductions/sliding.py +41 -0
- aioway-0.3.2/src/aioway/cc/emits/_utils.py +38 -0
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/compound.py +9 -8
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/convs.py +18 -22
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/emitters.py +12 -10
- aioway-0.3.2/src/aioway/cc/emits/linear.py +177 -0
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/__init__.py +1 -1
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/contrastive.py +24 -1
- aioway-0.3/src/aioway/compilers/emits/losses/losses.py → aioway-0.3.2/src/aioway/cc/emits/losses/routes.py +29 -2
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/norms.py +22 -9
- aioway-0.3/src/aioway/schemas/modules.py → aioway-0.3.2/src/aioway/cc/hashes.py +1 -1
- aioway-0.3.2/src/aioway/cc/ir/__init__.py +7 -0
- aioway-0.3/src/aioway/_utils/dags.py → aioway-0.3.2/src/aioway/cc/ir/_utils.py +15 -41
- aioway-0.3.2/src/aioway/cc/ir/calls.py +93 -0
- aioway-0.3.2/src/aioway/cc/ir/dags.py +420 -0
- aioway-0.3.2/src/aioway/cc/ir/execs.py +209 -0
- aioway-0.3.2/src/aioway/cc/ir/modules.py +168 -0
- aioway-0.3.2/src/aioway/cc/ir/queries.py +25 -0
- aioway-0.3/src/aioway/_modules.py → aioway-0.3.2/src/aioway/cc/rebuild.py +7 -10
- aioway-0.3.2/src/aioway/cc/regs.py +118 -0
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc/rewrites}/__init__.py +2 -1
- aioway-0.3.2/src/aioway/cc/rewrites/matchers.py +105 -0
- aioway-0.3.2/src/aioway/cc/rewrites/morphing.py +60 -0
- aioway-0.3.2/src/aioway/cc/rewrites/rewrites.py +41 -0
- aioway-0.3.2/src/aioway/cc/signs.py +27 -0
- aioway-0.3.2/src/aioway/contrib/__init__.py +3 -0
- aioway-0.3/src/aioway/dsets/discovery.py → aioway-0.3.2/src/aioway/contrib/dsets.py +1 -1
- {aioway-0.3/src/aioway/dsets → aioway-0.3.2/src/aioway/contrib}/mnist.py +1 -1
- aioway-0.3.2/src/aioway/io/__init__.py +4 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/_av.py +4 -1
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/audios.py +6 -7
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/images.py +3 -4
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/texts.py +3 -1
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/videos.py +6 -5
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/__init__.py +0 -2
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/comps.py +5 -5
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/dsets/dsets.py +4 -2
- aioway-0.3.2/src/aioway/t/README.md +5 -0
- aioway-0.3.2/src/aioway/t/__init__.py +17 -0
- aioway-0.3.2/src/aioway/t/_utils.py +79 -0
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/__init__.py +0 -1
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/aten.py +5 -3
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/binary.py +1 -1
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/fn.py +9 -9
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/getitem.py +1 -1
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/__init__.py +2 -4
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/_bases.py +0 -1
- aioway-0.3/src/aioway/schemas/renders.py → aioway-0.3.2/src/aioway/t/attrs/_utils.py +16 -3
- aioway-0.3.2/src/aioway/t/attrs/attrs.py +434 -0
- aioway-0.3.2/src/aioway/t/attrs/caches.py +104 -0
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/devices.py +0 -3
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/dtypes.py +0 -2
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/shapes.py +3 -13
- aioway-0.3.2/src/aioway/t/discovery.py +61 -0
- {aioway-0.3/src/aioway/modes/aten → aioway-0.3.2/src/aioway/t}/guards.py +30 -4
- aioway-0.3.2/src/aioway/t/lists.py +119 -0
- aioway-0.3.2/src/aioway/t/nested.py +105 -0
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/__init__.py +1 -3
- aioway-0.3/src/aioway/modes/fake.py → aioway-0.3.2/src/aioway/t/overrides/contexts.py +7 -43
- aioway-0.3.2/src/aioway/t/overrides/fake.py +157 -0
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/modes.py +7 -18
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/toggles.py +2 -0
- aioway-0.3.2/src/aioway/t/routes.py +137 -0
- aioway-0.3.2/src/aioway/t/sessions/__init__.py +4 -0
- aioway-0.3/src/aioway/_costs.py → aioway-0.3.2/src/aioway/t/sessions/costs.py +2 -1
- aioway-0.3.2/src/aioway/t/tspecs/__init__.py +16 -0
- aioway-0.3.2/src/aioway/t/tspecs/_utils.py +44 -0
- aioway-0.3/src/aioway/tspecs/gym.py → aioway-0.3.2/src/aioway/t/tspecs/boxes.py +12 -39
- aioway-0.3.2/src/aioway/t/tspecs/coercions.py +153 -0
- aioway-0.3.2/src/aioway/t/tspecs/gym.py +84 -0
- aioway-0.3.2/src/aioway/t/tspecs/losses.py +37 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/media.py +1 -2
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/tspecs.py +0 -10
- aioway-0.3.2/src/aioway/t/visitors.py +70 -0
- {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/__init__.py +1 -0
- aioway-0.3.2/src/aioway/tasks/distils.py +26 -0
- aioway-0.3.2/src/aioway/tasks/expls/__init__.py +4 -0
- aioway-0.3.2/src/aioway/tasks/expls/expls.py +102 -0
- aioway-0.3.2/src/aioway/tasks/expls/inputs.py +46 -0
- aioway-0.3.2/src/aioway/tasks/losses.py +49 -0
- {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/static.py +11 -23
- {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/steps.py +2 -2
- aioway-0.3.2/src/aioway/tasks/supervised.py +1 -0
- aioway-0.3.2/src/aioway/tasks/tasks.py +43 -0
- {aioway-0.3 → aioway-0.3.2/src/aioway.egg-info}/PKG-INFO +7 -3
- aioway-0.3.2/src/aioway.egg-info/SOURCES.txt +233 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/requires.txt +7 -2
- aioway-0.3.2/src/aioway.egg-info/scm_file_list.json +230 -0
- aioway-0.3.2/src/aioway.egg-info/scm_version.json +8 -0
- aioway-0.3.2/tests/__init__.py +1 -0
- aioway-0.3.2/tests/_utils/test_sets.py +170 -0
- aioway-0.3.2/tests/cc/emits/losses/test_contrastive.py +38 -0
- aioway-0.3.2/tests/cc/emits/losses/test_losses.py +32 -0
- {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_compound.py +1 -1
- {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_convs.py +7 -7
- {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_linear.py +27 -16
- {aioway-0.3/tests/compilers → aioway-0.3.2/tests/cc}/emits/test_norms.py +16 -3
- aioway-0.3.2/tests/cc/ir/conftest.py +40 -0
- aioway-0.3.2/tests/cc/ir/test_calls.py +224 -0
- aioway-0.3.2/tests/cc/ir/test_dags.py +66 -0
- aioway-0.3.2/tests/cc/ir/test_execs.py +45 -0
- aioway-0.3.2/tests/cc/ir/test_modules.py +179 -0
- aioway-0.3.2/tests/cc/rewrites/test_matchers.py +37 -0
- aioway-0.3.2/tests/cc/rewrites/test_morphing.py +62 -0
- aioway-0.3.2/tests/cc/test_args.py +28 -0
- aioway-0.3.2/tests/cc/test_deductions.py +61 -0
- aioway-0.3/tests/schemas/test_modules.py → aioway-0.3.2/tests/cc/test_hashes.py +2 -2
- aioway-0.3/tests/test_modules.py → aioway-0.3.2/tests/cc/test_rebuilds.py +7 -8
- {aioway-0.3 → aioway-0.3.2}/tests/conftest.py +54 -9
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_audios.py +5 -3
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_collate.py +1 -1
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_images.py +4 -2
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_texts.py +2 -2
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_videos.py +4 -2
- aioway-0.3.2/tests/mock.py +1 -0
- {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_devices.py +1 -1
- {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_dtypes.py +1 -1
- {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_layouts.py +1 -1
- aioway-0.3.2/tests/t/attrs/test_schemas.py +121 -0
- {aioway-0.3/tests/schemas → aioway-0.3.2/tests/t/attrs}/test_shapes.py +1 -1
- aioway-0.3.2/tests/t/overrides/test_utils.py +163 -0
- {aioway-0.3/tests → aioway-0.3.2/tests/t/sessions}/test_costs.py +1 -1
- aioway-0.3/tests/test_sess.py → aioway-0.3.2/tests/t/sessions/test_sessions.py +1 -1
- aioway-0.3.2/tests/t/test_discovery.py +42 -0
- aioway-0.3.2/tests/t/test_lists.py +80 -0
- aioway-0.3.2/tests/t/test_nested.py +163 -0
- aioway-0.3/tests/tspecs/test_gym.py → aioway-0.3.2/tests/t/tspecs/test_boxes.py +1 -1
- aioway-0.3.2/tests/t/tspecs/test_gym.py +105 -0
- {aioway-0.3/tests → aioway-0.3.2/tests/t}/tspecs/test_types.py +1 -1
- aioway-0.3.2/tests/tasks/test_distils.py +35 -0
- aioway-0.3.2/tests/tasks/test_expls.py +42 -0
- {aioway-0.3 → aioway-0.3.2}/tests/test_api.py +4 -2
- aioway-0.3/notebooks/deductor_for_instrs.py +0 -42
- aioway-0.3/notebooks/print_torch_ops.py +0 -42
- aioway-0.3/src/aioway/__init__.py +0 -21
- aioway-0.3/src/aioway/_utils/decomps.py +0 -207
- aioway-0.3/src/aioway/_utils/logging.py +0 -49
- aioway-0.3/src/aioway/compilers/emits/linear.py +0 -143
- aioway-0.3/src/aioway/compilers/rewrites.py +0 -17
- aioway-0.3/src/aioway/instrs/__init__.py +0 -11
- aioway-0.3/src/aioway/instrs/containers.py +0 -57
- aioway-0.3/src/aioway/instrs/instrs.py +0 -128
- aioway-0.3/src/aioway/instrs/layers/README.md +0 -7
- aioway-0.3/src/aioway/instrs/layers/__init__.py +0 -8
- aioway-0.3/src/aioway/instrs/layers/actives.py +0 -87
- aioway-0.3/src/aioway/instrs/layers/dense.py +0 -139
- aioway-0.3/src/aioway/instrs/layers/dropouts.py +0 -63
- aioway-0.3/src/aioway/instrs/layers/embs.py +0 -51
- aioway-0.3/src/aioway/instrs/layers/norms.py +0 -90
- aioway-0.3/src/aioway/instrs/layers/sliding.py +0 -263
- aioway-0.3/src/aioway/instrs/losses.py +0 -134
- aioway-0.3/src/aioway/instrs/nn.py +0 -43
- aioway-0.3/src/aioway/instrs/rl.py +0 -67
- aioway-0.3/src/aioway/modes/hists.py +0 -195
- aioway-0.3/src/aioway/modes/tracking.py +0 -212
- aioway-0.3/src/aioway/schemas/attrs.py +0 -238
- aioway-0.3/src/aioway/schemas/schemas.py +0 -83
- aioway-0.3/src/aioway/schemas/utils.py +0 -14
- aioway-0.3/src/aioway/tspecs/__init__.py +0 -7
- aioway-0.3/src/aioway/tspecs/composed.py +0 -38
- aioway-0.3/src/aioway.egg-info/SOURCES.txt +0 -199
- aioway-0.3/src/aioway.egg-info/scm_file_list.json +0 -196
- aioway-0.3/src/aioway.egg-info/scm_version.json +0 -8
- aioway-0.3/tests/_utils/test_dags.py +0 -22
- aioway-0.3/tests/_utils/test_decomps.py +0 -104
- aioway-0.3/tests/instrs/test_deducts.py +0 -72
- aioway-0.3/tests/instrs/test_losses.py +0 -20
- aioway-0.3/tests/losses/test_contrastive.py +0 -17
- aioway-0.3/tests/losses/test_losses.py +0 -12
- aioway-0.3/tests/mock.py +0 -50
- aioway-0.3/tests/modes/test_fate.py +0 -79
- aioway-0.3/tests/modes/test_history.py +0 -93
- aioway-0.3/tests/modes/test_thunks.py +0 -50
- aioway-0.3/tests/test_mock.py +0 -54
- {aioway-0.3 → aioway-0.3.2}/.gitattributes +0 -0
- {aioway-0.3 → aioway-0.3.2}/.github/workflows/publish.yaml +0 -0
- {aioway-0.3 → aioway-0.3.2}/.github/workflows/unit-test.yaml +0 -0
- {aioway-0.3 → aioway-0.3.2}/.github/workflows/website.yaml +0 -0
- {aioway-0.3 → aioway-0.3.2}/.gitignore +0 -0
- {aioway-0.3 → aioway-0.3.2}/CITATIONS.cff +0 -0
- {aioway-0.3 → aioway-0.3.2}/CODEOWNERS +0 -0
- {aioway-0.3 → aioway-0.3.2}/CODE_OF_CONDUCT.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/CONTRIBUTING.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/LICENSE.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/README.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/assets/architecture.excalidraw +0 -0
- {aioway-0.3 → aioway-0.3.2}/assets/architecture.svg +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/cleanup-github.sh +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/docs.sh +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/echo-run.sh +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/group-actions.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/install-linux.sh +0 -0
- {aioway-0.3 → aioway-0.3.2}/ci/install-mac.sh +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/.nojekyll +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/CNAME +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/Makefile +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/README.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/_coverpage.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/coverpage.css +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/dev/conf.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/dev/index.md +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/dev/index.rst +0 -0
- {aioway-0.3 → aioway-0.3.2}/docs/index.html +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/.gitkeep +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/file_example_JPG_2500kB.jpg +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/file_example_MP3_5MG.mp3 +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/file_example_MP4_1920_18MG.mp4 +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/file_example_PNG_3MB.png +0 -0
- {aioway-0.3 → aioway-0.3.2}/media/in_search_of_lost_time.txt +0 -0
- {aioway-0.3 → aioway-0.3.2}/notebooks/hello.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/notebooks/missing_values.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/setup.cfg +0 -0
- {aioway-0.3/tests → aioway-0.3.2/src/aioway}/__init__.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/__init__.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/fast.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/_api/items.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/api.py +0 -0
- {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/__init__.py +0 -0
- {aioway-0.3/src/aioway/app → aioway-0.3.2/src/aioway/apps}/server.py +0 -0
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/__init__.py +0 -0
- {aioway-0.3/src/aioway/compilers → aioway-0.3.2/src/aioway/cc}/emits/losses/recon.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/__init__.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/exceptions.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway/errors/raising.py +0 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/__init__.py +0 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/_bases.py +0 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/io}/codecs/collates.py +0 -0
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t}/aten/README.md +0 -0
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/README.md +0 -0
- {aioway-0.3/src/aioway/schemas → aioway-0.3.2/src/aioway/t/attrs}/layouts.py +0 -0
- {aioway-0.3/src/aioway/_utils → aioway-0.3.2/src/aioway/t}/hooks.py +0 -0
- {aioway-0.3/src/aioway/modes → aioway-0.3.2/src/aioway/t/overrides}/README.md +0 -0
- /aioway-0.3/src/aioway/_sess.py → /aioway-0.3.2/src/aioway/t/sessions/sessions.py +0 -0
- {aioway-0.3/src/aioway → aioway-0.3.2/src/aioway/t}/tspecs/README.md +0 -0
- /aioway-0.3/src/aioway/tspecs/utils.py → /aioway-0.3.2/src/aioway/t/tspecs/sampling.py +0 -0
- {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/nmf.py +0 -0
- {aioway-0.3/src/aioway/trainers → aioway-0.3.2/src/aioway/tasks}/rl.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/dependency_links.txt +0 -0
- {aioway-0.3 → aioway-0.3.2}/src/aioway.egg-info/top_level.txt +0 -0
- {aioway-0.3 → aioway-0.3.2}/tests/_utils/test_signs.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/tests/_utils/test_types.py +0 -0
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/conftest.py +0 -0
- {aioway-0.3/tests → aioway-0.3.2/tests/io}/codecs/test_media.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/tests/test_ci.py +0 -0
- {aioway-0.3 → aioway-0.3.2}/tests/test_notebooks.py +0 -0
|
@@ -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:
|
|
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.
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
40
|
+
with track_torch_fake_thunks(), dispatch_print.activate():
|
|
33
41
|
a + b
|
|
34
42
|
|
|
35
43
|
# %%
|
|
36
|
-
with
|
|
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
|
|
53
|
+
with track_torch_fake_thunks(), dispatch_print.activate():
|
|
47
54
|
3 - a
|
|
48
55
|
|
|
49
56
|
# %%
|
|
50
|
-
with
|
|
57
|
+
with track_torch_fake_thunks(), dispatch_print.activate():
|
|
51
58
|
a[a > 0]
|
|
52
59
|
|
|
53
60
|
# %%
|
|
54
|
-
with
|
|
61
|
+
with track_torch_fake_thunks(), dispatch_print.activate():
|
|
55
62
|
torch.stack([a, a, a])
|
|
56
63
|
|
|
57
64
|
# %%
|
|
58
|
-
with
|
|
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.
|
|
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 =
|
|
30
|
+
a = parse_attr(t)
|
|
31
31
|
a
|
|
32
32
|
|
|
33
33
|
# %%
|
|
@@ -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.
|
|
25
|
-
from aioway.
|
|
26
|
-
from aioway.
|
|
27
|
-
from aioway.
|
|
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
|
-
)
|
|
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!
|