Hi, I am trying to estimate the model parameters using cadet-match. I am facing the attached error. For reference, I have attached my code. Kindly help me to solve the error.
Thanks
Naveen J
Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[10], line 63
60 match_file2 = os.fspath(match_config_file)
62 with open(match_file2, 'w') as json_file:
---> 63 json.dump(match_config.to_dict(), json_file, indent='\t')
65 match = Match(match_file2)
66 match.start_sim()
File ~/opt/miniconda3/envs/ngj/lib/python3.9/json/__init__.py:179, in dump(obj, fp, skipkeys, ensure_ascii, check_circular, allow_nan, cls, indent, separators, default, sort_keys, **kw)
173 iterable = cls(skipkeys=skipkeys, ensure_ascii=ensure_ascii,
174 check_circular=check_circular, allow_nan=allow_nan, indent=indent,
175 separators=separators,
176 default=default, sort_keys=sort_keys, **kw).iterencode(obj)
177 # could accelerate with writelines in some versions of Python, at
178 # a debuggability cost
--> 179 for chunk in iterable:
180 fp.write(chunk)
File ~/opt/miniconda3/envs/ngj/lib/python3.9/json/encoder.py:431, in _make_iterencode.<locals>._iterencode(o, _current_indent_level)
429 yield from _iterencode_list(o, _current_indent_level)
430 elif isinstance(o, dict):
--> 431 yield from _iterencode_dict(o, _current_indent_level)
432 else:
433 if markers is not None:
...
178 """
--> 179 raise TypeError(f'Object of type {o.__class__.__name__} '
180 f'is not JSON serializable')
TypeError: Object of type PosixPath is not JSON serializable
Now I am facing the below error. Kindly help me to resolve this.
Thank you
Naveen J
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
ValueError: could not convert string to float: ''
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last)
Cell In[11], line 64
61 with open(match_file, 'w') as json_file:
62 json.dump(match_config.to_dict(), json_file, indent='\t')
---> 64 match = Match(match_file)
65 match.start_sim()
File ~/opt/miniconda3/envs/ngj/lib/python3.9/site-packages/CADETMatch/jupyter.py:19, in Match.__init__(self, json_path)
17 self.cache.setup_dir(json_path)
18 CADETMatch.match.createDirectories(self.cache, json_path)
---> 19 self.cache.setup(json_path)
File ~/opt/miniconda3/envs/ngj/lib/python3.9/site-packages/CADETMatch/cache.py:147, in Cache.setup(self, json_path, load_plugins)
142 self.parameters = [
143 self.transforms[parameter["transform"]](parameter, self)
144 for parameter in self.settings["parameters"]
145 ]
146 self.setupHeaders()
--> 147 self.setupTarget()
...
990 # string-length and datetime-unit discovery (like `arr.astype()`).
991 # Due to chunking, certain error reports are less clear, currently.
992 if filelike:
ValueError: could not convert string '\ufeff0' to float64 at row 0, column 1.
ok, there seems to be an issue with the file format of your csv file. I’m not an expert on this topic. I fixed it by opening it in an editor and saving it again but your milage may vary. Please make sure that the csv file uses UTF-8, EOL etc.
I was attempting to fit multiple experimental data sets in order to estimate parameters. However, the terminal became frozen, and the estimated parameter values are not producing satisfactory results.
Please assist me in solving this issue.