e35918cadf0b4bcfbf530e4cb68d52bd2e0bf93f,lib/gui/stats.py,Session,load_state_file,#Session#,230

Before Change


        state_file = os.path.join(self.modeldir, "{}_state.json".format(self.modelname))
        logger.debug("Loading State: "%s"", state_file)
        try:
            with open(state_file, "rb") as inp:
                state = self.serializer.unmarshal(inp.read().decode("utf-8"))
                self.state = state
                logger.debug("Loaded state: %s", state)
        except IOError as err:
            logger.warning("Unable to load state file. Graphing disabled: %s", str(err))

    def get_iterations_for_session(self, session_id):

After Change


        state_file = os.path.join(self.modeldir, "{}_state.json".format(self.modelname))
        logger.debug("Loading State: "%s"", state_file)
        self.state = self.serializer.load(state_file)
        logger.debug("Loaded state: %s", self.state)

    def get_iterations_for_session(self, session_id):
         Return the number of iterations for the given session id 
        session = self.state["sessions"].get(str(session_id), None)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: deepfakes/faceswap
Commit Name: e35918cadf0b4bcfbf530e4cb68d52bd2e0bf93f
Time: 2019-10-10
Author: 36920800+torzdf@users.noreply.github.com
File Name: lib/gui/stats.py
Class Name: Session
Method Name: load_state_file


Project Name: ilastik/ilastik
Commit Name: 46df5d3879a2fadb3a5df9728954ad1b5fce663a
Time: 2012-07-10
Author: bergs@janelia.hhmi.org
File Name: ilastik-shell/applets/pixelClassification/pixelClassificationGui.py
Class Name: PixelClassificationGui
Method Name: onTrainAndPredictButtonClicked


Project Name: tensorflow/tensorboard
Commit Name: db8880132ac2ccd1bd10973c7cea9dde884a3093
Time: 2020-01-28
Author: nfelt@users.noreply.github.com
File Name: tensorboard/backend/event_processing/event_file_loader.py
Class Name: RawEventFileLoader
Method Name: Load


Project Name: pantsbuild/pants
Commit Name: 78a0daafdb5d4f1335b23f56ea115d9a35ada677
Time: 2017-02-27
Author: jasonqsong@outlook.com
File Name: contrib/node/src/python/pants/contrib/node/subsystems/node_distribution.py
Class Name: NodeDistribution
Method Name: path