harbor run -t openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-03017harbor download openthoughts/tasktrove-swe-rebench-patched-oracle-swe_rebench-03017cd /testbed
git clone https://github.com/iris-hep/func_adl.git . && git checkout 95b14c9b3986201236d4f812dd4499185e99721e
pip install -r /setup_files/requirements.txt
pip install -e .[complete]
pip install pytest
Zip lookup for function types is causing a type tracing failure This is from @ponyisi.
You get this error:
File "/home/onyisi/servicex/analysis-grand-challenge/analyses/cms-open-data-ttbar/venv/lib64/python3.9/site-packages/func_adl/type_based_replacement.py", line 971, in visit_Attribute
raise ValueError(f"Key {key} not found in dict expression!!")
ValueError: Key Zip not found in dict expression!!
When running this AGC code:
cuts = source.Where(lambda e: {"pt": e.Electron_pt,
"eta": e.Electron_eta,
"cutBased": e.Electron_cutBased,
"sip3d": e.Electron_sip3d,}.Zip()\
.Where(lambda electron: (electron.pt > 30
and abs(electron.eta) < 2.1
and electron.cutBased == 4
and electron.sip3d < 4)).Count()
+ {"pt": e.Muon_pt,
"eta": e.Muon_eta,
"tightId": e.Muon_tightId,
"sip3d": e.Muon_sip3d,
"pfRelIso04_all": e.Muon_pfRelIso04_all}.Zip()\
.Where(lambda muon: (muon.pt > 30
and abs(muon.eta) < 2.1
and muon.tightId
and muon.pfRelIso04_all < 0.15)).Count()== 1)\
.Where(lambda f: {"pt": f.Jet_pt,
"eta": f.Jet_eta,
"jetId": f.Jet_jetId}.Zip()\
.Where(lambda jet: (jet.pt > 25
and abs(jet.eta) < 2.4
and jet.jetId == 6)).Count() >= 4)\
.Where(lambda g: {"pt": g.Jet_pt,
"eta": g.Jet_eta,
"btagCSVV2": g.Jet_btagCSVV2,
"jetId": g.Jet_jetId}.Zip()\
.Where(lambda jet: (jet.btagCSVV2 > 0.5
and jet.pt > 25
and abs(jet.eta) < 2.4)
and jet.jetId == 6).Count() >= 1)
Likely the problem is the function lookup should trigger an Any type return, not a total failure like this. And, further, it should work if the system has some type information (to catch mispellings).