HumanSignal / label-studio

Label Studio is a multi-type data labeling and annotation tool with standardized output format
https://labelstud.io
Apache License 2.0
19.36k stars 2.4k forks source link

no preview of time series when header attributes are quoted #3459

Open jdevoo opened 1 year ago

jdevoo commented 1 year ago

Describe the bug Cannot view the time series data in labeling task preview when the dataset header attributes are quoted.

To Reproduce Steps to reproduce the behavior: Create a local data source and add location for dataset (below first few rows)

"timestamps","value","anomaly","changepoint","trend","noise","seasonality1","seasonality2","seasonality3"
1416722400,-363.27890932679,0,0,-2,-361.27890932679,0,0,0
1416726000,320.888589880355,0,0,-4,-217.845823831664,413.1,115.769758874358,13.8646548376615
1416729600,891.727421717808,0,0,-6,-69.1426855907418,715.510188606703,223.65,27.7099187018461
1416733200,1174.65228740956,0,0,-8,-1.35300355429298,826.2,316.288863224743,41.5164277391066
1416736800,1712.29026109409,0,0,-10,564.14203707648,715.510188606703,387.373163112779,55.2648722981255
1416740400,1081.23695929409,0,0,-12,179.14231325898,413.1,432.0586220991,68.9360239360087
1416744000,328.359752757442,0,0,-14,-187.451009553559,1.01180318545554e-13,447.3,82.5107623110014

Create project with following task (adjust path and filename accordingly)

[{
  "data": {
    "csv": "http://localhost:8080/data/local-files?d=online-SESD/A3Benchmark-TS1.csv"
  }
}]

Labeling UI was configured as follows

<View>
  <TimeSeriesLabels name="A3Benchmark" toName="TS1">
    <Label value="mycp" background="red"/>
  </TimeSeriesLabels>
  <TimeSeries name="TS1"
              timeColumn="timestamps"
              timeFormat="%s"
              valueType="url"
              value="$csv">
    <Channel column="value"/>
  </TimeSeries>
</View>

Go to project and select labeling task. See that preview panel remains gray. When I remove the double quotes from the time series dataset, I see the time series data in the task.

timestamps,value,anomaly,changepoint,trend,noise,seasonality1,seasonality2,seasonality3
1416722400,-363.27890932679,0,0,-2,-361.27890932679,0,0,0
1416726000,320.888589880355,0,0,-4,-217.845823831664,413.1,115.769758874358,13.8646548376615
1416729600,891.727421717808,0,0,-6,-69.1426855907418,715.510188606703,223.65,27.7099187018461
1416733200,1174.65228740956,0,0,-8,-1.35300355429298,826.2,316.288863224743,41.5164277391066
1416736800,1712.29026109409,0,0,-10,564.14203707648,715.510188606703,387.373163112779,55.2648722981255
1416740400,1081.23695929409,0,0,-12,179.14231325898,413.1,432.0586220991,68.9360239360087
1416744000,328.359752757442,0,0,-14,-187.451009553559,1.01180318545554e-13,447.3,82.5107623110014

Expected behavior I would expect the data can be read with and without quoted header attributes.

Environment (please complete the following information): I used the docker image of Label Studio 1.7

bmartel commented 1 year ago

Hey @jdevoo 👋. Sorry for the delayed response, this is bug and I was able to reproduce and fix this. I will get a ticket generated and get this resolved.

makseq commented 1 year ago

We are working on it in the ticket DEV-4231.