Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Komodo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dragoon
Komodo
Commits
02a2ca68
Verified
Commit
02a2ca68
authored
11 months ago
by
STEVAN Antoine
Browse files
Options
Downloads
Patches
Plain Diff
compute the seeds directly by hashing
parent
7cd44214
No related branches found
No related tags found
No related merge requests found
Pipeline
#5300
failed
11 months ago
Stage: fmt
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bins/inbreeding/run.nu
+1
-15
1 addition, 15 deletions
bins/inbreeding/run.nu
with
1 addition
and
15 deletions
bins/inbreeding/run.nu
+
1
−
15
View file @
02a2ca68
use consts.nu
use ../../.nushell cargo "cargo bin"
use ../../.nushell error "error throw"
const VALID_HEX_CHARS = "abcdefABCDEF0123456789"
...
...
@@ -81,19 +80,6 @@ export def main [
mkdir $output_dir
print $"data will be dumped to `($output_dir)`"
# compute a unique seed for that strategy and global seed
let seed = $s + $"($prng_seed)"
| hash sha256
| split chars
| last 2
| str join
| $"0x($in)"
| into int
# compute all the seeds for that strategy, one per scenario
let seeds = cargo bin rng ...[ -n $options.nb_scenarii --prng-seed $prng_seed ]
| lines
| into int
for i in 1..$options.nb_scenarii {
let output = [ $output_dir, $"($i)" ] | path join
...
...
@@ -108,7 +94,7 @@ export def main [
--test-case recoding
--strategy $s
--environment $options.environment
--prng-seed (
$seeds | get ($i - 1)
)
--prng-seed (
[$prng_seed, $s, $i] | str join | hash sha256
)
] out> $output
}
...
...
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