Skip to content

Commit 43af6e7

Browse files
add invariantculture to both side
1 parent 32cfd49 commit 43af6e7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Microsoft.ML.AutoML/Sweepers/Parameters.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
using System;
66
using System.Collections.Generic;
7+
using System.Globalization;
78
using Microsoft.ML.Internal.Utilities;
89

910
namespace Microsoft.ML.AutoML
@@ -128,7 +129,7 @@ public FloatParameterValue(string name, float value)
128129
Runtime.Contracts.Assert(!float.IsNaN(value));
129130
_name = name;
130131
_value = value;
131-
_valueText = _value.ToString("R");
132+
_valueText = _value.ToString("R", CultureInfo.InvariantCulture);
132133
}
133134

134135
public bool Equals(IParameterValue other)

src/Microsoft.ML.AutoML/Utils/SweepableParamAttributes.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public SweepableFloatParam(float min, float max, float stepSize = -1, int numSte
145145

146146
public override void SetUsingValueText(string valueText)
147147
{
148-
RawValue = float.Parse(valueText);
148+
RawValue = float.Parse(valueText, CultureInfo.InvariantCulture);
149149
}
150150

151151
public override SweepableParam Clone() =>

0 commit comments

Comments
 (0)