Skip to content
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

New API overview: added AsDynamic call #1139

Merged
merged 5 commits into from
Oct 4, 2018
Merged

New API overview: added AsDynamic call #1139

merged 5 commits into from
Oct 4, 2018

Conversation

pkulikov
Copy link
Contributor

@pkulikov pkulikov commented Oct 3, 2018

The example at the end of the overview of new ML.NET API doesn't use AsDynamic:

var inputData = env.CreateDataView(new InputExample[] { example });
var outputData = model.Transform(inputData);
var output = outputData.AsEnumerable<OutputPrediction>(env, reuseRowObject: false).Single();

So, it looks that the AsDynamic call in the cookbook example is not necessary.

@sfilipi sfilipi requested a review from Zruty0 October 3, 2018 20:13
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.

Thanks @pkulikov for your contribution!

Unfortunately, it's the overview that need updating, not the cookbook. The cookbook code is correct.

If you would make the change in the overview doc, I would be happy to approve.

@pkulikov
Copy link
Contributor Author

pkulikov commented Oct 3, 2018

@Zruty0 OK, I'll make the update in the overview.
Why is this AsDynamic call necessary, by the way? #Closed

@pkulikov pkulikov changed the title ML.NET cookbook: typo fix New API overview: added AsDynamic call Oct 3, 2018
@pkulikov
Copy link
Contributor Author

pkulikov commented Oct 3, 2018

@Zruty0 I've updated the overview example. #Closed

```
Copy link
Contributor

@Zruty0 Zruty0 Oct 3, 2018

Choose a reason for hiding this comment

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

`` [](start = 1, length = 2)

nitpicking: please remove the trailing whitespace :) #Closed

Copy link
Contributor Author

@pkulikov pkulikov Oct 3, 2018

Choose a reason for hiding this comment

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

@Zruty0 fixed both :). Seems that GitHub web interface adds a blank line at the end on a commit. #Closed

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see. Well, I suppose we'll end up with these anyway, if that's what automation is doing. In any case, thanks!


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

The prediction function is *not re-entrant / thread-safe*: if you want to conduct predictions simultaneously with multiple threads, you need to have a prediction function per thread.
Copy link
Contributor

@Zruty0 Zruty0 Oct 3, 2018

Choose a reason for hiding this comment

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

d. [](start = 180, length = 2)

Trailing whitespace again :) #Closed

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:

Copy link
Member

@sfilipi sfilipi 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 Zruty0 merged commit 800d245 into dotnet:master Oct 4, 2018
@pkulikov pkulikov deleted the patch-1 branch October 4, 2018 06:15
@ghost ghost locked as resolved and limited conversation to collaborators Mar 28, 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.

3 participants