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 07:43:42 UTC
[GitHub] [submarine] pingsutw commented on a change in pull request #369: SUBMARINE-590. [WEB] Update chart/param/metric UI
pingsutw commented on a change in pull request #369:
URL: https://github.com/apache/submarine/pull/369#discussion_r468387982
##########
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:
Those two environment variables are for internal usage, we set these environment variables in pods.
But we would not like to see them in the experiment spec.
----------------------------------------------------------------
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