T
- input-object typeS
- shared-statepublic class QuickMultiDatasetExperiment<T extends InputFromManager,S> extends Experiment implements ReplaceInputManager<T>, ReplaceOutputManager
InputOutputExperiment
.
Normally, runs an experiment on all data-sets in *datasets*.
However, in debug-mode datasetSpecific
is used (if non-empty), otherwise the first
dataset is used.
Constructor and Description |
---|
QuickMultiDatasetExperiment() |
Modifier and Type | Method and Description |
---|---|
void |
checkMisconfigured(BeanInstanceMap defaultInstances)
Checks that a bean's properties conform to expectations.
|
Optional<Path> |
executeExperiment(ExecutionArguments arguments)
Executes the experiment.
|
String |
getBeanExtension() |
StringSet |
getDatasets() |
String |
getDatasetSpecific() |
String |
getDirectoryDataset() |
String |
getIdentifierSuffix() |
String |
getLogExperimentPath()
Relative path to a logger for the experiment in gneeral
|
String |
getLogTaskPath()
Relative path to a logger for a specific task
|
int |
getMaxNumberProcessors()
An upper limit on the number of the processors that can be simultaneously used in parallel,
if they are available.
|
String |
getOutput() |
Task<T,S> |
getTask() |
boolean |
isSuppressExceptions() |
void |
localise(Path path)
Called once after the bean is created, localising the bean to a path on the filesystem.
|
void |
replaceInputManager(InputManager<T> inputManager)
Replace the existing @{link InputManager} associated with this class.
|
void |
replaceOutputManager(OutputManager output)
Replace the currently-assigned
OutputManager with another. |
void |
setBeanExtension(String beanExtension) |
void |
setDatasets(StringSet datasets) |
void |
setDatasetSpecific(String datasetSpecific) |
void |
setDirectoryDataset(String directoryDataset) |
void |
setIdentifierSuffix(String identifierSuffix) |
void |
setLogExperimentPath(String logExperimentPath)
Relative path to a logger for the experiment in gneeral
|
void |
setLogTaskPath(String logTaskPath)
Relative path to a logger for a specific task
|
void |
setMaxNumberProcessors(int maxNumberProcessors)
An upper limit on the number of the processors that can be simultaneously used in parallel,
if they are available.
|
void |
setOutput(String output) |
void |
setSuppressExceptions(boolean suppressExceptions) |
void |
setTask(Task<T,S> task) |
boolean |
useDetailedLogging()
Whether to log in more or less detail.
|
associateXML, getXMLConfiguration
describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, toString
public void checkMisconfigured(BeanInstanceMap defaultInstances) throws BeanMisconfiguredException
AnchorBean
checkMisconfigured
in class AnchorBean<Experiment>
defaultInstances
- all available default instances if the DefaultInstance
annotation is usedBeanMisconfiguredException
- if the bean has not been configured properly as XMLpublic void localise(Path path) throws BeanMisconfiguredException
AnchorBean
It is sometimes useful to override this method so as to include other files.
localise
in class AnchorBean<Experiment>
path
- a path on the filesystem which is associated with the bean (can be null,
indicating no localization)BeanMisconfiguredException
- if a relative-path is passedpublic void replaceInputManager(InputManager<T> inputManager) throws OperationFailedException
ReplaceInputManager
replaceInputManager
in interface ReplaceInputManager<T extends InputFromManager>
inputManager
- the new input-manager that is assigned.OperationFailedException
- if the assignment cannot complete successfully.public void replaceOutputManager(OutputManager output) throws OperationFailedException
ReplaceOutputManager
OutputManager
with another.replaceOutputManager
in interface ReplaceOutputManager
output
- the task to replace.OperationFailedException
- if the task cannot be successfully replaced.public Optional<Path> executeExperiment(ExecutionArguments arguments) throws ExperimentExecutionException
Experiment
executeExperiment
in class Experiment
arguments
- arguments that may influence how the experiment is run.ExperimentExecutionException
- if an error occurs executing the experiment.public boolean useDetailedLogging()
Experiment
It's appropriate to perform more detailed logging for a lengthier experiment, but something quick and simple is preferable for a short job, which may only be outputted to the console.
useDetailedLogging
in class Experiment
public String getDirectoryDataset()
public void setDirectoryDataset(String directoryDataset)
public StringSet getDatasets()
public void setDatasets(StringSet datasets)
public String getDatasetSpecific()
public void setDatasetSpecific(String datasetSpecific)
public String getBeanExtension()
public void setBeanExtension(String beanExtension)
public String getLogExperimentPath()
public void setLogExperimentPath(String logExperimentPath)
public String getLogTaskPath()
public void setLogTaskPath(String logTaskPath)
public String getOutput()
public void setOutput(String output)
public String getIdentifierSuffix()
public void setIdentifierSuffix(String identifierSuffix)
public int getMaxNumberProcessors()
public void setMaxNumberProcessors(int maxNumberProcessors)
public boolean isSuppressExceptions()
public void setSuppressExceptions(boolean suppressExceptions)
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.