Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .kilocode/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"project": {
"managedIndexingEnabled": true
}
}
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
thiserror = "1.0"
tempfile = "3.10"

[package]
name = "roboflow"
Expand Down
165 changes: 0 additions & 165 deletions crates/roboflow-dataset/src/formats/lerobot/writer/camera_params.rs

This file was deleted.

6 changes: 3 additions & 3 deletions crates/roboflow-dataset/src/formats/lerobot/writer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@
//! - [`CameraIntrinsic`], [`CameraExtrinsic`], [`ExtrinsicData`] - Camera calibration types

mod builder;
mod camera;
mod camera_params;
mod episode_writer;
mod frame;
mod parquet;
Expand All @@ -53,7 +51,9 @@ mod writer_impl;

// Re-export public API
pub use builder::LerobotWriterBuilder;
pub use camera::{CameraExtrinsic, CameraIntrinsic, ExtrinsicData};
pub use episode_writer::EpisodeWriter;
pub use frame::LerobotFrame;
pub use roboflow_media::camera::{
CameraExtrinsic, CameraIntrinsic, CameraParamsWriter, ExtrinsicData,
};
pub use writer_impl::LerobotWriter;
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@ use roboflow_media::video::{
EncodeStats, RsmpegVideoComposer, VideoComposer, build_frame_buffer_static, encode_videos,
};

use super::camera::{CameraExtrinsic, CameraIntrinsic};
use super::camera_params::CameraParamsWriter;
use super::frame::LerobotFrame;
use super::stats;
use super::{CameraExtrinsic, CameraIntrinsic, CameraParamsWriter};

/// Default episodes per chunk for LeRobot v2.1 format.
/// This matches LeRobot's default of 500 episodes per chunk.
Expand Down Expand Up @@ -1270,7 +1269,7 @@ mod tests {
DatasetConfig, FlushingConfig, LerobotConfig, StreamingConfig, VideoConfig,
};
use crate::formats::lerobot::writer::EpisodeWriter;
use crate::formats::lerobot::writer::camera::{CameraExtrinsic, CameraIntrinsic};
use crate::formats::lerobot::writer::{CameraExtrinsic, CameraIntrinsic};
use roboflow_storage::LocalStorage;

/// Build a minimal LerobotConfig with a custom FlushingConfig.
Expand Down
28 changes: 28 additions & 0 deletions crates/roboflow-distributed/src/batch/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,24 @@ impl BatchController {
Ok(())
}

/// Reconcile a single batch by ID.
///
/// This bypasses phase indexes and directly loads the spec.
pub async fn reconcile_batch_id(&self, batch_id: &str) -> Result<(), TikvError> {
let spec_key = BatchKeys::spec(batch_id);
let spec_data = match self.client.get(spec_key.clone()).await? {
Some(data) => data,
None => {
return Err(TikvError::Other(format!(
"Spec not found for batch_id {}",
batch_id
)));
}
};

self.reconcile_batch(&spec_key, &spec_data).await
}

/// Reconcile a single batch job.
///
/// This reads the spec and status, then drives the state forward.
Expand Down Expand Up @@ -399,6 +417,16 @@ impl BatchController {
status.files_failed = failed;
status.files_active = processing;

if matches!(status.phase, BatchPhase::Failed)
&& failed == 0
&& (completed > 0 || processing > 0)
{
status.error = None;
status.failed_work_units.clear();
status.completed_at = None;
status.transition_to(BatchPhase::Running);
}

// Check if batch should be marked failed
if status.should_fail(spec.spec.backoff_limit) {
status.transition_to(BatchPhase::Failed);
Expand Down
3 changes: 3 additions & 0 deletions crates/roboflow-media/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description = "Image and video encoding/decoding for robotics datasets"
[dependencies]
roboflow-core = { workspace = true }
robocodec = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }

# Image decoding
image = { version = "0.25", default-features = false, features = ["jpeg", "png"] }
Expand All @@ -32,3 +34,4 @@ thiserror = "1.0"
tracing = "0.1"

[dev-dependencies]
tempfile = { workspace = true }
Loading
Loading