Skip to content

Version.txt in model .zip should use the FileVersion, not AssemblyVersion #3132

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

Closed
eerhardt opened this issue Mar 28, 2019 · 0 comments · Fixed by #3173
Closed

Version.txt in model .zip should use the FileVersion, not AssemblyVersion #3132

eerhardt opened this issue Mar 28, 2019 · 0 comments · Fixed by #3173
Assignees
Labels
bug Something isn't working

Comments

@eerhardt
Copy link
Member

When you save a model, it generates a Version.txt file in the .zip, so we can tell which version of ML.NET was used to generate the model.

using (var ent = rep.CreateEntry(DirTrainingInfo, "Version.txt"))
using (var writer = Utils.OpenWriter(ent.Stream))
writer.WriteLine(typeof(RepositoryWriter).Assembly.GetName().Version);
return rep;

However, the issue is we are using the AssemblyVersion there, which isn't great information as all the models produced are showing:

1.0.0.0

We should write the FileVersion or AssemblyInformationalVersion instead, which will give us the exact build and SHA:

[assembly: AssemblyFileVersion("0.12.27526.3")]
[assembly: AssemblyInformationalVersion("0.12.27526.3 @BuiltBy: dlab14-DDVSOWINAGE101 @Branch: master @SrcCode: https://github.com/dotnet/machinelearning/tree/9caafb04d2b4f298f2a9479a9550597afee32c94+9caafb04d2b4f298f2a9479a9550597afee32c94")]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants