11package ml .comet .experiment ;
22
3- import ml .comet .experiment .impl .constants .AssetType ;
3+ import ml .comet .experiment .context .ExperimentContext ;
4+ import ml .comet .experiment .impl .asset .AssetType ;
45import ml .comet .experiment .model .ExperimentAssetLink ;
56import ml .comet .experiment .model .ExperimentMetadataRest ;
67import ml .comet .experiment .model .GitMetadata ;
@@ -140,11 +141,22 @@ public interface Experiment {
140141 /**
141142 * Send logs to Comet.
142143 *
143- * @param line Text to be logged
144- * @param offset Offset describes the place for current text to be inserted
145- * @param stderr the flag to indicate if this is StdErr message.
144+ * @param line Text to be logged
145+ * @param offset Offset describes the place for current text to be inserted
146+ * @param stderr the flag to indicate if this is StdErr message.
147+ * @param context the context to be associated with the parameter.
146148 */
147- void logLine (String line , long offset , boolean stderr );
149+ void logLine (String line , long offset , boolean stderr , String context );
150+
151+ /**
152+ * Logs a metric with Comet. For running experiment updates current step to one from param!
153+ * Metrics are generally values that change from step to step.
154+ *
155+ * @param metricName The name for the metric to be logged
156+ * @param metricValue The new value for the metric. If the values for a metric are plottable we will plot them.
157+ * @param context the context to be associated with the metric.
158+ */
159+ void logMetric (String metricName , Object metricValue , ExperimentContext context );
148160
149161 /**
150162 * Logs a metric with Comet. For running experiment updates current step to one from param!
@@ -153,18 +165,27 @@ public interface Experiment {
153165 * @param metricName The name for the metric to be logged
154166 * @param metricValue The new value for the metric. If the values for a metric are plottable we will plot them
155167 * @param step The current step for this metric, this will set the given step for this experiment
156- * @param epoch The current epoch for this metric, this will set the given epoch for this experiment
168+ * @param epoch The current epoch for this metric, this will set the given epoch for this experiment.
157169 */
158170 void logMetric (String metricName , Object metricValue , long step , long epoch );
159171
172+ /**
173+ * Logs a param with Comet. For running experiment updates current step to one from param!
174+ * Params should be set at the start of the experiment.
175+ *
176+ * @param parameterName The name of the param being logged
177+ * @param paramValue The value for the param being logged
178+ * @param context the context to be associated with the parameter.
179+ */
180+ void logParameter (String parameterName , Object paramValue , ExperimentContext context );
160181
161182 /**
162183 * Logs a param with Comet. For running experiment updates current step to one from param!
163184 * Params should be set at the start of the experiment.
164185 *
165186 * @param parameterName The name of the param being logged
166187 * @param paramValue The value for the param being logged
167- * @param step The current step for this metric, this will set the given step for this experiment
188+ * @param step The current step for this metric, this will set the given step for this experiment.
168189 */
169190 void logParameter (String parameterName , Object paramValue , long step );
170191
@@ -214,6 +235,15 @@ public interface Experiment {
214235 */
215236 void logEndTime (long endTimeMillis );
216237
238+ /**
239+ * Allows you to report code for the experiment.
240+ *
241+ * @param code Code to be sent to Comet
242+ * @param fileName Name of source file to be displayed on UI 'code' tab
243+ * @param context the context to be associated with the asset.
244+ */
245+ void logCode (String code , String fileName , ExperimentContext context );
246+
217247 /**
218248 * Allows you to report code for the experiment.
219249 *
@@ -222,6 +252,14 @@ public interface Experiment {
222252 */
223253 void logCode (String code , String fileName );
224254
255+ /**
256+ * Allows you to report code for the experiment.
257+ *
258+ * @param file Asset with source code to be sent
259+ * @param context the context to be associated with the asset.
260+ */
261+ void logCode (File file , ExperimentContext context );
262+
225263 /**
226264 * Allows you to report code for the experiment.
227265 *
@@ -236,11 +274,41 @@ public interface Experiment {
236274 * @param asset The asset to be stored
237275 * @param fileName The file name under which the asset should be stored in Comet. E.g. "someFile.txt"
238276 * @param overwrite Whether to overwrite files of the same name in Comet
239- * @param step the step to be associated with asset
240- * @param epoch the epoch to be associated with asset
277+ * @param context the context to be associated with the asset.
278+ */
279+ void uploadAsset (File asset , String fileName , boolean overwrite , ExperimentContext context );
280+
281+ /**
282+ * Upload an asset to be associated with the experiment, for example the trained weights of a neural net.
283+ * For running experiment updates current step to one from param!
284+ *
285+ * @param asset The asset to be stored
286+ * @param fileName The file name under which the asset should be stored in Comet. E.g. "someFile.txt"
287+ * @param overwrite Whether to overwrite files of the same name in Comet
288+ * @param step the step to be associated with the asset
289+ * @param epoch the epoch to be associated with the asset
241290 */
242291 void uploadAsset (File asset , String fileName , boolean overwrite , long step , long epoch );
243292
293+ /**
294+ * Upload an asset to be associated with the experiment, for example the trained weights of a neural net.
295+ * For running experiment updates current step to one from param!
296+ *
297+ * @param asset The file asset to be stored. The name of the file will be used as assets identifier on Comet.
298+ * @param overwrite Whether to overwrite files of the same name in Comet
299+ * @param context the context to be associated with the asset.
300+ */
301+ void uploadAsset (File asset , boolean overwrite , ExperimentContext context );
302+
303+ /**
304+ * Upload an asset to be associated with the experiment, for example the trained weights of a neural net.
305+ * For running experiment updates current step to one from param!
306+ *
307+ * @param asset The file asset to be stored. The name of the file will be used as assets identifier on Comet.
308+ * @param overwrite Whether to overwrite files of the same name in Comet
309+ * @param step the step to be associated with the asset
310+ * @param epoch the epoch to be associated with the asset
311+ */
244312 void uploadAsset (File asset , boolean overwrite , long step , long epoch );
245313
246314 /**
0 commit comments