File size: 1,071 Bytes
2cbfbf8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
 * Centralized constants for the lerobot-dataset-visualizer
 * Eliminates magic numbers and provides single source of truth for configuration
 */

// Formatting constants for episode and file indexing
export const PADDING = {
  EPISODE_CHUNK: 3,
  EPISODE_INDEX: 6,
  FILE_INDEX: 3,
  CHUNK_INDEX: 3,
} as const;

// Numeric thresholds for data processing
export const THRESHOLDS = {
  SCALE_GROUPING: 2,
  EPSILON: 1e-9,
  VIDEO_SYNC_TOLERANCE: 0.2,
  VIDEO_SEGMENT_BOUNDARY: 0.05,
} as const;

// Chart configuration
export const CHART_CONFIG = {
  MAX_SERIES_PER_GROUP: 6,
  SERIES_NAME_DELIMITER: " | ",
} as const;

// Video player configuration
export const VIDEO_PLAYER = {
  JUMP_SECONDS: 5,
  STEP_SIZE: 0.01,
  DEBOUNCE_MS: 200,
} as const;

// HTTP configuration
export const HTTP = {
  TIMEOUT_MS: 10000,
} as const;

// Excluded columns by dataset version
export const EXCLUDED_COLUMNS = {
  V2: ["timestamp", "frame_index", "episode_index", "index", "task_index"],
  V3: ["index", "task_index", "episode_index", "frame_index", "next.done"],
} as const;