djl
djl copied to clipboard
TimeFeature Minute mapping as "T", is not aligned with Duration.parse like "M"
Description
Duration parse method fails when receives the Minute format from TimeFeature frequency with "T" ending char.
Expected Behavior
TimeFeature minute mapping should use the "M" char like Duration java class. (But the "M" char is already used to map the TimeFeature Month)
Error Message
Text cannot be parsed to a Duration
How to Reproduce?
Use any DJL example of Timeseries with frequency with "T", like "2T"
Steps to reproduce
(Paste the commands you ran that produced the error.)
- Build a Java 17 or Java 21 project with this: https://github.com/deepjavalibrary/djl/blob/master/examples/src/main/java/ai/djl/examples/training/TrainTimeSeries.java
- Initialize "freq" parameter to "T"
- Run the example.
What have you tried to solve it?
- Nothing yet.