Skip to content

Training model builder error for Forecasting due to datetime #2022

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vzhuqin opened this issue Feb 11, 2022 · 3 comments
Closed

Training model builder error for Forecasting due to datetime #2022

vzhuqin opened this issue Feb 11, 2022 · 3 comments
Assignees
Labels
Forecasting Priority:1 Work that is critical for the release, but we could probably ship without Reported by: Test Stale

Comments

@vzhuqin
Copy link

vzhuqin commented Feb 11, 2022

System Information (please complete the following information):

  • Model Builder Version (available in Manage Extensions dialog): 16.13.2.2211002
  • Microsoft Visual Studio Enterprise 2022 (64-bit) Version 17.0.6

Describe the bug

  • On which step of the process did you run into an issue: Forecasting>Training error

Data source
https://github.com/dotnet/machinelearning-samples/raw/main/samples/csharp/getting-started/Forecasting_BikeSharingDemand/BikeDemandForecasting/Data/DailyDemand.mdf

To Reproduce
Steps to reproduce the behavior:

  1. Select Create a new project from the Visual Studio 2022 start window;
  2. Choose the C# Console App (.NET Core) project template with .Net 6.0;
  3. Add model builder by right click on the project;
  4. Select Forecasting and input above data source;
  5. Set "TotalRentals" as Label, "Rental Data" as Time series;
  6. Start training, prompts model builder error that: Unable to cast object of type 'System.DateTime' to type 'System.String

Expected behavior
No error during training.

Screenshots
Data settings:
image

Error screenshot:
image

Additional context
Error message:
at System.Data.SqlClient.SqlBuffer.get_String()
at Microsoft.ML.Data.DatabaseLoader.Cursor.<>c__DisplayClass38_0.b__0(ReadOnlyMemory`1& value)
at Microsoft.Data.Analysis.StringDataFrameColumn.AddValueUsingCursor(DataViewRowCursor cursor, Delegate getter)
at Microsoft.ML.IDataViewExtensions.ToDataFrame(IDataView dataView, Int64 maxRows, String[] selectColumns)
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.ResampleStrategyProposer.InitializeForecasting(TrialParameter trialParameter) in //src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/ResampleStrategyProposer.cs:line 127
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.ResampleStrategyProposer.Propose(TrialParameter trialParameter) in /
/src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/ResampleStrategyProposer.cs:line 51
at Microsoft.ML.ModelBuilder.AutoMLService.Proposer.Controller.Propose() in //src/Microsoft.ML.ModelBuilder.AutoMLService/Proposer/Controller.cs:line 66
at Microsoft.ML.ModelBuilder.AutoMLService.Experiments.LocalAutoMLExperiment.d__15.MoveNext() in /
/src/Microsoft.ML.ModelBuilder.AutoMLService/Experiments/LocalAutoMLExperiment.cs:line 163
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.ML.ModelBuilder.AutoMLEngine.d__21.MoveNext() in /_/src/Microsoft.ML.ModelBuilder.AutoMLService/AutoMLEngineService/AutoMLEngine.cs:line 160

@vzhuqin vzhuqin added Priority:1 Work that is critical for the release, but we could probably ship without Reported by: Test Forecasting labels Feb 11, 2022
@LittleLittleCloud LittleLittleCloud self-assigned this Feb 22, 2022
@github-actions github-actions bot added the Stale label Mar 25, 2022
@cmckechney
Copy link

I am having the exact same error. ML 2022 and VS2022 w/ SQL Server data column

@beccamc
Copy link
Contributor

beccamc commented Jun 8, 2022

Just checked this with the addition of DateTime type and it looks like it's blocked by the DataFrame bug - dotnet/machinelearning#6213

@github-actions github-actions bot removed the Stale label Jun 9, 2022
@github-actions github-actions bot added the Stale label Jul 9, 2022
@beccamc beccamc changed the title Training model builder error for Forecasting. Training model builder error for Forecasting due to datetime Sep 14, 2022
@beccamc
Copy link
Contributor

beccamc commented Oct 27, 2022

Duplicate of #2166. This fix will ship in the Fall Model Builder release.

@beccamc beccamc closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Forecasting Priority:1 Work that is critical for the release, but we could probably ship without Reported by: Test Stale
Projects
None yet
Development

No branches or pull requests

4 participants