Skip to content

Conversation

@Maxusmusti
Copy link
Collaborator

Fixes logging to work in notebook environments, and also removes the existing file path barrier for huggingface models, as a follow-up to @abhi1092's PR #416

Also now accepts any CausalLM, rather than the previous hard-coded list.

Copy link
Member

@RobotSail RobotSail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question but otherwise LGTM

"GraniteForCausalLM",
], f"Model class name: {model.__class__.__name__} is not supported."
assert (
"ForCausalLM" in model.__class__.__name__
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we had a reason for this restriction, but I think it will be fine to lift this and revisit if it ever reappears.

"Model path does not appear to be a directory. Please make sure that you're passing a Hugging Face Transformers compatible directory checkpoint."
)
else:
elif not len(train_args.model_path.split("/")) == 2:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if I pass gpt-2?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated error message to make expected input more clear

@mergify mergify bot added the one-approval label Mar 24, 2025
Signed-off-by: Mustafa Eyceoz <[email protected]>
@mergify mergify bot merged commit d9460ff into instructlab:main Mar 25, 2025
16 checks passed
@mergify mergify bot removed the one-approval label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants