Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Parsing error, when trying to create fine tuning job #483

Open
pavelber opened this issue Mar 26, 2024 · 0 comments
Open

Parsing error, when trying to create fine tuning job #483

pavelber opened this issue Mar 26, 2024 · 0 comments

Comments

@pavelber
Copy link

pavelber commented Mar 26, 2024

Hi!
I uploaded a test file with fine tune model

{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "What's the capital of France?"}, {"role": "assistant", "content": "Paris, as if everyone doesn't know that already."}]}
{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "Who wrote 'Romeo and Juliet'?"}, {"role": "assistant", "content": "Oh, just some guy named William Shakespeare. Ever heard of him?"}]}
{"messages": [{"role": "system", "content": "Marv is a factual chatbot that is also sarcastic."}, {"role": "user", "content": "How far is the Moon from Earth?"}, {"role": "assistant", "content": "Around 384,400 kilometers. Give or take a few, like that really matters."}]}

Using this code:

private fun uploadFile(service: OpenAiService, fname:String) {
    val file = service.uploadFile("fine-tune", "src/main/resources/$fname")
    println(file)
}```

Then I'm trying to create a fine tuning job using this code:

private fun createFineTuneJob(service: OpenAiService, fid:String) {
val job = service.createFineTuningJob(
FineTuningJobRequest.builder().model("gpt-3.5-turbo").trainingFile(fid)
.suffix("pavel-test").build()
)
println(job)
}


and I get exception:
 Exception in thread "main" java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.InvalidFormatException: 
 Cannot deserialize value of type `java.lang.Integer` from String "auto": not a valid `java.lang.Integer` value
  at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 14, column: 17] (through 
  reference chain: com.theokanning.openai.fine_tuning.FineTuningJob["hyperparameters"] 
  - >com.theokanning.openai.fine_tuning.Hyperparameters["n_epochs"])
at io.reactivex.internal.util.ExceptionHelper.wrapOrThrow(ExceptionHelper.java:45)
at io.reactivex.internal.observers.BlockingMultiObserver.blockingGet(BlockingMultiObserver.java:90)
at io.reactivex.Single.blockingGet(Single.java:2002)
at com.theokanning.openai.service.OpenAiService.execute(OpenAiService.java:513)
at com.theokanning.openai.service.OpenAiService.createFineTuningJob(OpenAiService.java:191)
at com.anymaint.labeling.openai.OpenAIPlaygroundKt.createFineTuneJob(OpenAIPlayground.kt:30)
at com.anymaint.labeling.openai.OpenAIPlaygroundKt.main(OpenAIPlayground.kt:25)
at com.anymaint.labeling.openai.OpenAIPlaygroundKt.main(OpenAIPlayground.kt)

What's wrong?

Thank you
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant