# models

uuid: ec00ce2c-a69d-4f5f-9454-e97cc121526f
datetime_job_started: 2025-12-14T07:58:26.534493
datetime: 2025-12-14T08:04:30.062213
created_by: ubuntu
git_commit_hash: e22439a0d81ec21c45ecb553ae402337f1f1a6e2
git_branch: db
git_remote_url: https://github.com/TRI-ML/vla_foundry.git
model_checkpoints_path: s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m
fixed_model_path: s3://tri-ml-datasets-uw2/vla_foundry_models_fixed/a2b38070-08e9-4b73-a392-20a1aa8c971e
wandb_url: https://wandb.ai/tri/vla_foundry/runs/y5bwvxy3
cfg:
{"name": "2025_12_14-07_58_19-model_transformer-lr_0.0001-bsz_96", "resolve_configs": false, "resolve_configs_path": null, "save_path": null, "wandb": true, "wandb_entity": null, "wandb_project_name": "vla_foundry", "wandb_tags": [], "log_every_n_steps": 20, "log_level": "INFO", "remote_sync": "s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m", "remote_sync_fixed_path": "s3://tri-ml-datasets-uw2/vla_foundry_models_fixed/", "total_train_samples": 200000, "num_epochs": null, "num_checkpoints": 5, "max_checkpoint_limit": null, "total_val_samples": null, "val_every_n_checkpoints": 1, "data": {"type": "text", "dataset_manifest": ["s3://tri-ml-datasets/openlm/dcnlp/datasets/tri-hero-run1_cc_v4_resiliparse_rw_v2_bff_minngram13_10shards_all_fasttext_OH_eli5_vs_rw_v2_bigram_200k_train_0.11-starcoder-math_datasets/manifest.jsonl"], "dataset_weighting": [1.0], "dataset_modality": ["text"], "val_dataset_manifest": [], "val_dataset_weighting": [], "allow_multiple_epochs": false, "num_workers": 32, "prefetch_factor": 4, "seq_len": 2048, "shuffle": true, "shuffle_buffer_size": 2000, "shuffle_initial": 500, "seed": 42}, "database": {"enabled": true, "db_path": "vla_foundry.db", "db_remote": null}, "distributed": {"dist_url": "env://", "dist_backend": "nccl", "fsdp": true, "fsdp_cpu_offload": false, "fsdp_reshard_after_forward": false, "ddp_static_graph": false, "use_distributed": true, "world_size": 3, "rank": 0, "local_rank": 0, "device": "cuda:0"}, "ema": {"enabled": false, "type": "ema", "alpha": 0.999, "update_after_step": 0, "inv_gamma": 1.0, "power": 0.75, "min_value": 0.0, "max_value": 0.9999}, "hparams": {"precision": "amp_bfloat16", "global_batch_size": 96, "per_gpu_batch_size": 32, "seed": 42, "lr": 0.0001, "lr_scheduler": "cosine", "warmup": "0.1", "lr_cooldown_end": 0.0, "force_min_lr": 0.0, "optimizer": "adamw", "wd": 0.2, "beta1": 0.9, "beta2": 0.95, "eps": 1e-08, "loss_function": "cross_entropy", "z_loss_coefficient": 0.0, "grad_clip_norm": null, "grad_checkpointing": false, "torchcompile": false, "world_size": 3}, "model": {"type": "transformer", "resume_from_checkpoint": null, "resume_weights_only": false, "freeze": false, "norm_type": "default_layer_norm", "ffn_type": "swiglu", "qk_norm": false, "positional_embedding_type": "rotary", "attn_name": "torch_attn", "hidden_dim": 96, "n_layers": 8, "n_heads": 4, "vocab_size": 50432, "post_embed_norm": false, "norm_eps": 1e-05, "weight_tying": false, "cast_output_to_float32": true, "max_seq_len": 2048, "is_causal": true}}

git_local_changes:
diff --git a/examples/training/llm_11m.sh b/examples/training/llm_11m.sh
index 12fe676..d3fa3e2 100644
--- a/examples/training/llm_11m.sh
+++ b/examples/training/llm_11m.sh
@@ -8,11 +8,9 @@
 --data.dataset_modality ["text"] \
 --data.dataset_weighting [1.0] \
 --data.seq_len 2048 \
---total_train_samples 14_000_000 \
+--total_train_samples 200_000 \
 --num_checkpoints 5 \
 --hparams.per_gpu_batch_size 32 \
 --hparams.global_batch_size 96 \
 --remote_sync s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m \
---resolve_configs True \
---resolve_configs_path ./ \
 "$@"
\ No newline at end of file
diff --git a/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py b/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
index 259d777..1811bdc 100644
--- a/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
+++ b/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
@@ -79,7 +79,7 @@ def main():
     # Initialize database logger if enabled in config
     db_logger = None
     if cfg.database.enabled:
-        db_logger = DataLogger(cfg=cfg, table_name="datasets", db_path=cfg.database.db_path)
+        db_logger = DataLogger(cfg=cfg, table_name="datasets", db_params=cfg.database)
 
     # Ray Phase 1: Process frame individually and upload to S3
     print(f"🚀 Processing {len(episodes)} episodes and uploading to S3...")
diff --git a/vla_foundry/logger.py b/vla_foundry/logger.py
index 9687015..c3fba3f 100644
--- a/vla_foundry/logger.py
+++ b/vla_foundry/logger.py
@@ -1,6 +1,7 @@
 import json
 import logging
 import os
+import shutil
 import sqlite3
 import uuid
 from dataclasses import asdict, dataclass
@@ -8,6 +9,7 @@ from datetime import datetime
 from typing import Any, Dict, List, Optional
 
 import wandb
+from huggingface_hub import HfApi, hf_hub_download
 
 from vla_foundry.git_utils import get_git_info
 
@@ -85,8 +87,9 @@ class DataSchema(BaseSchema):
 
 
 class BaseLogger:
-    def __init__(self, table_name: str, db_path: str = None):
+    def __init__(self, table_name: str, db_params=None):
         self.table_name = table_name
+        self.db_params = db_params
 
         # Initialize common attributes
         self.created_by = os.environ.get("USER", os.environ.get("USERNAME", "unknown"))
@@ -99,12 +102,37 @@ class BaseLogger:
         self.git_has_local_changes = self.git_info["has_local_changes"]
         self.git_local_changes = self.git_info["local_changes"]
 
-        # Get SQLite database path from parameter, environment variable, or default
-        if db_path is None:
-            db_path = os.environ.get("DB_PATH", "vla_foundry.db")
-        self.conn = sqlite3.connect(db_path)
+        # Connect to database
+        self.db_path = self.db_params.db_path if self.db_params else None
+        if self.db_path is None:
+            self.db_path = os.environ.get("DB_PATH", "vla_foundry.db")
+        self.db_connect()
+
+    def db_connect(self):
+        if self.db_params.db_remote is not None:
+            # Copy db from HF remote to local
+            _remote_db_path = hf_hub_download(
+                repo_id=self.db_params.db_remote,
+                filename=os.path.basename(self.db_path),
+                repo_type="dataset",
+            )
+            shutil.copy2(_remote_db_path, self.db_path)
+            logging.info(f"Downloaded database from {self.db_params.db_remote} to {self.db_path}")
+
+        self.conn = sqlite3.connect(self.db_path)
         self.conn.row_factory = sqlite3.Row  # Enable column access by name
 
+    def db_upload(self):
+        self.conn.commit()
+        if self.db_params.db_remote is not None:
+            HfApi().upload_file(
+                path_or_fileobj=self.db_path,
+                path_in_repo=os.path.basename(self.db_path),
+                repo_id=self.db_params.db_remote,
+                repo_type="dataset",
+            )
+            logging.info(f"Uploaded database to {self.db_params.db_remote}")
+
     def upsert(self, doc: Dict[str, Any]) -> None:
         """Insert or update a document in the table.
 
@@ -138,8 +166,8 @@ class BaseLogger:
 
 
 class ModelLogger(BaseLogger):
-    def __init__(self, cfg, table_name: str = "models", db_path: str = None):
-        super().__init__(table_name=table_name, db_path=db_path)
+    def __init__(self, cfg, table_name: str = "models", db_params=None):
+        super().__init__(table_name=table_name, db_params=db_params)
         self.cfg = cfg
         self._init_db()
         self.datetime_job_started = datetime.now().isoformat()
@@ -204,14 +232,17 @@ class ModelLogger(BaseLogger):
 
         doc = schema.to_dict()
         doc.update(kwargs)
+
+        self.db_connect()
         self.upsert(doc)
+        self.db_upload()
 
         logging.info(f"Logged model checkpoint {kwargs['checkpoint_number_current']} to SQLite: {schema.uuid}")
 
 
 class DataLogger(BaseLogger):
-    def __init__(self, cfg, table_name: str = "datasets", db_path: str = None):
-        super().__init__(table_name=table_name, db_path=db_path)
+    def __init__(self, cfg, table_name: str = "datasets", db_params=None):
+        super().__init__(table_name=table_name, db_params=db_params)
         self.cfg = cfg
         self._init_db()
 
@@ -269,6 +300,9 @@ class DataLogger(BaseLogger):
 
         doc = schema.to_dict()
         doc.update(kwargs)
+
+        self.db_connect()   
         self.upsert(doc)
+        self.db_upload()
 
         print(f"Logged dataset to SQLite: {schema.uuid}")
diff --git a/vla_foundry/main.py b/vla_foundry/main.py
index c7d56b8..9c9276e 100644
--- a/vla_foundry/main.py
+++ b/vla_foundry/main.py
@@ -229,7 +229,7 @@ def main():
 
     db_logger = None
     if is_master(cfg) and cfg.database.enabled:
-        db_logger = ModelLogger(cfg=cfg, table_name="models", db_path=cfg.database.db_path)
+        db_logger = ModelLogger(cfg=cfg, table_name="models", db_params=cfg.database)
 
     done_training = global_step >= total_steps
     checkpoint_num = start_checkpoint_num
diff --git a/vla_foundry/params/database_params.py b/vla_foundry/params/database_params.py
index 9a86d5c..6a0426c 100644
--- a/vla_foundry/params/database_params.py
+++ b/vla_foundry/params/database_params.py
@@ -5,11 +5,11 @@ from vla_foundry.params.base_params import BaseParams
 
 @dataclass(frozen=True)
 class DatabaseParams(BaseParams):
-    # If upstream is set, it first copies db from upstream to db_path.
-    # Then, it logs to db_path, then re-uploads db_path to upstream.
+    # If db_remote is set, it first copies db from db_remote to db_path.
+    # Then, it logs to db_path, then re-uploads db_path to db_remote.
     enabled: bool = field(default=False)
     db_path: str = field(default="vla_foundry.db")
-    db_upstream: str = field(default=None)
+    db_remote: str = field(default=None)
 
     def __post_init__(self):
         super().__post_init__()

dataset_source_paths:
["s3://tri-ml-datasets/openlm/dcnlp/datasets/tri-hero-run1_cc_v4_resiliparse_rw_v2_bff_minngram13_10shards_all_fasttext_OH_eli5_vs_rw_v2_bigram_200k_train_0.11-starcoder-math_datasets/manifest.jsonl"]


uuid: 15f62625-2952-4b12-b4bc-215b665334e2
datetime_job_started: 2025-12-14T08:17:29.181450
datetime: 2025-12-14T08:23:37.109142
created_by: ubuntu
git_commit_hash: e22439a0d81ec21c45ecb553ae402337f1f1a6e2
git_branch: db
git_remote_url: https://github.com/TRI-ML/vla_foundry.git
model_checkpoints_path: s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m
fixed_model_path: s3://tri-ml-datasets-uw2/vla_foundry_models_fixed/4f5b45ab-0501-438b-b738-2de48ebca45d
wandb_url: https://wandb.ai/tri/vla_foundry/runs/975gd5sh
cfg:
{"name": "2025_12_14-08_17_21-model_transformer-lr_0.0001-bsz_96", "resolve_configs": false, "resolve_configs_path": null, "save_path": null, "wandb": true, "wandb_entity": null, "wandb_project_name": "vla_foundry", "wandb_tags": [], "log_every_n_steps": 20, "log_level": "INFO", "remote_sync": "s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m", "remote_sync_fixed_path": "s3://tri-ml-datasets-uw2/vla_foundry_models_fixed/", "total_train_samples": 200000, "num_epochs": null, "num_checkpoints": 5, "max_checkpoint_limit": null, "total_val_samples": null, "val_every_n_checkpoints": 1, "data": {"type": "text", "dataset_manifest": ["s3://tri-ml-datasets/openlm/dcnlp/datasets/tri-hero-run1_cc_v4_resiliparse_rw_v2_bff_minngram13_10shards_all_fasttext_OH_eli5_vs_rw_v2_bigram_200k_train_0.11-starcoder-math_datasets/manifest.jsonl"], "dataset_weighting": [1.0], "dataset_modality": ["text"], "val_dataset_manifest": [], "val_dataset_weighting": [], "allow_multiple_epochs": false, "num_workers": 32, "prefetch_factor": 4, "seq_len": 2048, "shuffle": true, "shuffle_buffer_size": 2000, "shuffle_initial": 500, "seed": 42}, "database": {"enabled": true, "db_path": "vla_foundry.db", "db_remote": "TRI-ML/vla_foundry_db"}, "distributed": {"dist_url": "env://", "dist_backend": "nccl", "fsdp": true, "fsdp_cpu_offload": false, "fsdp_reshard_after_forward": false, "ddp_static_graph": false, "use_distributed": true, "world_size": 3, "rank": 0, "local_rank": 0, "device": "cuda:0"}, "ema": {"enabled": false, "type": "ema", "alpha": 0.999, "update_after_step": 0, "inv_gamma": 1.0, "power": 0.75, "min_value": 0.0, "max_value": 0.9999}, "hparams": {"precision": "amp_bfloat16", "global_batch_size": 96, "per_gpu_batch_size": 32, "seed": 42, "lr": 0.0001, "lr_scheduler": "cosine", "warmup": "0.1", "lr_cooldown_end": 0.0, "force_min_lr": 0.0, "optimizer": "adamw", "wd": 0.2, "beta1": 0.9, "beta2": 0.95, "eps": 1e-08, "loss_function": "cross_entropy", "z_loss_coefficient": 0.0, "grad_clip_norm": null, "grad_checkpointing": false, "torchcompile": false, "world_size": 3}, "model": {"type": "transformer", "resume_from_checkpoint": null, "resume_weights_only": false, "freeze": false, "norm_type": "default_layer_norm", "ffn_type": "swiglu", "qk_norm": false, "positional_embedding_type": "rotary", "attn_name": "torch_attn", "hidden_dim": 96, "n_layers": 8, "n_heads": 4, "vocab_size": 50432, "post_embed_norm": false, "norm_eps": 1e-05, "weight_tying": false, "cast_output_to_float32": true, "max_seq_len": 2048, "is_causal": true}}

git_local_changes:
diff --git a/examples/training/llm_11m.sh b/examples/training/llm_11m.sh
index 12fe676..d3fa3e2 100644
--- a/examples/training/llm_11m.sh
+++ b/examples/training/llm_11m.sh
@@ -8,11 +8,9 @@
 --data.dataset_modality ["text"] \
 --data.dataset_weighting [1.0] \
 --data.seq_len 2048 \
---total_train_samples 14_000_000 \
+--total_train_samples 200_000 \
 --num_checkpoints 5 \
 --hparams.per_gpu_batch_size 32 \
 --hparams.global_batch_size 96 \
 --remote_sync s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m \
---resolve_configs True \
---resolve_configs_path ./ \
 "$@"
\ No newline at end of file
diff --git a/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py b/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
index 259d777..1811bdc 100644
--- a/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
+++ b/vla_foundry/data/preprocessing/preprocess_robotics_to_tar.py
@@ -79,7 +79,7 @@ def main():
     # Initialize database logger if enabled in config
     db_logger = None
     if cfg.database.enabled:
-        db_logger = DataLogger(cfg=cfg, table_name="datasets", db_path=cfg.database.db_path)
+        db_logger = DataLogger(cfg=cfg, table_name="datasets", db_params=cfg.database)
 
     # Ray Phase 1: Process frame individually and upload to S3
     print(f"🚀 Processing {len(episodes)} episodes and uploading to S3...")
diff --git a/vla_foundry/logger.py b/vla_foundry/logger.py
index 9687015..c3fba3f 100644
--- a/vla_foundry/logger.py
+++ b/vla_foundry/logger.py
@@ -1,6 +1,7 @@
 import json
 import logging
 import os
+import shutil
 import sqlite3
 import uuid
 from dataclasses import asdict, dataclass
@@ -8,6 +9,7 @@ from datetime import datetime
 from typing import Any, Dict, List, Optional
 
 import wandb
+from huggingface_hub import HfApi, hf_hub_download
 
 from vla_foundry.git_utils import get_git_info
 
@@ -85,8 +87,9 @@ class DataSchema(BaseSchema):
 
 
 class BaseLogger:
-    def __init__(self, table_name: str, db_path: str = None):
+    def __init__(self, table_name: str, db_params=None):
         self.table_name = table_name
+        self.db_params = db_params
 
         # Initialize common attributes
         self.created_by = os.environ.get("USER", os.environ.get("USERNAME", "unknown"))
@@ -99,12 +102,37 @@ class BaseLogger:
         self.git_has_local_changes = self.git_info["has_local_changes"]
         self.git_local_changes = self.git_info["local_changes"]
 
-        # Get SQLite database path from parameter, environment variable, or default
-        if db_path is None:
-            db_path = os.environ.get("DB_PATH", "vla_foundry.db")
-        self.conn = sqlite3.connect(db_path)
+        # Connect to database
+        self.db_path = self.db_params.db_path if self.db_params else None
+        if self.db_path is None:
+            self.db_path = os.environ.get("DB_PATH", "vla_foundry.db")
+        self.db_connect()
+
+    def db_connect(self):
+        if self.db_params.db_remote is not None:
+            # Copy db from HF remote to local
+            _remote_db_path = hf_hub_download(
+                repo_id=self.db_params.db_remote,
+                filename=os.path.basename(self.db_path),
+                repo_type="dataset",
+            )
+            shutil.copy2(_remote_db_path, self.db_path)
+            logging.info(f"Downloaded database from {self.db_params.db_remote} to {self.db_path}")
+
+        self.conn = sqlite3.connect(self.db_path)
         self.conn.row_factory = sqlite3.Row  # Enable column access by name
 
+    def db_upload(self):
+        self.conn.commit()
+        if self.db_params.db_remote is not None:
+            HfApi().upload_file(
+                path_or_fileobj=self.db_path,
+                path_in_repo=os.path.basename(self.db_path),
+                repo_id=self.db_params.db_remote,
+                repo_type="dataset",
+            )
+            logging.info(f"Uploaded database to {self.db_params.db_remote}")
+
     def upsert(self, doc: Dict[str, Any]) -> None:
         """Insert or update a document in the table.
 
@@ -138,8 +166,8 @@ class BaseLogger:
 
 
 class ModelLogger(BaseLogger):
-    def __init__(self, cfg, table_name: str = "models", db_path: str = None):
-        super().__init__(table_name=table_name, db_path=db_path)
+    def __init__(self, cfg, table_name: str = "models", db_params=None):
+        super().__init__(table_name=table_name, db_params=db_params)
         self.cfg = cfg
         self._init_db()
         self.datetime_job_started = datetime.now().isoformat()
@@ -204,14 +232,17 @@ class ModelLogger(BaseLogger):
 
         doc = schema.to_dict()
         doc.update(kwargs)
+
+        self.db_connect()
         self.upsert(doc)
+        self.db_upload()
 
         logging.info(f"Logged model checkpoint {kwargs['checkpoint_number_current']} to SQLite: {schema.uuid}")
 
 
 class DataLogger(BaseLogger):
-    def __init__(self, cfg, table_name: str = "datasets", db_path: str = None):
-        super().__init__(table_name=table_name, db_path=db_path)
+    def __init__(self, cfg, table_name: str = "datasets", db_params=None):
+        super().__init__(table_name=table_name, db_params=db_params)
         self.cfg = cfg
         self._init_db()
 
@@ -269,6 +300,9 @@ class DataLogger(BaseLogger):
 
         doc = schema.to_dict()
         doc.update(kwargs)
+
+        self.db_connect()   
         self.upsert(doc)
+        self.db_upload()
 
         print(f"Logged dataset to SQLite: {schema.uuid}")
diff --git a/vla_foundry/main.py b/vla_foundry/main.py
index c7d56b8..9c9276e 100644
--- a/vla_foundry/main.py
+++ b/vla_foundry/main.py
@@ -229,7 +229,7 @@ def main():
 
     db_logger = None
     if is_master(cfg) and cfg.database.enabled:
-        db_logger = ModelLogger(cfg=cfg, table_name="models", db_path=cfg.database.db_path)
+        db_logger = ModelLogger(cfg=cfg, table_name="models", db_params=cfg.database)
 
     done_training = global_step >= total_steps
     checkpoint_num = start_checkpoint_num
diff --git a/vla_foundry/params/database_params.py b/vla_foundry/params/database_params.py
index 9a86d5c..012749d 100644
--- a/vla_foundry/params/database_params.py
+++ b/vla_foundry/params/database_params.py
@@ -5,11 +5,11 @@ from vla_foundry.params.base_params import BaseParams
 
 @dataclass(frozen=True)
 class DatabaseParams(BaseParams):
-    # If upstream is set, it first copies db from upstream to db_path.
-    # Then, it logs to db_path, then re-uploads db_path to upstream.
+    # If db_remote is set, it first copies db from db_remote to db_path.
+    # Then, it logs to db_path, then re-uploads db_path to db_remote.
     enabled: bool = field(default=False)
     db_path: str = field(default="vla_foundry.db")
-    db_upstream: str = field(default=None)
+    db_remote: str = field(default="TRI-ML/vla_foundry_db")
 
     def __post_init__(self):
         super().__post_init__()

# Untracked: vla_foundry.db

dataset_source_paths:
["s3://tri-ml-datasets/openlm/dcnlp/datasets/tri-hero-run1_cc_v4_resiliparse_rw_v2_bff_minngram13_10shards_all_fasttext_OH_eli5_vs_rw_v2_bigram_200k_train_0.11-starcoder-math_datasets/manifest.jsonl"]


# datasets

uuid: 99ebae89-76a0-4e72-a7d0-8481d197da35
datetime: 2025-12-14T16:22:26.381900
created_by: ubuntu
git_commit_hash: 5774a315aedb4f130c7795482fb7203669aac4ab
git_branch: db
git_remote_url: https://github.com/TRI-ML/vla_foundry.git
dataset_type: spartan
dataset_target_path: s3://tri-ml-datasets-uw2/vla_foundry_scratch/spartan_datasets/bimanualputredbellpepperinbin/
dataset_fixed_path: s3://tri-ml-datasets-uw2/vla_foundry_datasets_fixed/757fb7f3-58e6-44df-97f9-43612cb0a341
cfg:
{"type": "spartan", "source_episodes": ["s3://robotics-manip-lbm/efs/data/tasks/BimanualPutRedBellPepperInBin/riverway/sim/bc/teleop/2025-01-02T10-49-28-05-00/diffusion_spartan/"], "output_dir": "s3://tri-ml-datasets-uw2/vla_foundry_scratch/spartan_datasets/bimanualputredbellpepperinbin/", "output_dir_fixed_path": "s3://tri-ml-datasets-uw2/vla_foundry_datasets_fixed/", "past_lowdim_steps": 1, "future_lowdim_steps": 14, "camera_names": ["scene_right_0", "scene_left_0", "wrist_left_plus", "wrist_right_minus"], "image_indices": [-1, 0], "stride": 1, "max_padding_left": 3, "max_padding_right": 15, "padding_strategy": "copy", "filter_still_samples": false, "still_threshold": 0.05, "samples_per_shard": 100, "num_workers": 20, "max_episodes_to_process": -1, "fail_on_nan": true, "compute_statistics": true, "auto_tag": true, "skip_git_tagging": false, "resize_images_size": [384, 384], "jpeg_quality": 95, "use_depth_data": false, "point_cloud_num_points": 50000, "ray_address": null, "ray_num_cpus": null, "database": {"enabled": true, "db_path": "vla_foundry.db", "db_remote": "TRI-ML/vla_foundry_db"}, "data_discard_keys": ["robot__desired__wrench__right::panda", "robot__desired__joint_torque__right::panda", "robot__desired__joint_torque__left::panda", "robot__desired__wrench__left::panda", "robot__desired__external_wrench__right::panda", "robot__desired__external_wrench__left::panda", "robot__desired__joint_torque_external__right::panda", "robot__desired__joint_torque_external__left::panda"], "language_annotations_path": "vla_foundry/config_presets/data/lbm/lbm_language_annotations.yaml", "action_fields_config_path": "vla_foundry/config_presets/data/lbm/lbm_action_fields.yaml", "validation_episodes_path": null}

git_local_changes:
diff --git a/examples/preprocessing/preprocess_robotics_data_lbm.sh b/examples/preprocessing/preprocess_robotics_data_lbm.sh
index 52ef4f4..6619fdc 100644
--- a/examples/preprocessing/preprocess_robotics_data_lbm.sh
+++ b/examples/preprocessing/preprocess_robotics_data_lbm.sh
@@ -2,13 +2,12 @@ source .venv/bin/activate && python vla_foundry/data/preprocessing/preprocess_ro
 --type "spartan" \
 --source_episodes "[
     's3://robotics-manip-lbm/efs/data/tasks/BimanualPutRedBellPepperInBin/riverway/sim/bc/teleop/2025-01-02T10-49-28-05-00/diffusion_spartan/',
-    's3://robotics-manip-lbm/efs/data/tasks/BimanualPutRedBellPepperInBin/riverway/sim/bc/teleop/2025-01-02T14-21-19-05-00/diffusion_spartan/',
-    's3://robotics-manip-lbm/efs/data/tasks/BimanualPutRedBellPepperInBin/riverway/sim/bc/teleop/2025-01-06T08-58-31-05-00/diffusion_spartan/',
     ]" \
---output_dir "s3://tri-ml-datasets-uw2/vla_foundry_scratch/spartan_datasets/bimanualputredbellpepperinbin3/" \
+--output_dir "s3://tri-ml-datasets-uw2/vla_foundry_scratch/spartan_datasets/bimanualputredbellpepperinbin/" \
 --camera_names "include vla_foundry/config_presets/data/lbm/lbm_data_camera_names_4cameras.yaml" \
 --language_annotations_path "vla_foundry/config_presets/data/lbm/lbm_language_annotations.yaml" \
 --action_fields_config_path "vla_foundry/config_presets/data/lbm/lbm_action_fields.yaml" \
 --data_discard_keys "include vla_foundry/config_presets/data/lbm/lbm_data_discard_key.yaml" \
 --samples_per_shard 100 \
---config_path "vla_foundry/config_presets/data/robotics_preprocessing_params_1past_14future.yaml"
+--config_path "vla_foundry/config_presets/data/robotics_preprocessing_params_1past_14future.yaml" \
+--database.enabled True \
diff --git a/examples/training/llm_11m.sh b/examples/training/llm_11m.sh
index 12fe676..d3fa3e2 100644
--- a/examples/training/llm_11m.sh
+++ b/examples/training/llm_11m.sh
@@ -8,11 +8,9 @@
 --data.dataset_modality ["text"] \
 --data.dataset_weighting [1.0] \
 --data.seq_len 2048 \
---total_train_samples 14_000_000 \
+--total_train_samples 200_000 \
 --num_checkpoints 5 \
 --hparams.per_gpu_batch_size 32 \
 --hparams.global_batch_size 96 \
 --remote_sync s3://tri-ml-datasets/vla_foundry_scratch/models/llm_11m \
---resolve_configs True \
---resolve_configs_path ./ \
 "$@"
\ No newline at end of file
diff --git a/vla_foundry/data/preprocessing/utils.py b/vla_foundry/data/preprocessing/utils.py
index 3aaaa25..c48edb1 100644
--- a/vla_foundry/data/preprocessing/utils.py
+++ b/vla_foundry/data/preprocessing/utils.py
@@ -273,8 +273,14 @@ def copy_s3_object(source_bucket: str, source_key: str, dest_bucket: str, dest_k
     """Copy a single S3 object from source to destination."""
     s3_client = boto3.client("s3")
     copy_source = {"Bucket": source_bucket, "Key": source_key}
-    s3_client.copy_object(CopySource=copy_source, Bucket=dest_bucket, Key=dest_key)
-    return dest_key
+    try:
+        s3_client.copy_object(CopySource=copy_source, Bucket=dest_bucket, Key=dest_key)
+        return dest_key
+    except Exception as e:
+        # Print detailed error information to help debug
+        print(f"❌ Error copying s3://{source_bucket}/{source_key} to s3://{dest_bucket}/{dest_key}")
+        print(f"   Error: {e}")
+        raise
 
 
 def recursive_s3_copy(path1: str, path2: str) -> None:
diff --git a/vla_foundry/file_utils.py b/vla_foundry/file_utils.py
index 804c3d1..d0110bf 100644
--- a/vla_foundry/file_utils.py
+++ b/vla_foundry/file_utils.py
@@ -167,6 +167,12 @@ def list_s3_directory_recursive(dir_path):
     assert dir_path.startswith("s3"), "Only S3 paths are supported for now"
     s3_client = boto3.client("s3")
     bucket, prefix = parse_s3_path(dir_path)
+
+    # Ensure prefix ends with / to avoid matching other directories with similar names
+    # e.g., "dir" shouldn't match "dir2/file.txt", only "dir/file.txt"
+    if prefix and not prefix.endswith("/"):
+        prefix += "/"
+
     paginator = s3_client.get_paginator("list_objects_v2")
     objects = set()
 
diff --git a/vla_foundry/logger.py b/vla_foundry/logger.py
index 224a679..1cf112d 100644
--- a/vla_foundry/logger.py
+++ b/vla_foundry/logger.py
@@ -204,6 +204,7 @@ class ModelLogger(BaseLogger):
             )
         """)
         self.conn.commit()
+        self.db_upload()
 
     def log_model(self, **kwargs: Any) -> Optional[str]:
         schema = ModelSchema(
@@ -275,6 +276,7 @@ class DataLogger(BaseLogger):
             )
         """)
         self.conn.commit()
+        self.db_upload()
 
     def log_dataset(self, **kwargs: Any) -> Optional[str]:
         schema = DataSchema(

dataset_source_paths:
["s3://robotics-manip-lbm/efs/data/tasks/BimanualPutRedBellPepperInBin/riverway/sim/bc/teleop/2025-01-02T10-49-28-05-00/diffusion_spartan/"]


