TinyExp 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.
- tinyexp-0.0.1/.gitignore +151 -0
- tinyexp-0.0.1/CONTRIBUTING.md +126 -0
- tinyexp-0.0.1/LICENSE +21 -0
- tinyexp-0.0.1/Makefile +53 -0
- tinyexp-0.0.1/PKG-INFO +139 -0
- tinyexp-0.0.1/README.md +82 -0
- tinyexp-0.0.1/pyproject.toml +177 -0
- tinyexp-0.0.1/tests/conftest.py +23 -0
- tinyexp-0.0.1/tests/dataset/test_sampler.py +41 -0
- tinyexp-0.0.1/tests/examples/test_cli_overrides.py +38 -0
- tinyexp-0.0.1/tests/test_tinyexp.py +44 -0
- tinyexp-0.0.1/tests/tine_engine/test_cpu_accelerator.py +47 -0
- tinyexp-0.0.1/tests/tine_engine/test_cpu_accelerator_unit.py +33 -0
- tinyexp-0.0.1/tests/tine_engine/test_ddp_accelerator.py +58 -0
- tinyexp-0.0.1/tests/tine_engine/test_ddp_accelerator_unit.py +15 -0
- tinyexp-0.0.1/tests/utils/test_log_utils.py +15 -0
- tinyexp-0.0.1/tests/utils/test_model_utils.py +19 -0
- tinyexp-0.0.1/tests/utils/test_ray_utils_unit.py +17 -0
- tinyexp-0.0.1/tests/utils/test_redis_utils.py +29 -0
- tinyexp-0.0.1/tests/utils/test_redis_utils_unit.py +25 -0
- tinyexp-0.0.1/tinyexp/__init__.py +149 -0
- tinyexp-0.0.1/tinyexp/dataset/__init__.py +7 -0
- tinyexp-0.0.1/tinyexp/dataset/fake_dataloader.py +25 -0
- tinyexp-0.0.1/tinyexp/dataset/sampler.py +63 -0
- tinyexp-0.0.1/tinyexp/examples/__init__.py +0 -0
- tinyexp-0.0.1/tinyexp/examples/mnist_exp.py +249 -0
- tinyexp-0.0.1/tinyexp/examples/resnet_exp.py +431 -0
- tinyexp-0.0.1/tinyexp/exceptions.py +46 -0
- tinyexp-0.0.1/tinyexp/tiny_engine/accelerator/__init__.py +12 -0
- tinyexp-0.0.1/tinyexp/tiny_engine/accelerator/base_accelerator.py +71 -0
- tinyexp-0.0.1/tinyexp/tiny_engine/accelerator/cpu_accelerator.py +79 -0
- tinyexp-0.0.1/tinyexp/tiny_engine/accelerator/ddp_accelerator.py +154 -0
- tinyexp-0.0.1/tinyexp/tiny_engine/accelerator/hf_accelerator.py +21 -0
- tinyexp-0.0.1/tinyexp/utils/__init__.py +0 -0
- tinyexp-0.0.1/tinyexp/utils/log_utils.py +48 -0
- tinyexp-0.0.1/tinyexp/utils/model_utils.py +17 -0
- tinyexp-0.0.1/tinyexp/utils/ray_utils.py +183 -0
- tinyexp-0.0.1/tinyexp/utils/redis_utils.py +231 -0
tinyexp-0.0.1/.gitignore
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
docs/source
|
|
2
|
+
|
|
3
|
+
# From https://raw.githubusercontent.com/github/gitignore/main/Python.gitignore
|
|
4
|
+
|
|
5
|
+
# Byte-compiled / optimized / DLL files
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
*$py.class
|
|
9
|
+
|
|
10
|
+
# C extensions
|
|
11
|
+
*.so
|
|
12
|
+
|
|
13
|
+
# Distribution / packaging
|
|
14
|
+
.Python
|
|
15
|
+
build/
|
|
16
|
+
develop-eggs/
|
|
17
|
+
dist/
|
|
18
|
+
downloads/
|
|
19
|
+
eggs/
|
|
20
|
+
.eggs/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
share/python-wheels/
|
|
28
|
+
*.egg-info/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
*.egg
|
|
31
|
+
MANIFEST
|
|
32
|
+
|
|
33
|
+
# PyInstaller
|
|
34
|
+
# Usually these files are written by a python script from a template
|
|
35
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
36
|
+
*.manifest
|
|
37
|
+
*.spec
|
|
38
|
+
|
|
39
|
+
# Installer logs
|
|
40
|
+
pip-log.txt
|
|
41
|
+
pip-delete-this-directory.txt
|
|
42
|
+
|
|
43
|
+
# Unit test / coverage reports
|
|
44
|
+
htmlcov/
|
|
45
|
+
.tox/
|
|
46
|
+
.nox/
|
|
47
|
+
.coverage
|
|
48
|
+
.coverage.*
|
|
49
|
+
.cache
|
|
50
|
+
nosetests.xml
|
|
51
|
+
coverage.xml
|
|
52
|
+
*.cover
|
|
53
|
+
*.py,cover
|
|
54
|
+
.hypothesis/
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
cover/
|
|
57
|
+
|
|
58
|
+
# Translations
|
|
59
|
+
*.mo
|
|
60
|
+
*.pot
|
|
61
|
+
|
|
62
|
+
# Django stuff:
|
|
63
|
+
*.log
|
|
64
|
+
local_settings.py
|
|
65
|
+
db.sqlite3
|
|
66
|
+
db.sqlite3-journal
|
|
67
|
+
|
|
68
|
+
# Flask stuff:
|
|
69
|
+
instance/
|
|
70
|
+
.webassets-cache
|
|
71
|
+
|
|
72
|
+
# Scrapy stuff:
|
|
73
|
+
.scrapy
|
|
74
|
+
|
|
75
|
+
# Sphinx documentation
|
|
76
|
+
docs/_build/
|
|
77
|
+
|
|
78
|
+
# PyBuilder
|
|
79
|
+
.pybuilder/
|
|
80
|
+
target/
|
|
81
|
+
|
|
82
|
+
# Jupyter Notebook
|
|
83
|
+
.ipynb_checkpoints
|
|
84
|
+
|
|
85
|
+
# IPython
|
|
86
|
+
profile_default/
|
|
87
|
+
ipython_config.py
|
|
88
|
+
|
|
89
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
90
|
+
__pypackages__/
|
|
91
|
+
|
|
92
|
+
# Celery stuff
|
|
93
|
+
celerybeat-schedule
|
|
94
|
+
celerybeat.pid
|
|
95
|
+
|
|
96
|
+
# SageMath parsed files
|
|
97
|
+
*.sage.py
|
|
98
|
+
|
|
99
|
+
# Environments
|
|
100
|
+
.env
|
|
101
|
+
.venv
|
|
102
|
+
env/
|
|
103
|
+
venv/
|
|
104
|
+
ENV/
|
|
105
|
+
env.bak/
|
|
106
|
+
venv.bak/
|
|
107
|
+
|
|
108
|
+
# Spyder project settings
|
|
109
|
+
.spyderproject
|
|
110
|
+
.spyproject
|
|
111
|
+
|
|
112
|
+
# Rope project settings
|
|
113
|
+
.ropeproject
|
|
114
|
+
|
|
115
|
+
# mkdocs documentation
|
|
116
|
+
/site
|
|
117
|
+
|
|
118
|
+
# mypy
|
|
119
|
+
.mypy_cache/
|
|
120
|
+
.dmypy.json
|
|
121
|
+
dmypy.json
|
|
122
|
+
|
|
123
|
+
# Pyre type checker
|
|
124
|
+
.pyre/
|
|
125
|
+
|
|
126
|
+
# pytype static type analyzer
|
|
127
|
+
.pytype/
|
|
128
|
+
|
|
129
|
+
# Cython debug symbols
|
|
130
|
+
cython_debug/
|
|
131
|
+
|
|
132
|
+
# Vscode config files
|
|
133
|
+
.vscode/
|
|
134
|
+
|
|
135
|
+
# PyCharm
|
|
136
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
137
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
138
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
139
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
140
|
+
#.idea/
|
|
141
|
+
|
|
142
|
+
# logs, data and outputs
|
|
143
|
+
data
|
|
144
|
+
data/
|
|
145
|
+
output
|
|
146
|
+
output/
|
|
147
|
+
output*/
|
|
148
|
+
**/output/
|
|
149
|
+
**/output*/
|
|
150
|
+
wandb/
|
|
151
|
+
**/wandb/
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Contributing to `TinyExp`
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated!
|
|
4
|
+
Every little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
You can contribute in many ways:
|
|
7
|
+
|
|
8
|
+
# Types of Contributions
|
|
9
|
+
|
|
10
|
+
## Report Bugs
|
|
11
|
+
|
|
12
|
+
Report bugs at https://github.com/zengarden/TinyExp/issues
|
|
13
|
+
|
|
14
|
+
If you are reporting a bug, please include:
|
|
15
|
+
|
|
16
|
+
- Your operating system name and version.
|
|
17
|
+
- Any details about your local setup that might be helpful in troubleshooting.
|
|
18
|
+
- Detailed steps to reproduce the bug.
|
|
19
|
+
|
|
20
|
+
## Fix Bugs
|
|
21
|
+
|
|
22
|
+
Look through the GitHub issues for bugs.
|
|
23
|
+
Anything tagged with "bug" and "help wanted" is open to whoever wants to implement a fix for it.
|
|
24
|
+
|
|
25
|
+
## Implement Features
|
|
26
|
+
|
|
27
|
+
Look through the GitHub issues for features.
|
|
28
|
+
Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it.
|
|
29
|
+
|
|
30
|
+
## Write Documentation
|
|
31
|
+
|
|
32
|
+
TinyExp could always use more documentation, whether as part of the official docs, in docstrings, or even on the web in blog posts, articles, and such.
|
|
33
|
+
|
|
34
|
+
## Submit Feedback
|
|
35
|
+
|
|
36
|
+
The best way to send feedback is to file an issue at https://github.com/zengarden/TinyExp/issues.
|
|
37
|
+
|
|
38
|
+
If you are proposing a new feature:
|
|
39
|
+
|
|
40
|
+
- Explain in detail how it would work.
|
|
41
|
+
- Keep the scope as narrow as possible, to make it easier to implement.
|
|
42
|
+
- Remember that this is a volunteer-driven project, and that contributions
|
|
43
|
+
are welcome :)
|
|
44
|
+
|
|
45
|
+
# Get Started!
|
|
46
|
+
|
|
47
|
+
Ready to contribute? Here's how to set up `TinyExp` for local development.
|
|
48
|
+
Please note this documentation assumes you already have `uv` and `Git` installed and ready to go.
|
|
49
|
+
|
|
50
|
+
1. Fork the `TinyExp` repo on GitHub.
|
|
51
|
+
|
|
52
|
+
2. Clone your fork locally:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
cd <directory_in_which_repo_should_be_created>
|
|
56
|
+
git clone git@github.com:YOUR_NAME/TinyExp.git
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
3. Now we need to install the environment. Navigate into the directory
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd TinyExp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Then, install and activate the environment with:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
uv sync
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. Install pre-commit to run linters/formatters at commit time:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv run pre-commit install
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
5. Create a branch for local development:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
git checkout -b name-of-your-bugfix-or-feature
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Now you can make your changes locally.
|
|
84
|
+
|
|
85
|
+
6. Don't forget to add test cases for your added functionality to the `tests` directory.
|
|
86
|
+
|
|
87
|
+
7. When you're done making changes, check that your changes pass the formatting tests.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
make check
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Now, validate that all unit tests are passing:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
make test
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
9. Before raising a pull request you should also run tox.
|
|
100
|
+
This will run the tests across different versions of Python:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
tox
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
This requires you to have multiple versions of python installed.
|
|
107
|
+
This step is also triggered in the CI/CD pipeline, so you could also choose to skip this step locally.
|
|
108
|
+
|
|
109
|
+
10. Commit your changes and push your branch to GitHub:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
git add .
|
|
113
|
+
git commit -m "Your detailed description of your changes."
|
|
114
|
+
git push origin name-of-your-bugfix-or-feature
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
11. Submit a pull request through the GitHub website.
|
|
118
|
+
|
|
119
|
+
# Pull Request Guidelines
|
|
120
|
+
|
|
121
|
+
Before you submit a pull request, check that it meets these guidelines:
|
|
122
|
+
|
|
123
|
+
1. The pull request should include tests.
|
|
124
|
+
|
|
125
|
+
2. If the pull request adds functionality, the docs should be updated.
|
|
126
|
+
Put your new functionality into a function with a docstring, and add the feature to the list in `README.md`.
|
tinyexp-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Zeming LI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
tinyexp-0.0.1/Makefile
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.PHONY: install
|
|
2
|
+
install: ## Install the virtual environment and install the pre-commit hooks
|
|
3
|
+
@echo "🚀 Creating virtual environment using uv"
|
|
4
|
+
@uv sync
|
|
5
|
+
@uv run pre-commit install
|
|
6
|
+
|
|
7
|
+
.PHONY: check
|
|
8
|
+
check: ## Run code quality tools.
|
|
9
|
+
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
|
|
10
|
+
@uv lock --locked
|
|
11
|
+
@echo "🚀 Linting code: Running pre-commit"
|
|
12
|
+
@uv run pre-commit run -a
|
|
13
|
+
# @echo "🚀 Static type checking: Running mypy"
|
|
14
|
+
# @uv run mypy
|
|
15
|
+
|
|
16
|
+
.PHONY: test
|
|
17
|
+
test: ## Test the code with pytest
|
|
18
|
+
@echo "🚀 Testing code: Running pytest"
|
|
19
|
+
@uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
|
|
20
|
+
|
|
21
|
+
.PHONY: build
|
|
22
|
+
build: clean-build ## Build wheel file
|
|
23
|
+
@echo "🚀 Creating wheel file"
|
|
24
|
+
@uvx --from build pyproject-build --installer uv
|
|
25
|
+
|
|
26
|
+
.PHONY: clean-build
|
|
27
|
+
clean-build: ## Clean build artifacts
|
|
28
|
+
@echo "🚀 Removing build artifacts"
|
|
29
|
+
@uv run python -c "import shutil; import os; shutil.rmtree('dist') if os.path.exists('dist') else None"
|
|
30
|
+
|
|
31
|
+
.PHONY: publish
|
|
32
|
+
publish: ## Publish a release to PyPI.
|
|
33
|
+
@echo "🚀 Publishing."
|
|
34
|
+
@uvx twine upload --repository testpypi dist/*
|
|
35
|
+
# @uvx twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
|
|
36
|
+
|
|
37
|
+
.PHONY: build-and-publish
|
|
38
|
+
build-and-publish: build publish ## Build and publish.
|
|
39
|
+
|
|
40
|
+
.PHONY: docs-test
|
|
41
|
+
docs-test: ## Test if documentation can be built without warnings or errors
|
|
42
|
+
@uv run mkdocs build -s
|
|
43
|
+
|
|
44
|
+
.PHONY: docs
|
|
45
|
+
docs: ## Build and serve the documentation
|
|
46
|
+
@uv run mkdocs serve
|
|
47
|
+
|
|
48
|
+
.PHONY: help
|
|
49
|
+
help:
|
|
50
|
+
@uv run python -c "import re; \
|
|
51
|
+
[[print(f'\033[36m{m[0]:<20}\033[0m {m[1]}') for m in re.findall(r'^([a-zA-Z_-]+):.*?## (.*)$$', open(makefile).read(), re.M)] for makefile in ('$(MAKEFILE_LIST)').strip().split()]"
|
|
52
|
+
|
|
53
|
+
.DEFAULT_GOAL := help
|
tinyexp-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: TinyExp
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A minimalist Python project for deep learning experiment management. It uses Ray for core distributed environment and backend setup, and provides basic, no-frills tracking for models, optimizers, and LR schedulers.
|
|
5
|
+
Project-URL: Homepage, https://zengarden.github.io/TinyExp/
|
|
6
|
+
Project-URL: Repository, https://github.com/zengarden/TinyExp
|
|
7
|
+
Project-URL: Documentation, https://zengarden.github.io/TinyExp/
|
|
8
|
+
Author-email: Zeming LI <zane.li@connect.ust.hk>
|
|
9
|
+
License: MIT License
|
|
10
|
+
|
|
11
|
+
Copyright (c) 2025 Zeming LI
|
|
12
|
+
|
|
13
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
in the Software without restriction, including without limitation the rights
|
|
16
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
furnished to do so, subject to the following conditions:
|
|
19
|
+
|
|
20
|
+
The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
copies or substantial portions of the Software.
|
|
22
|
+
|
|
23
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
SOFTWARE.
|
|
30
|
+
License-File: LICENSE
|
|
31
|
+
Keywords: python
|
|
32
|
+
Classifier: Intended Audience :: Developers
|
|
33
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
34
|
+
Classifier: Programming Language :: Python
|
|
35
|
+
Classifier: Programming Language :: Python :: 3
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
39
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
40
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
41
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
42
|
+
Requires-Python: <4.0,>=3.9
|
|
43
|
+
Requires-Dist: accelerate
|
|
44
|
+
Requires-Dist: hydra-core
|
|
45
|
+
Requires-Dist: loguru
|
|
46
|
+
Requires-Dist: loguru>=0.7.3
|
|
47
|
+
Requires-Dist: numpy
|
|
48
|
+
Requires-Dist: omegaconf
|
|
49
|
+
Requires-Dist: ray
|
|
50
|
+
Requires-Dist: redis
|
|
51
|
+
Requires-Dist: tabulate
|
|
52
|
+
Requires-Dist: torch
|
|
53
|
+
Requires-Dist: torchvision
|
|
54
|
+
Requires-Dist: tqdm
|
|
55
|
+
Requires-Dist: wandb
|
|
56
|
+
Description-Content-Type: text/markdown
|
|
57
|
+
|
|
58
|
+
[](https://github.com/HKUST-SAIL/tinyexp/actions/workflows/main.yml)
|
|
59
|
+
[](https://codecov.io/gh/HKUST-SAIL/TinyExp)
|
|
60
|
+
|
|
61
|
+
# TinyExp
|
|
62
|
+
|
|
63
|
+
A simple Python project for deep learning experiment management.
|
|
64
|
+
|
|
65
|
+
TinyExp lets you launch experiments with one click: the file you edit becomes the entrypoint to your experiment.
|
|
66
|
+
|
|
67
|
+
# Usage
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
pip install tinyexp
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
1. Run mnist example(By default, It will trained on CPU)
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import tinyexp
|
|
77
|
+
from tinyexp.examples.mnist_exp import Exp, store_and_run_exp
|
|
78
|
+
store_and_run_exp(Exp)
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
2. or:
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
python tinyexp/examples/mnist_exp.py
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
3. Run mnist example with overridden config:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
python tinyexp/examples/mnist_exp.py dataloader_cfg.train_batch_size_per_device=16
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
see all available configs:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
python tinyexp/examples/mnist_exp.py mode=help
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
see all available configs with overridden configs:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
python tinyexp/examples/mnist_exp.py mode=help dataloader_cfg.train_batch_size_per_device=16
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# More Examples
|
|
107
|
+
|
|
108
|
+
1. ImageNet ResNet-50 Example with Extremely Fast Data Loading (By default, all available GPUs will be used.)
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
# export IMAGENET_HOME=yours_imagenet_dir
|
|
112
|
+
|
|
113
|
+
import tinyexp
|
|
114
|
+
from tinyexp.examples.resnet_exp import ResNetExp, store_and_run_exp
|
|
115
|
+
store_and_run_exp(ResNetExp)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
# Develop
|
|
119
|
+
|
|
120
|
+
1. prepare env
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# 1. clone repo
|
|
124
|
+
git clone https://github.com/HKUST-SAIL/tinyexp.git
|
|
125
|
+
# 2. Set Up Your Development Environment, This will also generate your `uv.lock` file
|
|
126
|
+
make install
|
|
127
|
+
source .venv/bin/activate
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
2. After development, checking whether the code is standardized
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
|
|
134
|
+
uv run pre-commit run -a
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
# License
|
|
138
|
+
|
|
139
|
+
MIT License. See `LICENSE`.
|
tinyexp-0.0.1/README.md
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
[](https://github.com/HKUST-SAIL/tinyexp/actions/workflows/main.yml)
|
|
2
|
+
[](https://codecov.io/gh/HKUST-SAIL/TinyExp)
|
|
3
|
+
|
|
4
|
+
# TinyExp
|
|
5
|
+
|
|
6
|
+
A simple Python project for deep learning experiment management.
|
|
7
|
+
|
|
8
|
+
TinyExp lets you launch experiments with one click: the file you edit becomes the entrypoint to your experiment.
|
|
9
|
+
|
|
10
|
+
# Usage
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
pip install tinyexp
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
1. Run mnist example(By default, It will trained on CPU)
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
import tinyexp
|
|
20
|
+
from tinyexp.examples.mnist_exp import Exp, store_and_run_exp
|
|
21
|
+
store_and_run_exp(Exp)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
2. or:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
python tinyexp/examples/mnist_exp.py
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. Run mnist example with overridden config:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
python tinyexp/examples/mnist_exp.py dataloader_cfg.train_batch_size_per_device=16
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
see all available configs:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
python tinyexp/examples/mnist_exp.py mode=help
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
see all available configs with overridden configs:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
python tinyexp/examples/mnist_exp.py mode=help dataloader_cfg.train_batch_size_per_device=16
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# More Examples
|
|
50
|
+
|
|
51
|
+
1. ImageNet ResNet-50 Example with Extremely Fast Data Loading (By default, all available GPUs will be used.)
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
# export IMAGENET_HOME=yours_imagenet_dir
|
|
55
|
+
|
|
56
|
+
import tinyexp
|
|
57
|
+
from tinyexp.examples.resnet_exp import ResNetExp, store_and_run_exp
|
|
58
|
+
store_and_run_exp(ResNetExp)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
# Develop
|
|
62
|
+
|
|
63
|
+
1. prepare env
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# 1. clone repo
|
|
67
|
+
git clone https://github.com/HKUST-SAIL/tinyexp.git
|
|
68
|
+
# 2. Set Up Your Development Environment, This will also generate your `uv.lock` file
|
|
69
|
+
make install
|
|
70
|
+
source .venv/bin/activate
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
2. After development, checking whether the code is standardized
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
|
|
77
|
+
uv run pre-commit run -a
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
# License
|
|
81
|
+
|
|
82
|
+
MIT License. See `LICENSE`.
|