Skip to content

Commit 1c24fb2

Browse files
authored
Fix Typos (#380)
1 parent 89bdb3d commit 1c24fb2

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

delete_bad_nets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def show_help():
148148
print(" - a/b/c/d.ckpt")
149149
print(" - *.nnue")
150150
print(" - ordo.out")
151-
print(" (in this case ony lines with engine name matching")
151+
print(" (in this case only lines with engine name matching")
152152
print(' "run_[01]/nn-epoch[0-9]*\\.nnue" will be used.)')
153153

154154

do_plots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def do_plots(out_filename, root_dirs, elo_range, loss_range, split):
113113
ax_train_loss.set_ylabel("train_loss")
114114

115115
for user_root_dir in root_dirs:
116-
# if asked to split we split the roto dir into a number of user root dirs,
116+
# if asked to split we split the root dir into a number of user root dirs,
117117
# i.e. all direct subdirectories containing tfevent files.
118118
# we use the ordo file in the root dir, but split the content.
119119
split_root_dirs = [user_root_dir]

docs/nnue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ Even though we observed that few inputs change from position to position we have
293293

294294
For a single move, it's trivial to find which "A" features changed - we know what piece we're moving, from where, and where to. Captures and promotions can be considered as a piece disappearing or appearing from nowhere.
295295

296-
However, care must taken when using floating point values. Repeatedly adding and subtracting floats results in error that accumulates with each move. It requires careful evaluation of whether the error is small enough for the net to still produce good results. Thankfully, it is best implemented such that the accumulator is not updated when undoing a move. Instead, it is simply stored on the search stack, so the error is bounded by `O(MAX_DEPTH)` and can mostly be ignored.
296+
However, care must be taken when using floating point values. Repeatedly adding and subtracting floats results in error that accumulates with each move. It requires careful evaluation of whether the error is small enough for the net to still produce good results. Thankfully, it is best implemented such that the accumulator is not updated when undoing a move. Instead, it is simply stored on the search stack, so the error is bounded by `O(MAX_DEPTH)` and can mostly be ignored.
297297

298298
When using quantization this is no longer a problem, the incremental implementation is consistent, but now there is a possibility of overflowing the accumulator (regardless of whether incremental updates are used or not). The quantization scheme must be chosen such that no combination of possible active features can exceed the maximum value.
299299

ftperm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
3-
NOTE: This script uses CUDA and may requires large amounts of VRAM. Decrease --count if encountering problems.
3+
NOTE: This script uses CUDA and may require large amounts of VRAM. Decrease --count if encountering problems.
44
55
Example use:
66

lib/nnue_training_data_formats.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6610,11 +6610,11 @@ namespace binpack
66106610

66116611
// Write high bits of half move. This is a fix for the
66126612
// limited range of half move counter.
6613-
// This is backwards compatibile.
6613+
// This is backwards compatible.
66146614
stream.write_n_bit(pos.fullMove() >> 8, 8);
66156615

66166616
// Write the highest bit of rule50 at the end. This is a backwards
6617-
// compatibile fix for rule50 having only 6 bits stored.
6617+
// compatible fix for rule50 having only 6 bits stored.
66186618
// This bit is just ignored by the old parsers.
66196619
stream.write_n_bit(pos.rule50Counter() >> 6, 1);
66206620

@@ -6748,7 +6748,7 @@ namespace binpack
67486748

67496749
// Fullmove number, high bits
67506750
// This was added as a fix for fullmove clock
6751-
// overflowing at 256. This change is backwards compatibile.
6751+
// overflowing at 256. This change is backwards compatible.
67526752
fullmove |= stream.read_n_bit(8) << 8;
67536753

67546754
// Read the highest bit of rule50. This was added as a fix for rule50

run_games.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def run_match(
182182
f"option.EvalFile={evalfile}",
183183
]
184184

185-
# Attempt to run the match multiple times in case of unforseen
185+
# Attempt to run the match multiple times in case of unforeseen
186186
# errors like engine hanging or c-chess-cli having an error...
187187
for i in range(tries):
188188
print_atomic(" ".join(command))
@@ -279,7 +279,7 @@ def elo_error_95(self):
279279

280280
def run_approximate_ordo(root_dir):
281281
"""run an approximate ordo-like calculation on an existing pgn file"""
282-
""" it takes advantege of the fact that all matches are ran against master """
282+
""" it takes advantage of the fact that all matches are ran against master """
283283
pgn_file_name = os.path.join(root_dir, "out.pgn")
284284
ordo_file_name = os.path.join(root_dir, "ordo.out")
285285
ordo_file_name_temp = os.path.join(root_dir, "ordo_temp.out")

scripts/easy_train.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ def requests_get_content(url, *args, **kwargs):
10441044

10451045
def get_zipfile_members_strip_common_prefix(zipfile):
10461046
"""
1047-
Removes a common previx from zipfile entries.
1047+
Removes a common prefix from zipfile entries.
10481048
So for example will remove the top-level directory.
10491049
"""
10501050
parts = []
@@ -1536,7 +1536,7 @@ def _update_results_from_ordo_file(self, ordo_file_path):
15361536
try:
15371537
with open(ordo_file_path, "r") as ordo_file:
15381538
lines = ordo_file.readlines()
1539-
# Pring the first few lines for the CLI interface.
1539+
# Print the first few lines for the CLI interface.
15401540
for line in lines[:7]:
15411541
LOGGER.info(line.strip())
15421542
for line in lines:
@@ -2719,7 +2719,7 @@ def main():
27192719
)
27202720
else:
27212721
LOGGER.info(
2722-
"Not doing network testing. Either engines no provided or explicitely disabled."
2722+
"Not doing network testing. Either engines not provided or explicitly disabled."
27232723
)
27242724

27252725
nnue_pytorch_repo = "/".join(args.nnue_pytorch_branch.split("/")[:2])

training_data_loader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ std::function<bool(const TrainingDataEntry&)> make_skip_predicate(DataloaderSkip
11471147

11481148
auto do_filter = [&]() { return (e.isCapturingMove() || e.isInCheck()); };
11491149

1150-
// Allow for predermined filtering without the need to remove positions from the dataset.
1150+
// Allow for predetermined filtering without the need to remove positions from the dataset.
11511151
if (e.score == VALUE_NONE)
11521152
return true;
11531153

@@ -1411,4 +1411,4 @@ int main(int argc, char** argv) {
14111411
return 0;
14121412
}
14131413

1414-
#endif
1414+
#endif

0 commit comments

Comments
 (0)