Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OrcaSong
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Machine Learning
OrcaSong
Commits
df2d175f
Commit
df2d175f
authored
6 years ago
by
ViaFerrata
Browse files
Options
Downloads
Patches
Plain Diff
Fix creation of directories in very rare cases.
parent
fc328b76
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
orcasong/data_to_images.py
+18
-3
18 additions, 3 deletions
orcasong/data_to_images.py
user/job_submission_scripts/submit_data_to_images.sh
+23
-18
23 additions, 18 deletions
user/job_submission_scripts/submit_data_to_images.sh
with
41 additions
and
21 deletions
orcasong/data_to_images.py
+
18
−
3
View file @
df2d175f
...
@@ -91,6 +91,7 @@ __email__ = 'michael.m.moser@fau.de'
...
@@ -91,6 +91,7 @@ __email__ = 'michael.m.moser@fau.de'
__status__
=
'
Prototype
'
__status__
=
'
Prototype
'
import
os
import
os
import
errno
import
sys
import
sys
import
warnings
import
warnings
import
toml
import
toml
...
@@ -223,16 +224,30 @@ def make_output_dirs(output_dirpath, do2d, do3d, do4d):
...
@@ -223,16 +224,30 @@ def make_output_dirs(output_dirpath, do2d, do3d, do4d):
projections
=
[
'
xy
'
,
'
xz
'
,
'
yz
'
,
'
xt
'
,
'
yt
'
,
'
zt
'
]
projections
=
[
'
xy
'
,
'
xz
'
,
'
yz
'
,
'
xt
'
,
'
yt
'
,
'
zt
'
]
for
proj
in
projections
:
for
proj
in
projections
:
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo2d/
'
+
proj
):
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo2d/
'
+
proj
):
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo2d/
'
+
proj
)
try
:
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo2d/
'
+
proj
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
if
do3d
:
if
do3d
:
projections
=
[
'
xyz
'
,
'
xyt
'
,
'
xzt
'
,
'
yzt
'
,
'
rzt
'
]
projections
=
[
'
xyz
'
,
'
xyt
'
,
'
xzt
'
,
'
yzt
'
,
'
rzt
'
]
for
proj
in
projections
:
for
proj
in
projections
:
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo3d/
'
+
proj
):
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo3d/
'
+
proj
):
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo3d/
'
+
proj
)
try
:
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo3d/
'
+
proj
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
if
do4d
[
0
]:
if
do4d
[
0
]:
proj
=
'
xyzt
'
if
not
do4d
[
1
]
==
'
channel_id
'
else
'
xyzc
'
proj
=
'
xyzt
'
if
not
do4d
[
1
]
==
'
channel_id
'
else
'
xyzc
'
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo4d/
'
+
proj
):
if
not
os
.
path
.
exists
(
output_dirpath
+
'
/orcasong_output/4dTo4d/
'
+
proj
):
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo4d/
'
+
proj
)
try
:
os
.
makedirs
(
output_dirpath
+
'
/orcasong_output/4dTo4d/
'
+
proj
)
except
OSError
as
e
:
if
e
.
errno
!=
errno
.
EEXIST
:
raise
def
calculate_bin_edges
(
n_bins
,
det_geo
,
detx_filepath
,
do4d
):
def
calculate_bin_edges
(
n_bins
,
det_geo
,
detx_filepath
,
do4d
):
...
...
This diff is collapsed.
Click to expand it.
user/job_submission_scripts/submit_data_to_images.sh
+
23
−
18
View file @
df2d175f
#!/bin/bash
#!/bin/bash
#
#
#PBS -l nodes=1:ppn=4:sl,walltime=
15
:00:00
#PBS -l nodes=1:ppn=4:sl,walltime=
20
:00:00
#PBS -o /home/woody/capn/mppi033h/logs/orcasong/submit_data_to_images_${PBS_JOBID}_${PBS_ARRAYID}.out -e /home/woody/capn/mppi033h/logs/orcasong/submit_data_to_images_${PBS_JOBID}_${PBS_ARRAYID}.err
#PBS -o /home/woody/capn/mppi033h/logs/orcasong/submit_data_to_images_${PBS_JOBID}_${PBS_ARRAYID}.out -e /home/woody/capn/mppi033h/logs/orcasong/submit_data_to_images_${PBS_JOBID}_${PBS_ARRAYID}.err
# first non-empty non-comment line ends PBS options
# first non-empty non-comment line ends PBS options
# Submit with 'qsub -t 1-
10
submit_data_to_images.sh'
# Submit with 'qsub -t 1-
x
submit_data_to_images.sh'
# This script uses the data_to_images.py file in order to convert all .h5 raw MC files to .h5 event "images" (CNN input).
# This script uses the data_to_images.py file in order to convert all .h5 raw MC files to .h5 event "images" (CNN input).
# Currently available ORCA 115l sim files:
# Currently available ORCA 115l sim files:
# neutrinos: 600 files each for 1-5 GeV prod, else
# neutrinos: 600 files each for 1-5 GeV prod (muon-CC, elec-CC/NC) number of jobs needed = 5 with files_per_job=120,
# muon-CC = 2400 files, number of jobs needed = 40,
# else (3-100 GeV prod)
# elec-CC = 1200 files, number of jobs needed = 20,
# muon-CC = 2400 files, number of jobs needed = 20 with files_per_job=120
# elec-NC = 1200 files, number of jobs needed = 20,
# elec-CC = 1200 files, number of jobs needed = 10 with files_per_job=120
# tau-CC = 1800 files (half the size of other interaction channels), number of jobs needed = 30 (half walltime)
# elec-NC = 1200 files, number of jobs needed = 10 with files_per_job=120
# mupage: 20000 files, with files_per_job=1000 20 jobs needed.
# tau-CC = 1800 files (half the n_evts of other interaction channels), number of jobs needed = 15 with files_per_job=120 and half walltime
# random_noise: 500 files, with files_per_job=
# mupage: 20000 files, with files_per_job=250, 80 jobs needed with 20h walltime.
# random_noise: 500 files, with files_per_job=20 , 25 jobs needed with 20h walltime.
#--- USER INPUT ---#
#--- USER INPUT ---#
...
@@ -23,15 +24,19 @@ python_env_folder=/home/hpc/capn/mppi033h/.virtualenv/python_3_env/
...
@@ -23,15 +24,19 @@ python_env_folder=/home/hpc/capn/mppi033h/.virtualenv/python_3_env/
job_logs_folder
=
/home/woody/capn/mppi033h/logs/orcasong/cout
job_logs_folder
=
/home/woody/capn/mppi033h/logs/orcasong/cout
detx_filepath
=
/home/woody/capn/mppi033h/Code/OrcaSong/user/detx_files/orca_115strings_av23min20mhorizontal_18OMs_alt9mvertical_v1.detx
detx_filepath
=
/home/woody/capn/mppi033h/Code/OrcaSong/user/detx_files/orca_115strings_av23min20mhorizontal_18OMs_alt9mvertical_v1.detx
config_file
=
/home/woody/capn/mppi033h/Code/OrcaSong/user/config/orca_115l_mupage_rn_neutr_classifier/conf_ORCA_115l_mupage_xyz-t.toml
config_file
=
/home/woody/capn/mppi033h/Code/OrcaSong/user/config/orca_115l_mupage_rn_neutr_classifier/conf_ORCA_115l_random_noise_xyz-c.toml
particle_type
=
mupage
particle_type
=
random_noise
mc_prod
=
mupage
mc_prod
=
random_noise
# total number of files per job, e.g. 10 jobs for 600: 600/10 = 60. For neutrin
# total number of files per job
# For neutrinos and random_noise n=60 with PBS -l nodes=1:ppn=4:sl,walltime=3:00:00
# For neutrinos 3-100GeV:
# For mupage: n=1000 with PBS -l nodes=1:ppn=4:sl,walltime=15:00:00
# muon-CC/elec-CC/elec-NC/tau-CC n=120 with PBS -l nodes=1:ppn=4:sl,walltime=5:00:00
files_per_job
=
1000
# For neutrinos 1-5GeV:
# muon-CC/elec-CC/elec-NC n=120 with PBS -l nodes=1:ppn=4:sl,walltime=5:00:00
# For mupage: n=250 with PBS -l nodes=1:ppn=4:sl,walltime=5:00:00
# For random_noise: n=20 with PBS -l nodes=1:ppn=4:sl,walltime=5:00:00
files_per_job
=
20
# must be dividible by 4!
#--- USER INPUT ---#
#--- USER INPUT ---#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment