From 759e5b02d49df5602e880bd5ed8be80cf7498805 Mon Sep 17 00:00:00 2001 From: AroneyS Date: Mon, 3 Jun 2024 08:55:35 +1000 Subject: [PATCH] supplement: restrict polars threads --- singlem/supplement.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/singlem/supplement.py b/singlem/supplement.py index e1b0faff..cd4c762f 100755 --- a/singlem/supplement.py +++ b/singlem/supplement.py @@ -827,6 +827,9 @@ def supplement(self, **kwargs): if len(kwargs) > 0: raise Exception("Unexpected arguments detected: %s" % kwargs) + os.environ["POLARS_MAX_THREADS"] = str(threads) + import polars as pl + if new_genome_fasta_files is None and new_genome_fasta_files_list is None: raise Exception("Must provide either --new-genome-fasta-files or --new-genome-fasta-files-list") elif new_genome_fasta_files is not None and new_genome_fasta_files_list is not None: