Skip to content

Commit

Permalink
Merge pull request #22 from neurostuff/fix/n_cores
Browse files Browse the repository at this point in the history
[FIX] do not add n_cores to fdr corrector
  • Loading branch information
jdkent authored Feb 7, 2024
2 parents 59dc53b + e527ebb commit d61b98f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compose_runner/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# from neurosynth_compose_sdk.api.compose_api import ComposeApi
# import neurostore_sdk
# from neurostore_sdk.api.store_api import StoreApi
from nimare.correct import FDRCorrector
from nimare.workflows import CBMAWorkflow, PairwiseCBMAWorkflow
from nimare.meta.cbma.base import CBMAEstimator, PairwiseCBMAEstimator
from nimare.nimads import Studyset, Annotation
Expand Down Expand Up @@ -110,7 +111,6 @@ def run_workflow(self, no_upload=False, n_cores=None):
self.create_result_object()
self.upload_results()


def download_bundle(self):
meta_analysis_resp = requests.get(
f"{self.compose_url}/meta-analyses/{self.meta_analysis_id}?nested=true"
Expand Down Expand Up @@ -397,9 +397,9 @@ def load_specification(self, n_cores=None):
cor_mod = import_module(".".join(["nimare", "correct"]))
corrector = getattr(cor_mod, spec["corrector"]["type"])
cor_args = {**spec["corrector"]["args"]} if spec["corrector"].get("args") else {}
if n_cores is not None:
if n_cores is not None and corrector is not FDRCorrector:
cor_args["n_cores"] = n_cores
if cor_args.get("n_iters") is not None:
if cor_args.get("n_iters") is not None and corrector is not FDRCorrector:
cor_args["n_iters"] = int(cor_args["n_iters"])
if cor_args.get("**kwargs") is not None:
for k, v in cor_args["**kwargs"].items():
Expand Down

0 comments on commit d61b98f

Please sign in to comment.