Skip to content

Commit

Permalink
remove duplicated parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
FatalLin committed Dec 28, 2021
1 parent f00b48d commit aff3dc7
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public interface Submitter {
* @return object
* @throws SubmarineRuntimeException running error
*/
Experiment createExperiment(ExperimentSpec spec, String experimentId) throws SubmarineRuntimeException;
Experiment createExperiment(ExperimentSpec spec) throws SubmarineRuntimeException;

/**
* Find experiment by spec
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Experiment createExperiment(ExperimentSpec spec) throws SubmarineRuntimeE
spec.getMeta().setName(lowerName);
spec.getMeta().setExperimentId(id.toString());

Experiment experiment = submitter.createExperiment(spec, id.toString());
Experiment experiment = submitter.createExperiment(spec);
experiment.setExperimentId(id);

spec.getMeta().getEnvVars().remove(RestConstants.JOB_ID);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void testCreateExperiment() {
doReturn(experimentId).when(spyExperimentManager).generateExperimentId();

// Stub mockSubmitter createExperiment
when(mockSubmitter.createExperiment(any(ExperimentSpec.class), any(String.class))).thenReturn(result);
when(mockSubmitter.createExperiment(any(ExperimentSpec.class))).thenReturn(result);

// actual experiment should == expected experiment
Experiment actualExperiment = spyExperimentManager.createExperiment(spec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ public void initialize(SubmarineConfiguration conf) {
}

@Override
public Experiment createExperiment(ExperimentSpec spec, String experimentIO)
throws SubmarineRuntimeException {
public Experiment createExperiment(ExperimentSpec spec) throws SubmarineRuntimeException {
Experiment experiment;
try {
MLJob mlJob = ExperimentSpecParser.parseJob(spec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void testRunTFJobPerRequest() throws URISyntaxException, IOException, Sub
@Test
public void testCreateTFJob() throws IOException, URISyntaxException {
ExperimentSpec spec = (ExperimentSpec) buildFromJsonFile(ExperimentSpec.class, tfTfboardJobReqFile);
Experiment experiment = submitter.createExperiment(spec, "ExperimentId-001");
Experiment experiment = submitter.createExperiment(spec);
}

@Test
Expand All @@ -119,7 +119,7 @@ public void testGetMlflowInfo() throws IOException, URISyntaxException {

private void run(ExperimentSpec spec) throws SubmarineRuntimeException {
// create
Experiment experimentCreated = submitter.createExperiment(spec, "ExperimentId-001");
Experiment experimentCreated = submitter.createExperiment(spec);
Assert.assertNotNull(experimentCreated);

// find
Expand Down

0 comments on commit aff3dc7

Please sign in to comment.