plot_diagnostic function does not work #71
Replies: 2 comments
-
Can you reformat the code and give the full code that reproduces the issue? |
Beta Was this translation helpful? Give feedback.
0 replies
-
This is a common issue, I recommend reading this thread #20 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I got the following errors while calling model.plot_diagnostic(alpha=0.95) in the water level example. Can anybody help explain why? Thanks.
=======================================================================================
Extreme Values
Count: 94 Extraction method: BM
Type: high Block size: 365 days 05:49:12
Model: MLE Distribution: genextreme
Log-likelihood: 18.026 AIC: -29.786
Free parameters: c=-0.266 Fixed parameters: All parameters are free
loc=1.353
scale=0.146
Traceback (most recent call last):
File "", line 1, in
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
exitcode = _main(fd, parent_sentinel)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
prepare(preparation_data)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
_fixup_main_from_path(data['init_main_from_path'])
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 268, in run_path
main_content = runpy.run_path(main_path,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 268, in run_path
return _run_module_code(code, init_globals, run_name,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 97, in _run_module_code
return _run_module_code(code, init_globals, run_name,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
_run_code(code, mod_globals, init_globals,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/gangfengma/Documents/MRSG2023/test_extreme.py", line 34, in
exec(code, run_globals)
File "/Users/gangfengma/Documents/MRSG2023/test_extreme.py", line 34, in
model.plot_diagnostic(alpha=0.95)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1633, in plot_diagnostic
model.plot_diagnostic(alpha=0.95)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1633, in plot_diagnostic
self.plot_return_values(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1434, in plot_return_values
self.plot_return_values(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1434, in plot_return_values
modeled_return_values = self.get_summary(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1313, in get_summary
modeled_return_values = self.get_summary(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1313, in get_summary
rv = self.get_return_value(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1256, in get_return_value
rv = self.get_return_value(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/eva.py", line 1256, in get_return_value
for value in self.model.get_return_value(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/models/model_mle.py", line 127, in get_return_value
for value in self.model.get_return_value(
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/models/model_mle.py", line 127, in get_return_value
self._extend_fit_parameter_cache(n=n_extra_fit_parameters)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/models/model_mle.py", line 254, in _extend_fit_parameter_cache
self._extend_fit_parameter_cache(n=n_extra_fit_parameters)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyextremes/models/model_mle.py", line 254, in _extend_fit_parameter_cache
with multiprocessing.Pool(processes=n_cores) as pool:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 119, in Pool
with multiprocessing.Pool(processes=n_cores) as pool:
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 119, in Pool
return Pool(processes, initializer, initargs, maxtasksperchild,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 212, in init
return Pool(processes, initializer, initargs, maxtasksperchild,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 212, in init
self._repopulate_pool()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 303, in _repopulate_pool
self._repopulate_pool()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 303, in _repopulate_pool
return self._repopulate_pool_static(self._ctx, self.Process,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 326, in _repopulate_pool_static
return self._repopulate_pool_static(self._ctx, self.Process,
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/pool.py", line 326, in _repopulate_pool_static
w.start()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
w.start()
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
self._popen = self._Popen(self)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
return Popen(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in init
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
super().init(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
prep_data = spawn.get_preparation_data(process_obj._name)
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
_check_not_importing_main() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
raise RuntimeError('''
RuntimeError: RuntimeError
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
Beta Was this translation helpful? Give feedback.
All reactions