Skip to content

Add embeddings and search file support #35

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

Closed
wants to merge 2 commits into from
Closed

Conversation

hallacy
Copy link
Collaborator

@hallacy hallacy commented Sep 30, 2021

  • Adds support for the embeddings endpoint
  • Add search.prepare_data to the CLI to validate search files for upload

* Add validators for search files

* Clean up fields
"-f",
"--file",
required=True,
help="JSONL, JSON, CSV, TSV, TXT or XLSX file containing prompt-completion examples to be analyzed."
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy pasta of prompt-completion from fine tuning?

sub.add_argument(
"-p",
"--purpose",
help="Why are you uploading this file? (see https://beta.openai.com/docs/api-reference/ for purposes)",
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems unintuitive to me that the Search purpose (which is what this is ostensibly under) is further split into different purposes. Maybe each of them should be a different tool instead? (Or do they all fall under the search umbrella, and how? We can chat outside this PR if i'm missing some context)

@hallacy
Copy link
Collaborator Author

hallacy commented Oct 1, 2021

I think we're gonna split the validation code from the embeddings code. Closing this request down

@hallacy hallacy closed this Oct 1, 2021
pull bot referenced this pull request in mcx/openai-python Oct 10, 2021
* Add CLI option to download files (#34)

* Option to check if file has been uploaded in the past before uploading (#33)

The check is done based on filename, file purpose and file size

* Add fine-tuning hparams directly into the fine-tunes CLI (#35)

* update fine_tunes cli use_packing argument (#38)

* A file verification and remediation tool.

It applies the following validations:
- prints the number of examples, and warns if it's lower than 100
- ensures prompt and completion columns are present
- optionally removes any additional columns
- ensures all completions are non-empty
- infers which type of fine-tuning the data is most likely in (classification, conditional generation and open-ended generation)
- optionally removes duplicate rows
- infers the existence of a common suffix, and if there is none, suggests one for classification and conditional generation
- optionally prepends a space to each completion, to make tokenization better
- optionally splits into training and validation set for the classification use case
- optionally ensures there's an ending string for all completions
- optionally lowercases completions or prompts if more than a 1/3 of alphanumeric characters are upper case

It interactively asks the user to accept or reject recommendations. If the user is happy, then it saves the modified output file as a jsonl, which is ready for being used in fine-tuning with the printed command.

* Completion: remove  from kwargs before passing to EngineAPI (#37)

* Version bump before pushing to external

Co-authored-by: Todor Markov <[email protected]>
Co-authored-by: Boris Power <[email protected]>
Co-authored-by: Dave Cummings <[email protected]>
cgayapr pushed a commit to cgayapr/openai-python that referenced this pull request Dec 14, 2024
* Add CLI option to download files (openai#34)

* Option to check if file has been uploaded in the past before uploading (openai#33)

The check is done based on filename, file purpose and file size

* Add fine-tuning hparams directly into the fine-tunes CLI (openai#35)

* update fine_tunes cli use_packing argument (openai#38)

* A file verification and remediation tool.

It applies the following validations:
- prints the number of examples, and warns if it's lower than 100
- ensures prompt and completion columns are present
- optionally removes any additional columns
- ensures all completions are non-empty
- infers which type of fine-tuning the data is most likely in (classification, conditional generation and open-ended generation)
- optionally removes duplicate rows
- infers the existence of a common suffix, and if there is none, suggests one for classification and conditional generation
- optionally prepends a space to each completion, to make tokenization better
- optionally splits into training and validation set for the classification use case
- optionally ensures there's an ending string for all completions
- optionally lowercases completions or prompts if more than a 1/3 of alphanumeric characters are upper case

It interactively asks the user to accept or reject recommendations. If the user is happy, then it saves the modified output file as a jsonl, which is ready for being used in fine-tuning with the printed command.

* Completion: remove  from kwargs before passing to EngineAPI (openai#37)

* Version bump before pushing to external

Co-authored-by: Todor Markov <[email protected]>
Co-authored-by: Boris Power <[email protected]>
Co-authored-by: Dave Cummings <[email protected]>
safa0 pushed a commit to safa0/openai-agents-python that referenced this pull request Apr 27, 2025
docs: Fix typos in documentation files
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.

2 participants