Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1ac3d3f
Simplifying base (#6)
AlexandreAdam Aug 2, 2024
cdd9eed
Made cat the default for NCSNpp. Made the batch size and dataloading …
AlexandreAdam Aug 28, 2024
143d6e7
Updated Euler-Maruyma sampler and created a denoise method to the SBM…
AlexandreAdam Aug 29, 2024
14c0830
Fixed a bug introduced in the sample method
AlexandreAdam Aug 29, 2024
1905ccc
Updated and tested new feature so that custom loss can implement sche…
AlexandreAdam Sep 2, 2024
e07f21c
Updated a comment in LoRA
AlexandreAdam Sep 3, 2024
73de468
Cleanup LoRA class
AlexandreAdam Sep 4, 2024
65a7170
Added merge and unload method
AlexandreAdam Sep 4, 2024
27789c8
Added test for merge and unload method
AlexandreAdam Sep 4, 2024
d0f521a
Fixed a problem introduced in the Combine layer.
AlexandreAdam Sep 4, 2024
abb2f41
feat: adding simple models and solvers (#8)
ConnorStoneAstro Sep 13, 2024
c05e9c0
feature: Docs (#11)
AlexandreAdam Oct 21, 2024
8109ea8
Fixed issue with Hessian Diagonal model log likelihood not working pr…
AlexandreAdam Oct 23, 2024
a98f28a
Fixed issue with passing conditional argument in sampling and log prob
AlexandreAdam Oct 25, 2024
4ee8a5c
Merged dev
AlexandreAdam Oct 25, 2024
51a5cf3
Refactored the Hutchinson's trick function
AlexandreAdam Oct 27, 2024
6c34f9a
Added a comment in the Hutchinson's trick function
AlexandreAdam Oct 27, 2024
4170aae
Refactored the log prob test
AlexandreAdam Oct 27, 2024
15de2ed
feature: Improving architectures (#13)
AlexandreAdam Nov 23, 2024
51eac34
Added adaptive weights functionalities in the EDM class, and tested it
AlexandreAdam Nov 23, 2024
0f83091
Updated hyperparameters to track all the default values
AlexandreAdam Nov 23, 2024
8f12d3d
Made tracking default in the edm Unet dynamic, so we don't need to ch…
AlexandreAdam Nov 23, 2024
8a6ac94
Removed copy paste bug
AlexandreAdam Nov 23, 2024
f354c46
Fixed a bug in euler maruyam, only affects dependency
AlexandreAdam Nov 24, 2024
d55634b
Changed adaptive weights to adaptive loss
AlexandreAdam Nov 24, 2024
cca98fd
Updated EDMv2Net with a magnitude preserving conditional branch
AlexandreAdam Nov 27, 2024
eb475eb
Base 10 for noise sampling distribution
AlexandreAdam Nov 27, 2024
ac3a275
Added a force finite option in the Trainer to prevent loss spike from…
AlexandreAdam Nov 28, 2024
7a82ae0
Put clip at back to 256 to prevent explosions in the model
AlexandreAdam Nov 28, 2024
d9b2ce4
Fixed bug
AlexandreAdam Nov 28, 2024
c4d3075
Removed functional versions of ODE solvers, added more safeguards in …
AlexandreAdam Dec 2, 2024
d03f9a8
Refactored the priniting system to add a verbose argument. Fixed issu…
AlexandreAdam Dec 2, 2024
5bfcc6e
Conditional SBM notebook draft
AlexandreAdam Dec 5, 2024
893259e
Editing documentation
AlexandreAdam Aug 20, 2025
9e49d95
.
AlexandreAdam Aug 20, 2025
418c7a4
Working on score model tutorial
AlexandreAdam Dec 10, 2025
a358aea
Added explanations for how to train a model
AlexandreAdam Dec 10, 2025
32934b3
.
AlexandreAdam Dec 10, 2025
e649850
Created the likelihood for deconvolution and super resolution
AlexandreAdam Dec 10, 2025
855c1bc
Créé à l'aide de Colab
AlexandreAdam Dec 10, 2025
611df56
.
AlexandreAdam Dec 10, 2025
c060735
merged notebook
AlexandreAdam Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[bumpversion]
current_version = 0.6.0
commit = True
tag = True

[bumpversion:file:pyproject.toml]
search = version = "{current_version}"
replace = version = "{new_version}"

[bumpversion:file:score_models/__init__.py]
search = __version__ = "{current_version}"
replace = __version__ = "{new_version}"
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 127
max-complexity = 10
select = E9,F63,F7,F82
ignore = TC002,TC201
6 changes: 6 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
bugfix:
- "*fix*"
feature:
- "*feature*"
major:
- "*major*"
62 changes: 0 additions & 62 deletions .github/workflows/coverage.yaml

This file was deleted.

64 changes: 64 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- '**' # Trigger on all branches
pull_request:
branches:
- master
- dev

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
os: [ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Record State
run: |
pwd
echo github.ref is: ${{ github.ref }}
echo GITHUB_SHA is: $GITHUB_SHA
echo github.event_name is: ${{ github.event_name }}
echo github workspace: ${{ github.workspace }}
pip --version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov
cd $GITHUB_WORKSPACE
pip install -r requirements.txt

- name: Install package
run: |
pip install -e .

- name: Test
run: |
pytest --cov=${{ env.PROJECT_NAME }} --cov-report=xml --cov-report=term tests/
# Generate coverage report
continue-on-error: true # Allow tests to fail without breaking the workflow

- name: Upload coverage reports to Codecov
if: matrix.python-version == '3.10' # Change this to upload coverage only for a specific version
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
82 changes: 82 additions & 0 deletions .github/workflows/deploy_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Version Bump and Deploy

on:
push:
branches:
- master

jobs:
bump-version:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies
run: pip install bump2version

- name: Get Labels of Last Merged PR
id: get-labels
run: |
last_commit=$(git log -1 --pretty=format:"%H")
labels=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/commits/$last_commit/pulls" | \
jq -r '.[0].labels[].name')
echo "Labels found: $labels"
echo "labels=$labels" >> $GITHUB_ENV

- name: Determine Version Bump
id: bump
run: |
if [[ "${{ env.labels }}" == *"bugfix"* ]]; then
echo "bump_type=patch" >> $GITHUB_ENV
elif [[ "${{ env.labels }}" == *"feature"* ]]; then
echo "bump_type=minor" >> $GITHUB_ENV
elif [[ "${{ env.labels }}" == *"major"* ]]; then
echo "bump_type=major" >> $GITHUB_ENV
else
echo "No valid label found for version bump."
exit 1

- name: Bump Version
if: env.bump_type != ''
run: bump2version ${{ env.bump_type }}

- name: Push Changes
if: env.bump_type != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: git push --follow-tags

deploy:
needs: bump-version
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install dependencies for deployment
run: |
pip install build twine

- name: Build package
run: python -m build

- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*
53 changes: 53 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Deploy Docs
on:
push:
branches:
- master
- dev
- docs

permissions:
contents: write # This allows the action to push to the repository

jobs:
build-book:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install requirements
run: pip install -r docs_requirements.txt

- name: Build Jupyter Book
run: jupyter-book build docs

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: jupyter-book-html
path: docs/_build/html

deploy-pages:
runs-on: ubuntu-latest
needs: build-book
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download artifact
uses: actions/download-artifact@v4
with:
name: jupyter-book-html
path: docs/_build/html

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
26 changes: 26 additions & 0 deletions .github/workflows/label_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto Label PR

on:
pull_request:
types: [opened, edited]

jobs:
label:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Run Labeler
uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Apply Labels Based on Title
id: label
run: |
labels=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels" | \
jq -r '.[].name')
echo "labels=$labels" >> $GITHUB_ENV
7 changes: 3 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python package

on:
Expand All @@ -12,9 +11,9 @@ on:
branches:
- master
- dev

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -30,11 +29,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install flake8 pytest flake8-type-checking
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --select=E9,F63,F7,F82,TC,TC2 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,17 +153,11 @@ dmypy.json
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
models/
data/
__pycache__/*
.vim
/docs/
/doc/
/*.html
/*.pdf
Makefile
Expand Down
15 changes: 15 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.9"
jobs:
pre_build:
- "jupyter-book config sphinx docs/"

python:
install:
- requirements: docs_requirements.txt
- method: pip
path: .
Loading
Loading