From 10fd9360910ffeb11d58cea60b870e6cf654a6f4 Mon Sep 17 00:00:00 2001 From: Pablo Olivares <65406121+pab1s@users.noreply.github.com> Date: Mon, 15 Jul 2024 22:27:35 +0200 Subject: [PATCH] Minor updates advances #2 --- .github/workflows/test_workflow.yaml | 2 +- .gitignore | 1 + Makefile | 30 ++- environment.yaml | 330 ++++++++++++++++++++++++++- 4 files changed, 345 insertions(+), 18 deletions(-) diff --git a/.github/workflows/test_workflow.yaml b/.github/workflows/test_workflow.yaml index 5ada1c0..11cd5b6 100644 --- a/.github/workflows/test_workflow.yaml +++ b/.github/workflows/test_workflow.yaml @@ -19,7 +19,7 @@ jobs: with: auto-update-conda: true environment-file: environment.yaml - activate-environment: tda-nn-separability + activate-environment: tda-nn-analysis python-version: 3.10.14 channels: conda-forge diff --git a/.gitignore b/.gitignore index 5d681fa..024bc68 100644 --- a/.gitignore +++ b/.gitignore @@ -167,6 +167,7 @@ data/ *.xlsx # Outputs +outputs/* outputs/checkpoints/*.pth outputs/figures/*.png logs/ diff --git a/Makefile b/Makefile index 7a40afd..7ebefb4 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -# Enhanced Makefile for managing the Conda environment tda-nn-separability +# Makefile for managing the Conda environment tda-nn-analysis # Parameters -ENV_NAME := tda-nn-separability +ENV_NAME := tda-nn-analysis PYTHON_VERSION := 3.10 ENV_FILE := environment.yaml @@ -18,15 +18,14 @@ init: ifndef CONDA $(error "conda is not available, please install Miniconda or Anaconda.") endif - @echo "Creating the Conda environment if it doesn't exist..." - @conda env list | grep -q '^$(ENV_NAME) ' || \ - conda create --yes --name $(ENV_NAME) python=$(PYTHON_VERSION) + echo "Creating the Conda environment if it doesn't exist..." + conda env list | grep -q '^$(ENV_NAME) ' || conda create --yes --name $(ENV_NAME) python=$(PYTHON_VERSION) # Install packages from an environment file or manually specified .PHONY: install install: init - @echo "Installing necessary packages into the Conda environment..." - @if [ -f "$(ENV_FILE)" ]; then \ + echo "Installing necessary packages into the Conda environment..." + if [ -f "$(ENV_FILE)" ]; then \ echo "Using $(ENV_FILE) to install packages..."; \ conda env update --name $(ENV_NAME) --file $(ENV_FILE) --prune; \ else \ @@ -37,25 +36,24 @@ install: init # Export the current environment to a YAML file, excluding build-specific fields .PHONY: export export: - @echo "Exporting the Conda environment to $(ENV_FILE)..." - @conda env export --name $(ENV_NAME) --no-builds | grep -v "^name: " > $(ENV_FILE) + echo "Exporting the Conda environment to $(ENV_FILE)..." + conda env export --name $(ENV_NAME) --no-builds | grep -v "^name: " > $(ENV_FILE) # Update all packages in the Conda environment .PHONY: update update: init - @echo "Updating all packages in the Conda environment..." - @conda run --name $(ENV_NAME) conda update --all --yes + echo "Updating all packages in the Conda environment..." + conda run --name $(ENV_NAME) conda update --all --yes # Run tests using pytest within the Conda environment .PHONY: test test: init - @echo "Running tests..." + echo "Running tests..." pytest tests -v # Clean up __pycache__ directories and *.pyc files .PHONY: clean clean: - @echo "Cleaning up __pycache__ directories and *.pyc files..." - @find . -type d -name "__pycache__" -exec rm -rf {} + > /dev/null 2>&1 - @find . -type f -name "*.pyc" -delete > /dev/null 2>&1 - + echo "Cleaning up __pycache__ directories and *.pyc files..." + find . -type d -name "__pycache__" -exec rm -rf {} + > /dev/null 2>&1 + find . -type f -name "*.pyc" -delete > /dev/null 2>&1 diff --git a/environment.yaml b/environment.yaml index 896de74..c43506d 100644 --- a/environment.yaml +++ b/environment.yaml @@ -1,3 +1,331 @@ -name: tda-nn-separability channels: + - pytorch + - nvidia + - conda-forge - defaults +dependencies: + - _libgcc_mutex=0.1 + - _openmp_mutex=4.5 + - aiohttp=3.9.3 + - aiohttp-retry=2.8.3 + - aiosignal=1.2.0 + - amqp=5.2.0 + - annotated-types=0.6.0 + - antlr-python-runtime=4.9.3 + - appdirs=1.4.4 + - asttokens=2.4.1 + - async-timeout=4.0.3 + - asyncssh=2.14.1 + - atk-1.0=2.36.0 + - atpublic=3.0.1 + - attrs=23.1.0 + - backports=1.0 + - backports.functools_lru_cache=2.0.0 + - backports.zoneinfo=0.2.1 + - billiard=4.2.0 + - blas=1.0 + - boto3=1.29.1 + - botocore=1.32.1 + - bottleneck=1.3.7 + - brotli=1.0.9 + - brotli-python=1.0.9 + - bzip2=1.0.8 + - c-ares=1.28.1 + - ca-certificates=2024.7.2 + - cachetools=4.2.2 + - cairo=1.16.0 + - celery=5.3.6 + - certifi=2024.7.4 + - cffi=1.16.0 + - charset-normalizer=2.0.4 + - click=8.1.7 + - click-didyoumean=0.3.1 + - click-plugins=1.1.1 + - click-repl=0.2.0 + - colorama=0.4.6 + - comm=0.2.2 + - configobj=5.0.6 + - cryptography=42.0.5 + - cuda-cudart=12.1.105 + - cuda-cupti=12.1.105 + - cuda-libraries=12.1.0 + - cuda-nvrtc=12.1.105 + - cuda-nvtx=12.1.105 + - cuda-opencl=12.4.127 + - cuda-runtime=12.1.0 + - cudatoolkit=11.8.0 + - curl=8.7.1 + - debugpy=1.8.2 + - decorator=5.1.1 + - dictdiffer=0.9.0 + - diskcache=5.6.3 + - distro=1.8.0 + - dpath=2.1.6 + - dulwich=0.21.7 + - dvc=3.49.0 + - dvc-data=3.15.1 + - dvc-gdrive=3.0.1 + - dvc-http=2.32.0 + - dvc-objects=5.1.0 + - dvc-render=1.0.1 + - dvc-studio-client=0.20.0 + - dvc-task=0.4.0 + - entrypoints=0.4 + - exceptiongroup=1.2.0 + - executing=2.0.1 + - expat=2.5.0 + - filelock=3.13.1 + - flatten-dict=0.4.2 + - flufl.lock=7.1 + - font-ttf-dejavu-sans-mono=2.37 + - font-ttf-inconsolata=2.001 + - font-ttf-source-code-pro=2.030 + - font-ttf-ubuntu=0.83 + - fontconfig=2.14.1 + - fonts-anaconda=1 + - fonts-conda-ecosystem=1 + - fonts-conda-forge=1 + - freetype=2.12.1 + - fribidi=1.0.10 + - frozenlist=1.4.0 + - fsspec=2024.3.1 + - funcy=1.18 + - future=0.18.3 + - gdk-pixbuf=2.42.10 + - giflib=5.2.2 + - gitdb=4.0.7 + - gitpython=3.1.37 + - glib=2.69.1 + - gmp=6.3.0 + - gobject-introspection=1.72.0 + - google-api-core=2.10.1 + - google-api-python-client=2.125.0 + - google-auth=2.6.0 + - google-auth-httplib2=0.2.0 + - googleapis-common-protos=1.56.4 + - grandalf=0.7 + - graphite2=1.3.14 + - graphviz=2.50.0 + - gtk2=2.24.33 + - gto=1.7.1 + - gts=0.7.6 + - gudhi=3.9.0 + - harfbuzz=4.3.0 + - httplib2=0.22.0 + - hydra-core=1.3.2 + - icu=73.1 + - idna=3.4 + - importlib-metadata=7.0.1 + - importlib_metadata=7.0.1 + - importlib_resources=6.1.1 + - iniconfig=1.1.1 + - intel-openmp=2023.1.0 + - ipykernel=6.29.4 + - ipython=8.26.0 + - iterative-telemetry=0.0.8 + - jedi=0.19.1 + - jmespath=1.0.1 + - jpeg=9e + - jupyter_client=8.6.2 + - jupyter_core=5.7.2 + - keyutils=1.6.1 + - kombu=5.3.6 + - krb5=1.21.2 + - lcms2=2.12 + - ld_impl_linux-64=2.38 + - lerc=3.0 + - libblas=3.9.0 + - libboost=1.82.0 + - libcblas=3.9.0 + - libcublas=12.1.0.26 + - libcufft=11.0.2.4 + - libcufile=1.9.1.3 + - libcurand=10.3.5.147 + - libcurl=8.7.1 + - libcusolver=11.4.4.55 + - libcusparse=12.0.2.55 + - libdeflate=1.17 + - libedit=3.1.20230828 + - libev=4.33 + - libexpat=2.5.0 + - libffi=3.4.4 + - libgcc-ng=13.2.0 + - libgd=2.3.3 + - libgfortran-ng=13.2.0 + - libgfortran5=13.2.0 + - libgit2=1.7.2 + - libgomp=13.2.0 + - libhwloc=2.9.0 + - liblapack=3.9.0 + - libnghttp2=1.58.0 + - libnpp=12.0.2.50 + - libnvjitlink=12.1.105 + - libnvjpeg=12.1.1.14 + - libpng=1.6.39 + - libprotobuf=3.20.3 + - librsvg=2.54.4 + - libsodium=1.0.18 + - libsqlite=3.41.2 + - libssh2=1.11.0 + - libstdcxx-ng=13.2.0 + - libtiff=4.5.1 + - libtool=2.4.6 + - libuuid=1.41.5 + - libwebp=1.3.2 + - libwebp-base=1.3.2 + - libxcb=1.15 + - libxml2=2.10.4 + - libzlib=1.2.13 + - llvm-openmp=14.0.6 + - lz4-c=1.9.4 + - markdown-it-py=2.2.0 + - matplotlib-base=3.8.4 + - matplotlib-inline=0.1.7 + - mdurl=0.1.0 + - mkl=2023.1.0 + - mkl-service=2.4.0 + - mkl_fft=1.3.8 + - mkl_random=1.2.4 + - mpfr=4.2.1 + - multidict=6.0.4 + - ncurses=6.4.20240210 + - nest-asyncio=1.6.0 + - networkx=3.1 + - ninja=1.10.2 + - ninja-base=1.10.2 + - numexpr=2.8.7 + - numpy=1.26.4 + - numpy-base=1.26.4 + - oauth2client=4.1.3 + - omegaconf=2.3.0 + - openjpeg=2.4.0 + - openssl=3.3.1 + - orjson=3.9.15 + - packaging=23.2 + - pandas=2.2.2 + - pango=1.50.7 + - parso=0.8.4 + - pathlib2=2.3.6 + - pathspec=0.10.3 + - pcre=8.45 + - pcre2=10.43 + - pexpect=4.9.0 + - pickleshare=0.7.5 + - pillow=10.2.0 + - pixman=0.40.0 + - platformdirs=3.10.0 + - pluggy=1.0.0 + - poppler=21.11.0 + - poppler-data=0.4.12 + - prompt-toolkit=3.0.43 + - prompt_toolkit=3.0.43 + - protobuf=3.20.3 + - psutil=5.9.0 + - pthread-stubs=0.4 + - ptyprocess=0.7.0 + - pure_eval=0.2.2 + - pyasn1=0.4.8 + - pyasn1-modules=0.2.8 + - pycparser=2.21 + - pydantic=2.5.3 + - pydantic-core=2.14.6 + - pydot=1.4.1 + - pydrive2=1.19.0 + - pygit2=1.14.1 + - pygments=2.15.1 + - pygtrie=2.5.0 + - pyopenssl=24.0.0 + - pyparsing=3.0.9 + - pysocks=1.7.1 + - pytest=7.4.0 + - python=3.10.14 + - python-dateutil=2.8.2 + - python-gssapi=1.8.3 + - python-tzdata=2023.3 + - python_abi=3.10 + - pytorch=1.13.1 + - pytorch-cuda=12.1 + - pytorch-mutex=1.0 + - pytz=2024.1 + - pyu2f=0.1.5 + - pywin32-on-windows=0.1.0 + - pyyaml=6.0.1 + - pyzmq=26.0.3 + - readline=8.2 + - requests=2.31.0 + - rich=13.3.5 + - rsa=4.7.2 + - ruamel.yaml=0.17.21 + - ruamel.yaml.clib=0.2.6 + - s3transfer=0.7.0 + - scipy=1.13.0 + - scmrepo=3.3.1 + - seaborn=0.13.2 + - semver=3.0.2 + - setuptools=68.2.2 + - shellingham=1.5.0.post1 + - shortuuid=1.0.13 + - shtab=1.7.1 + - six=1.16.0 + - smmap=4.0.0 + - sqlite=3.41.2 + - sqltrie=0.11.0 + - stack_data=0.6.2 + - tabulate=0.9.0 + - tbb=2021.8.0 + - tk=8.6.12 + - tomli=2.0.1 + - tomlkit=0.11.1 + - torchcam=0.4.0 + - torchvision=0.15.2 + - tornado=6.4.1 + - tqdm=4.65.0 + - traitlets=5.14.3 + - typer=0.9.0 + - typing=3.10.0.0 + - typing-extensions=4.9.0 + - typing_extensions=4.9.0 + - tzdata=2024a + - unicodedata2=15.1.0 + - uritemplate=4.1.1 + - urllib3=2.0.7 + - vine=5.1.0 + - voluptuous=0.14.2 + - wcwidth=0.2.5 + - xorg-libxau=1.0.11 + - xorg-libxdmcp=1.1.3 + - xz=5.4.6 + - yaml=0.2.5 + - yarl=1.9.3 + - zc.lockfile=2.0 + - zeromq=4.3.5 + - zipp=3.17.0 + - zlib=1.2.13 + - zstd=1.5.5 + - pip: + - beautifulsoup4==4.12.3 + - contourpy==1.2.1 + - cycler==0.12.1 + - fonttools==4.53.0 + - giotto-ph==0.2.2 + - giotto-tda==0.6.0 + - igraph==0.11.4 + - ipywidgets==8.1.3 + - joblib==1.4.2 + - jupyterlab-widgets==3.0.11 + - kiwisolver==1.4.5 + - matplotlib==3.9.0 + - pip==24.1.1 + - plotly==5.20.0 + - pot==0.8.2 + - pyflagser==0.4.5 + - scikit-learn==1.5.0 + - soupsieve==2.5 + - stack-data==0.6.3 + - tenacity==8.4.2 + - texttable==1.7.0 + - threadpoolctl==3.5.0 + - torch-topological==0.1.7 + - wheel==0.43.0 + - widgetsnbextension==4.0.11 +prefix: /home/pab1s/.conda/envs/tda-nn-separability