Skip to content

Separate assemblies for static extensions #1914

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 9 commits into from
Dec 19, 2018

Conversation

abgoswam
Copy link
Member

@abgoswam abgoswam commented Dec 18, 2018

Fixes #1695

  • Created separate assemblies to host the Static API extensions. Moved the Static API extensions to the appropriate assembly.
  • Requires adding [BestFriend] attribute in several places
  1. Microsoft.ML.StaticPipe
  2. Microsoft.ML.LightGBM.StaticPipe
  3. Microsoft.ML.TensorFlow.StaticPipe
  4. Microsoft.ML.OnnxTransform.StaticPipe
  5. Microsoft.ML.HalLearners.StaticPipe

NOTE: These assemblies are named corresponding to nuget packages (with the Microsoft.ML prefix)

@abgoswam abgoswam changed the title WIP (please don't review) : Separate assemblies for static extensions WIP : Separate assemblies for static extensions Dec 19, 2018
@abgoswam abgoswam changed the title WIP : Separate assemblies for static extensions Separate assemblies for static extensions Dec 19, 2018
@abgoswam
Copy link
Member Author

@Zruty0 . I have created the assemblies (to host static API extensions) so they correspond to nuget packages having the Microsoft.ML prefix. It would be great if you could take a look.

@sfilipi sfilipi added the API Issues pertaining the friendly API label Dec 19, 2018
@sfilipi sfilipi requested a review from najeeb-kazmi December 19, 2018 06:44

namespace Microsoft.ML.OnnxTransform.StaticPipe
{
public static class DnnImageFeaturizerStaticExtensions
Copy link
Member

@sfilipi sfilipi Dec 19, 2018

Choose a reason for hiding this comment

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

public [](start = 4, length = 6)

ideally would want to document, but i get this is low-pri. #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

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

yeap. low-pri .

not looking to modify documentation in this PR


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

@sfilipi
Copy link
Member

sfilipi commented Dec 19, 2018

        var invalidData = TextLoader.CreateReader(Env, ctx => (

I think this one should get moved to StaticPipe too. This is a bit trickier: it is a partial class and therefore on the same namespace as the Text Loader. #Closed


Refers to: test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs:37 in a94d7f4. [](commit_id = a94d7f4, deletion_comment = False)

@abgoswam
Copy link
Member Author

        var invalidData = TextLoader.CreateReader(Env, ctx => (

I am thinking of keeping the TextLoader changes as a separate PR. As you noted, it seems a bit more involved

This PR is for the transforms / learners


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


Refers to: test/Microsoft.ML.Tests/Transformers/TextFeaturizerTests.cs:37 in a94d7f4. [](commit_id = a94d7f4, deletion_comment = False)

@Zruty0
Copy link
Contributor

Zruty0 commented Dec 19, 2018

using Microsoft.ML.Core.Data;

Please make sure all the new files have header comments #Resolved


Refers to: src/Microsoft.ML.StaticPipe/WordEmbeddingsStaticExtensions.cs:1 in a94d7f4. [](commit_id = a94d7f4, deletion_comment = False)

@@ -21,6 +21,7 @@
using System.Linq;
using Xunit;
using Xunit.Abstractions;
using Microsoft.ML.StaticPipe;
Copy link
Contributor

@Zruty0 Zruty0 Dec 19, 2018

Choose a reason for hiding this comment

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

using [](start = 0, length = 5)

sort usings #Resolved

@Zruty0
Copy link
Contributor

Zruty0 commented Dec 19, 2018

Looks good to me with minor comments.

I noticed that we don't yet create NuGet packages for the new static pipe assemblies. Should we do it now (maybe even in this PR), or wait? @TomFinley do you have an opinion?


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

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:

@abgoswam abgoswam merged commit 4fa8ff0 into dotnet:master Dec 19, 2018
@abgoswam abgoswam deleted the abgoswam/static_assembly branch January 13, 2019 18:12
@ghost ghost locked as resolved and limited conversation to collaborators Mar 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Issues pertaining the friendly API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate assembly for statically typed API extensions
3 participants