Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 11, 2024
1 parent 0ec9af5 commit e707170
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 28 deletions.
26 changes: 13 additions & 13 deletions src/spikeinterface/sorters/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
slurm={"tmp_script_folder": None},
)

_default_slurm_kwargs = {'cpus-per-task': 1, 'mem': '1G'}
_default_slurm_kwargs = {"cpus-per-task": 1, "mem": "1G"}

_implemented_engine = list(_default_engine_kwargs.keys())

Expand Down Expand Up @@ -228,18 +228,18 @@ def run_sorter_jobs(job_list, engine="loop", engine_kwargs=None, slurm_kwargs=No


def run_sorter_by_property(
sorter_name,
recording,
grouping_property,
folder,
mode_if_folder_exists=None,
engine="loop",
engine_kwargs={},
verbose=False,
docker_image=None,
singularity_image=None,
working_folder: None = None,
**sorter_params,
sorter_name,
recording,
grouping_property,
folder,
mode_if_folder_exists=None,
engine="loop",
engine_kwargs={},
verbose=False,
docker_image=None,
singularity_image=None,
working_folder: None = None,
**sorter_params,
):
"""
Generic function to run a sorter on a recording after splitting by a "grouping_property" (e.g. "group").
Expand Down
24 changes: 9 additions & 15 deletions src/spikeinterface/sorters/tests/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,15 @@ def test_run_sorter_jobs_slurm_kwargs(mocker, tmp_path, job_list):

tmp_script_folder = tmp_path / "slurm_scripts"

engine_kwargs = dict(
tmp_script_folder=tmp_script_folder)
slurm_kwargs={
"cpus-per-task": 32,
"mem": "32G",
"gres": "gpu:1",
"any_random_kwarg": 12322,
}

run_sorter_jobs(
job_list,
engine="slurm",
engine_kwargs=engine_kwargs,
slurm_kwargs=slurm_kwargs
)
engine_kwargs = dict(tmp_script_folder=tmp_script_folder)
slurm_kwargs = {
"cpus-per-task": 32,
"mem": "32G",
"gres": "gpu:1",
"any_random_kwarg": 12322,
}

run_sorter_jobs(job_list, engine="slurm", engine_kwargs=engine_kwargs, slurm_kwargs=slurm_kwargs)

script_0_path = f"{tmp_script_folder}/si_script_0.py"
script_1_path = f"{tmp_script_folder}/si_script_1.py"
Expand Down

0 comments on commit e707170

Please sign in to comment.