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

Expose EvalFileSmall option for small net #5068

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,7 @@ NNUE::EvalFiles NNUE::load_networks(const std::string& rootDirectory,

for (auto& [netSize, evalFile] : evalFiles)
{
// Replace with
// options[evalFile.optionName]
// once fishtest supports the uci option EvalFileSmall
std::string user_eval_file =
netSize == Small ? evalFile.defaultName : options[evalFile.optionName];
std::string user_eval_file = options[evalFile.optionName];

if (user_eval_file.empty())
user_eval_file = evalFile.defaultName;
Expand Down Expand Up @@ -149,11 +145,8 @@ void NNUE::verify(const OptionsMap& optio

for (const auto& [netSize, evalFile] : evalFiles)
{
// Replace with
// options[evalFile.optionName]
// once fishtest supports the uci option EvalFileSmall
std::string user_eval_file =
netSize == Small ? evalFile.defaultName : options[evalFile.optionName];
std::string user_eval_file = options[evalFile.optionName];

if (user_eval_file.empty())
user_eval_file = evalFile.defaultName;

Expand Down
3 changes: 3 additions & 0 deletions src/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ UCI::UCI(int argc, char** argv) :
options["EvalFile"] << Option(EvalFileDefaultNameBig, [this](const Option&) {
evalFiles = Eval::NNUE::load_networks(cli.binaryDirectory, options, evalFiles);
});
options["EvalFileSmall"] << Option(EvalFileDefaultNameSmall, [this](const Option&) {
evalFiles = Eval::NNUE::load_networks(cli.binaryDirectory, options, evalFiles);
});

threads.set({options, threads, tt});

Expand Down