Skip to content

Commit

Permalink
Try setting suggested env var in scprint
Browse files Browse the repository at this point in the history
  • Loading branch information
lazappi committed Jan 17, 2025
1 parent 6e63cf9 commit 232e4fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/methods/scprint/config.vsh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ runners:
- type: executable
- type: nextflow
directives:
label: [midtime, midmem, midcpu, highgpu]
label: [midtime, midmem, midcpu, gpu]
3 changes: 3 additions & 0 deletions src/methods/scprint/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@

print(f"====== scPRINT version {scprint.__version__} ======", flush=True)

# Set suggested PyTorch environment variable
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"

print("\n>>> Reading input data...", flush=True)
input = read_anndata(par["input"], X="layers/counts", obs="obs", var="var", uns="uns")
if input.uns["dataset_organism"] == "homo_sapiens":
Expand Down

0 comments on commit 232e4fc

Please sign in to comment.