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

Build fix for rolling ML.NET 1.5.0-preview* and update to Pandas 1.0 #437

Merged
merged 5 commits into from
Feb 13, 2020
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
7 changes: 1 addition & 6 deletions src/DotNetBridge/RmlEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,9 @@ protected override IHost RegisterCore(HostEnvironmentBase<RmlEnvironment> source
}

public RmlEnvironment(Bridge.CheckCancelled checkDelegate, int? seed = null, bool verbose = false)
: this(RandomUtils.Create(seed), verbose)
: base(seed, verbose)
{
CheckCancelled = checkDelegate;
}

public RmlEnvironment(Random rand, bool verbose = false)
: base(rand, verbose)
{
CultureInfo.CurrentUICulture = CultureInfo.InvariantCulture;
EnsureDispatcher<ChannelMessage>();
}
Expand Down
1 change: 1 addition & 0 deletions src/python/nimbusml.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
<Compile Include="nimbusml\internal\entrypoints\trainers_lightgbmranker.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_lightgbmregressor.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_linearsvmbinaryclassifier.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_localdeepsvmbinaryclassifier.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_logisticregressionbinaryclassifier.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_logisticregressionclassifier.py" />
<Compile Include="nimbusml\internal\entrypoints\trainers_naivebayesclassifier.py" />
Expand Down
5 changes: 5 additions & 0 deletions src/python/nimbusml/ensemble/lightgbmbinaryclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ class LightGbmBinaryClassifier(
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -165,6 +168,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -219,6 +223,7 @@ def __init__(
batch_size=batch_size,
use_categorical_split=use_categorical_split,
handle_missing_value=handle_missing_value,
use_zero_as_missing_value=use_zero_as_missing_value,
minimum_example_count_per_group=minimum_example_count_per_group,
maximum_categorical_split_point_count=maximum_categorical_split_point_count,
categorical_smoothing=categorical_smoothing,
Expand Down
5 changes: 5 additions & 0 deletions src/python/nimbusml/ensemble/lightgbmclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class LightGbmClassifier(core, BasePredictor, ClassifierMixin):
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -160,6 +163,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -214,6 +218,7 @@ def __init__(
batch_size=batch_size,
use_categorical_split=use_categorical_split,
handle_missing_value=handle_missing_value,
use_zero_as_missing_value=use_zero_as_missing_value,
minimum_example_count_per_group=minimum_example_count_per_group,
maximum_categorical_split_point_count=maximum_categorical_split_point_count,
categorical_smoothing=categorical_smoothing,
Expand Down
5 changes: 5 additions & 0 deletions src/python/nimbusml/ensemble/lightgbmranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ class LightGbmRanker(core, BasePredictor, ClassifierMixin):
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -159,6 +162,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -212,6 +216,7 @@ def __init__(
batch_size=batch_size,
use_categorical_split=use_categorical_split,
handle_missing_value=handle_missing_value,
use_zero_as_missing_value=use_zero_as_missing_value,
minimum_example_count_per_group=minimum_example_count_per_group,
maximum_categorical_split_point_count=maximum_categorical_split_point_count,
categorical_smoothing=categorical_smoothing,
Expand Down
5 changes: 5 additions & 0 deletions src/python/nimbusml/ensemble/lightgbmregressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ class LightGbmRegressor(core, BasePredictor, RegressorMixin):
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -150,6 +153,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -201,6 +205,7 @@ def __init__(
batch_size=batch_size,
use_categorical_split=use_categorical_split,
handle_missing_value=handle_missing_value,
use_zero_as_missing_value=use_zero_as_missing_value,
minimum_example_count_per_group=minimum_example_count_per_group,
maximum_categorical_split_point_count=maximum_categorical_split_point_count,
categorical_smoothing=categorical_smoothing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ class LightGbmBinaryClassifier(
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -154,6 +157,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -183,6 +187,7 @@ def __init__(
self.batch_size = batch_size
self.use_categorical_split = use_categorical_split
self.handle_missing_value = handle_missing_value
self.use_zero_as_missing_value = use_zero_as_missing_value
self.minimum_example_count_per_group = minimum_example_count_per_group
self.maximum_categorical_split_point_count = maximum_categorical_split_point_count
self.categorical_smoothing = categorical_smoothing
Expand Down Expand Up @@ -220,6 +225,7 @@ def _get_node(self, **all_args):
batch_size=self.batch_size,
use_categorical_split=self.use_categorical_split,
handle_missing_value=self.handle_missing_value,
use_zero_as_missing_value=self.use_zero_as_missing_value,
minimum_example_count_per_group=self.minimum_example_count_per_group,
maximum_categorical_split_point_count=self.maximum_categorical_split_point_count,
categorical_smoothing=self.categorical_smoothing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ class LightGbmClassifier(
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -152,6 +155,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -181,6 +185,7 @@ def __init__(
self.batch_size = batch_size
self.use_categorical_split = use_categorical_split
self.handle_missing_value = handle_missing_value
self.use_zero_as_missing_value = use_zero_as_missing_value
self.minimum_example_count_per_group = minimum_example_count_per_group
self.maximum_categorical_split_point_count = maximum_categorical_split_point_count
self.categorical_smoothing = categorical_smoothing
Expand Down Expand Up @@ -218,6 +223,7 @@ def _get_node(self, **all_args):
batch_size=self.batch_size,
use_categorical_split=self.use_categorical_split,
handle_missing_value=self.handle_missing_value,
use_zero_as_missing_value=self.use_zero_as_missing_value,
minimum_example_count_per_group=self.minimum_example_count_per_group,
maximum_categorical_split_point_count=self.maximum_categorical_split_point_count,
categorical_smoothing=self.categorical_smoothing,
Expand Down
6 changes: 6 additions & 0 deletions src/python/nimbusml/internal/core/ensemble/lightgbmranker.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ class LightGbmRanker(BasePipelineItem, DefaultSignatureWithRoles):
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -149,6 +152,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -176,6 +180,7 @@ def __init__(
self.batch_size = batch_size
self.use_categorical_split = use_categorical_split
self.handle_missing_value = handle_missing_value
self.use_zero_as_missing_value = use_zero_as_missing_value
self.minimum_example_count_per_group = minimum_example_count_per_group
self.maximum_categorical_split_point_count = maximum_categorical_split_point_count
self.categorical_smoothing = categorical_smoothing
Expand Down Expand Up @@ -212,6 +217,7 @@ def _get_node(self, **all_args):
batch_size=self.batch_size,
use_categorical_split=self.use_categorical_split,
handle_missing_value=self.handle_missing_value,
use_zero_as_missing_value=self.use_zero_as_missing_value,
minimum_example_count_per_group=self.minimum_example_count_per_group,
maximum_categorical_split_point_count=self.maximum_categorical_split_point_count,
categorical_smoothing=self.categorical_smoothing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ class LightGbmRegressor(
:param handle_missing_value: Enable special handling of missing value or
not.

:param use_zero_as_missing_value: Enable usage of zero (0) as missing
value.

:param minimum_example_count_per_group: Minimum number of instances per
categorical group.

Expand Down Expand Up @@ -142,6 +145,7 @@ def __init__(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand All @@ -168,6 +172,7 @@ def __init__(
self.batch_size = batch_size
self.use_categorical_split = use_categorical_split
self.handle_missing_value = handle_missing_value
self.use_zero_as_missing_value = use_zero_as_missing_value
self.minimum_example_count_per_group = minimum_example_count_per_group
self.maximum_categorical_split_point_count = maximum_categorical_split_point_count
self.categorical_smoothing = categorical_smoothing
Expand Down Expand Up @@ -202,6 +207,7 @@ def _get_node(self, **all_args):
batch_size=self.batch_size,
use_categorical_split=self.use_categorical_split,
handle_missing_value=self.handle_missing_value,
use_zero_as_missing_value=self.use_zero_as_missing_value,
minimum_example_count_per_group=self.minimum_example_count_per_group,
maximum_categorical_split_point_count=self.maximum_categorical_split_point_count,
categorical_smoothing=self.categorical_smoothing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def trainers_lightgbmbinaryclassifier(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -88,6 +89,8 @@ def trainers_lightgbmbinaryclassifier(
(inputs).
:param handle_missing_value: Enable special handling of missing
value or not. (inputs).
:param use_zero_as_missing_value: Enable usage of zero (0) as
missing value. (inputs).
:param minimum_example_count_per_group: Minimum number of
instances per categorical group. (inputs).
:param maximum_categorical_split_point_count: Max number of
Expand Down Expand Up @@ -243,6 +246,11 @@ def trainers_lightgbmbinaryclassifier(
obj=handle_missing_value,
none_acceptable=True,
is_of_type=bool)
if use_zero_as_missing_value is not None:
inputs['UseZeroAsMissingValue'] = try_set(
obj=use_zero_as_missing_value,
none_acceptable=True,
is_of_type=bool)
if minimum_example_count_per_group is not None:
inputs['MinimumExampleCountPerGroup'] = try_set(
obj=minimum_example_count_per_group,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def trainers_lightgbmclassifier(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -86,6 +87,8 @@ def trainers_lightgbmclassifier(
(inputs).
:param handle_missing_value: Enable special handling of missing
value or not. (inputs).
:param use_zero_as_missing_value: Enable usage of zero (0) as
missing value. (inputs).
:param minimum_example_count_per_group: Minimum number of
instances per categorical group. (inputs).
:param maximum_categorical_split_point_count: Max number of
Expand Down Expand Up @@ -240,6 +243,11 @@ def trainers_lightgbmclassifier(
obj=handle_missing_value,
none_acceptable=True,
is_of_type=bool)
if use_zero_as_missing_value is not None:
inputs['UseZeroAsMissingValue'] = try_set(
obj=use_zero_as_missing_value,
none_acceptable=True,
is_of_type=bool)
if minimum_example_count_per_group is not None:
inputs['MinimumExampleCountPerGroup'] = try_set(
obj=minimum_example_count_per_group,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def trainers_lightgbmranker(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -83,6 +84,8 @@ def trainers_lightgbmranker(
(inputs).
:param handle_missing_value: Enable special handling of missing
value or not. (inputs).
:param use_zero_as_missing_value: Enable usage of zero (0) as
missing value. (inputs).
:param minimum_example_count_per_group: Minimum number of
instances per categorical group. (inputs).
:param maximum_categorical_split_point_count: Max number of
Expand Down Expand Up @@ -232,6 +235,11 @@ def trainers_lightgbmranker(
obj=handle_missing_value,
none_acceptable=True,
is_of_type=bool)
if use_zero_as_missing_value is not None:
inputs['UseZeroAsMissingValue'] = try_set(
obj=use_zero_as_missing_value,
none_acceptable=True,
is_of_type=bool)
if minimum_example_count_per_group is not None:
inputs['MinimumExampleCountPerGroup'] = try_set(
obj=minimum_example_count_per_group,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def trainers_lightgbmregressor(
batch_size=1048576,
use_categorical_split=None,
handle_missing_value=True,
use_zero_as_missing_value=False,
minimum_example_count_per_group=100,
maximum_categorical_split_point_count=32,
categorical_smoothing=10.0,
Expand Down Expand Up @@ -78,6 +79,8 @@ def trainers_lightgbmregressor(
(inputs).
:param handle_missing_value: Enable special handling of missing
value or not. (inputs).
:param use_zero_as_missing_value: Enable usage of zero (0) as
missing value. (inputs).
:param minimum_example_count_per_group: Minimum number of
instances per categorical group. (inputs).
:param maximum_categorical_split_point_count: Max number of
Expand Down Expand Up @@ -218,6 +221,11 @@ def trainers_lightgbmregressor(
obj=handle_missing_value,
none_acceptable=True,
is_of_type=bool)
if use_zero_as_missing_value is not None:
inputs['UseZeroAsMissingValue'] = try_set(
obj=use_zero_as_missing_value,
none_acceptable=True,
is_of_type=bool)
if minimum_example_count_per_group is not None:
inputs['MinimumExampleCountPerGroup'] = try_set(
obj=minimum_example_count_per_group,
Expand Down
Loading