Skip to content

Fix loading of old ConcatTransform models - #1301

Merged
yaeldekel merged 4 commits into
dotnet:masterfrom
yaeldekel:concatversion
Oct 24, 2018
Merged

yaeldekel merged 4 commits into
dotnet:masterfrom
yaeldekel:concatversion

Conversation

@yaeldekel

Copy link
Copy Markdown

Fixes #1300 .

// int: index of the alias
// int: string id of the alias
// int: -1, marks the end of the list
// int: sizeof(Float).

@Zruty0 Zruty0 Oct 18, 2018 •

Copy link
Copy Markdown
Contributor

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);

@Zruty0 Zruty0 Oct 18, 2018 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

Zruty0 commented Oct 18, 2018

Copy link
Copy Markdown
Contributor
    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)

@Zruty0 Zruty0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@eerhardt

Copy link
Copy Markdown
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)

@Ivanidzo4ka Ivanidzo4ka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

@Zruty0

Zruty0 commented Oct 24, 2018

Copy link
Copy Markdown
Contributor

@yaeldekel Should we merge it?

@eerhardt eerhardt left a comment

Copy link
Copy Markdown
Member

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