Skip to content
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

Open
wants to merge 7 commits into
base: mlSearcher
Choose a base branch
from

Conversation

Parzival-05
Copy link

No description provided.

@Parzival-05 Parzival-05 requested a review from gsvgit December 27, 2024 05:08
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch 2 times, most recently from fed64b7 to 615a7c1 Compare December 27, 2024 15:20
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from 946a8d9 to 783ba3e Compare December 28, 2024 18:01
@Parzival-05 Parzival-05 requested a review from gsvgit December 28, 2024 20:50
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from 41cd1b8 to f732fb4 Compare December 30, 2024 04:13
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch 2 times, most recently from 02c7e74 to 46b9b42 Compare January 7, 2025 23:49
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from 35432c6 to 05b0bc4 Compare February 15, 2025 09:43
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from e73ad5e to 0ba658d Compare February 18, 2025 15:32
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch 4 times, most recently from 954fdb8 to c9728c8 Compare February 21, 2025 12:36
Base automatically changed from david/gpu-support to mlSearcher February 26, 2025 20:17
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from d0d01d6 to 022aa4c Compare March 1, 2025 16:16
@Parzival-05 Parzival-05 force-pushed the david/model-validation branch from 022aa4c to 9f9b36b Compare March 1, 2025 16:20
@@ -227,9 +214,6 @@ private class TestSvmCommand : DelegatingTestCommand
private readonly ExplorationMode _explorationMode;
private readonly int _randomSeed;
private readonly uint _stepsLimit;
private readonly string _pathToModel;
Copy link
Member

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 =
Copy link
Member

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
Copy link
Member

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 =
Copy link
Member

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"""
Copy link
Member

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
Copy link
Member

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 = []
Copy link
Member

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<_>),
Copy link
Member

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
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants