Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climax
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
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
earth_observation_public
Climax
Commits
a7559f69
Commit
a7559f69
authored
3 years ago
by
Frisinghelli Daniel
Browse files
Options
Downloads
Patches
Plain Diff
Script for bootstrapped model training in batch mode.
parent
b2dacc24
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Scripts/bootstrap.sh
+41
-0
41 additions, 0 deletions
Scripts/bootstrap.sh
with
41 additions
and
0 deletions
Scripts/bootstrap.sh
0 → 100644
+
41
−
0
View file @
a7559f69
#!/usr/bin/env bash
# activate conda environment
conda activate climax
# move to project repository
cd
~/git/climax
# predictands
PREDICTAND
=(
pr
tasmin tasmax
)
# set number of ensemble members
sed
-i
"s/BOOTSTRAP
\s
*=.*/BOOTSTRAP
\=
10/"
./climax/main/config.py
# iterate over predictands
for
predictand
in
${
PREDICTAND
[@]
}
;
do
# change predictand in configuration
sed
-i
"s/PREDICTAND
\s
*=.*/PREDICTAND='
$predictand
'/"
./climax/main/config.py
# define available loss functions for current predictand
if
[
"
$predictand
"
=
"pr"
]
;
then
LOSS
=(
L1Loss BernoulliGammaLoss MSELoss
)
else
LOSS
=(
L1Loss MSELoss
)
fi
# iterate over loss functions
for
loss
in
${
LOSS
[@]
}
;
do
# change loss function in configuration
if
[
"
$loss
"
=
"L1Loss"
]
||
[
"
$loss
"
=
"MSELoss"
]
;
then
sed
-i
"s/LOSS
\s
*=.*/LOSS=
$loss
()/"
./climax/main/config.py
else
sed
-i
"s/LOSS
\s
*=.*/LOSS=
$loss
(min_amount=1)/"
./climax/main/config.py
fi
# run downscaling
python climax/main/downscale_bootstrap.py
done
done
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