Skip to content

Fix loading of old ConcatTransform models #1301

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

Merged
merged 4 commits into from
Oct 24, 2018

Conversation

yaeldekel
Copy link

Fixes #1300 .

@@ -306,6 +306,10 @@ private ColumnInfo[] LoadLegacy(ModelLoadContext ctx)
// int: index of the alias
// int: string id of the alias
// int: -1, marks the end of the list
// int: sizeof(Float).
Copy link
Contributor

@Zruty0 Zruty0 Oct 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int: sizeof(Float). [](start = 15, length = 19)

why is it at the end? #Resolved

// int: sizeof(Float).

var sizeofFloat = ctx.Reader.ReadInt32();
Contracts.CheckDecode(sizeofFloat == 4 || sizeofFloat == 8);
Copy link
Contributor

@Zruty0 Zruty0 Oct 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 || sizeofFloat == 8 [](start = 49, length = 21)

sizeof(float) and sizeof(double) ? #Resolved

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, how about we disallow the double build? It's not like anyone was using it or something


In reply to: 226423915 [](ancestors = 226423915)

@Zruty0
Copy link
Contributor

Zruty0 commented Oct 18, 2018

    private ColumnInfo[] LoadLegacy(ModelLoadContext ctx)

I wonder if we should add a test for the legacy load. Maybe not one transform at a time, but a bigger model with a bunch of transforms?


Refers to: src/Microsoft.ML.Data/Transforms/ConcatTransform.cs:295 in 2bd0a6f. [](commit_id = 2bd0a6f, deletion_comment = False)

Copy link
Contributor

@Zruty0 Zruty0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@eerhardt
Copy link
Member

    private ColumnInfo[] LoadLegacy(ModelLoadContext ctx)

No matter what - we should add at least 1 test here in this PR. You can follow the same approach I took for #1290 and add the model to https://github.com/dotnet/machinelearning-testdata/tree/master/Microsoft.ML.TestModels/TestModels


In reply to: 431120918 [](ancestors = 431120918)


Refers to: src/Microsoft.ML.Data/Transforms/ConcatTransform.cs:295 in 2bd0a6f. [](commit_id = 2bd0a6f, deletion_comment = False)

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@Zruty0
Copy link
Contributor

Zruty0 commented Oct 24, 2018

@yaeldekel Should we merge it?

Copy link
Member

@eerhardt eerhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@yaeldekel yaeldekel merged commit d63e21e into dotnet:master Oct 24, 2018
@yaeldekel yaeldekel deleted the concatversion branch October 24, 2018 15:07
@ghost ghost locked as resolved and limited conversation to collaborators Mar 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants