You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@submarine.apache.org by GitBox <gi...@apache.org> on 2020/08/11 02:55:01 UTC

[GitHub] [submarine] tangzhankun commented on a change in pull request #369: SUBMARINE-590. [WEB] Update chart/param/metric UI

tangzhankun commented on a change in pull request #369:
URL: https://github.com/apache/submarine/pull/369#discussion_r468292579



##########
File path: submarine-server/server-core/src/main/java/org/apache/submarine/server/experiment/ExperimentManager.java
##########
@@ -85,13 +87,33 @@ private ExperimentManager(Submitter submitter) {
    */
   public Experiment createExperiment(ExperimentSpec spec) throws SubmarineRuntimeException {
     checkSpec(spec);
+
+    // Submarine sdk will get experimentID and JDBC URL from environment variables in each worker,
+    // and then log experiment metrics and parameters to submarine server
+    ExperimentId id = generateExperimentId();
+    String url = getSQLAlchemyURL();
+    spec.getMeta().getEnvVars().put(RestConstants.JOB_ID, id.toString());
+    spec.getMeta().getEnvVars().put(RestConstants.SUBMARINE_TRACKING_URI, url);
+
     Experiment experiment = submitter.createExperiment(spec);
-    experiment.setExperimentId(generateExperimentId());
+    experiment.setExperimentId(id);
+
+    spec.getMeta().getEnvVars().remove(RestConstants.JOB_ID);

Review comment:
       I don't quite understand why put the environment to the spec and then delete them?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org