Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion run-mlreco/install_mlreco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,7 @@ git clone -b develop https://github.com/DeepLearnPhysics/spine.git
# sed -i 's/yaml.load(open(filename))/yaml.load(open(filename), yaml.Loader)/' \
# dune-nd-lar-reco/load_helpers.py

git clone -b main https://github.com/DeepLearnPhysics/spine_prod.git
git clone -b main https://github.com/DeepLearnPhysics/spine-prod.git

# for backward-compatibility with run_mlreco.spine.sh
ln -s spine-prod spine_prod
33 changes: 33 additions & 0 deletions run-mlreco/run_spine.spine-prod.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash

export ND_PRODUCTION_CONTAINER=${ND_PRODUCTION_CONTAINER:-deeplearnphysics/larcv2:ub2204-cu124-torch251-larndsim}

source ../util/reload_in_container.inc.sh
source ../util/init.inc.sh

source load_mlreco.inc.sh

# Only export onwards if the vars are filled. The exports are a tip from Kazu and
# required for NDLAr.
[ -n "$ND_PRODUCTION_SPINE_NUM_THREADS" ] && export NUM_THREADS=$ND_PRODUCTION_SPINE_NUM_THREADS
[ -n "$ND_PRODUCTION_SPINE_OPENBLAS_NUM_THREADS" ] && export OPENBLAS_NUM_THREADS=$ND_PRODUCTION_SPINE_OPENBLAS_NUM_THREADS

outFile=${tmpOutDir}/${outName}.MLRECO_SPINE.hdf5
inName=${ND_PRODUCTION_IN_NAME}.${globalIdx}
inFile=${ND_PRODUCTION_OUTDIR_BASE}/run-mlreco/${ND_PRODUCTION_IN_NAME}/LARCV/${subDir}/${inName}.LARCV.root

rm -f "$outFile"

source install/spine-prod/configure.sh


run python3 install/spine/bin/run.py \
--config "$ND_PRODUCTION_SPINE_CONFIG" \
--log-dir "$logDir" \
--source "$inFile" \
--output "$outFile"


infOutDir=${outDir}/MLRECO_SPINE/${subDir}
mkdir -p "$infOutDir"
mv "$outFile" "$infOutDir/"