コード例 #1
0
ファイル: function_runner.py プロジェクト: zhuohan123/ray
    def _stop(self):
        # If everything stayed in synch properly, this should never happen.
        if not self._results_queue.empty():
            logger.warning(
                ("Some results were added after the trial stop condition. "
                 "These results won't be logged."))

        # Check for any errors that might have been missed.
        self._report_thread_runner_error()
        session.shutdown()
コード例 #2
0
ファイル: test_track.py プロジェクト: zommiommy/ray
    def testSessionInitShutdown(self):
        self.assertTrue(session._session is None)

        # Checks that the singleton _session is created/destroyed
        # by session.init() and session.shutdown()
        for _ in range(2):
            # do it twice to see that we can reopen the session
            session.init(reporter=None)
            self.assertTrue(session._session is not None)
            session.shutdown()
            self.assertTrue(session._session is None)
コード例 #3
0
ファイル: function_runner.py プロジェクト: dtbeat/ray
    def cleanup(self):
        # If everything stayed in synch properly, this should never happen.
        if not self._results_queue.empty():
            logger.warning(
                ("Some results were added after the trial stop condition. "
                 "These results won't be logged."))

        # Check for any errors that might have been missed.
        self._report_thread_runner_error()
        session.shutdown()

        if self.temp_checkpoint_dir is not None and os.path.exists(
                self.temp_checkpoint_dir):
            shutil.rmtree(self.temp_checkpoint_dir)
            logger.debug("Clearing temporary checkpoint: %s",
                         self.temp_checkpoint_dir)
コード例 #4
0
ファイル: test_track.py プロジェクト: zhuohan123/ray
 def tearDown(self):
     session.shutdown()
     ray.shutdown()