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

FIX: finetuningjob deserialize crash #155

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

Conversation

inszee
Copy link

@inszee inszee commented Nov 22, 2023

let job = open_ai_client
.fine_tuning()
.create(fine_tune_request)
.await?;
FineTuningJob struct is like:
{
"object": "fine_tuning.job",
"id": "ftjob xxx",
"model": "gpt-3.5-turbo-0613",
"created_at": 1700626516,
"finished_at": null,
"fine_tuned_model": null,
"organization_id": "org-zxxx",
"result_files": [],
"status": "validating_files",
"validation_file": null,
"training_file": "file-xxx",
"hyperparameters": {
"batch_size": "auto",
"learning_rate_multiplier": "auto"
},
"trained_tokens": null,
"error": null
}
have not n_epochs variable ,cause deserialize exception.

@64bit
Copy link
Owner

64bit commented Nov 25, 2023

Hey thanks for PR, I'm not sure I follow what's going on.

My guess is that #[serde(skip_serializing_if = "Option::is_none")] is missing attribute on CreateFineTuningJobRequest struct's hyperparameters field.

@64bit
Copy link
Owner

64bit commented Nov 25, 2023

Hmm there's perhaps confusion between deprecated and new fine tuning APIs.

@inszee
Copy link
Author

inszee commented Nov 25, 2023

Hey thanks for PR, I'm not sure I follow what's going on.

My guess is that #[serde(skip_serializing_if = "Option::is_none")] is missing attribute on CreateFineTuningJobRequest struct's hyperparameters field.

 There's not impact on the structure of CreateFineTuningJobRequest。#[serde(skip_serializing_if = "Option::is_none")] is used to declare that a field in the structure may not exist during deserialization

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