zhipeng93 commented on code in PR #237:
URL: https://github.com/apache/flink-ml/pull/237#discussion_r1209803567


##########
flink-ml-lib/src/main/java/org/apache/flink/ml/common/ps/training/TrainingContext.java:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flink.ml.common.ps.training;
+
+import org.apache.flink.runtime.state.StateInitializationContext;
+import org.apache.flink.runtime.state.StateSnapshotContext;
+import org.apache.flink.runtime.util.ResettableIterator;
+
+import java.io.Serializable;
+
+/**
+ * Stores the context information that is alive during the training process. 
Note that the context
+ * information will be updated by each {@link IterationStage}.
+ *
+ * <p>Note that subclasses should take care of the snapshot of object stored 
in {@link
+ * TrainingContext} if the object satisfies that: the write-process is 
followed by an {@link
+ * PullStage}, which is later again read by other stages.
+ */
+public interface TrainingContext extends Serializable {

Review Comment:
   It is indeed not a `listener`. How about we rename it as `MLSession`?
   
   We can talk about this offline.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to