Skip to content

Multithreading issue with palantir.utils.run_magic_imputation() #133

@gighuarhguggg45

Description

@gighuarhguggg45

Hi,

Thank you for your work with Palantir. I have been running into issues with
imputed_X = palantir.utils.run_magic_imputation(ad,n_jobs=16)

(or any n_jobs > 1).

I get the following warning shortly after the run starts, which always ends up with the python kernel dying after a while.

`RuntimeWarning: os.fork() was called. os.fork() is incompatible with multithreaded code, and JAX is multithreaded, so this will likely lead to a deadlock

I do not get any errors with:
imputed_X = palantir.utils.run_magic_imputation(ad,n_jobs=1)

But n_jobs=1 just runs forever and never produces a result with my large scATAC anndata (101,966 cells and 228,892 features, with 30,000 variable features).

Of note, when I run the tutorial Palantir analysis notebook, I still get the warning, but I do not get the crash.

I am using 80 vCPUs and 640GB of memory. I'm using python 3.9.2

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions