djl icon indicating copy to clipboard operation
djl copied to clipboard

TimeFeature Minute mapping as "T", is not aligned with Duration.parse like "M"

Open J11Livestyling opened this issue 8 months ago • 0 comments

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.)

  1. 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
  2. Initialize "freq" parameter to "T"
  3. Run the example.

What have you tried to solve it?

  1. Nothing yet.

J11Livestyling avatar Mar 06 '25 16:03 J11Livestyling