Replies: 6 comments 11 replies
-
Btw, These are the steps in my analysis In [4]: results.steps
Out[4]:
DotDict([('trigger',
<Array [False, False, False, ..., False, False, False] type='100000 * bool'>),
('met_filter',
<Array [True, True, True, True, ..., True, True, True] type='100000 * bool'>),
('b_veto',
<Array [True, True, True, True, ..., True, True, True] type='100000 * bool'>),
('At least two leptons of any sign',
<Array [False, False, False, ..., False, False, False] type='100000 * bool'>),
('dilepton_veto',
<Array [True, True, True, True, ..., True, True, True] type='100000 * bool'>),
('atleast_one_higgs_cand_per_event',
<Array [False, False, False, ..., False, False, False] type='100000 * ?bool'>)])
In [5]: Perhaps, the type of the last one is |
Beta Was this translation helpful? Give feedback.
-
I bypassed it somehow using ak.fill_none(slection_mask, False) Probably, this is not the best way to do this. |
Beta Was this translation helpful? Give feedback.
-
Hi @gsaha009 , This is just a quick feedback: Indeed, I think the Anyhow, in the cases where you have a |
Beta Was this translation helpful? Give feedback.
-
That being said, I think we should look into the error that is raised, I think the print out is malformed |
Beta Was this translation helpful? Give feedback.
-
Thanks @pkausw ** ALERT: Long Error message ahead !!! :| After selecting the events, in the selectEvents task, I was going to save the newly produced concatenated array of LorentzVector in the events array. The error I am getting is the following: ERROR: luigi-interface - [pid 29850] Worker Worker(salt=5076733547, workers=1, host=sbgui3.in2p3.fr, username=gsaha, pid=28486) failed cf.SelectEvents(effective_workflow=local, branch=0, analysis=httcp.config.analysis_httcp.analysis_httcp, version=v1, config=run2_2017_nano_local_v10, shift=nominal, local_shift=nominal, dataset=h_ggf_tautau_powheg, calibrators=main, selector=main)
Traceback (most recent call last):
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/awkward/_dispatch.py", line 60, in dispatch
next(gen_or_result)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/awkward/operations/ak_to_parquet.py", line 309, in to_parquet
with pyarrow_parquet.ParquetWriter(
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/pyarrow/parquet/core.py", line 1016, in __init__
self.writer = _parquet.ParquetWriter(
File "pyarrow/_parquet.pyx", line 1776, in pyarrow._parquet.ParquetWriter.__cinit__
File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: dense_union<0: large_list<item: large_list<item: struct<charge: int32 not null, decayMode: int16 not null, eta: float not null, mass: float not null, phi: float not null, pt: float not null> not null> not null> not null=0, 1: fixed_size_list<item: fixed_size_list<item: large_list<item: struct<charge: int32 not null, decayMode: int16 not null, eta: float not null, mass: float not null, phi: float not null, pt: float not null> not null> not null>[0] not null>[1] not null=1>
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/luigi/worker.py", line 203, in run
new_deps = self._run_get_new_deps()
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/luigi/worker.py", line 138, in _run_get_new_deps
task_gen = self.task.run()
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 244, in wrapper
return decorator(fn, _opts, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 272, in log
return fn(task, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 231, in wrapper
result = call(state)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/util.py", line 303, in call
return fn(task, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 244, in wrapper
return decorator(fn, _opts, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 540, in localize
return fn(task, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 231, in wrapper
result = call(state)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/decorator.py", line 303, in call
return fn(task, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/tasks/selection.py", line 163, in run
for (events, *cols), pos in self.iter_chunked_io(
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/tasks/framework/mixins.py", line 1933, in iter_chunked_io
for obj in self.iter_progress(handler, max(handler.n_chunks, 1), msg=msg):
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/modules/law/law/task/base.py", line 565, in iter_progress
for i, val in enumerate(iterable):
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/columnar_util.py", line 3388, in __iter__
yield from self._iter_impl()
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/columnar_util.py", line 3319, in _iter_impl
result_obj = result.get()
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/conda/lib/python3.9/multiprocessing/pool.py", line 771, in get
raise self._value
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/conda/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/modules/columnflow/columnflow/columnar_util.py", line 1041, in sorted_ak_to_parquet
ak.to_parquet(ak_array, *args, **kwargs)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/awkward/_dispatch.py", line 68, in dispatch
return gen_or_result
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/awkward/_errors.py", line 67, in __exit__
self.handle_exception(exception_type, exception_value)
File "/home/gsaha/Work/ColumnflowAnalyses/CPinHToTauTau/data/software/venvs/venv_columnar_dev_3cbb5aff/lib/python3.9/site-packages/awkward/_errors.py", line 82, in handle_exception
raise self.decorate_exception(cls, exception)
pyarrow.lib.ArrowNotImplementedError: Unhandled type for Arrow to Parquet schema conversion: dense_union<0: large_list<item: large_list<item: struct<charge: int32 not null, decayMode: int16 not null, eta: float not null, mass: float not null, phi: float not null, pt: float not null> not null> not null> not null=0, 1: fixed_size_list<item: fixed_size_list<item: large_list<item: struct<charge: int32 not null, decayMode: int16 not null, eta: float not null, mass: float not null, phi: float not null, pt: float not null> not null> not null>[0] not null>[1] not null=1>
See if this has been reported at https://github.com/scikit-hep/awkward/issues
INFO: luigi-interface - This progress looks :( because there were failed tasks By any chance, do you think that this is due to the If you think that I should raise a different discussion for this, let me know |
Beta Was this translation helpful? Give feedback.
-
Great, sounds like this issue is resolved (within the context of columnflow). I'll close the discussion for now, but if there are new developments we should open it up again. |
Beta Was this translation helpful? Give feedback.
-
Hi CF Users and Developers,
I am trying to build an analysis using columnflow framework. The problem I am facing is the following:
I am trying to produce a new column which would contain the pairs of leptons of any flavor, like, [ [e,tau], [mu,tau], [tau,tau], ... ].
I do also want to apply some event level selection based on the number of pairs per event.
First, I kept some common fields of the leptons by reconstructing a coffea.vector LorentzVector
e.g.
Now the way I am creating the event level mask is the following:
ak.num(ak.firsts(hcand_pair_concat.pt, axis=1), axis=1) == 2
to make sure there is at least one pair per event.If I add this boolean array in "steps" dict in SelectionResults, the error I am getting is the following
ValueError: SelectionResult event mask must be of type N * bool, but got {ak.type(self.event)}
I added that particular result to my main SelectioResults(), and just before
event_sel = reduce(and_, results.steps.values())
, I got this error.ANY IDEA!!!
Thank you very much :)
Beta Was this translation helpful? Give feedback.
All reactions