Skip to content

Commit

Permalink
Fixing nEpochs field name
Browse files Browse the repository at this point in the history
  • Loading branch information
sashirestela committed Sep 24, 2024
1 parent de6f6f6 commit 2cdf5a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,8 @@ public class HyperParams {
@ObjectType(baseClass = String.class)
private Object nEpochs;

public Object getnEpochs() {
return nEpochs;
}

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.github.sashirestela.openai.domain.finetuning;

import io.github.sashirestela.cleverclient.util.JsonUtil;
import io.github.sashirestela.openai.SimpleOpenAI;
import io.github.sashirestela.openai.domain.DomainTestingHelper;
import io.github.sashirestela.openai.domain.finetuning.Integration.IntegrationType;
Expand All @@ -10,7 +11,9 @@
import java.io.IOException;
import java.net.http.HttpClient;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.Mockito.mock;

class FineTuningDomainTest {
Expand Down Expand Up @@ -97,4 +100,15 @@ void testFineTuningsCancel() throws IOException {
assertNotNull(fineTuningResponse);
}

@Test
void testTranslateNumberEpochs() {
var hyperParams = HyperParams.builder()
.nEpochs(2)
.build();
var json = JsonUtil.objectToJson(hyperParams);
System.out.println(json);
assertTrue(json.contains("n_epochs"));
assertFalse(json.contains("nepochs"));
}

}

0 comments on commit 2cdf5a0

Please sign in to comment.