Commit f262868f authored by Benjamin Murauer's avatar Benjamin Murauer
Browse files

Merge branch '60-fix-check_serializability-for-json' into 'master'

Resolve "Fix check_serializability for json"

Closes #60

See merge request dbis/software/dbispipeline!42
parents b2249377 f6b25720
Pipeline #43047 passed with stage
in 1 minute and 35 seconds
......@@ -344,7 +344,8 @@ def write_slurm_job_file(dryrun, force, verbose, restore, mail, plan):
content = '#!/bin/bash -l\n'
content += '\n'.join(['#SBATCH ' + x for x in options])
venv_manager = config.get('slurm', 'virtual_env_manager',
venv_manager = config.get('slurm',
content += f'\nsrun {venv_manager} run python -m dbispipeline {plan} '
......@@ -443,6 +444,14 @@ def check_serializability(content,
cleaned = pos_inf_replacement
elif type(content) == float and np.isneginf(content):
cleaned = neg_inf_repacement
elif type(content) == np.ndarray:
cleaned = content.tolist()
cleaned = content
# assume numpy type
cleaned = content.item()
except AttributeError as ex:
raise ValueError(
f'Type \'{type(content)}\' is no numpy type.') from ex
return cleaned
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment