public class OnlineExperimentImpl extends BaseExperiment implements OnlineExperiment
| Modifier and Type | Class and Description |
|---|---|
static class |
OnlineExperimentImpl.OnlineExperimentBuilderImpl |
| Constructor and Description |
|---|
OnlineExperimentImpl() |
| Modifier and Type | Method and Description |
|---|---|
static OnlineExperimentImpl.OnlineExperimentBuilderImpl |
builder() |
void |
end()
Tells Comet that the Experiment is complete.
|
protected Connection |
getConnection() |
String |
getContext()
Gets the current context as recorded in the Experiment object locally
|
long |
getEpoch()
Gets the current epoch as recorded by the Experiment object locally
|
String |
getExperimentKey()
Get the experiment key returned by Comet
|
Optional<String> |
getExperimentLink()
Get the experiment link returned by Comet.
|
String |
getExperimentName()
Get experiment name.
|
protected org.slf4j.Logger |
getLogger() |
long |
getStep()
Gets the current step as recorded by the Experiment object locally
|
void |
logLine(String line,
long offset,
boolean stderr)
Send logs to Comet.
|
void |
logMetric(String metricName,
Object metricValue) |
void |
logMetric(String metricName,
Object metricValue,
long step)
Logs a metric with Comet under the current experiment step.
|
void |
logMetric(String metricName,
Object metricValue,
long step,
long epoch)
Logs a metric with Comet.
|
void |
logParameter(String parameterName,
Object paramValue)
Logs a param with Comet under the current experiment step.
|
void |
logParameter(String parameterName,
Object paramValue,
long step)
Logs a param with Comet.
|
void |
nextEpoch()
Increments the epoch that the experiment is on
|
void |
nextStep()
Increments the step that the experiment is on
|
protected void |
pingStatus() |
void |
setContext(String context)
Sets the context for any logs and uploaded files
|
void |
setEpoch(long epoch)
Sets the current epoch for the experiment.
|
void |
setInterceptStdout()
Turn on intercept of stdout and stderr and the logging of both in Comet
|
void |
setStep(long step)
Sets the current step for the experiment.
|
void |
stopInterceptStdout()
Turn off intercept of stdout and stderr and turns off their logging in Comet
|
void |
uploadAsset(File asset,
boolean overwrite) |
void |
uploadAsset(File asset,
String fileName,
boolean overwrite) |
void |
uploadAsset(File asset,
String fileName,
boolean overwrite,
long step)
Upload an asset under the current experiment step to be associated with the experiment, for example the trained weights of a neural net
|
addTag, getAssetList, getGitMetadata, getGraph, getHtml, getLogOther, getMetadata, getMetrics, getOutput, getParameters, getTags, logCode, logCode, logEndTime, logGitMetadata, logGraph, logHtml, logOther, logStartTime, setExperimentName, uploadAsset, uploadAssetclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddTag, getAssetList, getGitMetadata, getGraph, getHtml, getLogOther, getMetadata, getMetrics, getOutput, getParameters, getProjectName, getTags, getWorkspaceName, logCode, logCode, logEndTime, logGitMetadata, logGraph, logHtml, logOther, logStartTime, setExperimentName, uploadAsset, uploadAssetpublic String getExperimentName()
ExperimentgetExperimentName in interface Experimentpublic static OnlineExperimentImpl.OnlineExperimentBuilderImpl builder()
protected Connection getConnection()
getConnection in class BaseExperimentprotected org.slf4j.Logger getLogger()
getLogger in class BaseExperimentpublic void end()
OnlineExperimentend in interface OnlineExperimentpublic void setInterceptStdout()
throws IOException
OnlineExperimentsetInterceptStdout in interface OnlineExperimentIOExceptionpublic void stopInterceptStdout()
OnlineExperimentstopInterceptStdout in interface OnlineExperimentpublic void logLine(String line, long offset, boolean stderr)
OnlineExperimentlogLine in interface OnlineExperimentline - Text to be loggedoffset - Offset describes the place for current text to be insertedpublic void setStep(long step)
OnlineExperimentsetStep in interface OnlineExperimentpublic void nextStep()
OnlineExperimentnextStep in interface OnlineExperimentpublic long getStep()
OnlineExperimentgetStep in interface OnlineExperimentpublic void setEpoch(long epoch)
OnlineExperimentsetEpoch in interface OnlineExperimentpublic void nextEpoch()
OnlineExperimentnextEpoch in interface OnlineExperimentpublic long getEpoch()
OnlineExperimentgetEpoch in interface OnlineExperimentpublic void setContext(String context)
OnlineExperimentsetContext in interface OnlineExperimentpublic String getContext()
OnlineExperimentgetContext in interface OnlineExperimentgetContext in class BaseExperimentpublic String getExperimentKey()
ExperimentgetExperimentKey in interface Experimentpublic Optional<String> getExperimentLink()
ExperimentgetExperimentLink in interface Experimentpublic void logMetric(String metricName, Object metricValue, long step)
OnlineExperimentlogMetric in interface OnlineExperimentmetricName - The name for the metric to be loggedmetricValue - The new value for the metric. If the values for a metric are plottable we will plot themstep - The step to be associated with this metricpublic void logMetric(String metricName, Object metricValue)
logMetric in interface OnlineExperimentpublic void logMetric(String metricName, Object metricValue, long step, long epoch)
ExperimentlogMetric in interface ExperimentlogMetric in class BaseExperimentmetricName - The name for the metric to be loggedmetricValue - The new value for the metric. If the values for a metric are plottable we will plot themstep - The current step for this metric, this will set the given step for this experimentepoch - The current epoch for this metric, this will set the given epoch for this experimentpublic void logParameter(String parameterName, Object paramValue)
OnlineExperimentlogParameter in interface OnlineExperimentparameterName - The name of the param being loggedparamValue - The value for the param being loggedpublic void logParameter(String parameterName, Object paramValue, long step)
ExperimentlogParameter in interface ExperimentlogParameter in class BaseExperimentparameterName - The name of the param being loggedparamValue - The value for the param being loggedstep - The current step for this metric, this will set the given step for this experimentpublic void uploadAsset(File asset, String fileName, boolean overwrite, long step)
OnlineExperimentuploadAsset in interface OnlineExperimentasset - The asset to be storedfileName - The file name under which the asset should be stored in Comet. E.g. "someFile.txt"overwrite - Whether to overwrite files of the same name in Cometstep - The step to be associated with assetpublic void uploadAsset(File asset, boolean overwrite)
uploadAsset in interface OnlineExperimentpublic void uploadAsset(File asset, String fileName, boolean overwrite)
uploadAsset in interface OnlineExperimentprotected void pingStatus()
Copyright © 2021. All rights reserved.