Ok, I think I found the issue. If you look at the error message, it says:
----> 6 json.dump(match_config.to_dict(), json_file, indent='\t')
[...]
TypeError: Object of type PosixPath is not JSON serializable
So what I did next was to check the contents of match_config
. This is the output when i print it:
{'CADETPath': PosixPath('/opt/tljh/user/bin/cadet-cli'),
'baseDir': '/home/jupyter-j.schmoelder/cadet-tutorial/08_CADET-Match_Introduction',
'resultsDir': 'results',
'parameters': [{'location': '/input/model/unit_001/COL_DISPERSION',
'min': 1e-10,
'max': 1e-06,
'component': -1,
'bound': -1,
'transform': 'null'},
{'location': '/input/model/unit_001/COL_POROSITY',
'min': 0.2,
'max': 0.7,
'component': -1,
'bound': -1,
'transform': 'null'}],
'experiments': [{'name': 'dextran',
'csv': '../resources/dextran_experiment.csv',
'HDF5': 'dextran_reference.h5',
'output_path': '/output/solution/unit_002/SOLUTION_OUTLET_COMP_000',
'features': [{'name': 'Pulse', 'type': 'SSE'}]}],
'searchMethod': 'NSGA3',
'population': 12,
'stallGenerations': 10,
'finalGradRefinement': True,
'gradVector': True}
Here you can see that actually, the cadet path seems to be the culprit. If you convert it to a proper path, it runs:
match_config.CADETPath = Cadet.cadet_path.as_posix()
Once again, sorry it took so long!