Skip to content

Commit 8c9d047

Browse files
committed
Merge branch 'dev_experimental' into dev_main
2 parents 329c81a + 8efa866 commit 8c9d047

File tree

145 files changed

+6858
-517
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+6858
-517
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Python Package using Conda
2+
3+
# Set run on push on main branches and only if src file has changed
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- dev_main
9+
paths:
10+
- examples/**
11+
- pyTorchAutoForge/**
12+
- tests/**
13+
pull_request:
14+
branches:
15+
- main
16+
- dev_main
17+
release: # Always
18+
types:
19+
- created
20+
- published
21+
- edited
22+
- deleted
23+
- prereleased
24+
- released
25+
- unpublished
26+
27+
jobs:
28+
build-package:
29+
runs-on: ubuntu-latest
30+
strategy:
31+
max-parallel: 5
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Set up Python 3.11
36+
uses: actions/setup-python@v3
37+
with:
38+
python-version: '3.11'
39+
- name: Add conda to system path
40+
run: |
41+
# $CONDA is an environment variable pointing to the root of the miniconda directory
42+
echo $CONDA/bin >> $GITHUB_PATH
43+
- name: Install dependencies
44+
run: |
45+
#conda env update --file environment.yml --name base
46+
pip install .
47+
verify-lint:
48+
runs-on: ubuntu-latest
49+
needs: build-package
50+
steps:
51+
- uses: actions/checkout@v4
52+
- name: Lint with flake8
53+
run: |
54+
conda install flake8
55+
# stop the build if there are Python syntax errors or undefined names
56+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
57+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
58+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
59+
test-package:
60+
runs-on: ubuntu-latest
61+
needs: build-package
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Test with pytest
65+
run: |
66+
conda install pytest
67+
pytest # TODO add specifications of test
68+

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ mlruns/*
66
*.asv
77
checkpoints/*
88
pyTorchAutoForge/.experimental/*
9+
*autodoc*
910

1011
# Byte-compiled / optimized / DLL files
1112
__pycache__/
@@ -131,11 +132,7 @@ celerybeat.pid
131132

132133
# Environments
133134
.env
134-
<<<<<<< HEAD
135-
.venv*
136-
=======
137135
.venv*/
138-
>>>>>>> fdfbee2 (Added script for automatic setup on Linux)*/
139136
env/
140137
venv/
141138
ENV/

.readthedocs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version, and other tools you might need
8+
build:
9+
os: ubuntu-24.04
10+
tools:
11+
python: "3.11"
12+
13+
# Build documentation in the "docs/" directory with Sphinx
14+
sphinx:
15+
configuration: doc/conf.py
16+
17+
# Optionally, but recommended,
18+
# declare the Python requirements required to build your documentation
19+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20+
python:
21+
install:
22+
- requirements: doc/requirements.txt
23+
- method: pip
24+
path: .
25+
26+

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
# pyTorchAutoForge
2-
PyTorchAutoForge library is based on raw PyTorch and designed to automate DNN development, model tracking and deployment, tightly integrated with MLflow and Optuna. It also supports spiking networks libraries (WIP). Model optimization and deployment can be performed using ONNx, pyTorch facilities or TensorRT (WIP). The library also aims to be compatible with Jetson Orin Nano Jetpack rev6.1.
32

4-
# Installation using pip
3+
A library based on PyTorch (<https://pytorch.org/>) and designed to automate ML models development, tracking and deployment, integrated with MLflow and Optuna (<https://mlflow.org/>, <https://optuna.org/>). It also supports spiking networks libraries (WIP). Model optimization and deployment can be performed using ONNx, pyTorch facilities or TensorRT (WIP). The library also aims to be compatible with Jetson Orin Nano Jetpack rev6.1. ASeveral other functionalities and utilities for sklearn and pySR (<https://github.com/MilesCranmer/PySR>) are included (see README and documentation).
4+
5+
## Installation using pip
6+
57
Run in a conda or virtual environment:
8+
69
```bash
7-
pip install pyTorchAutoForge==0.1.0b1
10+
pip install pyTorchAutoForge
811
```
9-
Dependencies for the core modules should be installed automatically using pip.
1012

11-
# Manual installation (bash)
13+
Dependencies for the core modules should be installed automatically using pip.
14+
15+
## Manual installation (bash)
16+
1217
1) Clone the repository
1318
2) Create a virtual environment using python >= 3.10 (tested with 3.11), using `python -m venv <your_venv_name>`
14-
3) Activate the virtual environment using `source <your_venv_name>/bin/activate` on Linux
19+
3) Activate the virtual environment using `source <your_venv_name>/bin/activate` on Linux
1520
4) Install the requirements using `pip install -r requirements.txt`
1621
5) Install the package using `pip install .` in the root folder of the repository

TODO

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# List of TODOs
2+
3+
## Library management and config
4+
5+
- [x] Review linters/code formatting tools and configure them properly to comply with standards
6+
7+
- [ ] Add type annotations for mypy (currently disable no-untyped-defs due to too many errors)
8+
9+
- [ ] Automate documentation building process
10+
11+
- [ ] Implement CI/CD to run tests
12+
13+
- [ ] Improve docstrings in src code
14+
15+
- [x] Configure project to use hatch build for automatic versioning linked to git tags
16+
17+
## Modules development
18+
19+
### Evaluation
20+
21+
- [ ] Improve ModelProfiler to provide more functionalities from torch_profiler
22+
23+
- [ ]
24+
25+
### Optimization
26+
27+
- [ ]
28+
29+
### API module
30+
31+
- [ ] Add prototype implementation of mlflow api: MlflowHandler to replace manually written code in optimization module
32+
33+
- [ ] Add prototype implementation of telegram bot api for training push notifications
34+
35+
- [ ] Improve torch saving api

_version.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# file generated by setuptools-scm
2+
# don't change, don't track in version control
3+
4+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
5+
6+
TYPE_CHECKING = False
7+
if TYPE_CHECKING:
8+
from typing import Tuple
9+
from typing import Union
10+
11+
VERSION_TUPLE = Tuple[Union[int, str], ...]
12+
else:
13+
VERSION_TUPLE = object
14+
15+
version: str
16+
__version__: str
17+
__version_tuple__: VERSION_TUPLE
18+
version_tuple: VERSION_TUPLE
19+
20+
__version__ = version = '0.1.0.dev26+g7100b36.d20250330'
21+
__version_tuple__ = version_tuple = (0, 1, 0, 'dev26', 'g7100b36.d20250330')

conda_install.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ if [ $jetson_target -eq 1 ]; then
174174
pip install -e . # Install the package in editable mode
175175
else
176176
echo "Building and installing pyTorchAutoForge wheel..."
177+
# Remove previous build
178+
rm -rf dist
179+
rm -rf build
180+
rm -rf pyTorchAutoForge.egg-info
181+
# Build and install
177182
python3 -m build
178183
pip install dist/*.whl # Install pyTorchAutoForge wheel # FIXME editable mode does not work for this
179184
fi
@@ -197,6 +202,11 @@ else
197202
pip install -e . # Install the package in editable mode
198203
else
199204
echo "Building and installing pyTorchAutoForge wheel..."
205+
# Remove previous build
206+
rm -rf dist
207+
rm -rf build
208+
rm -rf pyTorchAutoForge.egg-info
209+
# Build and install
200210
python3 -m build
201211
pip install dist/*.whl # Install pyTorchAutoForge wheel # FIXME editable mode does not work for this
202212
fi

deeplab1.png

-2.37 MB
Binary file not shown.

doc/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<<<<<<< HEAD
2+
html
3+
doctrees
4+
=======
5+
doctrees
6+
html
7+
>>>>>>> main
8+
sources
File renamed without changes.

0 commit comments

Comments
 (0)