Skip to content

Commit

Permalink
Fix weights-manifest change check
Browse files Browse the repository at this point in the history
The weights are changed if there is no cache (no previous value) or the
value differs.

Signed-off-by: Iskren Chernev <[email protected]>
  • Loading branch information
ichernev committed Jul 31, 2023
1 parent 02c4a3e commit 1b75e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/image/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func Build(cfg *config.Config, dir, imageName string, secrets []string, noCache,
return fmt.Errorf("Failed to generate weights manifest: %w", err)
}
cachedManifest, err := weights.LoadManifest(weightsManifestPath)
changed := err != nil && weightsManifest.Equal(cachedManifest)
changed := err != nil || !weightsManifest.Equal(cachedManifest)
if changed {
if err := buildWeightsImage(dir, weightsDockerfile, imageName+"-weights", secrets, noCache, progressOutput); err != nil {
return fmt.Errorf("Failed to build model weights Docker image: %w", err)
Expand Down

0 comments on commit 1b75e94

Please sign in to comment.