Skip to content

Commit

Permalink
Log digests and saved locations
Browse files Browse the repository at this point in the history
This commit adds logging to display the saved digest, new digest, and
the location where the digest is written.
  • Loading branch information
ChinChangYang committed Dec 2, 2023
1 parent 5ccfb5c commit 4214827
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/neuralnet/coremlmodel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@ class KataGoModel {
shouldCompile = digest != savedDigest

if (shouldCompile) {
Logger().info("Saved digest: \(savedDigest)")
Logger().info("New digest: \(digest)")
Logger().info("Compiling CoreML model because the digest has changed");
}
} else {
Expand Down Expand Up @@ -305,6 +307,9 @@ class KataGoModel {
options: .usingNewMetadataOnly,
resultingItemURL: nil)

Logger().info("Writing digest to: \(savedDigestURL)")
Logger().info("Digest: \(digest)")

// Update the digest
try digest.write(to: savedDigestURL, atomically: true, encoding: .utf8)
}
Expand Down

0 comments on commit 4214827

Please sign in to comment.