Commit 9cc8319b authored by jameskrw's avatar jameskrw
Browse files

updated val batch size for the environments

parent 0d731cd6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ python3 -m vagen.trainer.main_ppo \
    data.train_files=data/navigation-vision-debug/train.parquet \
    data.val_files=data/navigation-vision-debug/test.parquet \
    data.train_batch_size=2 \
    data.val_batch_size=2 \
    data.max_prompt_length=1024 \
    data.max_response_length=128 \
    data.max_trajectory_length=1800 \
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ python3 -m vagen.trainer.main_ppo \
    data.train_files=data/sokoban-text-debug/train.parquet \
    data.val_files=data/sokoban-text-debug/test.parquet \
    data.train_batch_size=16 \
    data.val_batch_size=128 \
    data.max_prompt_length=1024 \
    data.max_response_length=128 \
    data.max_trajectory_length=1800 \
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ python3 -m vagen.trainer.main_ppo \
    data.train_files=data/sokoban-vision-debug/train.parquet \
    data.val_files=data/sokoban-vision-debug/test.parquet \
    data.train_batch_size=16 \
    data.val_batch_size=128 \
    data.max_prompt_length=1024 \
    data.max_response_length=128 \
    data.max_trajectory_length=1800 \
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ data:
  max_response_length: 512
  max_trajectory_length: 3072 # vagen only
  train_batch_size: 1024
  val_batch_size: null # DEPRECATED: Validation datasets are sent to inference engines as a whole batch, which will schedule the memory themselves
  val_batch_size: 1024 
  return_raw_input_ids: False  # This should be set to true when the tokenizer between policy and rm differs
  return_raw_chat: False
  shuffle: True
+4 −4
Original line number Diff line number Diff line
@@ -627,16 +627,16 @@ class RayPPOTrainer(object):
            dataset=self.val_dataset,
            # Validation datasets are sent to inference engines as a whole batch,
            # which will schedule the memory themselves.
            batch_size=len(self.val_dataset),
            batch_size=self.config.data.val_batch_size,
            num_workers=8,
            shuffle=False,
            drop_last=False,
            collate_fn=collate_fn)

        assert len(self.train_dataloader) >= 1
        assert len(
            self.val_dataloader
        ) == 1, "Validation dataloader must have a single batch, which inference engines will schedule the memory themselves."
        # assert len(
        #     self.val_dataloader
        # ) == 1, "Validation dataloader must have a single batch, which inference engines will schedule the memory themselves." # for agent training we still use val batch size

        print(f'Size of train dataloader: {len(self.train_dataloader)}')