Open dachengx opened 1 week ago
https://github.com/AxFoundation/strax/pull/901 until 560cf9bee2ac1030ff5463b23e746768ed1585fe is trying to solve the error when "single_thread"
. It can solve that, but after that commit, another error RANDOMLY occurs:
2024-10-13 13:00:05,088 - utilix - DEBUG - Token exists at /home/xudc/.dbtoken
2024-10-13 13:00:05,088 - utilix - DEBUG - Token is valid.
/home/xudc/straxen/straxen/config/preprocessors.py:16: UserWarning: From straxen version 2.1.0 onward, URLConfig parameters will be sorted alphabetically before being passed to the plugins, this will change the lineage hash for non-sorted URLs. To load data processed with non-sorted URLs, you will need to use an older version.
warnings.warn(
/home/xudc/straxen/straxen/plugins/records/records.py:467: RuntimeWarning: invalid value encountered in divide
means = baseline_buffer / count
/home/xudc/straxen/straxen/plugins/records/records.py:470: RuntimeWarning: invalid value encountered in divide
res["baseline_rms_mean"][:] = (baseline_rms_buffer / count)[:]
/home/xudc/strax/strax/processing/general.py:396: UserWarning: endtime of things is not sorted! touching_windows will return the indices of the first and last things which are touching the container.
warnings.warn(
Multiple targets detected! This is only suitable for mass producing dataypes since only ['pulse_counts'] will be subscribed in the mailbox system!
You specified _auto_append_rucio_local=True and you are not on dali compute nodes, so we will add the following rucio local path: /project/lgrandi/rucio/
convert_channel:: changed channel
convert_channel_like:: update area_per_channel
convert_channel_like:: update saturated_channel
convert_channel_like:: update pulse_count
convert_channel_like:: update lone_pulse_count
convert_channel_like:: update pulse_area
convert_channel_like:: update lone_pulse_area
convert_channel_like:: update baseline_mean
convert_channel_like:: update baseline_rms_mean
Traceback (most recent call last):
File "/home/xudc/t.py", line 28, in <module>
assert st.is_stored(nt_test_run_id, "veto_regions")
AssertionError
This is because targets
is not deterministic after https://github.com/AxFoundation/strax/blob/dca35457bea07b278e331b07fefb98cea842e60a/strax/context.py#L1552 because set
is not sorted. Sometimes targets
will be ('veto_regions', 'pulse_counts', 'peaklets')
and sometimes will be ('peaklets', 'pulse_counts', 'veto_regions')
, etc.
When targets
is ('peaklets', 'pulse_counts', 'veto_regions')
, no error shows. Because in this case veto_region
will be the final_plugin
in https://github.com/AxFoundation/strax/blob/dca35457bea07b278e331b07fefb98cea842e60a/strax/context.py#L1313. Maybe there are other cases of no errors.
But ('pulse_counts', 'veto_regions', 'peaklets')
will definitely show an error.
This is done in the 2nd part of #901 after 560cf9bee2ac1030ff5463b23e746768ed1585fe.
Describe the bug
The processors are confused when some
data_type
s are saved but required to be processed again.To Reproduce
The processors are confused by the following code:
The
ThreadedMailboxProcessor
andSingleThreadProcessor
are both confused, so there are two problems.If
processor = "threaded_mailbox"
, you will see error:If
processor = "single_thread"
, you will see error:Expected behavior
No error happens and
veto_regions
is saved.Screenshots If applicable, add screenshots to help explain your problem.
Versions
strax dca35457bea07b278e331b07fefb98cea842e60a straxen 9d2a6b6111b0e43051f53d19fd394c6861465fdb