Add chat fine-tuning CLI commands (Issue #622)#3069
Add chat fine-tuning CLI commands (Issue #622)#3069aayushpawar11 wants to merge 1 commit intoopenai:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 32b7ef7a6c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| class CLIChatFineTune: | ||
| @staticmethod | ||
| def create(args: CLIChatFineTuneCreateArgs) -> None: | ||
| hyperparameters = json.loads(str(args.hyperparameters)) if is_given(args.hyperparameters) else omit |
There was a problem hiding this comment.
Handle malformed hyperparameters JSON as a CLI error
When chat.fine_tune.create is called with an invalid --hyperparameters payload, json.loads(...) raises JSONDecodeError, which is not caught by _cli.main()'s error handling (it only catches APIError, CLIError, and pydantic.ValidationError). This causes a raw traceback instead of a user-facing CLI error message, so a simple input mistake produces an ungraceful failure path.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Noted. This is a potential enhancement for future error handling.
Changes being requested
Added chat fine-tuning CLI command group with create, list, and apply subcommands.