public abstract class BaseExperiment extends Object implements Experiment
| Constructor and Description |
|---|
BaseExperiment() |
| Modifier and Type | Method and Description |
|---|---|
void |
addTag(@NonNull String tag)
Adds a tag to this experiment.
|
List<ExperimentAssetLink> |
getAssetList(@NonNull AssetType type)
Get experiment asset list.
|
protected abstract Connection |
getConnection()
Returns connection associated with particular experiment.
|
protected abstract String |
getContext()
Gets the current context as recorded in the Experiment object locally.
|
GitMetadataRest |
getGitMetadata()
Get experiment git metadata.
|
Optional<String> |
getGraph()
Get experiment graph data.
|
Optional<String> |
getHtml()
Get experiment html.
|
protected abstract org.slf4j.Logger |
getLogger()
Returns logger instance associated with particular experiment.
|
List<ValueMinMaxDto> |
getLogOther()
Get experiment log other data.
|
ExperimentMetadataRest |
getMetadata()
Get experiment metadata.
|
List<ValueMinMaxDto> |
getMetrics()
Get experiment metrics.
|
Optional<String> |
getOutput()
Get experiment output data.
|
List<ValueMinMaxDto> |
getParameters()
Get experiment parameters.
|
List<String> |
getTags()
Get experiment tags.
|
void |
logCode(@NonNull File asset)
Allows you to report code for the experiment.
|
void |
logCode(@NonNull String code,
@NonNull String fileName)
Allows you to report code for the experiment.
|
void |
logEndTime(long endTimeMillis)
Logs the start time of the experiment.
|
void |
logGitMetadata(CreateGitMetadata gitMetadata)
Logs Git Metadata for the experiment.
|
void |
logGraph(@NonNull String graph)
Logs a graph to Comet.
|
void |
logHtml(@NonNull String html,
boolean override)
Allows you to create html report for the experiment.
|
void |
logMetric(@NonNull String metricName,
@NonNull Object metricValue,
long step,
long epoch)
Logs a metric with Comet.
|
void |
logOther(@NonNull String key,
@NonNull Object value)
Logs a key value pair with Comet.
|
void |
logParameter(@NonNull String parameterName,
@NonNull Object paramValue,
long step)
Logs a param with Comet.
|
void |
logStartTime(long startTimeMillis)
Logs the start time of the experiment.
|
void |
setExperimentName(@NonNull String experimentName)
Sets the experiment name.
|
void |
uploadAsset(@NonNull File asset,
boolean overwrite,
long step,
long epoch) |
void |
uploadAsset(@NonNull File asset,
@NonNull String fileName,
boolean overwrite,
long step,
long epoch)
Upload an asset to be associated with the experiment, for example the trained weights of a neural net.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitend, getExperimentKey, getExperimentLink, getExperimentName, getProjectName, getWorkspaceNameprotected abstract String getContext()
protected abstract Connection getConnection()
protected abstract org.slf4j.Logger getLogger()
public void setExperimentName(@NonNull
@NonNull String experimentName)
ExperimentsetExperimentName in interface ExperimentexperimentName - The new name for the experimentpublic void logMetric(@NonNull
@NonNull String metricName,
@NonNull
@NonNull Object metricValue,
long step,
long epoch)
ExperimentlogMetric in interface ExperimentmetricName - 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(@NonNull
@NonNull String parameterName,
@NonNull
@NonNull Object paramValue,
long step)
ExperimentlogParameter in interface ExperimentparameterName - 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 logHtml(@NonNull
@NonNull String html,
boolean override)
ExperimentlogHtml in interface Experimenthtml - A block of html to be sent to Cometoverride - Whether previous html sent should be deleted. If true the old html will be deleted.
If false, it will have the new html appended onto the end.public void logCode(@NonNull
@NonNull String code,
@NonNull
@NonNull String fileName)
ExperimentlogCode in interface Experimentcode - Code to be sent to CometfileName - Name of source file to be displayed on UI 'code' tabpublic void logCode(@NonNull
@NonNull File asset)
ExperimentlogCode in interface Experimentasset - Asset with source code to be sentpublic void logOther(@NonNull
@NonNull String key,
@NonNull
@NonNull Object value)
ExperimentlogOther in interface Experimentkey - The key for the data to be storedvalue - The value for said keypublic void addTag(@NonNull
@NonNull String tag)
ExperimentaddTag in interface Experimenttag - The tag to be addedpublic void logGraph(@NonNull
@NonNull String graph)
ExperimentlogGraph in interface Experimentgraph - The graph to be loggedpublic void logStartTime(long startTimeMillis)
ExperimentlogStartTime in interface ExperimentstartTimeMillis - When you want to say that the experiment startedpublic void logEndTime(long endTimeMillis)
ExperimentlogEndTime in interface ExperimentendTimeMillis - When you want to say that the experiment endedpublic void uploadAsset(@NonNull
@NonNull File asset,
@NonNull
@NonNull String fileName,
boolean overwrite,
long step,
long epoch)
ExperimentuploadAsset in interface Experimentasset - 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 assetepoch - the epoch to be associated with assetpublic void uploadAsset(@NonNull
@NonNull File asset,
boolean overwrite,
long step,
long epoch)
uploadAsset in interface Experimentpublic void logGitMetadata(CreateGitMetadata gitMetadata)
ExperimentlogGitMetadata in interface ExperimentgitMetadata - The Git Metadata for the experimentpublic ExperimentMetadataRest getMetadata()
ExperimentgetMetadata in interface Experimentpublic GitMetadataRest getGitMetadata()
ExperimentgetGitMetadata in interface Experimentpublic Optional<String> getHtml()
ExperimentgetHtml in interface Experimentpublic Optional<String> getOutput()
ExperimentgetOutput in interface Experimentpublic Optional<String> getGraph()
ExperimentgetGraph in interface Experimentpublic List<ValueMinMaxDto> getParameters()
ExperimentgetParameters in interface Experimentpublic List<ValueMinMaxDto> getMetrics()
ExperimentgetMetrics in interface Experimentpublic List<ValueMinMaxDto> getLogOther()
ExperimentgetLogOther in interface Experimentpublic List<String> getTags()
ExperimentgetTags in interface Experimentpublic List<ExperimentAssetLink> getAssetList(@NonNull @NonNull AssetType type)
ExperimentgetAssetList in interface Experimenttype - the type of assets to be included.Copyright © 2021. All rights reserved.