-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rename Microsoft.ML.StandardLearners #2792
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
Conversation
@Potapy4 Thank you for your contribution. Our policy for working on a task is to make sure it isn’t assigned to anyone already. In this case it was assigned to me and that means I could already be working on it. Please feel free to assign this task to yourself but moving forward make sure to check no one is already working on a task before assigning it to yourself and only then start the work. |
Hi @Potapy4 , thank you for working on this. Though, as @codemzs explains, we typically use the "assigned" field on issues to indicate that someone is actually actively working on it, which might lead to duplication of effort if someone else likewise takes on the work. But let's call that past praying for now. 😄 This test failure As we see of point 4 on this PR #970, we wrote the assembly name into the model file, so that we can find the loader signature later. This is on a whole a valuable change, and I think it will serve us well going forward. In this case it presents a difficulty, because in this case we are testing that our model loading is backwards compatible, as we do in several places. However those older models were saved with the old assembly name. It is here: machinelearning/src/Microsoft.ML.Core/Data/ModelLoading.cs Lines 217 to 227 in e1ab18c
I see several alternatives, of which I can identify two as possibly best. But between these I am not certain which is best. Note that this same difficulty @Potapy4 has faced here will crop up again when we rename the so-called
I myself believe 2 is correct, but I am not certain. It would be relatively easy to do I think. The code that fails is here, when we ensure the stored assembly actually has its DI components properly detected and registered. machinelearning/src/Microsoft.ML.Core/Data/ModelLoading.cs Lines 258 to 265 in e1ab18c
We could imagine an auxiliary property private string ForwardedLoaderAssemblyName
{ get {
switch (LoaderAssemblyName) {
case "Microsoft.ML.StandardLearners": return "Microsoft.ML.StandardTrainers";
default: return LoaderAssemblyName;
}
} } Then we change the ensure loaded to work over this private |
In addition to people already involved on thread I'd welcome the thoughts of @eerhardt. He wrote this assembly storing code and might have anticipated this problem and already have a solution in mind. Of course anyone can participate. |
My initial reaction is to lean towards solution (1) above - we've been in preview mode for the past year, I don't think we've strictly guaranteed that we aren't going to break things from preview release to preview release. The API for sure has gone through vast breaking changes. Requiring people to re-build their models one more time might not be horrible. That being said - this is the last time we get to say these things. Once However, solution (2) is so simple that it may be worth doing, the cost of adding that code one time, and keeping it forever, is probably way less than the effort it will take to triage bugs and questions about why their old model no longer works. If it was more complex code, I would rethink that position. So, in the end, it is probably "worth" doing solution (2). |
I think so too. So maybe we say, "OK, let's just have this assembly forwarding." Are you comfortable doing that @Potapy4 ? A natural followup question (which we do not have to answer now) is what .NET team considers a breaking change in the API, whether if we ship this capability in v1.0 to read pre-release versions, we are under obligation to keep it, provided the version v1.0 remains available for whoever might want to convert models (by simply reading and writing them)? You mentioned "keeping it forever" which suggests you would consider it a breaking change. Yet, sometimes I observe some libraries and tools say, "look, we dropped backward compatibility models for version X in version Z, but version Y reads version X format and writes in a format Z understands." (Where X < Y < Z.) This is quite common, but like many common things may be wrong. (This is surely a sliding scale. By some very strict standards, even a change in But that followup question may not be one we want to answer right now. I would be interested though in your perspective. |
Here's what is documented in It links to |
Alright, first of all @codemzs I would like to apologize for taking this task from your plate - my bad 😔 next time I check the issues before I start working on them. @TomFinley thanks for the good and detailed explanation about the tests. ❤️ I think we can use the second approach and make this "hack" right now. I also liked your pseudo-code, but I prefer |
Sounds fine thanks @Potapy4 . My reasoning for preferring the switch is I know for a fact that there will be two others in the immediate future that can use the same mechanism, but of course this can be changed at any time. So that sounds fine. I wouldn't worry too much about a TODO, since I would consider this work to be part of the other assembly renaming work, which I will be reviewing no doubt. |
@Potapy4 I'm seeing you still haven't assigned the associated issue to yourself. |
I don't think people can assign issues to themselves that do not have write access but I could be wrong. I cannot assign him and I do have write access. @codemzs , can you do it? Because, I cannot, I am not sure he can, so since you seem to think it necessary maybe you can figure out what's up. Thanks! |
https://help.github.com/en/articles/assigning-issues-and-pull-requests-to-other-github-users
members of your organization is the key there. Non-members need to accept an invitation first before they can be assigned issues. |
@Potapy4 I just forced pushed the changes into your branch so that we can close this PR soon as its been open for a while. @TomFinley Lets review and close this stuff .... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #2792 +/- ##
==========================================
+ Coverage 71.8% 71.82% +0.01%
==========================================
Files 812 812
Lines 142644 142649 +5
Branches 16090 16090
==========================================
+ Hits 102432 102460 +28
+ Misses 35828 35803 -25
- Partials 4384 4386 +2
|
Summary
I renamed
StandardLearners
toStandardTrainers
. If I missed something, please let me know 👌Fixes #2786
We are excited to review your PR.
So we can do the best job, please check:
Fixes #nnnn
in your description to cause GitHub to automatically close the issue(s) when your PR is merged.