Skip to content

Commit

Permalink
Fix tune lines bloating up binary size (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes committed Jun 8, 2024
2 parents f5fb457 + bfc2f8c commit 7016c1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tuner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// The next Camel major version will switch to NNUE, which won't require
// Texel tuning anymore, so this is a temporary solution.

use std::fs::read_to_string;

use rayon::iter::{IntoParallelRefIterator, ParallelIterator};

use crate::{
Expand Down Expand Up @@ -109,7 +111,8 @@ fn evaluation_error(entries: &[PositionEntry], k: f64) -> f64 {
pub fn texel_tune() -> Vec<ValueScore> {
let entries: Vec<PositionEntry> = {
let epd_file =
include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/books/quiet-labeled.epd"));
read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/books/quiet-labeled.epd"))
.expect("Could not read file");
epd_file
.lines()
.collect::<Vec<&str>>()
Expand Down

0 comments on commit 7016c1d

Please sign in to comment.