Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Summa Actors
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Ashley Van Beusekom (gwu479)
Summa Actors
Commits
d425139d
Commit
d425139d
authored
2 years ago
by
KyleKlenk
Browse files
Options
Downloads
Patches
Plain Diff
Changed the parseSettigns in the summa_actor to use the globally defiend one
parent
9d4af9f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/includes/summa_actor/summa_actor.hpp
+0
-1
0 additions, 1 deletion
build/includes/summa_actor/summa_actor.hpp
build/source/actors/summa_actor/summa_actor.cpp
+6
-39
6 additions, 39 deletions
build/source/actors/summa_actor/summa_actor.cpp
with
6 additions
and
40 deletions
build/includes/summa_actor/summa_actor.hpp
+
0
−
1
View file @
d425139d
...
@@ -33,7 +33,6 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
...
@@ -33,7 +33,6 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
void
spawnJob
(
stateful_actor
<
summa_actor_state
>*
self
);
void
spawnJob
(
stateful_actor
<
summa_actor_state
>*
self
);
void
parseSettings
(
stateful_actor
<
summa_actor_state
>*
self
,
std
::
string
configPath
);
...
...
This diff is collapsed.
Click to expand it.
build/source/actors/summa_actor/summa_actor.cpp
+
6
−
39
View file @
d425139d
...
@@ -22,7 +22,11 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
...
@@ -22,7 +22,11 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
self
->
state
.
configPath
=
configPath
;
self
->
state
.
configPath
=
configPath
;
self
->
state
.
parent
=
parent
;
self
->
state
.
parent
=
parent
;
parseSettings
(
self
,
configPath
);
self
->
state
.
outputStrucSize
=
getSettings
(
self
->
state
.
configPath
,
"SummaActor"
,
"OuputStructureSize"
,
self
->
state
.
outputStrucSize
).
value_or
(
250
);
self
->
state
.
maxGRUPerJob
=
getSettings
(
self
->
state
.
configPath
,
"SummaActor"
,
"maxGRUPerJob"
,
self
->
state
.
maxGRUPerJob
).
value_or
(
100
);
aout
(
self
)
<<
"SETTINGS FOR SUMMA_ACTOR
\n
"
;
aout
(
self
)
<<
"SETTINGS FOR SUMMA_ACTOR
\n
"
;
aout
(
self
)
<<
"Output Structure Size = "
<<
self
->
state
.
outputStrucSize
<<
"
\n
"
;
aout
(
self
)
<<
"Output Structure Size = "
<<
self
->
state
.
outputStrucSize
<<
"
\n
"
;
aout
(
self
)
<<
"Max GRUs Per Job = "
<<
self
->
state
.
maxGRUPerJob
<<
"
\n
"
;
aout
(
self
)
<<
"Max GRUs Per Job = "
<<
self
->
state
.
maxGRUPerJob
<<
"
\n
"
;
...
@@ -48,11 +52,7 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
...
@@ -48,11 +52,7 @@ behavior summa_actor(stateful_actor<summa_actor_state>* self, int startGRU, int
aout
(
self
)
<<
" "
<<
((
self
->
state
.
duration
/
1000
)
/
60
)
/
60
<<
" Hours
\n
"
;
aout
(
self
)
<<
" "
<<
((
self
->
state
.
duration
/
1000
)
/
60
)
/
60
<<
" Hours
\n
"
;
aout
(
self
)
<<
"Program Finished
\n
"
;
aout
(
self
)
<<
"Program Finished
\n
"
;
self
->
send
(
self
->
state
.
parent
,
done_batch_v
,
self
->
state
.
duration
);
self
->
send
(
self
->
state
.
parent
,
done_batch_v
,
self
->
state
.
duration
);
}
else
{
}
else
{
// spawn a new job
// spawn a new job
...
@@ -87,37 +87,4 @@ void spawnJob(stateful_actor<summa_actor_state>* self) {
...
@@ -87,37 +87,4 @@ void spawnJob(stateful_actor<summa_actor_state>* self) {
self
->
state
.
numGRU
=
0
;
self
->
state
.
numGRU
=
0
;
}
}
}
}
void
parseSettings
(
stateful_actor
<
summa_actor_state
>*
self
,
std
::
string
configPath
)
{
json
settings
;
std
::
string
SummaActorsSettings
=
"/Summa_Actors_Settings.json"
;
std
::
ifstream
settings_file
(
configPath
+
SummaActorsSettings
);
settings_file
>>
settings
;
settings_file
.
close
();
if
(
settings
.
find
(
"SummaActor"
)
!=
settings
.
end
())
{
json
SummaActorConfig
=
settings
[
"SummaActor"
];
// Find the desired OutputStrucSize
if
(
SummaActorConfig
.
find
(
"OuputStructureSize"
)
!=
SummaActorConfig
.
end
())
{
self
->
state
.
outputStrucSize
=
SummaActorConfig
[
"OuputStructureSize"
];
}
else
{
aout
(
self
)
<<
"Error Finding OutputStructureSize in JOSN - Reverting to default value
\n
"
;
self
->
state
.
outputStrucSize
=
250
;
}
// Find the desired maxGRUPerJob size
if
(
SummaActorConfig
.
find
(
"maxGRUPerJob"
)
!=
SummaActorConfig
.
end
())
{
self
->
state
.
maxGRUPerJob
=
SummaActorConfig
[
"maxGRUPerJob"
];
}
else
{
aout
(
self
)
<<
"Error Finding maxGRUPerJob in JOSN - Reverting to default value
\n
"
;
self
->
state
.
maxGRUPerJob
=
500
;
}
}
else
{
aout
(
self
)
<<
"Error Finding SummaActor in JSON - Reverting to default values
\n
"
;
self
->
state
.
outputStrucSize
=
250
;
self
->
state
.
maxGRUPerJob
=
500
;
}
}
}
// end namespace
}
// end namespace
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