diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index bb8c335..b75537d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,7 +37,9 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest black + pip install pytest black pyreqs pip-tools + chmod +x requirements.sh + sh ./requirements.sh pip install -r requirements.txt - name: Run tests diff --git a/lightorch/__init__.py b/lightorch/__init__.py index a7a9b2f..bd9e45c 100644 --- a/lightorch/__init__.py +++ b/lightorch/__init__.py @@ -3,6 +3,7 @@ from .training import * from .deprecated import * from ._version import __version__ +from .htuning import * __author__ = "Jorge David Enciso Martínez" __email__ = "jorged.encyso@gmail.com" diff --git a/lightorch/htuning/optuna.py b/lightorch/htuning.py similarity index 100% rename from lightorch/htuning/optuna.py rename to lightorch/htuning.py diff --git a/lightorch/htuning/__init__.py b/lightorch/htuning/__init__.py deleted file mode 100644 index cc48add..0000000 --- a/lightorch/htuning/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .optuna import * diff --git a/requirements.sh b/requirements.sh new file mode 100644 index 0000000..43b96ef --- /dev/null +++ b/requirements.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +rm -f requirements.txt + +pipreqs lightorch --savepath=requirements.in + +pip-compile requirements.in + +rm -f requirements.in \ No newline at end of file diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4c963ba..0000000 --- a/requirements.txt +++ /dev/null @@ -1,523 +0,0 @@ -absl-py==2.1.0 -accelerate==0.29.3 -access==1.1.9 -affine==2.4.0 -aiofiles==23.2.1 -aioftp==0.21.4 -aiohttp==3.9.1 -aiolimiter==1.1.0 -aiosignal==1.3.1 -alembic==1.13.1 -altair==5.3.0 -annotated-types==0.6.0 -antlr4-python3-runtime==4.9.3 -anyio==4.3.0 -appdirs==1.4.4 -apturl==0.5.2 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.3.0 -astropy==6.0.0 -astropy-iers-data==0.2023.12.4.0.30.20 -astroquery==0.4.6 -asttokens==2.4.1 -async-lru==2.0.4 -async-timeout==4.0.3 -attrs==23.1.0 -Authlib==1.2.1 -av==11.0.0 -ax-platform==0.4.0 -azure-common==1.1.28 -azure-core==1.30.0 -azure-identity==1.15.0 -azure-mgmt-core==1.4.0 -azure-mgmt-rdbms==10.1.0 -azure-mgmt-resource==23.0.1 -azure-mgmt-subscription==3.1.1 -Babel==2.14.0 -backcall==0.2.0 -backoff==2.2.1 -bcrypt==4.0.1 -beautifulsoup4==4.12.2 -bidict==0.23.0 -black==24.4.0 -bleach==6.1.0 -blessed==1.20.0 -blinker==1.7.0 -blosc2==2.3.2 -boto3==1.33.13 -botocore==1.33.13 -botorch==0.11.0 -branca==0.7.0 -Brotli==1.1.0 -bs4==0.0.1 -build==1.2.1 -CacheControl==0.12.10 -cachetools==5.3.2 -catalyst==22.4 -cdflib==1.2.3 -certifi==2024.2.2 -cffi==1.16.0 -cfgv==3.4.0 -cftime==1.6.3 -chardet==4.0.0 -charset-normalizer==3.3.2 -chromedriver-binary==125.0.6422.76.0 -click==8.1.7 -click-plugins==1.1.1 -cligj==0.7.2 -colorama==0.4.4 -colorlog==6.8.2 -comm==0.2.0 -command-not-found==0.3 -configobj==5.0.6 -contourpy==1.2.0 -corkit==1.0.15 -coverage==7.3.2 -croniter==1.3.15 -cryptography==41.0.7 -cssselect==1.1.0 -cuda-python==12.3.0 -cudf-cu12==23.12.1 -cupshelpers==1.0 -cupy-cuda12x==13.0.0 -cycler==0.12.1 -DateTime==5.3 -dbus-python==1.2.18 -debugpy==1.8.0 -decorator==5.1.1 -deepdiff==7.0.1 -defer==1.0.6 -defusedxml==0.7.1 -deprecation==2.1.0 -difftorch==1.2.2 -distlib==0.3.8 -distro==1.7.0 -distro-info==1.1+ubuntu0.2 -dnspython==2.6.0 -docker-pycreds==0.4.0 -docopt==0.6.2 -docstring_parser==0.16 -docutils==0.21.1 -drms==0.7.0 -duplicity==0.8.21 -editor==1.6.6 -einops==0.8.0 -email-validator==2.1.0.post1 -esda==2.5.1 -eventlet==0.34.2 -exceptiongroup==1.2.0 -executing==2.0.1 -fastapi==0.111.0 -fastapi-cli==0.0.2 -fasteners==0.14.1 -fastjsonschema==2.19.1 -fastrlock==0.8.2 -filelock==3.13.1 -fiona==1.9.5 -Flask==2.3.3 -flask-babel==4.0.0 -Flask-Compress==1.14 -Flask-Gravatar==0.5.0 -Flask-Login==0.6.3 -Flask-Mail==0.9.1 -Flask-Migrate==4.0.5 -Flask-Paranoid==0.3.0 -Flask-Principal==0.4.0 -Flask-Security-Too==5.2.0 -Flask-SocketIO==5.3.6 -Flask-SQLAlchemy==3.1.1 -Flask-WTF==1.2.1 -folium==0.15.1 -fonttools==4.46.0 -fqdn==1.5.1 -frozenlist==1.4.0 -fsspec==2023.10.0 -future==0.18.2 -fvcore==0.1.5.post20221221 -GDAL==3.4.1 -gdown==5.1.0 -geographiclib==2.0 -geomagpy==1.1.7 -geopandas==0.14.1 -geopy==2.4.1 -georasters==0.5.27 -giddy==2.3.4 -gitdb==4.0.11 -GitPython==3.1.43 -google-api-core==2.17.1 -google-api-python-client==2.118.0 -google-auth==2.27.0 -google-auth-httplib2==0.2.0 -google-auth-oauthlib==1.1.0 -googleapis-common-protos==1.62.0 -gpustat==1.1.1 -gpytorch==1.11 -greenlet==1.1.2 -grpcio==1.60.0 -gyp==0.1 -h11==0.14.0 -h5netcdf==1.3.0 -h5py==3.10.0 -hiplot==0.1.33 -html5lib==1.1 -httpagentparser==1.9.5 -httpcore==1.0.5 -httplib2==0.20.2 -httptools==0.6.1 -httpx==0.27.0 -huggingface-hub==0.23.0 -hydra-core==1.3.2 -hydra-slayer==0.5.0 -icecream==2.1.3 -identify==2.5.36 -idna==3.3 -imageio==2.33.1 -importlib-metadata==7.0.1 -importlib-resources==6.1.1 -inequality==1.0.1 -iniconfig==2.0.0 -inquirer==3.2.4 -iopath==0.1.10 -ipykernel==6.27.1 -ipython==8.12.3 -ipywidgets==8.1.1 -isodate==0.6.1 -isoduration==20.11.0 -itsdangerous==2.1.2 -jaraco.classes==3.3.1 -jaxtyping==0.2.28 -jedi==0.19.1 -jeepney==0.7.1 -Jinja2==3.1.2 -jmespath==1.0.1 -joblib==1.3.2 -json5==0.9.25 -jsonargparse==4.28.0 -jsonpointer==2.4 -jsonschema==4.22.0 -jsonschema-specifications==2023.12.1 -jupyter-events==0.10.0 -jupyter-lsp==2.2.5 -jupyter_client==8.6.0 -jupyter_core==5.5.0 -jupyter_server==2.14.0 -jupyter_server_terminals==0.5.3 -jupyterlab==4.1.8 -jupyterlab-widgets==3.0.9 -jupyterlab_pygments==0.3.0 -jupyterlab_server==2.27.1 -keyring==24.3.0 -kiwisolver==1.4.5 -language-selector==0.1 -launchpadlib==1.10.16 -lazr.restfulclient==0.14.4 -lazr.uri==1.0.6 -lazy_loader==0.3 -ldap3==2.9.1 -libpysal==4.9.2 -lightning==2.2.4 -lightning-utilities==0.11.2 -lightorch==0.0.1 -linear-operator==0.5.1 -llvmlite==0.40.1 -lockfile==0.12.2 -lxml==4.9.3 -macaroonbakery==1.3.1 -Mako==1.1.3 -mapclassify==2.6.1 -Markdown==3.5.2 -markdown-it-py==3.0.0 -MarkupSafe==2.1.4 -matplotlib==3.8.2 -matplotlib-inline==0.1.6 -mdurl==0.1.2 -mgwr==2.2.0 -mistune==3.0.2 -momepy==0.7.0 -monotonic==1.6 -more-itertools==8.10.0 -mpmath==1.3.0 -msal==1.26.0 -msal-extensions==1.1.0 -msgpack==1.0.3 -msrest==0.7.1 -multidict==6.0.4 -multipledispatch==1.0.0 -mypy-extensions==1.0.0 -nbclient==0.10.0 -nbconvert==7.16.4 -nbformat==5.10.4 -ndindex==1.7 -nest-asyncio==1.5.8 -netCDF4==1.6.5 -netifaces==0.11.0 -networkx==3.2.1 -nh3==0.2.17 -nodeenv==1.8.0 -notebook_shim==0.2.4 -numba==0.57.1 -numexpr==2.8.7 -numpy==1.24.4 -nvidia-cublas-cu12==12.1.3.1 -nvidia-cuda-cupti-cu12==12.1.105 -nvidia-cuda-nvrtc-cu12==12.1.105 -nvidia-cuda-runtime-cu12==12.1.105 -nvidia-cudnn-cu12==8.9.2.26 -nvidia-cufft-cu12==11.0.2.54 -nvidia-curand-cu12==10.3.2.106 -nvidia-cusolver-cu12==11.4.5.107 -nvidia-cusparse-cu12==12.1.0.106 -nvidia-ml-py==12.535.133 -nvidia-nccl-cu12==2.18.1 -nvidia-nvjitlink-cu12==12.3.101 -nvidia-nvtx-cu12==12.1.105 -nvtx==0.2.8 -oauthlib==3.2.0 -olefile==0.46 -omegaconf==2.3.0 -opencv-python==4.9.0.80 -opt-einsum==3.3.0 -optuna==3.6.1 -optuna-integration==3.6.0 -ordered-set==4.1.0 -orjson==3.10.3 -outcome==1.3.0.post0 -overrides==7.7.0 -packaging==23.2 -paho-mqtt==1.6.1 -pandas==1.5.3 -pandocfilters==1.5.1 -parameterized==0.9.0 -paramiko==2.9.3 -parfive==2.0.2 -parso==0.8.3 -passlib==1.7.4 -pathspec==0.12.1 -patsy==0.5.4 -peewee==3.17.3 -pexpect==4.8.0 -pgadmin4==8.3 -pickleshare==0.7.5 -Pillow==9.0.1 -pip-tools==7.4.1 -pipreqs==0.5.0 -pkginfo==1.10.0 -platformdirs==4.0.0 -plotly==5.22.0 -pluggy==1.5.0 -pointpats==2.4.0 -pooch==1.8.0 -portalocker==2.8.2 -pre-commit==3.7.0 -prometheus_client==0.20.0 -prompt-toolkit==3.0.41 -protobuf==4.23.4 -psutil==5.9.6 -psycopg==3.1.12 -psycopg-binary==3.1.12 -ptyprocess==0.7.0 -PuLP==2.7.0 -pure-eval==0.2.2 -py-cpuinfo==9.0.0 -pyarrow==14.0.2 -pyasn1==0.5.1 -pyasn1-modules==0.3.0 -pycairo==1.20.1 -pycparser==2.21 -pycups==2.0.1 -pydantic==2.7.1 -pydantic_core==2.18.2 -pydeck==0.9.0 -pyerfa==2.0.1.1 -pyfiglet==1.0.2 -Pygments==2.17.2 -PyGObject==3.42.1 -pyhdf==0.11.3 -PyJWT==2.3.0 -pymacaroons==0.13.0 -PyMySQL==1.1.0 -PyNaCl==1.5.0 -pynvim==0.4.2 -pyotp==2.9.0 -pyparsing==2.4.7 -pypng==0.20220715.0 -pyproj==3.6.1 -pyproject_hooks==1.1.0 -Pypubsub==4.0.3 -pyre-extensions==0.0.30 -pyreadstat==1.2.7 -pyRFC3339==1.1 -pyro-api==0.1.2 -pyro-ppl==1.9.0 -pysal==23.7 -PySocks==1.7.1 -pytest==8.2.1 -python-apt==2.4.0+ubuntu3 -python-dateutil==2.8.2 -python-debian==0.1.43+ubuntu1.1 -python-dotenv==1.0.1 -python-engineio==4.9.0 -python-json-logger==2.0.7 -python-multipart==0.0.9 -python-socketio==5.11.1 -pytorch-ignite==0.5.0.post2 -pytorch-lightning==2.2.4 -pytorchvideo==0.1.5 -pytz==2023.4 -pyvo==1.4.2 -PyWavelets==1.6.0 -pyxdg==0.27 -PyYAML==5.4.1 -pyzmq==25.1.1 -qrcode==7.4.2 -quantecon==0.7.1 -rasterio==1.3.9 -rasterstats==0.19.0 -readchar==4.0.6 -readme_renderer==43.0 -referencing==0.35.1 -reportlab==3.6.8 -requests==2.31.0 -requests-file==1.5.1 -requests-oauthlib==1.3.1 -requests-toolbelt==1.0.0 -rfc3339-validator==0.1.4 -rfc3986==2.0.0 -rfc3986-validator==0.1.1 -rich==13.7.0 -rmm-cu12==23.12.0 -rpds-py==0.18.0 -rsa==4.9 -Rtree==1.1.0 -runs==1.2.2 -s3transfer==0.8.2 -safetensors==0.4.3 -savReaderWriter==3.4.2 -savvy==0.0.1 -scikit-fuzzy==0.4.2 -scikit-image==0.22.0 -scikit-learn==1.3.2 -scipy==1.11.4 -scour==0.38.2 -screen-resolution-extra==0.0.0 -seaborn==0.13.0 -SecretStorage==3.3.1 -segregation==2.5 -selenium==4.18.1 -Send2Trash==1.8.3 -sentry-sdk==2.0.1 -seppy==0.1.11 -setproctitle==1.3.3 -shapely==2.0.2 -shellingham==1.5.4 -simple-websocket==1.0.0 -simplejson==3.19.2 -six==1.16.0 -smmap==5.0.1 -sniffio==1.3.1 -snuggs==1.4.7 -solo-epd-loader==0.3.6 -sortedcontainers==2.4.0 -soupsieve==2.5 -spacepy==0.4.1 -spaghetti==1.7.4 -speaklater3==1.4 -spglm==1.1.0 -spint==1.0.7 -splot==1.1.5.post1 -spopt==0.6.0 -spreg==1.4.2 -spvcm==0.3.0 -SQLAlchemy==2.0.27 -sqlite-web==0.6.3 -sqlmodel==0.0.18 -sqlparse==0.4.4 -sshtunnel==0.4.0 -stack-data==0.6.3 -starlette==0.37.2 -starsessions==1.3.0 -statsmodels==0.14.0 -streamlit==1.34.0 -sunpy==5.1.0 -sympy==1.12 -systemd-python==234 -tables==3.9.2 -tabulate==0.9.0 -tenacity==8.2.3 -tensorboard==2.15.1 -tensorboard-data-server==0.7.2 -tensorboardX==2.6.2.2 -termcolor==2.4.0 -termdown==1.18.0 -terminado==0.18.1 -terminator==2.1.3 -threadpoolctl==3.2.0 -tifffile==2023.12.9 -tinycss2==1.3.0 -tobler==0.11.2 -toml==0.10.2 -tomli==2.0.1 -toolz==0.12.1 -torch==2.1.1 -torch-tb-profiler==0.4.3 -torchaudio==2.1.1 -torchinfo==1.8.0 -torchmetrics==1.3.0.post0 -torchvision==0.16.1 -tornado==6.4 -tqdm==4.66.1 -traitlets==5.14.0 -trio==0.24.0 -trio-websocket==0.11.1 -triton==2.1.0 -twine==5.0.0 -typeguard==2.13.3 -typer==0.12.3 -types-python-dateutil==2.9.0.20240316 -typeshed_client==2.5.1 -typing-inspect==0.9.0 -typing_extensions==4.10.0 -tzdata==2023.3 -ua-parser==0.18.0 -ubuntu-drivers-common==0.0.0 -ubuntu-pro-client==8001 -ucimlrepo==0.0.7 -ufw==0.36.1 -ujson==5.9.0 -unattended-upgrades==0.1 -uri-template==1.3.0 -uritemplate==4.1.1 -urllib3==2.0.7 -usb-creator==0.3.7 -user-agents==2.2.0 -uvicorn==0.29.0 -uvloop==0.19.0 -viresclient==0.11.3 -virtualenv==20.25.3 -wadllib==1.3.6 -wandb==0.16.6 -watchdog==4.0.0 -watchfiles==0.21.0 -wcwidth==0.2.12 -webcolors==1.13 -webdriver-manager==4.0.1 -webencodings==0.5.1 -websocket-client==1.8.0 -websockets==12.0 -Werkzeug==2.3.8 -widgetsnbextension==4.0.9 -wsproto==1.2.0 -WTForms==3.1.2 -xarray==2023.11.0 -xdg==5 -xgboost==2.0.2 -xkit==0.0.0 -xmod==1.8.1 -xyzservices==2023.10.1 -yacs==0.1.8 -yarg==0.1.9 -yarl==1.9.3 -zeep==4.2.1 -zipp==1.0.0 -zope.interface==6.1 diff --git a/tests/test_supervised.py b/tests/test_supervised.py index a38b63d..d733e98 100644 --- a/tests/test_supervised.py +++ b/tests/test_supervised.py @@ -1,6 +1,6 @@ from lightorch.training.supervised import Module from lightorch.nn.criterions import MSELoss -from lightorch.htuning.optuna import htuning +from lightorch.htuning import htuning from .utils import create_inputs, DataModule from torch import nn import optuna