8000 schema: Add `prompt` validation check by ksbrar · Pull Request #3564 · ludwig-ai/ludwig · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

schema: Add prompt validation check #3564

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

Merged
merged 25 commits into from
Sep 6, 2023
Merged

Conversation

ksbrar
Copy link
Collaborator
@ksbrar ksbrar commented Aug 30, 2023

No description provided.

@ksbrar ksbrar requested a review from jeffkinnison August 30, 2023 23:32
@github-actions
Copy link
github-actions bot commented Aug 30, 2023

Unit Test Results

       6 files  ±0         6 suites  ±0   1h 24m 17s ⏱️ - 3m 53s
2 827 tests +1  2 791 ✔️  - 23  12 💤 ±0  24 +24 
2 870 runs  +1  2 825 ✔️  - 23  21 💤 ±0  24 +24 

For more details on these failures, see this check.

Results for commit 4fe83e6. ± Comparison against base commit 6dfc68f.

♻️ This comment has been updated with latest results.

Uh oh!

There was an error while loading. Please reload this page.

@ksbrar ksbrar changed the title schema: Add prompt.template validation check schema: Add prompt validation check Aug 31, 2023
@ksbrar
Copy link
Collaborator Author
ksbrar commented Sep 1, 2023

@jeffkinnison @arnavgarg1 @justinxzhao PR is complete and affected tests have succeeded. Remaining test failures seem unrelated but they've happened on several runs now.

Copy link
Contributor
@justinxzhao justinxzhao left a comment

Choose a reason for hiding this comment

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

Nice, clear aux config validation check!

# return
from ludwig.schema.llms.prompt import PromptConfig, RetrievalConfig

if config.prompt == PromptConfig():
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the idea here that if it's the default prompt config, we don't need to check prompt requirements?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Exactly. It's a confusing check, which is why ideally I think prompt should be null by default.

Comment on lines 660 to 661
"A template must contain at least one reference to a column or, in the case of zero/few-shot "
"learning, at least the sample keyword `{__sample__}`!"
Copy link
Contributor

Choose a reason for hiding this comment

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

How about:

"A template must contain at least one reference to a column or the sample keyword {__sample__} for a JSON-serialized representation of non-output feature columns."

Since {__sample__} can be used for regular fine-tuning as well.

CC: @arnavgarg1

Copy link
Collaborator Author
@ksbrar ksbrar Sep 5, 2023

Choose a reason for hiding this comment

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

changed

@ksbrar ksbrar merged commit 3d2ff0b into master Sep 6, 2023
@ksbrar ksbrar deleted the add-template-validation-check branch September 6, 2023 00:28
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.

4 participants
0