Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample error with pymc version 5.17.0 #134

Open
CUMT530849827 opened this issue Oct 10, 2024 · 10 comments
Open

sample error with pymc version 5.17.0 #134

CUMT530849827 opened this issue Oct 10, 2024 · 10 comments

Comments

@CUMT530849827
Copy link

Dear developers, thank you very much for providing such excellent software. I found that I could not solve this error when I processed column 3, but I handled it normally on another computer without any error. My current beat version is 2.0.1, how should I deal with this error?

(/opt/beat) root@ubuntu:~/Desktop# beat sample Laquila
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
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: 42.29
lon: 13.35
time: '2009-04-06 01:32:49.190000057'
depth: 12000.0
name: '200904060132A'
magnitude: 6.343080192483292
region: 'CENTRAL ITALY'
catalog: 'gCMT'
moment_tensor: !pf.MomentTensor
mnn: 1.43e+18
mee: 1.87e+18
mdd: -3.3e+18
mne: 1.77e+18
mnd: -1.43e+18
med: 2.6900000000000003e+17
strike1: 120.23408298515041
dip1: 54.240869089580485
rake1: -112.81739742081386
strike2: 335.98575923255856
dip2: 41.58440373860804
rake2: -61.69749587601104
moment: 3.6696131948749036e+18
magnitude: 6.343080192483292
duration: 7.0

geodetic - INFO Number of geodetic datasets: 2
geodetic - INFO Initialising corrections ...
heart - INFO Setting up Ramps correction for Laquila_dscxn
heart - INFO Masking data for Ramps estimation!
heart - INFO Not correcting Laquila_dscxn for Euler Pole
heart - INFO Not correcting Laquila_dscxn for Strain Rate
heart - INFO Setting up Ramps correction for Laquila_ascxn
heart - INFO Masking data for Ramps estimation!
heart - INFO Not correcting Laquila_ascxn for Euler Pole
heart - INFO Not correcting Laquila_ascxn for Strain Rate
geodetic - INFO Number of geodetic data points: 419
geodetic - INFO Initialising geometry geodetic composite ...
models - INFO ... Building model ...

/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
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...
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
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 6 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 Laquila_dscxn ...
geodetic - INFO Retrieving geodetic data-covariances with structure "import" for Laquila_ascxn ...
geodetic - INFO Applying corrections! ...
models - INFO Model building was successful!

models - INFO Using "bin" 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: [Laquila_ascxn_azimuth_ramp, Laquila_ascxn_offset, Laquila_ascxn_range_ramp, Laquila_dscxn_azimuth_ramp, Laquila_dscxn_offset, Laquila_dscxn_range_ramp, depth, dip, east_shift, h_SAR, length, north_shift, nucleation_x, nucleation_y, rake, slip, strike, time, width]
pymc.sampling.forward - INFO Sampling: [Laquila_ascxn_azimuth_ramp, Laquila_ascxn_offset, Laquila_ascxn_range_ramp, Laquila_dscxn_azimuth_ramp, Laquila_dscxn_offset, Laquila_dscxn_range_ramp, depth, dip, east_shift, h_SAR, length, north_shift, nucleation_x, nucleation_y, rake, slip, strike, time, width]
metropolis - INFO Compiling model graph ...
Traceback (most recent call last):
File "/opt/beat/bin/beat", line 8, in
sys.exit(main())
^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/apps/beat.py", line 2442, in main
globals()"command_" + command
File "/opt/beat/lib/python3.11/site-packages/beat/apps/beat.py", line 1064, in command_sample
step = problem.init_sampler(hypers=options.hypers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/models/problems.py", line 175, in init_sampler
step = sampler.SMC(
^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/sampler/smc.py", line 96, in init
super(SMC, self).init(
File "/opt/beat/lib/python3.11/site-packages/beat/sampler/metropolis.py", line 125, in init
self.compile_model_graph(model)
File "/opt/beat/lib/python3.11/site-packages/beat/sampler/metropolis.py", line 178, in compile_model_graph
out_vars=[model.varlogp],
^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/model/core.py", line 862, in varlogp
return self.logp(vars=self.free_RVs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/model/core.py", line 746, in logp
rv_logps = transformed_conditional_logp(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/logprob/basic.py", line 598, in transformed_conditional_logp
temp_logp_terms = conditional_logp(
^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/logprob/basic.py", line 481, in conditional_logp
fgraph = construct_ir_fgraph(rv_values, ir_rewriter=ir_rewriter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/logprob/rewriting.py", line 243, in construct_ir_fgraph
replacements = tuple((rv, valued_rv(rv, value)) for rv, value in ir_rv_values.items())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/logprob/rewriting.py", line 243, in
replacements = tuple((rv, valued_rv(rv, value)) for rv, value in ir_rv_values.items())
^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 304, in call
compute_test_value(node)
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 125, in compute_test_value
thunk()
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 524, in rval
r = p(n, [x[0] for x in i], o)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pymc/logprob/abstract.py", line 239, in perform
raise NotImplementedError("ValuedVar should not be present in the final graph!")
NotImplementedError: ValuedVar should not be present in the final graph!
(/opt/beat) root@ubuntu:~/Desktop#


BEAT_log.txt

@hvasbath
Copy link
Owner

hvasbath commented Oct 10, 2024

Hi, I am happy you like the software! Please update to the latest version 2.0.3 that error was resolved with that update. Thank you!

@CUMT530849827
Copy link
Author

Thanks for your reply, I updated beat to version 2.0.3 but it still reports the same error,I uploaded my data and yaml file and don't know where the error was

image
Laquila.zip

@hvasbath
Copy link
Owner

Whats your pymc version?

@CUMT530849827
Copy link
Author

image
5.17.0

@hvasbath
Copy link
Owner

Please try installing an earlier version 5.16.2? There were major changes in pymc with 5.17.0 (just released this week) maybe that broke things?

@CUMT530849827
Copy link
Author

It's starting to work properly Thank you very much for your guidance

@hvasbath
Copy link
Owner

Great thanks for reporting! Will need to pin the version of pymc then in the next release.

@hvasbath hvasbath changed the title sample error sample error with pymc version 5.17.0 Oct 10, 2024
@CUMT530849827
Copy link
Author

CUMT530849827 commented Oct 10, 2024

I used beat to complete the data processing of column 3 and got the same result as the case. However, I used my own data and the following error occurred. I only had insar data, so I made a new yaml file,How should I deal with this error

(/opt/beat) root@ubuntu:~/Desktop# beat sample mydz
WARNING (pytensor.tensor.blas): Using NumPy C-API based implementation for BLAS functions.
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: 37.81
lon: 101.31
time: '2022-01-07 17:45:32.089999914'
depth: 13700.0
name: '202201071745A'
magnitude: 6.686712302029662
region: 'QINGHAI, CHINA'
catalog: 'gCMT'
moment_tensor: !pf.MomentTensor
mnn: 5.659999999999999e+18
mee: -5.88e+18
mdd: 2.1e+17
mne: -1.04e+19
mnd: 5.6e+17
med: -1.67e+18
strike1: 104.56241311967706
dip1: 81.57891681425234
rake1: 0.7926346174953631
strike2: 14.446326877538597
dip2: 89.21591169980759
rake2: 171.57812248597253
moment: 1.2024539492221729e+19
magnitude: 6.686712302029662
duration: 10.4

geodetic - INFO Number of geodetic datasets: 1
geodetic - INFO Initialising corrections ...
heart - INFO Setting up Ramps correction for myas_asc
heart - INFO Masking data for Ramps estimation!
heart - INFO Not correcting myas_asc for Euler Pole
heart - INFO Not correcting myas_asc for Strain Rate
geodetic - INFO Number of geodetic data points: 370
geodetic - INFO Initialising geometry geodetic composite ...
models - INFO ... Building model ...

config - INFO not solving for opening_fraction, got fixed at 0.0
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
models - INFO Initialised hyperparameter h_SAR with size 1
models - INFO Initialized 1 hyperparameters in total!
geodetic - INFO Evaluating config for Ramps corrections for datasets...
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
/opt/beat/lib/python3.11/site-packages/pymc/model/core.py:1453: UserWarning: To disable default transform, please use default_transform=None instead of transform=None. Setting transform to None will not have any effect in future.
warnings.warn(
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 3 hierarchical parameters.
geodetic - INFO Geodetic optimization on:
depth, dip, east_shift, length, north_shift, rake, slip, strike, width
Traceback (most recent call last):
File "/opt/beat/bin/beat", line 8, in
sys.exit(main())
^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/apps/beat.py", line 2442, in main
globals()"command_" + command
File "/opt/beat/lib/python3.11/site-packages/beat/apps/beat.py", line 1062, in command_sample
problem = load_model(project_dir, options.mode, options.hypers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/models/problems.py", line 922, in load_model
problem.built_model()
File "/opt/beat/lib/python3.11/site-packages/beat/models/problems.py", line 241, in built_model
total_llk += composite.get_formula(
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/models/geodetic.py", line 635, in get_formula
disp = self.get_synths(self.input_rvs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 304, in call
compute_test_value(node)
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 125, in compute_test_value
thunk()
File "/opt/beat/lib/python3.11/site-packages/pytensor/graph/op.py", line 524, in rval
r = p(n, [x[0] for x in i], o)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/pytensorf.py", line 118, in perform
synths[0] = heart.geo_synthetics(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/beat/heart.py", line 4197, in geo_synthetics
response = engine.process(sources, targets)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pyrocko/gf/seismosizer.py", line 5744, in process
for ii_results, tcounters_static in process_static(
File "/opt/beat/lib/python3.11/site-packages/pyrocko/gf/seismosizer.py", line 5247, in process_static
base_statics, tcounters = engine.base_statics(
^^^^^^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pyrocko/gf/seismosizer.py", line 5585, in base_statics
base_statics = store_.statics(
^^^^^^^^^^^^^^^
File "/opt/beat/lib/python3.11/site-packages/pyrocko/gf/store.py", line 2084, in statics
res = store_ext.store_calc_static(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pyrocko.gf.store_ext.StoreExtError: INDEX_OUT_OF_BOUNDS
yamlfile.txt

@hvasbath
Copy link
Owner

Please see the FAQ, yours is point 5: https://pyrocko.org/beat/docs/current/faq.html

@hvasbath hvasbath reopened this Oct 11, 2024
@CUMT530849827
Copy link
Author

Thank you, Professor. I have completed List 3 and List 4 according to the instructions and the issue on github. beat is very attractive to me and I think it is a great software. I want to know more about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants