Skip to content

SDCA Error w/ L2=0 #596

Description

@justinormont

When using l2=0 in SDCA, our warning message throws, as it doesn't have enough parameters.

Error:

 Unexpected exception: Index (zero based) must be greater than or equal to zero and less than the size of the argument list., 'System.FormatException'
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object[] args)
   at Microsoft.ML.Runtime.Data.TlcEnvironment.ConsoleWriter.PrintMessage(IMessageSource sender, ChannelMessage msg) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.Core\Environment\TlcEnvironment.cs:line 53
   at Microsoft.ML.Runtime.Data.TlcEnvironment.PrintMessage(IMessageSource src, ChannelMessage msg) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.Core\Environment\TlcEnvironment.cs:line 396
   at Microsoft.ML.Runtime.Data.HostEnvironmentBase`1.Dispatcher`1.DispatchCore(IMessageSource sender, TMessage message) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.Core\Environment\HostEnvironmentBase.cs:line 338
   at Microsoft.ML.Runtime.Data.HostEnvironmentBase`1.ChannelBase.Warning(MessageSensitivity sensitivity, String fmt, Object[] args) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.Core\Environment\HostEnvironmentBase.cs:line 276
   at Microsoft.ML.Runtime.Learners.SdcaTrainerBase`1.ArgumentsBase.Check(IHostEnvironment env) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.StandardLearners\Standard\LinearClassificationTrainer.cs:line 219
   at Microsoft.ML.Runtime.Learners.SdcaMultiClassTrainer..ctor(IHostEnvironment env, Arguments args) in E:\TLC_git\TLC\OpenSource\src\Microsoft.ML.StandardLearners\Standard\SdcaMultiClass.cs:line 68

Cause:
L2LowerBound needs to be added to the warning's params.

ch.Warning("The specified l2Const = {0} is too small. SDCA optimizes the dual objective function. " +
"The dual formulation is only valid with a positive L2 regularization. Also, an l2Const less than {1} " +
"could drastically slow down the convergence. So using l2Const = {1} instead.", L2Const);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions