This repository was archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Update to ML.NET 0.10.preview #77
Merged
Shahab Moradi (shmoradims)
merged 42 commits into
microsoft:master
from
montebhoover:mlnet0.9
Jan 16, 2019
Merged
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
b59cbdb
Updating ML.NET nugets to latest 0.9 preview.
montebhoover 4012a78
--generate_entrypoints phase 1
7788922
Fixed Models.CrossValidator
af12201
Updated all entrypoints
29d3006
New manifest.json, picket from Monte's branch
7e05c53
Updated API codegen
dcd749d
Replace ISchema and SchemaImpl with Schema and SchemaBuilder.
montebhoover 78aca37
Merge branch 'master' into mlnet0.9
montebhoover 2b3aafe
Revert "Replace ISchema and SchemaImpl with Schema and SchemaBuilder."
montebhoover 5890ea9
Refactor IRowCursor to RowCursor.
montebhoover ce50654
Update ML.NET version in build.csproj.
montebhoover 0b0b9dd
Update manifest.json to ml.net commit 92e762686989215ddf45d9db3f0a1c9…
b9f153b
Updated RunGraph.cs to ml.net 0.10
20713de
Merge branch 'mlnet0.9' into mlnet0.9_ep
9dbca28
Refactor Vbuffer
montebhoover e43ba6d
Added override to RowCursor methods
montebhoover 1fd7f36
Merge pull request #1 from shmoradims/mlnet0.9_ep
montebhoover 83e3def
Merge pull request #2 from shmoradims/fix_graphrunner
montebhoover 913b04b
Update to NimbusML-privileged nugets from ML.NET.
montebhoover c75319a
Merge branch 'mlnet0.9' of https://github.com/montebhoover/NimbusML i…
montebhoover 6fdc1ae
Update to Microsoft.ML namespace without Runtime.
montebhoover 0cda66e
Schema and VBuffer fixes in NativeDataInterop.
montebhoover 66cb74f
API fixes for IRandom and IsText in RmlEnvironment and NativeDataView.
montebhoover 85849ec
Work on getting VBuffer pointers from Spans.
montebhoover cae5813
Some VBuffer fixes
b85788b
Merge branch 'mlnet0.9' of https://github.com/montebhoover/NimbusML i…
b7848af
fix some class names
1b64023
Fix Register Assembly names.
montebhoover ef02813
Remove ML.PipelineInference
montebhoover 82edcec
fixed more classes
e02491c
Merge conflict
fea8196
Add back columndropper for backward compatability.
montebhoover 2390143
Merge branch 'mlnet0.9' of https://github.com/montebhoover/NimbusML i…
montebhoover 9c04b7f
Register Entrypoints assembly in environment.
montebhoover 829bcfd
Fix homebrew update problem on VS Hosted Mac images.
montebhoover 8452453
Updated all the nuget versions to be the same.
e9c6923
Merge branch 'mlnet0.9' of https://github.com/montebhoover/NimbusML i…
f9d5b71
Attempt to fix the dataframe unit tests
daba868
Fixed test_pyproj
053946a
Optimized VBuffer changes
4b97c77
Changed bridge version value to 0.10
47e44fe
Addressed PR comments
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,8 +8,8 @@ | |
| using System.Globalization; | ||
| using System.Runtime.InteropServices; | ||
| using System.Text; | ||
| using Microsoft.ML.Runtime; | ||
| using Microsoft.ML.Runtime.Data; | ||
| using Microsoft.ML; | ||
| using Microsoft.ML.Data; | ||
|
|
||
| namespace Microsoft.MachineLearning.DotNetBridge | ||
| { | ||
|
|
@@ -115,14 +115,14 @@ private static unsafe void SendViewToNative(IChannel ch, EnvironmentBlock* penv, | |
| var expandCols = new HashSet<int>(); | ||
| var allNames = new HashSet<string>(); | ||
|
|
||
| for (int col = 0; col < schema.ColumnCount; col++) | ||
| for (int col = 0; col < schema.Count; col++) | ||
| { | ||
| if (schema.IsHidden(col)) | ||
| if (schema[col].IsHidden) | ||
| continue; | ||
|
|
||
| var fullType = schema.GetColumnType(col); | ||
| var fullType = schema[col].Type; | ||
| var itemType = fullType.ItemType; | ||
| var name = schema.GetColumnName(col); | ||
| var name = schema[col].Name; | ||
|
|
||
| DataKind kind = itemType.RawKind; | ||
| int keyCard; | ||
|
|
@@ -157,10 +157,10 @@ private static unsafe void SendViewToNative(IChannel ch, EnvironmentBlock* penv, | |
| } | ||
|
|
||
| keyCard = itemType.KeyCount; | ||
| if (!schema.HasKeyNames(col, keyCard)) | ||
| if (!schema[col].HasKeyValues(keyCard)) | ||
| keyCard = -1; | ||
| } | ||
| else if (itemType.IsStandardScalar) | ||
| else if (itemType.IsStandardScalar()) | ||
| { | ||
| switch (itemType.RawKind) | ||
| { | ||
|
|
@@ -201,10 +201,10 @@ private static unsafe void SendViewToNative(IChannel ch, EnvironmentBlock* penv, | |
| for (int i = 0; i < nSlots; i++) | ||
| AddUniqueName(info.SlotNames[i], allNames, nameIndices, nameUtf8Bytes); | ||
| } | ||
| else if (schema.HasSlotNames(col, nSlots)) | ||
| else if (schema[col].HasSlotNames(nSlots)) | ||
| { | ||
| var romNames = default(VBuffer<ReadOnlyMemory<char>>); | ||
| schema.GetMetadata(MetadataUtils.Kinds.SlotNames, col, ref romNames); | ||
| schema[col].Metadata.GetValue(MetadataUtils.Kinds.SlotNames, ref romNames); | ||
| foreach (var kvp in romNames.Items(true)) | ||
| { | ||
| // REVIEW: Add the proper number of zeros to the slot index to make them sort in the right order. | ||
|
|
@@ -273,12 +273,12 @@ private static unsafe void SendViewToNative(IChannel ch, EnvironmentBlock* penv, | |
| var keyIndex = 0; | ||
| for (int i = 0; i < colIndices.Count; i++) | ||
| { | ||
| var type = schema.GetColumnType(colIndices[i]); | ||
| if (type.ItemType.IsKey && schema.HasKeyNames(colIndices[i], type.ItemType.KeyCount)) | ||
| var type = schema[colIndices[i]].Type; | ||
| if (type.ItemType.IsKey && schema[colIndices[i]].HasKeyValues(type.ItemType.KeyCount)) | ||
| { | ||
| ch.Assert(schema.HasKeyNames(colIndices[i], type.ItemType.KeyCount)); | ||
| ch.Assert(schema[colIndices[i]].HasKeyValues(type.ItemType.KeyCount)); | ||
| var keyValues = default(VBuffer<ReadOnlyMemory<char>>); | ||
| schema.GetMetadata(MetadataUtils.Kinds.KeyValues, colIndices[i], ref keyValues); | ||
| schema[colIndices[i]].Metadata.GetValue(MetadataUtils.Kinds.KeyValues, ref keyValues); | ||
| for (int slot = 0; slot < type.ValueCount; slot++) | ||
| { | ||
| foreach (var kvp in keyValues.Items()) | ||
|
|
@@ -333,15 +333,15 @@ private abstract unsafe class BufferFillerBase | |
| public delegate void ValuePoker<T>(T value, int col, long index); | ||
|
|
||
| protected readonly int _colIndex; | ||
| protected readonly IRow _input; | ||
| protected readonly Row _input; | ||
|
|
||
| protected BufferFillerBase(IRow input, int pyColIndex) | ||
| protected BufferFillerBase(Row input, int pyColIndex) | ||
| { | ||
| _colIndex = pyColIndex; | ||
| _input = input; | ||
| } | ||
|
|
||
| public static BufferFillerBase Create(EnvironmentBlock* penv, IRow input, int pyCol, int idvCol, DataKind dataKind, ColumnType type, void* setter) | ||
| public static BufferFillerBase Create(EnvironmentBlock* penv, Row input, int pyCol, int idvCol, DataKind dataKind, ColumnType type, void* setter) | ||
| { | ||
| var itemType = type.ItemType; | ||
| // We convert the unsigned types to signed types, with -1 indicating missing in Python. | ||
|
|
@@ -494,14 +494,14 @@ private sealed class Impl<TSrc> : BufferFillerBase | |
| private readonly ValueGetter<TSrc> _get; | ||
| private readonly ValuePoker<TSrc> _poker; | ||
|
|
||
| public Impl(IRow input, int pyColIndex, int idvColIndex, ColumnType type, ValuePoker<TSrc> poker) | ||
| public Impl(Row input, int pyColIndex, int idvColIndex, ColumnType type, ValuePoker<TSrc> poker) | ||
| : base(input, pyColIndex) | ||
| { | ||
| Contracts.AssertValue(input); | ||
| Contracts.Assert(0 <= idvColIndex && idvColIndex < input.Schema.ColumnCount); | ||
| Contracts.Assert(0 <= idvColIndex && idvColIndex < input.Schema.Count); | ||
|
|
||
| if (type.IsVector) | ||
| _getVec = RowCursorUtils.GetVecGetterAs<TSrc>(type.ItemType.AsPrimitive, input, idvColIndex); | ||
| _getVec = RowCursorUtils.GetVecGetterAs<TSrc>((PrimitiveType)type.ItemType, input, idvColIndex); | ||
| else | ||
| _get = RowCursorUtils.GetGetterAs<TSrc>(type, input, idvColIndex); | ||
|
|
||
|
|
@@ -516,19 +516,19 @@ public override void Set() | |
| { | ||
| for (int i = 0; i < _buffer.Length; i++) | ||
| { | ||
| _poker(_buffer.Values[i], _colIndex + i, _input.Position); | ||
| _poker(_buffer.GetValues()[i], _colIndex + i, _input.Position); | ||
| } | ||
| } | ||
| else | ||
| { | ||
| int ii = 0; | ||
| for (int i = 0; i < _buffer.Length; i++) | ||
| { | ||
| while (ii < _buffer.Count && _buffer.Indices[ii] < i) | ||
| while (ii < _buffer.GetValues().Length && _buffer.GetIndices()[ii] < i) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It may be cleaner to add two lines before the for loop: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| ii++; | ||
| TSrc val = default(TSrc); | ||
| if (ii < _buffer.Count && _buffer.Indices[ii] == i) | ||
| val = _buffer.Values[ii]; | ||
| if (ii < _buffer.GetValues().Length && _buffer.GetIndices()[ii] == i) | ||
| val = _buffer.GetValues()[ii]; | ||
| _poker(val, _colIndex + i, _input.Position); | ||
| } | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Is this intentional? Shouldn't we use a release version? #Resolved
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.
Yes. 0.9 won't work and we don't have the official 0.10 yet. So we're stuck with preview nugets until 0.10 is released.
In reply to: 248377040 [](ancestors = 248377040)
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.
Also, we won't be publishing a new nimbusml wheel file until we use 0.10.
In reply to: 248401711 [](ancestors = 248401711,248377040)