Skip to content

Indirect references in ML.NET using Dependency Injection #726

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 Aug 24, 2018 · 1 comment
Closed

Indirect references in ML.NET using Dependency Injection #726

eerhardt opened this issue Aug 24, 2018 · 1 comment

Comments

@eerhardt
Copy link
Member

I've found 2 indirect references in our product that I'm not sure how to proceed on.

  1. LearnerFeatureSelectionTransform depends on SDCA, but ML.Transforms doesn't have a reference to ML.StandardLearners.
  2. The 'train' commands in ML.Data (CV, Train, TrainTest) all have a default Trainer of AveragedPerceptron. but AveragedPerceptron lives in the ML.StandardLearners assembly. And ML.StandardLearners references ML.Data, but this dependency is in the wrong order.

A couple of options:

  1. Change these parameters to be 'user required', i.e. they don't have a default and fail if you didn't specify it.
  2. Move some code around so the dependencies line up correctly. For example, we could move our 'train' commands out of ML.Data and into a higher assembly.
  3. For (1) above, we could move LearnerFeatureSelectionTransform into ML.StandardLearners instead of being in ML.Transforms. Or we could add the dependency from ML.Transforms to ML.StandardLearners.
  4. Continue to use Dependency Injection and just assume/hope the component is there at runtime.

From an internal conversation with @TomFinley, we are thinking of taking option (1) above - make these parameters required and not have a default.

Thoughts?

cc @TomFinley @Zruty0 @codemzs @Ivanidzo4ka

@codemzs
Copy link
Member

codemzs commented Jun 30, 2019

Closing this issue as I believe this has been addressed with the stable API.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants