Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix to update method that allows for working with lists. #837

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion netpyne/batchtools/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def update_items(d, u, force_match = False):
for k, v in u.items():
try:
force_match and validate(k, d)
if isinstance(v, collections.abc.Container):
if isinstance(v, collections.abc.Mapping): #TODO this will currently break on lists of dicts
d[k] = update_items(d.get(k), v, force_match)
else:
d[k] = v
Expand Down
1 change: 1 addition & 0 deletions netpyne/batchtools/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def run(config):
('sh', 'sfs' ): constructors(runtk.dispatchers.SFSDispatcher , submits.SHSubmitSFS),
}#TODO, just say "socket"?


"""
some shim functions before ray_search
"""
Expand Down
10 changes: 5 additions & 5 deletions netpyne/batchtools/submits.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ class SlurmSubmit(Submit):
#SBATCH --mail-user={email}
#SBATCH --mail-type=end
export JOBID=$SLURM_JOB_ID
{res}
{env}
{custom}
source ~/.bashrc
cd {project_path}
{command}
wait
Expand Down Expand Up @@ -227,8 +226,8 @@ class SlurmSubmitSFS(SlurmSubmit):
export JOBID=$SLURM_JOB_ID
export OUTFILE="{output_path}/{label}.out"
export SGLFILE="{output_path}/{label}.sgl"
{env}
{custom}
source ~/.bashrc
cd {project_path}
{command}
wait
Expand All @@ -254,13 +253,14 @@ class SlurmSubmitSOCK(SlurmSubmit):
#SBATCH --mail-type=end
export JOBID=$SLURM_JOB_ID
export SOCNAME="{sockname}"
{env}
{custom}
source ~/.bashrc
cd {project_path}
{command}
wait
"""
script_handles = {runtk.SUBMIT: '{output_path}/{label}.sh',
runtk.STDOUT: '{output_path}/{label}.run',
runtk.SOCKET: '{sockname}'
}
}

Loading