Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump everything #1778

Merged
merged 39 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
86d3df4
Update cil recipes to use astra 2.1
gfardell Feb 16, 2024
b13e7f6
callback temp fix
gfardell Feb 19, 2024
79734b9
tests: fix windows tempfile race
casperdcl Feb 19, 2024
52ab891
Merge remote-tracking branch 'upstream/master' into astra_2.1
gfardell Feb 20, 2024
63cdc2c
Merge remote-tracking branch 'upstream/test-windows-tempfile-race' in…
gfardell Feb 20, 2024
f7602ee
changelog
gfardell Feb 20, 2024
a092968
Merge branch 'master' into astra_2.1
gfardell Feb 20, 2024
7a29e25
change back to conda-forge with cuda
gfardell Feb 21, 2024
20dcb83
update readme
gfardell Feb 21, 2024
60b02e1
Merge branch 'master' into astra_2.1
gfardell Mar 27, 2024
a660e40
Updated Dockerfile for new ASTRA version
gfardell Mar 28, 2024
c598a04
Updated requirements to TIGRE 2.6
gfardell Mar 28, 2024
03ffdeb
update recipe
gfardell Mar 28, 2024
223adbd
Update unittests for py3.12
gfardell Mar 28, 2024
f1fce47
Merge branch 'master' into tigre_2.6
gfardell Mar 28, 2024
f71918b
replace assertDictContainsSubset
gfardell Apr 3, 2024
66b90b5
Merge branch 'master' into tigre_2.6
gfardell Apr 5, 2024
45872b0
Update meta.yaml
gfardell Apr 9, 2024
cf25d33
Update meta.yaml
gfardell Apr 9, 2024
6287110
CI: drop CUDA ASTRA
casperdcl Apr 9, 2024
e0a68ab
CI: drop TIGRE CPU
casperdcl Apr 10, 2024
e7e8a13
docker: try -c nvidia
casperdcl Apr 10, 2024
7f95463
updates for CCPi-Regularisation version 24.0.0
paskino Mar 27, 2024
bdc55dd
add to changelog
paskino Mar 27, 2024
fdc7a54
bump ccpi-regulariser
casperdcl Apr 16, 2024
eb3649f
CI: bump python, numpy versions
casperdcl Apr 16, 2024
2547db0
Supress prints for 3D fdk calls
gfardell Apr 16, 2024
e06231a
add versions, remove selector
gfardell Apr 16, 2024
3dc669a
Merge remote-tracking branch 'origin/py_np_variants_update' into rgl24
gfardell Apr 16, 2024
14305b1
Merge branch 'astra_2.1' into bump-versions
casperdcl Apr 16, 2024
da6c452
Merge branch 'tigre_2.6' into bump-versions
casperdcl Apr 16, 2024
2e6bf76
Merge branch 'rgl24' into bump-versions
casperdcl Apr 16, 2024
3f7791c
Package for GPU tests
gfardell Apr 18, 2024
b14be12
Merge branch 'astra_2.1' into bump-versions
gfardell Apr 18, 2024
96e87cf
Merge branch 'master' into bump-versions
gfardell Apr 18, 2024
788cbc3
Update README.md
gfardell Apr 19, 2024
9dee8c2
Update cange log
gfardell Apr 19, 2024
d4a3b3b
Add python and numpy versions to readme and action docs
lauramurgatroyd Apr 19, 2024
8f91c0e
Update test_DataProcessor.py
gfardell Apr 22, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Details on some of these jobs are given below.

## conda

When opening or modifying a pull request to `master`, a single variant is built and tested. This variant is for linux with `python=3.9` and `numpy=1.22`.
When opening or modifying a pull request to `master`, a single variant is built and tested. This variant is for linux with `python=3.11` and `numpy=1.25`.

> [!NOTE]
> The action does not publish to conda, instead this is done by jenkins. We will eventually move from jenkins to conda-forge instead.
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
runs-on: [self-hosted, python, cuda]
strategy:
matrix:
python-version: [3.9]
numpy-version: [1.22]
python-version: [3.11]
numpy-version: [1.25]
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
Expand Down Expand Up @@ -80,15 +80,15 @@ jobs:
strategy:
matrix:
include:
- python-version: 3.8
numpy-version: 1.21
- python-version: '3.10'
numpy-version: 1.24
numpy-version: 1.23
- python-version: 3.12
numpy-version: 1.26
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- name: set requirements
run: sed -ri -e '/ python=/d' -e 's/(.* numpy=).*/\1${{ matrix.numpy-version }}/' scripts/requirements-test.yml
run: sed -ri -e '/ python=/d' -e 's/(.* numpy=).*/\1${{ matrix.numpy-version }}/' -e 's/=cuda*//' -e '/tigre/d' scripts/requirements-test.yml
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -105,8 +105,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
numpy-version: [1.22]
python-version: [3.11]
numpy-version: [1.25]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why were these particular versions chosen for the conda action?

steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
Expand All @@ -132,12 +132,12 @@ jobs:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- uses: conda-incubator/setup-miniconda@v3
with: {python-version: '3.10'}
with: {python-version: 3.11}
- name: install dependencies
run: |
cd docs
conda install -c conda-forge -yq conda-merge
conda-merge ../scripts/requirements-test.yml docs_environment.yml > environment.yml
conda-merge ../scripts/requirements-test.yml docs_environment.yml | sed '/tigre/d' > environment.yml
conda env update -n test
conda list
- name: build cil
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
* x.x.x
* 24.0.0
- Update to new CCPi-Regularisation toolkit v24.0.0. This is a backward incompatible release of the toolkit.
- CIL plugin support for TIGRE version v2.6
- CIL plugin support for ASTRA-TOOLBOX version v2.1
- Dropped support for python 3.8 and 3.9
- Added support for python 3.11 and 3.12
- Dropped support for numpy 1.21 and 1.22
- Added support for numpy 1.25 and 1.26
- Set CMake Policy CMP0148 to OLD to avoid warnings in CMake 3.27
- AcquisitionGeometry prints the first and last 10 angles, or all if there are 30 or less, rather than the first 20
- Added a weight argument to the L1Norm function
Expand Down Expand Up @@ -48,7 +55,6 @@
- `TXRMDataReader`
- Added the ApproximateGradientSumFunction and SGFunction to allow for stochastic gradient algorithms to be created using functions with an approximate gradient and deterministic algorithms


lauramurgatroyd marked this conversation as resolved.
Show resolved Hide resolved
* 23.1.0
- Fix bug in IndicatorBox proximal_conjugate
- Allow CCPi Regulariser functions for non CIL object
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LABEL org.opencontainers.image.source=https://github.com/TomographicImaging/CIL
LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause AND GPL-3.0"

# CUDA-specific packages
ARG CIL_EXTRA_PACKAGES="tigre=2.4 astra-toolbox<2.1"
ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox=2.1.0=cuda*"
# build & runtime dependencies
# TODO: sync scripts/create_local_env_for_cil_development.sh, scripts/requirements-test.yml, recipe/meta.yaml (e.g. missing libstdcxx-ng _openmp_mutex pip)?
# vis. https://github.com/TomographicImaging/CIL/pull/1590
Expand All @@ -20,7 +20,7 @@ COPY --chown="${NB_USER}" scripts/requirements-test.yml environment.yml
RUN sed -ri '/tigre|astra-toolbox/d' environment.yml \
&& for pkg in jupyter-server-proxy $CIL_EXTRA_PACKAGES; do echo " - $pkg" >> environment.yml; done \
&& conda config --env --set channel_priority strict \
&& for ch in defaults ccpi intel conda-forge; do conda config --env --add channels $ch; done \
&& for ch in defaults nvidia ccpi intel conda-forge; do conda config --env --add channels $ch; done \
&& mamba env update -n base \
&& mamba clean -a -y -f \
&& rm environment.yml \
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ conda create --name cil -c conda-forge -c intel -c ccpi cil=23.1.0
To install CIL and the additional packages and plugins needed to run the [CIL demos](https://github.com/TomographicImaging/CIL-Demos) install the environment with:

```sh
conda create --name cil -c conda-forge -c intel -c ccpi cil=23.1.0 astra-toolbox tigre ccpi-regulariser tomophantom ipywidgets
conda create --name cil -c conda-forge -c intel -c ccpi cil=23.1.0 astra-toolbox=*=cuda* tigre ccpi-regulariser tomophantom ipywidgets
```

where:

- `astra-toolbox` (requires an NVIDIA GPU) enables CIL support for [ASTRA toolbox](http://www.astra-toolbox.com) projectors (GPLv3 license)
- `astra-toolbox` enables CIL support for [ASTRA toolbox](http://www.astra-toolbox.com) CPU projector (2D Parallel beam only) (GPLv3 license)
- `astra-toolbox=*=cuda*` (requires an NVIDIA GPU) enables CIL support for [ASTRA toolbox](http://www.astra-toolbox.com) GPU projectors (GPLv3 license)
- `tigre` (requires an NVIDIA GPU) enables support for [TIGRE](https://github.com/CERN/TIGRE) toolbox projectors (BSD license)
- `ccpi-regulariser` is the [CCPi Regularisation Toolkit](https://github.com/vais-ral/CCPi-Regularisation-Toolkit)
- `ccpi-regulariser` is the [CCPi Regularisation Toolkit](https://github.com/TomographicImaging/CCPi-Regularisation-Toolkit)
- `tomophantom` can generate phantoms to use as test data [Tomophantom](https://github.com/dkazanc/TomoPhantom)
- `ipywidgets` enables visulisation tools within jupyter noteboooks
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder, shouldn't we need a table with versions requirements in the README?


### Dependencies

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

try:
from ccpi.filters import regularisers
from ccpi.filters.cpu_regularisers import TV_ENERGY
from ccpi.filters.TV import TV_ENERGY
except ImportError as exc:
raise ImportError('Please `conda install "ccpi::ccpi-regulariser>=20.04"`') from exc
raise ImportError('Please `conda install "ccpi::ccpi-regulariser>=24"`') from exc


from cil.framework import DataOrder
Expand Down Expand Up @@ -229,14 +229,17 @@ def _fista_on_dual_rof(self, in_arr, tau):

"""

res , info = regularisers.FGP_TV(\
info = np.zeros((2,), dtype=np.float32)

res = regularisers.FGP_TV(\
in_arr,\
self.alpha * tau,\
self.max_iteration,\
self.tolerance,\
self.methodTV,\
self.nonnegativity,\
self.device)
infovector = info,
device = self.device)

return res, info

Expand Down Expand Up @@ -315,14 +318,18 @@ def alpha1(self):
return 1.

def proximal_numpy(self, in_arr, tau):
res , info = regularisers.TGV(in_arr,

info = np.zeros((2,), dtype=np.float32)

res = regularisers.TGV(in_arr,
self.alpha * tau,
self.alpha1,
self.alpha2,
self.max_iteration,
self.LipshitzConstant,
self.tolerance,
self.device)
infovector = info,
device = self.device)

# info: return number of iteration and reached tolerance
# https://github.com/vais-ral/CCPi-Regularisation-Toolkit/blob/master/src/Core/regularisers_CPU/TGV_core.c#L168
Expand Down Expand Up @@ -400,7 +407,10 @@ def __call__(self,x):
return np.nan

def proximal_numpy(self, in_arr, tau):
res , info = regularisers.FGP_dTV(\

info = np.zeros((2,), dtype=np.float32)

res = regularisers.FGP_dTV(\
in_arr,\
self.reference,\
self.alpha * tau,\
Expand All @@ -409,7 +419,8 @@ def proximal_numpy(self, in_arr, tau):
self.eta,\
self.methodTV,\
self.nonnegativity,\
self.device)
infovector = info,
device = self.device)
return res, info

def convex_conjugate(self, x):
Expand Down Expand Up @@ -454,7 +465,7 @@ def __call__(self,x):
def proximal_numpy(self, in_arr, tau):
# remove any dimension of size 1
in_arr = np.squeeze(in_arr)

res = regularisers.TNV(in_arr,
self.alpha * tau,
self.max_iteration,
Expand Down
4 changes: 3 additions & 1 deletion Wrappers/Python/cil/plugins/tigre/FBP.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ def process(self, out=None):
arr_out = np.squeeze(arr_out, axis=0)
else:
if self.acquisition_geometry.geom_type == 'cone':
arr_out = fdk(self.get_input().as_array(), self.tigre_geom, self.tigre_angles)
# suppress print statements from TIGRE https://github.com/CERN/TIGRE/issues/532
with contextlib.redirect_stdout(io.StringIO()):
arr_out = fdk(self.get_input().as_array(), self.tigre_geom, self.tigre_angles)
else:
arr_out = fbp(self.get_input().as_array(), self.tigre_geom, self.tigre_angles)

Expand Down
Loading
Loading