|
1 |
| -use std::sync::Arc; |
2 |
| -use std::sync::mpsc::Sender; |
3 |
| -use std::thread; |
| 1 | +use std::{ |
| 2 | + sync::{Arc, mpsc::Sender}, |
| 3 | + thread, |
| 4 | +}; |
4 | 5 |
|
5 | 6 | use anyhow::{Context as _, anyhow};
|
6 |
| -use arrow::array::{ |
7 |
| - ArrayRef, BinaryArray, FixedSizeListArray, Int64Array, RecordBatch, StringArray, StructArray, |
| 7 | +use arrow::{ |
| 8 | + array::{ |
| 9 | + ArrayRef, BinaryArray, FixedSizeListArray, Int64Array, RecordBatch, StringArray, |
| 10 | + StructArray, |
| 11 | + }, |
| 12 | + compute::cast, |
| 13 | + datatypes::{DataType, Field}, |
8 | 14 | };
|
9 |
| -use arrow::compute::cast; |
10 |
| -use arrow::datatypes::{DataType, Field}; |
11 | 15 | use itertools::Either;
|
| 16 | + |
12 | 17 | use re_arrow_util::ArrowArrayDowncastRef as _;
|
13 | 18 | use re_chunk::{
|
14 | 19 | ArrowArray, Chunk, ChunkId, EntityPath, RowId, TimeColumn, TimeInt, TimePoint, Timeline,
|
| 20 | + TimelineName, external::nohash_hasher::IntMap, |
15 | 21 | };
|
16 |
| -use re_chunk::{TimelineName, external::nohash_hasher::IntMap}; |
17 |
| - |
18 | 22 | use re_log_types::{ApplicationId, StoreId};
|
19 |
| -use re_types::archetypes::{ |
20 |
| - AssetVideo, DepthImage, EncodedImage, TextDocument, VideoFrameReference, |
| 23 | +use re_types::{ |
| 24 | + Archetype, Component, ComponentBatch, |
| 25 | + archetypes::{ |
| 26 | + AssetVideo, DepthImage, EncodedImage, Scalars, TextDocument, VideoFrameReference, |
| 27 | + }, |
| 28 | + components::{Name, VideoTimestamp}, |
21 | 29 | };
|
22 |
| -use re_types::components::{Name, Scalar, VideoTimestamp}; |
23 |
| -use re_types::{Archetype, Component, ComponentBatch}; |
24 | 30 |
|
25 | 31 | use crate::lerobot::{
|
26 | 32 | DType, EpisodeIndex, Feature, LeRobotDataset, TaskIndex, is_lerobot_dataset,
|
@@ -592,11 +598,7 @@ fn make_scalar_entity_chunk(
|
592 | 598 | ChunkId::new(),
|
593 | 599 | entity_path,
|
594 | 600 | timelines.clone(),
|
595 |
| - std::iter::once(( |
596 |
| - <Scalar as Component>::descriptor().clone(), |
597 |
| - data_field_array, |
598 |
| - )) |
599 |
| - .collect(), |
| 601 | + std::iter::once((Scalars::descriptor_scalars().clone(), data_field_array)).collect(), |
600 | 602 | )?)
|
601 | 603 | }
|
602 | 604 |
|
|
0 commit comments