Cannot use MultiGrader object inside FineTune service API
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.5k
- Forks
- 264
- Avg merge
- 9h 46m
- Merged PRs (30d)
- 96
Description
I am trying to use a MultiGrader object inside the reinforcement method of FineTune API.
For instance, I am validating first the object using GraderService validate method. This is my object creation and request:
MultiGrader testMultiGrader = MultiGrader.builder().name("ASDF").calculateOutput("0.5 * compliant").graders(MultiGrader.Graders.ofStringCheckGrader( StringCheckGrader.builder() .name("compliant") .input("{{sample.output_json.compliant}}") .reference("{{item.compliant}}") .operation(StringCheckGrader.Operation.EQ) .build() )).build(); xxx.fineTuning().alpha().graders().validate( GraderValidateParams.builder() .grader(GraderValidateParams.Grader.ofMulti(testMultiGrader)) .build() );
The result is an error: "Multigrader validation test failed: 400: Invalid type for 'graders.input': expected an object, but got a string instead.". Is there a bug in the API or is me making an error during request creation?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the FineTune service API entry point for graders().validate() and the MultiGrader request construction shown in the issue. Trace how the nested StringCheckGrader is serialized, focusing on why graders.input reaches the API as a string rather than an object. Done means determining whether the request is incorrectly constructed or the API/SDK behavior is faulty, with validation demonstrated for the supplied example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100