Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
server
Manage
Activity
Members
Labels
Automate
Agent sessions
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
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
elixxir
server
Commits
746c5284
Commit
746c5284
authored
Oct 15, 2019
by
Sydney Erickson
Browse files
Options
Downloads
Patches
Plain Diff
Change graph gen params to default to previous values
parent
0919f990
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
cmd/conf/graphgen_test.go
+3
-1
3 additions, 1 deletion
cmd/conf/graphgen_test.go
cmd/conf/params.go
+11
-0
11 additions, 0 deletions
cmd/conf/params.go
cmd/conf/params.yaml
+0
-5
0 additions, 5 deletions
cmd/conf/params.yaml
cmd/node.go
+0
-8
0 additions, 8 deletions
cmd/node.go
with
14 additions
and
14 deletions
cmd/conf/graphgen_test.go
+
3
−
1
View file @
746c5284
package
conf
package
conf
import
"runtime"
var
ExpectedGraphGen
=
GraphGen
{
var
ExpectedGraphGen
=
GraphGen
{
minInputSize
:
4
,
minInputSize
:
4
,
defaultNumTh
:
2
,
defaultNumTh
:
uint8
(
runtime
.
NumCPU
())
,
outputSize
:
4
,
outputSize
:
4
,
outputThreshold
:
0.0
,
outputThreshold
:
0.0
,
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cmd/conf/params.go
+
11
−
0
View file @
746c5284
...
@@ -22,6 +22,7 @@ import (
...
@@ -22,6 +22,7 @@ import (
"gitlab.com/elixxir/server/services"
"gitlab.com/elixxir/server/services"
"golang.org/x/crypto/blake2b"
"golang.org/x/crypto/blake2b"
"net"
"net"
"runtime"
)
)
// This object is used by the server instance.
// This object is used by the server instance.
...
@@ -72,8 +73,18 @@ func NewParams(vip *viper.Viper) (*Params, error) {
...
@@ -72,8 +73,18 @@ func NewParams(vip *viper.Viper) (*Params, error) {
params
.
Permissioning
.
RegistrationCode
=
vip
.
GetString
(
"permissioning.registrationCode"
)
params
.
Permissioning
.
RegistrationCode
=
vip
.
GetString
(
"permissioning.registrationCode"
)
params
.
GraphGen
.
defaultNumTh
=
uint8
(
vip
.
GetUint
(
"graphgen.defaultNumTh"
))
params
.
GraphGen
.
defaultNumTh
=
uint8
(
vip
.
GetUint
(
"graphgen.defaultNumTh"
))
if
params
.
GraphGen
.
defaultNumTh
==
0
{
params
.
GraphGen
.
defaultNumTh
=
uint8
(
runtime
.
NumCPU
())
}
params
.
GraphGen
.
minInputSize
=
vip
.
GetUint32
(
"graphgen.mininputsize"
)
params
.
GraphGen
.
minInputSize
=
vip
.
GetUint32
(
"graphgen.mininputsize"
)
if
params
.
GraphGen
.
minInputSize
==
0
{
params
.
GraphGen
.
minInputSize
=
4
}
params
.
GraphGen
.
outputSize
=
vip
.
GetUint32
(
"graphgen.outputsize"
)
params
.
GraphGen
.
outputSize
=
vip
.
GetUint32
(
"graphgen.outputsize"
)
if
params
.
GraphGen
.
outputSize
==
0
{
params
.
GraphGen
.
outputSize
=
4
}
// This (outputThreshold) already defaulted to 0.0
params
.
GraphGen
.
outputThreshold
=
float32
(
vip
.
GetFloat64
(
"graphgen.outputthreshold"
))
params
.
GraphGen
.
outputThreshold
=
float32
(
vip
.
GetFloat64
(
"graphgen.outputthreshold"
))
params
.
Batch
=
vip
.
GetUint32
(
"batch"
)
params
.
Batch
=
vip
.
GetUint32
(
"batch"
)
...
...
This diff is collapsed.
Click to expand it.
cmd/conf/params.yaml
+
0
−
5
View file @
746c5284
...
@@ -50,9 +50,4 @@ skipReg: true
...
@@ -50,9 +50,4 @@ skipReg: true
keepBuffers
:
true
keepBuffers
:
true
metrics
:
metrics
:
log
:
"
~/.elixxir/metrics.log"
log
:
"
~/.elixxir/metrics.log"
graphgen
:
defaultNumTh
:
2
mininputsize
:
4
outputsize
:
4
outputthreshold
:
0.0
...
...
This diff is collapsed.
Click to expand it.
cmd/node.go
+
0
−
8
View file @
746c5284
...
@@ -149,14 +149,6 @@ func StartServer(vip *viper.Viper) {
...
@@ -149,14 +149,6 @@ func StartServer(vip *viper.Viper) {
round
,
payload
,
"FULL/BATCH"
)
round
,
payload
,
"FULL/BATCH"
)
}
}
//PanicHandler := func(g, m string, err error) {
// jww.FATAL.Panicf(fmt.Sprintf("Error in module %s of graph %s: %+v", g,
// m, err))
//}
//def.GraphGenerator = services.NewGraphGenerator(4, PanicHandler,
// uint8(runtime.NumCPU()), 4, 0.0)
def
.
RngStreamGen
=
fastRNG
.
NewStreamGenerator
(
params
.
RngScalingFactor
,
def
.
RngStreamGen
=
fastRNG
.
NewStreamGenerator
(
params
.
RngScalingFactor
,
uint
(
runtime
.
NumCPU
()),
csprng
.
NewSystemRNG
)
uint
(
runtime
.
NumCPU
()),
csprng
.
NewSystemRNG
)
...
...
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
sign in
to comment