-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Official implementation of the paper Continuous-Time Functional Diffusion Processes Co-Authored-By: giuliofranzese <52629439+giuliofranzese@users.noreply.github.com> Co-Authored-By: Pietro Michiardi <pietro.michiardi@eurecom.fr> Co-Authored-By: Simone Rossi <11166137+srossi93@users.noreply.github.com>
- Loading branch information
Showing
144 changed files
with
9,800 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
max_line_length = 120 | ||
trim_trailing_whitespace = true | ||
|
||
# 4 space indentation | ||
[*.py] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
|
||
[*.{yaml, yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[flake8] | ||
# https://github.com/pytorch/pytorch/blob/master/.flake8 | ||
max-line-length = 120 | ||
select = B,C,E,F,P,T4,W,B9 | ||
extend-ignore = E203, E501, W503, E731, E722, E203, E402 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
env: | ||
CACHE_NUMBER: 0 # increase to reset cache manually | ||
CONDA_ENV_FILE: './env.yaml' | ||
CONDA_ENV_NAME: 'fdp' | ||
|
||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.10'] | ||
include: | ||
- os: ubuntu-20.04 | ||
label: linux-64 | ||
prefix: /usr/share/miniconda3/envs/ | ||
|
||
name: ${{ matrix.label }}-py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Parametrize conda env name | ||
run: echo "PY_CONDA_ENV_NAME=${{ env.CONDA_ENV_NAME }}-${{ matrix.python-version }}" >> $GITHUB_ENV | ||
- name: echo conda env name | ||
run: echo ${{ env.PY_CONDA_ENV_NAME }} | ||
|
||
- name: Parametrize conda prefix | ||
run: echo "PY_PREFIX=${{ matrix.prefix }}${{ env.PY_CONDA_ENV_NAME }}" >> $GITHUB_ENV | ||
- name: echo conda prefix | ||
run: echo ${{ env.PY_PREFIX }} | ||
|
||
# extract the first two digits from the release note | ||
- name: Set release notes tag | ||
run: | | ||
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }} | ||
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION%.*}">> $GITHUB_ENV | ||
- name: Echo release notes tag | ||
run: | | ||
echo "${RELEASE_TAG_VERSION}" | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Remove the python version pin from the env.yml which could be inconsistent | ||
- name: Remove explicit python version from the environment | ||
shell: bash -l {0} | ||
run: | | ||
sed -Ei '/^\s*-?\s*python\s*([#=].*)?$/d' ${{ env.CONDA_ENV_FILE }} | ||
cat ${{ env.CONDA_ENV_FILE }} | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: ${{ env.PY_CONDA_ENV_NAME }} | ||
python-version: ${{ matrix.python-version }} | ||
use-mamba: true | ||
|
||
- uses: actions/cache@v2 | ||
name: Conda cache | ||
with: | ||
path: ${{ env.PY_PREFIX }} | ||
key: ${{ matrix.label }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
id: conda_cache | ||
|
||
- uses: actions/cache@v2 | ||
name: Pip cache | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.label }}-pip-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
|
||
- uses: actions/cache@v2 | ||
name: Pre-commit cache | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ matrix.label }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
|
||
# Ensure the hack for the python version worked | ||
- name: Ensure we have the right Python | ||
shell: bash -l {0} | ||
run: | | ||
echo "Installed Python: $(python --version)" | ||
echo "Expected: ${{ matrix.python-version }}" | ||
python --version | grep "Python ${{ matrix.python-version }}" | ||
- name: Update conda environment | ||
run: mamba env update -n ${{ env.PY_CONDA_ENV_NAME }} -f ${{ env.CONDA_ENV_FILE }} | ||
if: steps.conda_cache.outputs.cache-hit != 'true' | ||
|
||
# Update pip env whether or not there was a conda cache hit | ||
- name: Update pip environment | ||
shell: bash -l {0} | ||
run: pip install -e ".[dev]" | ||
if: steps.conda_cache.outputs.cache-hit == 'true' | ||
|
||
- run: pip3 list | ||
shell: bash -l {0} | ||
- run: mamba info | ||
- run: mamba list | ||
|
||
# Ensure the hack for the python version worked | ||
- name: Ensure we have the right Python | ||
shell: bash -l {0} | ||
run: | | ||
echo "Installed Python: $(python --version)" | ||
echo "Expected: ${{ matrix.python-version }}" | ||
python --version | grep "Python ${{ matrix.python-version }}" | ||
- name: Run pre-commits | ||
shell: bash -l {0} | ||
run: | | ||
pre-commit install | ||
pre-commit run -v --all-files --show-diff-on-failure | ||
# - name: Test with pytest | ||
# shell: bash -l {0} | ||
# run: | | ||
# pytest -v | ||
|
||
- name: Build docs website | ||
shell: bash -l {0} | ||
run: | | ||
git config user.name ci-bot | ||
git config user.email ci-bot@ci.com | ||
mike deploy --rebase --push --update-aliases ${RELEASE_TAG_VERSION} latest | ||
# Uncomment to publish on PyPI on release | ||
# - name: Build SDist and wheel | ||
# run: pipx run build | ||
# | ||
# - name: Check metadata | ||
# run: pipx run twine check dist/* | ||
# | ||
# - name: Publish distribution 📦 to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_API_TOKEN }} | ||
# | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
name: Test Suite | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- develop | ||
|
||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
|
||
env: | ||
CACHE_NUMBER: 1 # increase to reset cache manually | ||
CONDA_ENV_FILE: './env.yaml' | ||
CONDA_ENV_NAME: 'fdp' | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.10'] | ||
include: | ||
- os: ubuntu-20.04 | ||
label: linux-64 | ||
prefix: /usr/share/miniconda3/envs/ | ||
|
||
# - os: macos-latest | ||
# label: osx-64 | ||
# prefix: /Users/runner/miniconda3/envs/$CONDA_ENV_NAME | ||
|
||
# - os: windows-latest | ||
# label: win-64 | ||
# prefix: C:\Miniconda3\envs\$CONDA_ENV_NAME | ||
|
||
name: ${{ matrix.label }}-py${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Parametrize conda env name | ||
run: echo "PY_CONDA_ENV_NAME=${{ env.CONDA_ENV_NAME }}-${{ matrix.python-version }}" >> $GITHUB_ENV | ||
- name: echo conda env name | ||
run: echo ${{ env.PY_CONDA_ENV_NAME }} | ||
|
||
- name: Parametrize conda prefix | ||
run: echo "PY_PREFIX=${{ matrix.prefix }}${{ env.PY_CONDA_ENV_NAME }}" >> $GITHUB_ENV | ||
- name: echo conda prefix | ||
run: echo ${{ env.PY_PREFIX }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
# Remove the python version pin from the env.yml which could be inconsistent | ||
- name: Remove explicit python version from the environment | ||
shell: bash -l {0} | ||
run: | | ||
sed -Ei '/^\s*-?\s*python\s*([#=].*)?$/d' ${{ env.CONDA_ENV_FILE }} | ||
cat ${{ env.CONDA_ENV_FILE }} | ||
- name: Setup Mambaforge | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
miniforge-variant: Mambaforge | ||
miniforge-version: latest | ||
activate-environment: ${{ env.PY_CONDA_ENV_NAME }} | ||
python-version: ${{ matrix.python-version }} | ||
use-mamba: true | ||
|
||
- uses: actions/cache@v2 | ||
name: Conda cache | ||
with: | ||
path: ${{ env.PY_PREFIX }} | ||
key: ${{ matrix.label }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
id: conda_cache | ||
|
||
- uses: actions/cache@v2 | ||
name: Pip cache | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ matrix.label }}-pip-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
|
||
- uses: actions/cache@v2 | ||
name: Pre-commit cache | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ matrix.label }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ env.PY_CONDA_ENV_NAME }}-${{ hashFiles(env.CONDA_ENV_FILE) }}-${{hashFiles('./setup.cfg') }} | ||
|
||
# Ensure the hack for the python version worked | ||
- name: Ensure we have the right Python | ||
shell: bash -l {0} | ||
run: | | ||
echo "Installed Python: $(python --version)" | ||
echo "Expected: ${{ matrix.python-version }}" | ||
python --version | grep "Python ${{ matrix.python-version }}" | ||
- name: Update conda environment | ||
run: mamba env update -n ${{ env.PY_CONDA_ENV_NAME }} -f ${{ env.CONDA_ENV_FILE }} | ||
if: steps.conda_cache.outputs.cache-hit != 'true' | ||
|
||
# Update pip env whether or not there was a conda cache hit | ||
- name: Update pip environment | ||
shell: bash -l {0} | ||
run: pip install -e ".[dev]" | ||
if: steps.conda_cache.outputs.cache-hit == 'true' | ||
|
||
- run: pip3 list | ||
shell: bash -l {0} | ||
- run: mamba info | ||
- run: mamba list | ||
|
||
# Ensure the hack for the python version worked | ||
- name: Ensure we have the right Python | ||
shell: bash -l {0} | ||
run: | | ||
echo "Installed Python: $(python --version)" | ||
echo "Expected: ${{ matrix.python-version }}" | ||
python --version | grep "Python ${{ matrix.python-version }}" | ||
- name: Run pre-commits | ||
shell: bash -l {0} | ||
run: | | ||
pre-commit install | ||
pre-commit run -v --all-files --show-diff-on-failure | ||
# - name: Test with pytest | ||
# shell: bash -l {0} | ||
# run: | | ||
# pytest -v | ||
# | ||
# |
Oops, something went wrong.