8000 add -pf -of options for chat by reidliu41 · Pull Request #2727 · instructlab/instructlab · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

add -pf -of options for chat #2727

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

reidliu41
Copy link
Contributor
@reidliu41 reidliu41 commented Nov 30, 2024
  • Read prompts from file and output to a file , it would be useful for automation quick testing, for 2714
$ ilab model chat --help
Usage: ilab model chat [OPTIONS] [QUESTION]...

  Runs a chat using the modified model
  -pf, --prompt-file PATH   Path to a file containing test prompts (used with
                            -of). Each line is treated as a separate input.
  -of, --output-file PATH   Path to save model responses (used with -pf).
  --help                    Show this message and exit.
---------
$ ilab model chat -pf aaa
Usage: ilab model chat [OPTIONS] [QUESTION]...
Try 'ilab model chat --help' for help.

Error: Invalid value for '-pf' / '--prompt-file': Path 'aaa' does not exist.
---------
$ ilab model chat -pf aaa
The prompt file 'aaa' is empty. Please provide a valid file with prompts (one question per line).
---------
$ cat test-dirs/prompt.txt
hi
how are you?
who are you?

$ ilab model chat -pf test-dirs/prompt.txt
Start processing prompts...
Processing prompt 1/3...
Q: hi
A: Hello! I'm here to help answer your questions and engage in conversation on a wide range of topics. I can provide information, offer insights, and even assist with tasks such as code completion or explaining complex concepts. How can I help you today?

Processing prompt 2/3...
Q: how are you?
A: Hello! I'm glad you asked. I'm an AI language model, so I don't have feelings or emotions like humans do, but I'm here and ready to help you with any questions or tasks you might have. How can I assist you today?

Processing prompt 3/3...
Q: who are you?
A: Greetings! I am an AI Assistant, specifically designed to provide assistance in various tasks and answer your questions to the best of my knowledge and abilities.

Finished processing prompts.
---------
$ ilab model chat -pf test-dirs/prompt.txt -of output.txt
Start processing prompts...
Processing prompt 1/3...
Processing prompt 2/3...
Processing prompt 3/3...
Finished processing prompts. Results saved to output.txt.
Results from output.txt:
--- Processing started at: 2024-12-01 08:00:01 ---

Q: hi
A: Hello! I'm glad to see you. How can I assist you today?

Q: how are you?
A: Hello! I'm glad you asked. I'm a machine learning model, so I don't have feelings or emotions like humans do. However, I am fully operational and eager to assist you with any questions or tasks you might have. How can I help you today?

Q: who are you?
A: I am an AI language model, specifically a Red Hat® Instruct Model based on Granite 7B. I was developed by Red Hat and IBM Research to assist users in understanding and using various technologies. My knowledge cuts across multiple domains, including programming languages, cloud computing, machine learning, and more. I am designed to provide explanations, answer questions, and guide users in their learning journey.

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the
    conventional commits.
  • Changelog updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Functional tests have been added, if necessary.
  • E2E Workflow tests have been added, if necessary.

@mergify mergify bot added testing Relates to testing ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Nov 30, 2024
@reidliu41 reidliu41 force-pushed the add-pf-of-options-chat branch from 41d4c85 to c869279 Compare November 30, 2024 11:58
@mergify mergify bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Nov 30, 2024
@reidliu41 reidliu41 force-pushed the add-pf-of-options-chat branch from 859f030 to 35fe950 Compare November 30, 2024 12:48
@mergify mergify bot added ci-failure PR has at least one CI failure and removed ci-failure PR has at least one CI failure labels Nov 30, 2024
- Read prompts from file and output to a file

Signed-off-by: reid_liu <guliu@redhat.com>
@reidliu41 reidliu41 force-pushed the add-pf-of-options-chat branch from 8290a63 to 3854ac3 Compare November 30, 2024 15:13
@nathan-weinberg nathan-weinberg requested a review from a team December 1, 2024 19:56
@ktam3 ktam3 linked an issue Jan 8, 2025 that may be closed by this pull request
Copy link
github-actions bot commented Feb 2, 2025

This pull request has been automatically marked as stale because it has not had activity within 60 days. It will be automatically closed if no further activity occurs within 30 days.

@github-actions github-actions bot added the stale label Feb 2, 2025
Copy link
Contributor
mergify bot commented Feb 2, 2025

This pull request has merge conflicts that must be resolved before it can be merged. @reidliu41 please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase This Pull Request needs to be rebased label Feb 2, 2025
@github-actions github-actions bot removed the stale label Feb 3, 2025
@courtneypacheco
Copy link
Contributor

Hi @reidliu41! I'm looking to do some housekeeping and close out stale PRs, including drafts.

This PR had previously been marked as stale and I haven't seen any recent activity. I also noticed that the linked issue is "Closed as not planned."

Is this PR still relevant, in your opinion? If you're planning on continuing to work on this PR, please let me know within the next 7 days. Otherwise, I plan to close this draft PR. You're more than welcome to reopen it though if you need to!!

@reidliu41 reidliu41 removed the request for review from a team March 6, 2025 23:32
@reidliu41
Copy link
Contributor Author

I think it ok to close so far since no any inputs. @courtneypacheco thanks

@mergify mergify bot removed the needs-rebase This Pull Request needs to be rebased label Apr 28, 2025
Copy link
Contributor
mergify bot commented Apr 28, 2025

This pull request has merge conflicts that must be resolved before it can be merged. @reidliu41 please rebase it. https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase This Pull Request needs to be rebased label Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-rebase This Pull Request needs to be rebased testing Relates to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ilab model chat with pre-defined prompt(s) and output to text
2 participants
0