Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
old_macaon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
Franck Dary
old_macaon
Commits
6bbc03e0
Commit
6bbc03e0
authored
Oct 5, 2018
by
Franck Dary
Browse files
Options
Downloads
Patches
Plain Diff
More debug info for dynamical oracle
parent
1c781b93
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
trainer/src/Trainer.cpp
+1
-0
1 addition, 0 deletions
trainer/src/Trainer.cpp
transition_machine/include/Classifier.hpp
+5
-0
5 additions, 0 deletions
transition_machine/include/Classifier.hpp
transition_machine/include/Oracle.hpp
+6
-0
6 additions, 0 deletions
transition_machine/include/Oracle.hpp
with
12 additions
and
0 deletions
trainer/src/Trainer.cpp
+
1
−
0
View file @
6bbc03e0
...
@@ -150,6 +150,7 @@ void Trainer::train()
...
@@ -150,6 +150,7 @@ void Trainer::train()
fprintf
(
stderr
,
"ERROR (%s) : Unable to find any zero cost action. Aborting.
\n
"
,
ERRINFO
);
fprintf
(
stderr
,
"ERROR (%s) : Unable to find any zero cost action. Aborting.
\n
"
,
ERRINFO
);
fprintf
(
stderr
,
"State : %s
\n
"
,
currentState
->
name
.
c_str
());
fprintf
(
stderr
,
"State : %s
\n
"
,
currentState
->
name
.
c_str
());
trainConfig
.
printForDebug
(
stderr
);
trainConfig
.
printForDebug
(
stderr
);
classifier
->
explainCostOfActions
(
stderr
,
trainConfig
);
exit
(
1
);
exit
(
1
);
}
}
...
...
This diff is collapsed.
Click to expand it.
transition_machine/include/Classifier.hpp
+
5
−
0
View file @
6bbc03e0
...
@@ -106,6 +106,11 @@ class Classifier
...
@@ -106,6 +106,11 @@ class Classifier
///
///
/// @return A vector of all the actions that are zero cost given this Config.
/// @return A vector of all the actions that are zero cost given this Config.
std
::
vector
<
std
::
string
>
getZeroCostActions
(
Config
&
config
);
std
::
vector
<
std
::
string
>
getZeroCostActions
(
Config
&
config
);
/// @brief Print an explaination as of why some actions are not zero cost.
///
/// @param output Where to write the explainations.
/// @param config The current Config.
void
explainCostOfActions
(
FILE
*
output
,
Config
&
config
);
/// @brief Use the Oracle on the config to get the correct Action to take.
/// @brief Use the Oracle on the config to get the correct Action to take.
///
///
/// @param config The Config to work with.
/// @param config The Config to work with.
...
...
This diff is collapsed.
Click to expand it.
transition_machine/include/Oracle.hpp
+
6
−
0
View file @
6bbc03e0
...
@@ -77,6 +77,12 @@ class Oracle
...
@@ -77,6 +77,12 @@ class Oracle
///
///
/// @return Whether or not the action is optimal for the given Config.
/// @return Whether or not the action is optimal for the given Config.
bool
actionIsZeroCost
(
Config
&
config
,
const
std
::
string
&
action
);
bool
actionIsZeroCost
(
Config
&
config
,
const
std
::
string
&
action
);
/// @brief Explain why an action is zero cost or not.
///
/// @param output Where to write the explaination.
/// @param config The current Config.
/// @param action The current Action.
void
explainCostOfAction
(
FILE
*
output
,
Config
&
config
,
const
std
::
string
&
action
);
/// @brief Get the optimal action given the current Config, only for non-trainable Classifier..
/// @brief Get the optimal action given the current Config, only for non-trainable Classifier..
///
///
/// @param config The current Config.
/// @param config The current Config.
...
...
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