Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maya_pretrain_debugger: added prints for source and encoders and fail… #14

Draft
wants to merge 1 commit into
base: maya_pretrain
Choose a base branch
from
Draft
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
7 changes: 6 additions & 1 deletion llava/model/llava_arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,12 @@ def prepare_inputs_labels_for_multimodal(
cur_new_input_embeds.append(cur_input_embeds_no_im[i])
cur_new_labels.append(cur_labels_noim[i])
if i < num_images:
cur_image_features = image_features[cur_image_idx]
try:
cur_image_features = image_features[cur_image_idx]
except Exception as e:
print(f'Tracking input_ids START.....{e}')
print(input_ids)
print('Tracking input_ids END.....')
cur_image_idx += 1
cur_new_input_embeds.append(cur_image_features)
cur_new_labels.append(torch.full((cur_image_features.shape[0],), IGNORE_INDEX, device=cur_labels.device, dtype=cur_labels.dtype))
Expand Down
3 changes: 3 additions & 0 deletions llava/train/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,9 @@ def expand2square(pil_img, background_color):
# image does not exist in the data, but the model is multimodal
crop_size = self.data_args.image_processor.crop_size
data_dict['image'] = torch.zeros(3, crop_size['height'], crop_size['width'])
print(sources)
print(data_dict)
print('Tracking source and data_dict above.....')
return data_dict


Expand Down