Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Stefano Franchellucci
Umami
Commits
9c5bd30c
Commit
9c5bd30c
authored
Jan 31, 2022
by
Samuel Van Stroud
Committed by
Alexander Froch
Jan 31, 2022
Browse files
Small preprocessing changes
parent
23517530
Changes
4
Hide whitespace changes
Inline
Side-by-side
umami/configs/GNN_Variables.yaml
View file @
9c5bd30c
...
...
@@ -35,6 +35,7 @@ train_variables:
-
numberOfSCTSharedHits
-
numberOfPixelHoles
-
numberOfSCTHoles
#- leptonID
#- AMVFWeightPV
#- ambiRank
#- chiSquaredOverNumberDoF
...
...
@@ -44,5 +45,8 @@ track_train_variables:
tracks
:
<<
:
*tracks_variables
tracks_loose
:
<<
:
*tracks_variables
custom_defaults_vars
:
umami/data_tools/Cuts.py
View file @
9c5bd30c
...
...
@@ -47,6 +47,9 @@ def GetSampleCuts(jets, cuts):
cuts
=
clean_list
for
cut_entry
in
cuts
:
if
cut_entry
is
None
:
continue
# expect a dictionary with only one entry
cut
=
list
(
cut_entry
.
keys
())
if
len
(
cut
)
!=
1
:
...
...
umami/preprocessing_tools/Preparation.py
View file @
9c5bd30c
...
...
@@ -90,7 +90,7 @@ class PrepareSamples:
logger
.
warning
(
"no batch size given. Batch size set to 1,000,000"
)
self
.
batch_size
=
1_000_000
else
:
self
.
batch_size
=
self
.
config
.
preparation
[
"batchsize"
]
self
.
batch_size
=
int
(
self
.
config
.
preparation
[
"batchsize"
]
)
def
GetBatchesPerFile
(
self
,
filename
:
str
):
"""
...
...
umami/preprocessing_tools/Resampling.py
View file @
9c5bd30c
...
...
@@ -340,6 +340,9 @@ class Resampling:
self
.
outfile_name
=
self
.
config
.
GetFileName
(
option
=
"resampled"
)
self
.
outfile_path
=
self
.
config
.
config
[
"parameters"
][
"sample_path"
]
if
os
.
path
.
dirname
(
self
.
outfile_name
):
os
.
makedirs
(
os
.
path
.
dirname
(
self
.
outfile_name
),
exist_ok
=
True
)
# Get class labels from sampling/preparation.
# Try/Except here for backward compatibility
try
:
...
...
@@ -601,7 +604,6 @@ class Resampling:
if
create_file
:
create_file
=
False
os
.
makedirs
(
os
.
path
.
dirname
(
self
.
outfile_name
),
exist_ok
=
True
)
# write to file by creating dataset
with
h5py
.
File
(
self
.
outfile_name
,
"w"
)
as
out_file
:
out_file
.
create_dataset
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment