Skip to content

Commit

Permalink
add container update interface
Browse files Browse the repository at this point in the history
  • Loading branch information
PaParaZz1 committed Jun 12, 2019
1 parent 9082389 commit e0f100c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package model.application.auto_train.base_interface;

import model.config.GlobalException;

public interface ArgumentContainerInterface {
int getSize();
boolean isValid();
void saveObject2File();
String getOutputFilePath();
void updateValue(String key, String value) throws GlobalException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,17 @@ public void saveObject2File() {
out.flush();
out.close();
}

@Override
public void updateValue(String key, String value) throws GlobalException {
if (mConfigMap.containsKey(key)) {
try {
mConfigMap.get(key).updateValue(value);
} catch (GlobalException e) {
throw e;
}
} else {
throw new GlobalException("invalid pytorch train argument");
}
}
}

0 comments on commit e0f100c

Please sign in to comment.