Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrymhuang committed Jun 7, 2024
2 parents 187da9a + 8bf60e1 commit eb44c25
Show file tree
Hide file tree
Showing 50 changed files with 847 additions and 814 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
os: [ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11"]
backend: ["jax", "numpy", "tensorflow", "torch"]
defaults:
run:
shell: bash -el {0}
env:
KERAS_BACKEND: ${{ matrix.backend }}

steps:
- name: Checkout code
Expand All @@ -25,31 +30,25 @@ jobs:
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: bayesflow
environment-file: environment.yaml
python-version: ${{ matrix.python-version }}
auto-active-base: false

- name: Install JAX
if: ${{ matrix.backend == 'jax' }}
run: |
pip install -U "jax[cpu]"
export KERAS_BACKEND=jax
- name: Install NumPy
if: ${{ matrix.backend == 'numpy' }}
run: |
conda install numpy
export KERAS_BACKEND=numpy
- name: Install Tensorflow
if: ${{ matrix.backend == 'tensorflow' }}
run: |
pip install -U tensorflow
export KERAS_BACKEND=tensorflow
- name: Install PyTorch
if: ${{ matrix.backend == 'torch' }}
run: |
conda install pytorch torchvision torchaudio cpuonly -c pytorch
export KERAS_BACKEND=torch
- name: Show Environment Info
run: |
Expand All @@ -59,6 +58,22 @@ jobs:
conda config --show
printenv | sort
- name: Run tests
- name: Run JAX Tests
if: ${{ matrix.backend == 'jax' }}
run: |
python -m pytest tests/ -n auto -v -m "not (numpy or tensorflow or torch)"
- name: Run NumPy Tests
if: ${{ matrix.backend == 'numpy' }}
run: |
python -m pytest tests/ -n auto -v -m "not (jax or tensorflow or torch)"
- name: Run TensorFlow Tests
if: ${{ matrix.backend == 'tensorflow' }}
run: |
python -m pytest tests/ -n auto -v -m "not (jax or numpy or torch)"
- name: Run PyTorch Tests
if: ${{ matrix.backend == 'torch' }}
run: |
python -m pytest tests/ -n auto -v
python -m pytest tests/ -n auto -v -m "not (jax or numpy or tensorflow)"
24 changes: 10 additions & 14 deletions bayesflow/experimental/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@

from . import (
amortizers,
datasets,
diagnostics,
networks,
simulation,
approximators,
datasets,
diagnostics,
distributions,
networks,
simulation,
)

from .amortizers import (
AmortizedLikelihood,
AmortizedPosterior,
Amortizer,
)
from .approximators import Approximator

from .simulation import (
distribution,
JointDistribution,
from .datasets import (
OnlineDataset,
OfflineDataset,
)

6 changes: 0 additions & 6 deletions bayesflow/experimental/amortizers/__init__.py

This file was deleted.

23 changes: 0 additions & 23 deletions bayesflow/experimental/amortizers/amortized_likelihood.py

This file was deleted.

21 changes: 0 additions & 21 deletions bayesflow/experimental/amortizers/amortized_posterior.py

This file was deleted.

174 changes: 0 additions & 174 deletions bayesflow/experimental/amortizers/amortizer.py

This file was deleted.

31 changes: 0 additions & 31 deletions bayesflow/experimental/amortizers/joint_amortizer.py

This file was deleted.

20 changes: 0 additions & 20 deletions bayesflow/experimental/amortizers/point_amortizer.py

This file was deleted.

3 changes: 3 additions & 0 deletions bayesflow/experimental/approximators/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

from .approximator import Approximator
from .joint_approximator import JointApproximator
Loading

0 comments on commit eb44c25

Please sign in to comment.