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

Make everything but client optional on PipelineContext #518

Merged

Conversation

bbrowning
Copy link
Contributor

This makes model_family, model_id, and num_instructions_to_generate optional on PipelineContext instead of required. This should be a backwards-compatible change, and includes tests that verify passing the previously-required parameters into PipelineContext work as expected. This is a move towards supporting and expecting Pipelines that have LLMBlocks that may use different model families or different model ids.

If a Block's yaml config specifies a model_family or model_id and none is set on the PipelineContext, then the Block's values will get used. However, if these are set on the PipelineContext, they're treated as overrides and will override the values for all Blocks in this Pipeline. This behavior emulates the previous behavior, but we should steer users away from ever setting model_id or model_family on a PipelineContext if the Pipeline contains multiple LLMBlock entries.

Fixes #511

@mergify mergify bot added documentation Improvements or additions to documentation testing Relates to testing ci-failure and removed ci-failure labels Jan 28, 2025
Copy link
Contributor

@eshwarprasadS eshwarprasadS left a comment

Choose a reason for hiding this comment

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

Looks good to me so far, thanks for adding comprehensive tests for everything here!

@bbrowning bbrowning force-pushed the pipelinecontext-model-optional branch from a9d463d to 49caaa4 Compare January 29, 2025 17:11
@mergify mergify bot added the ci-failure label Jan 29, 2025
bbrowning added a commit to bbrowning/instructlab-sdg that referenced this pull request Jan 29, 2025
When reconciling the SDG code, we forgot to add a schema entry for
IterBlock. This does that, which will fix the CI failure hit in PR instructlab#518

Signed-off-by: Ben Browning <[email protected]>
@bbrowning
Copy link
Contributor Author

CI failed on the rebase because of a missing schema unrelated to this change - #526 fixes that. Once 526 lands, will rebase this one more time and the test should be fixed.

This makes model_family, model_id, and num_instructions_to_generate
optional on PipelineContext instead of required. This should be a
backwards-compatible change, and includes tests that verify passing
the previously-required parameters into PipelineContext work as
expected. This is a move towards supporting and expecting Pipelines
that have LLMBlocks that may use different model families or different
model ids.

If a Block's yaml config specifies a model_family or model_id and none
is set on the PipelineContext, then the Block's values will get
used. However, if these are set on the PipelineContext, they're
treated as overrides and will override the values for all Blocks in
this Pipeline. This behavior emulates the previous behavior, but we
should steer users away from ever setting model_id or model_family on
a PipelineContext if the Pipeline contains multiple LLMBlock entries.

Fixes instructlab#511

Signed-off-by: Ben Browning <[email protected]>
@bbrowning bbrowning force-pushed the pipelinecontext-model-optional branch from 49caaa4 to c8145f8 Compare January 29, 2025 19:45
@mergify mergify bot removed the ci-failure label Jan 29, 2025
@aakankshaduggal aakankshaduggal requested a review from a team January 30, 2025 16:37
Copy link
Member

@aakankshaduggal aakankshaduggal left a comment

Choose a reason for hiding this comment

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

Thanks @bbrowning
LGTM 🚀

@mergify mergify bot added the one-approval label Jan 30, 2025
@bbrowning bbrowning merged commit 887981c into instructlab:main Jan 30, 2025
26 checks passed
@bbrowning bbrowning deleted the pipelinecontext-model-optional branch January 30, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation one-approval testing Relates to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make model_id and model_family in PipelineContext optional
3 participants