Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

upgrade to ML.NET 1.1 #126

Merged
merged 4 commits into from
Jun 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/DotNetBridge/DotNetBridge.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.ML" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.EntryPoints" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.Mkl.Redist" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.LightGBM" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.OnnxTransformer" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.TensorFlow" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.Ensemble" Version="0.12.0" />
<PackageReference Include="Microsoft.ML" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.EntryPoints" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.Mkl.Redist" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.LightGBM" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.OnnxTransformer" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.TensorFlow" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.Ensemble" Version="0.13.0" />
</ItemGroup>
</Project>
18 changes: 9 additions & 9 deletions src/Platforms/build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.ML" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.EntryPoints" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.LightGBM" Version="1.0.0" />
<PackageReference Include="Microsoft.ML.OnnxTransformer" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.TensorFlow" Version="0.12.0" />
<PackageReference Include="Microsoft.ML.Ensemble" Version="0.12.0" />
<PackageReference Include="Microsoft.ML" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.CpuMath" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.EntryPoints" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.Mkl.Components" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.ImageAnalytics" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.LightGBM" Version="1.1.0" />
<PackageReference Include="Microsoft.ML.OnnxTransformer" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.TensorFlow" Version="0.13.0" />
<PackageReference Include="Microsoft.ML.Ensemble" Version="0.13.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/python/nimbusml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Microsoft Machine Learning for Python
"""

__version__ = '1.0.2'
__version__ = '1.1.0'

# CoreCLR version of MicrosoftML is built on Windows.
# But file permissions are not preserved when it's copied to Linux.
Expand Down
2 changes: 2 additions & 0 deletions src/python/nimbusml/internal/utils/data_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,8 @@ def format_options(self, add_sep=False):

val = ['quote+']
for k, v in sorted(opts.items()):
if k == 'quote':
continue
if isinstance(v, bool):
v = "+" if v else '-'
elif k == 'sep' and v == '\t':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def test_word_embedding_example(self):
path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)

# transform usage
Expand All @@ -92,7 +92,7 @@ def test_word_embedding_example(self):
])

features = pipeline.fit_transform(data)
assert features.shape == (248, 787)
assert features.shape == (248, 802)

# TODO: fix ssl issue on test centos7 & ubuntu14 boxes.
# Test works on ubuntu16.
Expand All @@ -117,7 +117,7 @@ def test_word_embedding_example2(self):
path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)

pipeline = Pipeline([
Expand All @@ -129,7 +129,7 @@ def test_word_embedding_example2(self):
])

features = pipeline.fit_transform(data)
assert features.shape == (248, 787)
assert features.shape == (248, 802)
assert 'features_TransformedText.94' in list(features.columns)

# TODO: fix ssl issue on test centos7 & ubuntu14 boxes.
Expand All @@ -155,7 +155,7 @@ def test_word_embedding_example_dict_same_name(self):
path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)
pipeline = Pipeline([
NGramFeaturizer(word_feature_extractor=Ngram(), output_tokens_column_name='features_TransformedText',
Expand All @@ -168,14 +168,14 @@ def test_word_embedding_example_dict_same_name(self):
])

features = pipeline.fit_transform(data)
assert features.shape == (248, 787)
assert features.shape == (248, 802)

@unittest.skip('System.ArgumentOutOfRangeException')
def test_word_embedding_example_dict_newname(self):
path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)
pipeline = Pipeline([
NGramFeaturizer(word_feature_extractor=Ngram(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,20 +198,20 @@ def test_ngramfeaturizer_single(self):
path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)
xf = NGramFeaturizer(word_feature_extractor=n_gram(),
columns={'features': ['id', 'education']})

features = xf.fit_transform(data)
assert features.shape == (248, 637)
assert features.shape == (248, 652)

def test_ngramfeaturizer_multi(self):

path = get_dataset('infert').as_filepath()
file_schema = 'sep=, col=id:TX:0 col=education:TX:1 col=age:R4:2 ' \
'col=parity:R4:3 col=induced:R4:4 col=case:R4:5 ' \
'col=spontaneous:R4:6 header=+'
'col=spontaneous:R4:6 quote+ header=+'
data = FileDataStream(path, schema=file_schema)
try:
xf = NGramFeaturizer(word_feature_extractor=n_gram(),
Expand Down
Loading