-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support of new training process #89
base: mlSearcher
Are you sure you want to change the base?
Conversation
fed64b7
to
615a7c1
Compare
b2add77
to
4147660
Compare
946a8d9
to
783ba3e
Compare
41cd1b8
to
f732fb4
Compare
02c7e74
to
46b9b42
Compare
35432c6
to
05b0bc4
Compare
a49b0ed
to
c2a86ca
Compare
e73ad5e
to
0ba658d
Compare
954fdb8
to
c9728c8
Compare
c2a86ca
to
a2d6970
Compare
d0d01d6
to
022aa4c
Compare
022aa4c
to
9f9b36b
Compare
@@ -227,9 +214,6 @@ private class TestSvmCommand : DelegatingTestCommand | |||
private readonly ExplorationMode _explorationMode; | |||
private readonly int _randomSeed; | |||
private readonly uint _stepsLimit; | |||
private readonly string _pathToModel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these parameters can be removed?
let q = ResizeArray<_> () | ||
let availableStates = HashSet<_> () | ||
let updateGameState (delta: GameState) = | ||
module GameUtils = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to create this module?
match mode with | ||
| AIMode -> | ||
match options.aiAgentTrainingOptions with | ||
let useGPU = | ||
options.useGPU.IsSome && options.useGPU.Value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the case when useGPU
is none? Can we just use false
as a default value for this field?
match options.aiAgentTrainingOptions with | ||
let useGPU = | ||
options.useGPU.IsSome && options.useGPU.Value | ||
let optimize = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as for useGPU
.
@@ -55,6 +70,13 @@ type CliArguments = | |||
"Mode to run application. Server --- to train network, Generator --- to generate data for training." | |||
| OutFolder _ -> "Folder to store generated data." | |||
| StepsToSerialize _ -> "Maximal number of steps for each method to serialize." | |||
| Model _ -> """Path to ONNX model (use it for training in mode "SendModel")""" | |||
| StepsToPlay _ -> """Steps to start""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Detailed explanation in help should be provided. For all arguments.
} | ||
|
||
let mutable steps = [] | ||
let stepSaver (aiGameStep: AIGameStep) = steps <- aiGameStep :: steps in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No in
in modern F#
oracle = None | ||
} | ||
|
||
let mutable steps = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use ResizeArray here.
searchStrategy = SearchStrategy.AI, | ||
solverTimeout = SOLVER_TIMEOUT_FOR_TRAINING, | ||
stepsLimit = uint (stepsToPlay + stepsToStart), | ||
aiOptions = (Some aiOptions |> Option.defaultValue Unchecked.defaultof<_>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the magic |> Option.defaultValue Unchecked.defaultof<_>
?
@@ -328,7 +472,61 @@ let main args = | |||
with e -> | |||
printfn $"Failed on port {port}" | |||
printfn $"{e.Message}" | |||
| Mode.SendModel -> | |||
let model = | |||
match args.TryGetResult <@ Model @> with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to use GetResult
with default value. Like here
) | ||
|
||
let useGPU = | ||
(args.TryGetResult <@ UseGPU @>).IsSome |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value
No description provided.