You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dear developer, thank you very much for providing the program. It has been of great help to our work. I have encountered some questions that I would like to ask you:
beat sample Gongxian
To enable 'bem' mode packages 'pygmsh' and 'cutde' need to be installed.
config - INFO All hierarchicals ok!
config - INFO All hyperparameters ok!
config - INFO All priors ok!
models - INFO ... Initialising Geometry Optimizer ...
models - INFO Analysing problem ...
models - INFO ---------------------
models - INFO Using RectangularSource for 1 sources for event --- !pf.Event
lat: 28.2
lon: 104.86
time: '2009-04-06 01:32:49.190000057'
depth: 3000.0
duration: 5.0
geodetic - INFO Number of geodetic datasets: 2
geodetic - INFO Number of geodetic data points: 2178
geodetic - INFO Initialising geometry geodetic composite ...
models - INFO ... Building model ...
models - INFO Initialised hyperparameter h_SAR with size 2
models - INFO Initialized 2 hyperparameters in total!
geodetic - INFO Evaluating config for Ramps corrections for datasets...
geodetic - INFO No Ramps correction!
geodetic - INFO Evaluating config for Euler Pole corrections for datasets...
geodetic - INFO No Euler Pole correction!
geodetic - INFO Evaluating config for Strain Rate corrections for datasets...
geodetic - INFO No Strain Rate correction!
geodetic - INFO Initialized 0 hierarchical parameters.
geodetic - INFO Geodetic optimization on:
depth, dip, east_shift, length, north_shift, rake, slip, strike, width
geodetic - INFO Retrieving geodetic data-covariances with structure "import" for asc_20190103SichuanGongxian ...
geodetic - INFO Retrieving geodetic data-covariances with structure "import" for des_20190103SichuanGongxian ...
models - INFO Model building was successful!
models - INFO Using "csv" backend to store samples!
models - INFO ... Initiate Sequential Monte Carlo ...
n_chains=1000, tune_interval=10, n_jobs=4, proposal_distribution: MultivariateCauchy,
metropolis - INFO Creating initial population for 1000 chains ...
Sampling: [depth, dip, east_shift, h_SAR, length, north_shift, rake, slip, strike, width]
pymc.sampling.forward - INFO Sampling: [depth, dip, east_shift, h_SAR, length, north_shift, rake, slip, strike, width]
metropolis - INFO Compiling model graph ...
metropolis - INFO Initializing proposal distribution ...MultivariateCauchy
metropolis - INFO Time for proposal covariance init: 0.008871
models - INFO Compilation time: 1.356128
models.base - INFO ... Starting SMC ...
backend - INFO Reloading existing results ...
backend - INFO Loading multitrace from /home/ywz/BEAT/Gongxian/geometry/stage_0
backend - INFO Checking for corrupted files ...
smc - INFO Sample initial stage: ...
smc - INFO Beta: 0.000000 Stage: 0
backend - INFO Loading multitrace from /home/ywz/BEAT/Gongxian/geometry/stage_0
smc - INFO Updating Covariances ...
Traceback (most recent call last):
File "/home/ywz/Downloads/enter/envs/beatenv/bin/beat", line 8, in
sys.exit(main())
^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/apps/beat.py", line 2441, in main
globals()"command_" + command
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/apps/beat.py", line 1068, in command_sample
sample(step, problem)
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/models/base.py", line 262, in sample
smc_sample(
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/sampler/smc.py", line 494, in smc_sample
map_pt = step.get_map_end_points()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/sampler/smc.py", line 288, in get_map_end_points
return self.bij.rmap(self.array_population[idx, :])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/pymc/blocking.py", line 105, in rmap
raise TypeError("array must be a RaveledVars type")
TypeError: array must be a RaveledVars type
Is this error caused by a version error in the software packages pymc, pygmsh, or cutde, or is there a problem with the previous steps (which did not report the error)?
Here are the versions of these three software packages:
Name: pymc
Version: 5.16.2
Summary: Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor
Home-page: http://github.com/pymc-devs/pymc
Author:
Author-email:
License: Apache License, Version 2.0
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: arviz, cachetools, cloudpickle, numpy, pandas, pytensor, rich, scipy, threadpoolctl, typing-extensions
Required-by: beat
#############################
Name: cutde
Version: 23.6.25
Summary: 130 million TDEs per second, Python + CUDA TDEs from Nikkhoo and Walter 2015
Home-page: https://github.com/tbenthompson/cutde
Author: T. Ben Thompson
Author-email: [email protected]
License: MIT
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: mako, pybind11
Required-by:
#############################
Name: pygmsh
Version: 7.1.17
Summary: Python frontend for Gmsh
Home-page:
Author:
Author-email: Nico Schlömer [email protected]
License:
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: gmsh, meshio, numpy
Required-by:
I'm really looking forward to your response, and I truly appreciate the time and effort you'll put into answering my question.
The text was updated successfully, but these errors were encountered:
thank you! I am glad it is of use for you! Please disable the update_covariances flag in your sampler config. That is not easily supported currently. Also it is not straight forward to use- you can get significantly biased results.
As a sidenote: once you know your setup is correctly configured and consistent such that you do not need to debug the sampling result files anymore- I recommend you set the backend=bin (instead of csv) that is 100 times faster during read and write.
Thank you!
Hannes
hvasbath
changed the title
Sample issue
Sampling issue with update_covariances=True
Feb 3, 2025
Dear Hannes @hvasbath ,
Thank you sincerely for your prompt and helpful response. Your insights are invaluable for my project.I set update_comvariances=fasle, and the issue was resolved. The advice on setting backend=bin instead of csv is also much valued.
Thank you again for your help!
Dear developer, thank you very much for providing the program. It has been of great help to our work. I have encountered some questions that I would like to ask you:
beat sample Gongxian
To enable 'bem' mode packages 'pygmsh' and 'cutde' need to be installed.
config - INFO All hierarchicals ok!
config - INFO All hyperparameters ok!
config - INFO All priors ok!
models - INFO ... Initialising Geometry Optimizer ...
models - INFO Analysing problem ...
models - INFO ---------------------
models - INFO Using RectangularSource for 1 sources for event --- !pf.Event
lat: 28.2
lon: 104.86
time: '2009-04-06 01:32:49.190000057'
depth: 3000.0
duration: 5.0
geodetic - INFO Number of geodetic datasets: 2
geodetic - INFO Number of geodetic data points: 2178
geodetic - INFO Initialising geometry geodetic composite ...
models - INFO ... Building model ...
models - INFO Initialised hyperparameter h_SAR with size 2
models - INFO Initialized 2 hyperparameters in total!
geodetic - INFO Evaluating config for Ramps corrections for datasets...
geodetic - INFO No Ramps correction!
geodetic - INFO Evaluating config for Euler Pole corrections for datasets...
geodetic - INFO No Euler Pole correction!
geodetic - INFO Evaluating config for Strain Rate corrections for datasets...
geodetic - INFO No Strain Rate correction!
geodetic - INFO Initialized 0 hierarchical parameters.
geodetic - INFO Geodetic optimization on:
depth, dip, east_shift, length, north_shift, rake, slip, strike, width
geodetic - INFO Retrieving geodetic data-covariances with structure "import" for asc_20190103SichuanGongxian ...
geodetic - INFO Retrieving geodetic data-covariances with structure "import" for des_20190103SichuanGongxian ...
models - INFO Model building was successful!
models - INFO Using "csv" backend to store samples!
models - INFO ... Initiate Sequential Monte Carlo ...
n_chains=1000, tune_interval=10, n_jobs=4, proposal_distribution: MultivariateCauchy,
metropolis - INFO Creating initial population for 1000 chains ...
Sampling: [depth, dip, east_shift, h_SAR, length, north_shift, rake, slip, strike, width]
pymc.sampling.forward - INFO Sampling: [depth, dip, east_shift, h_SAR, length, north_shift, rake, slip, strike, width]
metropolis - INFO Compiling model graph ...
metropolis - INFO Initializing proposal distribution ...MultivariateCauchy
metropolis - INFO Time for proposal covariance init: 0.008871
models - INFO Compilation time: 1.356128
models.base - INFO ... Starting SMC ...
backend - INFO Reloading existing results ...
backend - INFO Loading multitrace from /home/ywz/BEAT/Gongxian/geometry/stage_0
backend - INFO Checking for corrupted files ...
smc - INFO Sample initial stage: ...
smc - INFO Beta: 0.000000 Stage: 0
backend - INFO Loading multitrace from /home/ywz/BEAT/Gongxian/geometry/stage_0
smc - INFO Updating Covariances ...
Traceback (most recent call last):
File "/home/ywz/Downloads/enter/envs/beatenv/bin/beat", line 8, in
sys.exit(main())
^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/apps/beat.py", line 2441, in main
globals()"command_" + command
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/apps/beat.py", line 1068, in command_sample
sample(step, problem)
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/models/base.py", line 262, in sample
smc_sample(
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/sampler/smc.py", line 494, in smc_sample
map_pt = step.get_map_end_points()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/beat/sampler/smc.py", line 288, in get_map_end_points
return self.bij.rmap(self.array_population[idx, :])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages/pymc/blocking.py", line 105, in rmap
raise TypeError("
array
must be aRaveledVars
type")TypeError:
array
must be aRaveledVars
typeIs this error caused by a version error in the software packages pymc, pygmsh, or cutde, or is there a problem with the previous steps (which did not report the error)?
Here are the versions of these three software packages:
Name: pymc
Version: 5.16.2
Summary: Probabilistic Programming in Python: Bayesian Modeling and Probabilistic Machine Learning with PyTensor
Home-page: http://github.com/pymc-devs/pymc
Author:
Author-email:
License: Apache License, Version 2.0
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: arviz, cachetools, cloudpickle, numpy, pandas, pytensor, rich, scipy, threadpoolctl, typing-extensions
Required-by: beat
#############################
Name: cutde
Version: 23.6.25
Summary: 130 million TDEs per second, Python + CUDA TDEs from Nikkhoo and Walter 2015
Home-page: https://github.com/tbenthompson/cutde
Author: T. Ben Thompson
Author-email: [email protected]
License: MIT
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: mako, pybind11
Required-by:
#############################
Name: pygmsh
Version: 7.1.17
Summary: Python frontend for Gmsh
Home-page:
Author:
Author-email: Nico Schlömer [email protected]
License:
Location: /home/ywz/Downloads/enter/envs/beatenv/lib/python3.11/site-packages
Requires: gmsh, meshio, numpy
Required-by:
I'm really looking forward to your response, and I truly appreciate the time and effort you'll put into answering my question.
The text was updated successfully, but these errors were encountered: