SUEPPhysics / SUEPCoffea_dask

SUEP analysis using coffea with fastjet. Uses Dask for batch submissions
3 stars 13 forks source link

conda env - either update environment.yml or the README #306

Closed jreic closed 6 months ago

jreic commented 6 months ago

The README says that we can run the ntuple maker when using the conda env, but I couldn't quite get it working today / had to switch over to the singularity instance (offhand, I don't remember which way I ran the ntuple making before!).

In my simple test inside the conda env, I ran python condor_SUEP_WH.py --infile /data/submit/jreicher/QCD_Pt_600to800_TuneCP5_13TeV_pythia8+RunIISummer20UL18MiniAODv2-106X_upgrade2018_realistic_v16_L1v1-v1+MINIAODSIM_FF0F3BC4-6B79-FC4A-AFD8-078B85CAB9F9.root --maxChunks 1 --isMC=1 --doSyst=0

and initially encountered an issue with importing vector. After adding vector to my conda env, I ran into an issue importing fastjet instead:

  File "/home/submit/jreicher/SUEPCoffea_dask/condor_SUEP_WH.py", line 8, in <module>
    from workflows import SUEP_coffea_WH
  File "/home/submit/jreicher/SUEPCoffea_dask/workflows/SUEP_coffea_WH.py", line 17, in <module>
    import workflows.SUEP_utils as SUEP_utils
  File "/home/submit/jreicher/SUEPCoffea_dask/workflows/SUEP_utils.py", line 2, in <module>
    import fastjet
ModuleNotFoundError: No module named 'fastjet'

I feel like fastjet would have been part of the env for a long time, if the conda env was usable for producing ntuples! So I suggest we just fix the README to say that the minimal environment isn't sufficient for making ntuples, unless others think it's worth improving the environment.yml (I do notice that fastjet isn't in conda-forge).

lucalavezzo commented 6 months ago

Thank you for spotting this, I'm not quite sure how I got it to work myself; I think that since fastjet is install through pip it went in my ~/.local, and was available across any conda env I was making. I will add it to the environment now. Vector should be installed with coffea? I'm not sure, but I've added it explicitly.

I think it's nice to have an environment that works that's not dependent on singularity and can be controlled a bit more. We can be more explicit in the docs to say that the singularity is the suggested & more supported way to do things though.

lucalavezzo commented 6 months ago

Maybe related, but will our code break soon with the new singularity image since coffea has undergone a major upgrade? we use the :latest one, we might need to freeze to a particular version. We should check on this.