Skip to content
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

Cannot run Transform on DataFrame with DateTime type #6213

Closed
Tracked by #6144
beccamc opened this issue Jun 2, 2022 · 2 comments · Fixed by #6302
Closed
Tracked by #6144

Cannot run Transform on DataFrame with DateTime type #6213

beccamc opened this issue Jun 2, 2022 · 2 comments · Fixed by #6302
Labels
enhancement New feature or request Microsoft.Data.Analysis All DataFrame related issues and PRs P2 Priority of the issue for triage purpose: Needs to be fixed at some point.
Milestone

Comments

@beccamc
Copy link
Contributor

beccamc commented Jun 2, 2022

System Information (please complete the following information):

  • OS & Version: [e.g. Windows 10]
  • ML.NET Version: 1.7.1
  • .NET Version: [e.g. .NET 5.0]

Describe the bug
I'm adding the DateTime type to Model Builder, but unfortunately a few features are broken because of DataFrame support. DataFrame doesn't support the DateTime type directly. However I can add a PrimitiveDataFrameColumn of type DateTime. This displays correctly but breaks when I try to use the DataFrame for a prediction

System.NotSupportedException: Specified method is not supported.
   at Microsoft.Data.Analysis.PrimitiveDataFrameColumn`1.GetDataViewType()
   at Microsoft.Data.Analysis.PrimitiveDataFrameColumn`1.AddDataViewColumn(Builder builder)
   at Microsoft.Data.Analysis.DataFrame.get_DataViewSchema()
   at Microsoft.Data.Analysis.DataFrame.Microsoft.ML.IDataView.get_Schema()
   at Microsoft.ML.Data.TransformerChain`1.Transform(IDataView input)
   at Submission#8.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)

To Reproduce
Steps to reproduce the behavior:
var resultDataView = model.Transform(dataFrame /*DataFrame with DateTime*/);

I have a notebook with the problem here DateTimeDF.zip

Expected behavior
Since IDataView supports the DateTime type, I expect DataFrame to support it as well.

@ghost ghost added the untriaged New issue has not been triaged label Jun 2, 2022
@beccamc
Copy link
Contributor Author

beccamc commented Jun 2, 2022

I assume this is the same root cause as this - #5698

@michaelgsharp
Copy link
Member

@beccamc I'll tag this for our "future" milestone and we can pull it in whenever we have the capacity to work on it.

@michaelgsharp michaelgsharp added enhancement New feature or request Microsoft.Data.Analysis All DataFrame related issues and PRs labels Jun 13, 2022
@michaelgsharp michaelgsharp added this to the ML.NET Future milestone Jun 13, 2022
@ghost ghost removed the untriaged New issue has not been triaged label Jun 13, 2022
@michaelgsharp michaelgsharp added the P2 Priority of the issue for triage purpose: Needs to be fixed at some point. label Jun 13, 2022
@ghost ghost added the in-pr label Aug 24, 2022
@ghost ghost removed the in-pr label Sep 20, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request Microsoft.Data.Analysis All DataFrame related issues and PRs P2 Priority of the issue for triage purpose: Needs to be fixed at some point.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants