Skip to content

Commit ed915fd

Browse files
fix(ci): cache-dependency-glob (#24)
* drops redundant paths from GA workflow * fixes `cache-dependency-glob` * enables capturing std-out on CI * test on `3.10` and above
1 parent 8dd99cc commit ed915fd

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

.github/workflows/python.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,46 @@ on:
55
branches: [main]
66
paths:
77
- "**.py"
8-
- ".devcontainer/requirements.txt"
98
- ".github/workflows/python.yml"
109
pull_request:
1110
branches: [main]
1211
paths:
1312
- "**.py"
14-
- ".devcontainer/requirements.txt"
1513
- ".github/workflows/python.yml"
1614
release:
1715
types: [created]
1816
schedule:
1917
- cron: "0 0 * * 0"
18+
workflow_dispatch:
2019

2120
jobs:
2221
build:
2322
runs-on: ${{ matrix.os }}
2423

2524
strategy:
2625
matrix:
27-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
26+
python-version: ["3.10", "3.11", "3.12"]
2827
os: [ubuntu-latest, macos-latest]
2928

3029
steps:
3130
- uses: actions/checkout@v4
3231

33-
- name: Install uv
34-
uses: astral-sh/setup-uv@v3
32+
- name: Setup Python ${{ matrix.python-version }}
33+
uses: actions/setup-python@v5
3534
with:
36-
enable-cache: true
37-
cache-dependency-glob: "uv.lock"
38-
39-
- name: Set up Python ${{ matrix.python-version }}
40-
run: uv python install ${{ matrix.python-version }}
35+
python-version: ${{ matrix.python-version }}
36+
cache: "pip"
37+
cache-dependency-path: "pyproject.toml"
4138

4239
- name: Install dependencies
43-
run: uv sync --all-extras --dev
44-
45-
- name: Ruff
4640
run: |
47-
uv run ruff check jflux
41+
pip install -U pip
42+
pip install jax flax fire pytest ruff
43+
pip install git+https://github.com/black-forest-labs/flux.git
44+
45+
- name: ruff
46+
run: ruff check jflux
47+
4848
- name: Test with PyTest
4949
run: |
50-
uv run pytest -v .
50+
pytest -v -s .

jflux/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
from dataclasses import dataclass
55
from glob import iglob
66

7-
import torch
87
import jax
98
import jax.numpy as jnp
109
import numpy as np
10+
import torch
1111
from einops import rearrange
1212
from fire import Fire
1313
from flax import nnx
1414
from PIL import Image
1515

1616
from jflux.sampling import denoise, get_noise, get_schedule, prepare, unpack
17-
from jflux.util import configs, load_ae, load_clip, load_flow_model, load_t5, torch2jax
17+
from jflux.util import configs, load_ae, load_clip, load_flow_model, load_t5
18+
1819

19-
import os
2020
os.environ["XLA_PYTHON_CLIENT_PREALLOCATE"] = "false"
2121

2222
@dataclass

jflux/modules/layers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import math
22
from dataclasses import dataclass
33

4-
import jax
54
import jax.numpy as jnp
65
from chex import Array
76
from einops import rearrange

0 commit comments

Comments
 (0)