Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Troubled Cell Detection
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Laura Christine Kühle
Troubled Cell Detection
Commits
bb74ef62
Commit
bb74ef62
authored
3 years ago
by
Laura Christine Kühle
Browse files
Options
Downloads
Patches
Plain Diff
Fixed issue that random seed was not set in each workflow module.
parent
630e788b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Snakefile
+6
-3
6 additions, 3 deletions
Snakefile
workflows/ANN_data.smk
+5
-4
5 additions, 4 deletions
workflows/ANN_data.smk
workflows/ANN_training.smk
+3
-2
3 additions, 2 deletions
workflows/ANN_training.smk
workflows/approximation.smk
+3
-2
3 additions, 2 deletions
workflows/approximation.smk
with
17 additions
and
11 deletions
Snakefile
+
6
−
3
View file @
bb74ef62
...
@@ -6,21 +6,24 @@ DIR = 'workflows'
...
@@ -6,21 +6,24 @@ DIR = 'workflows'
if config['random_seed'] is not None:
if config['random_seed'] is not None:
np.random.seed(config['random_seed'])
np.random.seed(config['random_seed'])
module_config = {'data_dir': config['data_dir'],
'random_seed': config['random_seed']}
module ann_data:
module ann_data:
snakefile: DIR + '/ANN_data.smk'
snakefile: DIR + '/ANN_data.smk'
config: {**config['ANN_Data'],
'data_dir': config['data_dir']
}
config: {**config['ANN_Data'],
**module_config
}
use rule * from ann_data as ANN_*
use rule * from ann_data as ANN_*
module ann_training:
module ann_training:
snakefile: DIR + '/ANN_training.smk'
snakefile: DIR + '/ANN_training.smk'
config: {**config['ANN_Training'],
'data_dir':config['data_dir']
}
config: {**config['ANN_Training'],
**module_config
}
use rule * from ann_training as ANN_*
use rule * from ann_training as ANN_*
module approximation:
module approximation:
snakefile: DIR + '/approximation.smk'
snakefile: DIR + '/approximation.smk'
config: {**config['Approximation'],
'data_dir': config['data_dir']
}
config: {**config['Approximation'],
**module_config
}
use rule * from approximation as DG_*
use rule * from approximation as DG_*
...
...
This diff is collapsed.
Click to expand it.
workflows/ANN_data.smk
+
5
−
4
View file @
bb74ef62
import sys
import sys
import time
import time
import numpy as np
configfile: 'config.yaml'
import ANN_Data_Generator, Initial_Condition
import ANN_Data_Generator, Initial_Condition
configfile: 'config.yaml'
DIR = config['data_dir']
DIR = config['data_dir']
#
if config['random_seed'] is not None:
if config['random_seed'] is not None:
#
np.random.seed(config['random_seed'])
np.random.seed(config['random_seed'])
rule generate_data:
rule generate_data:
output:
output:
...
...
This diff is collapsed.
Click to expand it.
workflows/ANN_training.smk
+
3
−
2
View file @
bb74ef62
import sys
import sys
import numpy as np
import ANN_Training
import ANN_Training
from ANN_Training import *
from ANN_Training import *
...
@@ -7,8 +8,8 @@ configfile: 'config.yaml'
...
@@ -7,8 +8,8 @@ configfile: 'config.yaml'
DIR = config['data_dir']
DIR = config['data_dir']
MODELS = config['models']
MODELS = config['models']
#
if config['random_seed'] is not None:
if config['random_seed'] is not None:
#
np.random.seed(config['random_seed'])
np.random.seed(config['random_seed'])
rule all:
rule all:
input:
input:
...
...
This diff is collapsed.
Click to expand it.
workflows/approximation.smk
+
3
−
2
View file @
bb74ef62
import sys
import sys
import time
import time
import numpy as np
from DG_Approximation import DGScheme
from DG_Approximation import DGScheme
...
@@ -8,8 +9,8 @@ configfile: 'config.yaml'
...
@@ -8,8 +9,8 @@ configfile: 'config.yaml'
PLOTS = ['error', 'exact_and_approx', 'semilog_error', 'shock_tube']
PLOTS = ['error', 'exact_and_approx', 'semilog_error', 'shock_tube']
DIR = config['data_dir']
DIR = config['data_dir']
SCHEMES = config['schemes']
SCHEMES = config['schemes']
#
if config['random_seed'] is not None:
if config['random_seed'] is not None:
#
np.random.seed(config['random_seed'])
np.random.seed(config['random_seed'])
rule all:
rule all:
input:
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