Skip to content

Commit 3945c87

Browse files
Update data.py
1 parent 79ad152 commit 3945c87

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

open_flamingo/train/data.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,6 @@ def preprocess_laion_text(sample, tokenizer, max_tokens=128):
8484
(f"<image>{re.sub(CAPTION_BAN_PATTERN, '', s.split('<|synthetic caption|>')[-1].strip())}{tokenizer.eos_token}") for s in sample
8585
]
8686

87-
print(sample[0])
88-
8987
text = tokenizer(
9088
sample,
9189
max_length=max_tokens,
@@ -528,4 +526,4 @@ def get_data(args, image_processor, tokenizer, dataset_type, epoch=0):
528526
args, image_processor=image_processor, epoch=epoch, tokenizer=tokenizer
529527
)
530528
else:
531-
raise ValueError(f"Unsupported dataset: {dataset_type}")
529+
raise ValueError(f"Unsupported dataset: {dataset_type}")

0 commit comments

Comments
 (0)