Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
reconstruction_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
reconstruction_benchmarks
Merge requests
!287
Add plot script for e/pi separation performance
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Add plot script for e/pi separation performance
update_imaging_ml_benchmarks
into
master
Overview
0
Commits
6
Pipelines
0
Changes
1
Open
Chao Peng
requested to merge
update_imaging_ml_benchmarks
into
master
2 years ago
Overview
0
Commits
6
Pipelines
0
Changes
1
Expand
update the json output from epcut and ML so rejection power and uncertainties can be directly read from them
add a json output for run_benchmark.py to collect all run information
add a script reading the run info files and plot the e/pi separation power curve
0
0
Merge request reports
Viewing commit
41825bf0
Prev
Next
Show latest version
1 file
+
18
−
10
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
41825bf0
add a run_type for run_benchmark.py
· 41825bf0
Chao Peng
authored
2 years ago
benchmarks/imaging_shower_ML/run_benchmark.py
+
18
−
10
Options
@@ -26,14 +26,14 @@ FILE_NAMES = dict(
prep_script
=
os
.
path
.
join
(
SDIR
,
'
scripts
'
,
'
ml_data_preprocess.py
'
),
ml_script
=
os
.
path
.
join
(
SDIR
,
'
scripts
'
,
'
ml_training.py
'
),
sim_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
sim_data
'
),
epscan_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
epcut
'
),
ml_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
ml_result
'
),
sim_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
sim_data
'
),
epscan_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
epcut
'
),
ml_dir
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
ml_result
'
),
gen_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
sim_data
'
,
'
{ntag}_gen.hepmc
'
),
sim_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
sim_data
'
,
'
{ntag}_sim.edm4hep.root
'
),
rec_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
sim_data
'
,
'
{ntag}_rec.root
'
),
ml_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
sim_data
'
,
'
{ntag}_data.h5
'
),
gen_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
sim_data
'
,
'
{ntag}_gen.hepmc
'
),
sim_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
sim_data
'
,
'
{ntag}_sim.edm4hep.root
'
),
rec_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
sim_data
'
,
'
{ntag}_rec.root
'
),
ml_file
=
os
.
path
.
join
(
'
{outdir}
'
,
'
{run_type}
'
,
'
sim_data
'
,
'
{ntag}_data.h5
'
),
)
# default values for argument parser
DEFAULT_COMPACT
=
os
.
path
.
join
(
@@ -124,11 +124,17 @@ if __name__ == '__main__':
default
=
'
sim_output
'
,
help
=
'
output directory.
'
)
parser
.
add_argument
(
'
-r
'
,
'
--run-type
'
,
type
=
str
,
dest
=
'
run_type
'
,
default
=
'
epic_imcal
'
,
help
=
'
a name specify the run type.
'
)
parser
.
add_argument
(
'
-t
'
,
'
--name-tag
'
,
type
=
str
,
dest
=
'
ntag
'
,
default
=
'
imcal_ml
'
,
help
=
'
name tag for output files.
'
help
=
'
a
name tag for output files.
'
)
parser
.
add_argument
(
'
-c
'
,
'
--compact
'
,
type
=
str
,
@@ -271,11 +277,13 @@ if __name__ == '__main__':
# save run information
# NOTE: runs with the same outdir will be combined (overwrite if nametag is the same)
run_data
=
{
args
.
ntag
:
kwargs
}
run_data
=
{
args
.
run_type
:
{
args
.
ntag
:
kwargs
}
}
try
:
with
open
(
os
.
path
.
join
(
args
.
outdir
,
'
result.json
'
),
'
r
'
)
as
f
:
run_data
=
json
.
load
(
f
)
run_data
.
update
({
args
.
ntag
:
kwargs
})
run_info
=
run_data
.
get
(
args
.
run_type
,
{})
run_info
.
update
({
args
.
ntag
:
kwargs
})
run_data
[
args
.
run_type
]
=
run_info
except
(
FileNotFoundError
,
json
.
decoder
.
JSONDecodeError
):
pass
Loading