Skip to content

Fix loading type problem for netfx #2409

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 3 commits into from
Feb 5, 2019
Merged

Fix loading type problem for netfx #2409

merged 3 commits into from
Feb 5, 2019

Conversation

Anipik
Copy link
Contributor

@Anipik Anipik commented Feb 4, 2019

Fixes #2104

A couple of types doesn't get loaded properly by Maml commands on netfx. So we have to register them manually.
We are doing a similar things for maml commands in our benchmarks.
These tests fail on netfx and are being enabled in #2402

@Anipik Anipik requested review from danmoseley and eerhardt February 4, 2019 23:23
@codecov
Copy link

codecov bot commented Feb 5, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@2dfc51a). Click here to learn what that means.
The diff coverage is 100%.

@@            Coverage Diff            @@
##             master    #2409   +/-   ##
=========================================
  Coverage          ?   71.24%           
=========================================
  Files             ?      785           
  Lines             ?   140893           
  Branches          ?    16103           
=========================================
  Hits              ?   100383           
  Misses            ?    36044           
  Partials          ?     4466
Flag Coverage Δ
#Debug 71.24% <100%> (?)
#production 67.6% <ø> (?)
#test 85.3% <100%> (?)

@Anipik
Copy link
Contributor Author

Anipik commented Feb 5, 2019

@Ivanidzo4ka @sfilipi @justinormont can you please review this PR ?

@@ -135,7 +135,8 @@ void TestOldSavingAndLoading()
[ConditionalFact(typeof(Environment), nameof(Environment.Is64BitProcess))] // x86 output differs from Baseline
void TestCommandLine()
{
var env = new MLContext();
// typeof helps to load the TensorFlowTransformer type.
Type type = typeof(TensorFlowTransformer);
Copy link
Contributor

Choose a reason for hiding this comment

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

Any idea why typeof helps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So when we create an instance of a type in Maml, we check if the type\assembly is present in the loaded modules.
Typeof helps to load the assembly involving this type.

Copy link
Contributor

@Ivanidzo4ka Ivanidzo4ka left a comment

Choose a reason for hiding this comment

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

:shipit:

@Anipik Anipik merged commit d7eb0a6 into dotnet:master Feb 5, 2019
@Anipik Anipik deleted the FixTests branch February 5, 2019 23:11
@ghost ghost locked as resolved and limited conversation to collaborators Mar 24, 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.

4 participants