Skip to content

Commit 1888fdb

Browse files
authored
Fix multiple methods (#97)
* Fix multiple methods * Restrict pyarrow version
1 parent 7d956fa commit 1888fdb

File tree

6 files changed

+31
-5
lines changed

6 files changed

+31
-5
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
setup:
22
- type: python
3-
pypi: [spatialdata, "anndata>=0.12.0"]
3+
pypi: [spatialdata, "anndata>=0.12.0", "pyarrow<22.0.0"]
4+
# remove pyarrow when https://github.com/scverse/spatialdata/issues/1007 is fixed

src/methods_cell_type_annotation/moscot/script.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,31 @@
2424
}
2525
## VIASH END
2626

27+
# --- Fix for CuDNN version mismatch ------------------------------------------
28+
# JAX wheels (e.g. jax[cuda12]) come with their own CUDA/cuDNN libraries.
29+
# However, some systems set LD_LIBRARY_PATH to point to an older system-wide
30+
# CUDA/cuDNN (e.g. 9.1). That can override JAX's bundled libraries and cause
31+
# errors like:
32+
# "Loaded runtime CuDNN library: 9.1.0 but source was compiled with: 9.8.0"
33+
#
34+
# To prevent that, we remove LD_LIBRARY_PATH before importing JAX so it uses
35+
# its own compatible, built-in CUDA/cuDNN stack.
36+
# -----------------------------------------------------------------------------
37+
import os
38+
print("LD_LIBRARY_PATH before unset:", os.environ.get("LD_LIBRARY_PATH"), flush=True)
39+
os.environ.pop("LD_LIBRARY_PATH", None)
40+
41+
# gpu check
42+
import jax
43+
import jaxlib
44+
print("GPU check", flush=True)
45+
print("jax:", jax.__version__, flush=True)
46+
print("jaxlib:", jaxlib.__version__, flush=True)
47+
print("backend:", jax.default_backend(), flush=True)
48+
print("devices:", jax.devices(), flush=True)
49+
print("LD_LIBRARY_PATH:", os.environ.get("LD_LIBRARY_PATH"), flush=True)
50+
51+
2752
# Optional parameter check: For this specific annotation method the par['input_spatial_normalized_counts'] and par['input_scrnaseq_reference'] are required
2853
assert par['input_spatial_normalized_counts'] is not None, 'Spatial input is required for this annotation method.'
2954
assert par['input_scrnaseq_reference'] is not None, 'Single cell input is required for this annotation method.'

src/methods_transcript_assignment/comseg/config.vsh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ arguments:
2525
description: "Coordinate system for the transcripts"
2626
- name: --patch_width
2727
type: integer
28-
default: 1200
28+
default: 2000
2929
description: "Width of image patches for processing"
3030
- name: --patch_overlap
3131
type: integer

src/methods_transcript_assignment/comseg/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"coordinate_system": "global",
1313
"output": "temp/comseg/transcripts.zarr",
1414

15-
"patch_width": 1200,
15+
"patch_width": 2000,
1616
"patch_overlap": 50,
1717
"transcript_patch_width": 200,
1818
"mean_cell_diameter": 15.0,

src/methods_transcript_assignment/pciseq/config.vsh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,4 +163,4 @@ runners:
163163
- type: executable
164164
- type: nextflow
165165
directives:
166-
label: [ hightime, midcpu, veryhighmem ]
166+
label: [ veryhightime, midcpu, veryhighmem ]

src/methods_transcript_assignment/proseg/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
)
8787

8888
# Make transcript patches
89-
sopa.make_transcript_patches(sdata_sopa, patch_width=2000, patch_overlap=50, prior_shapes_key="cell_id")
89+
sopa.make_transcript_patches(sdata_sopa, patch_width=None, patch_overlap=50, prior_shapes_key="cell_id")
9090
sdata_sopa['transcripts'].attrs['spatialdata_attrs'] = {}
9191
sdata_sopa['transcripts'].attrs['spatialdata_attrs']['feature_key'] = 'feature_name'
9292

0 commit comments

Comments
 (0)