Пример #1
0
    def _update_path(self, path):

        # compile and create output path
        self.full_path = self.compile_path(path)
        checkNCreateDirectory(self.full_path + '/')
        self.logger.info(
            "Output:\t\t\t%s/%s" %
            (self.full_path, self.output_filename))
        #TODO set up logging to file for rlpy loggers

        self.log_filename = '{:0>3}.log'.format(self.exp_id)
        if self.config_logging:
            rlpy_logger = logging.getLogger("rlpy")
            for h in rlpy_logger.handlers:
                rlpy_logger.removeHandler(h)
            rlpy_logger.addHandler(logging.StreamHandler())
            rlpy_logger.addHandler(logging.FileHandler(os.path.join(self.full_path, self.log_filename)))
            rlpy_logger.setLevel(logging.INFO)
Пример #2
0
    def _update_path(self, path):

        # compile and create output path
        self.full_path = self.compile_path(path)
        checkNCreateDirectory(self.full_path + '/')
        self.logger.info(
            "Output:\t\t\t%s/%s" %
            (self.full_path, self.output_filename))
        #TODO set up logging to file for rlpy loggers

        self.log_filename = '{:0>3}.log'.format(self.exp_id)
        if self.config_logging:
            rlpy_logger = logging.getLogger("rlpy")
            for h in rlpy_logger.handlers:
                rlpy_logger.removeHandler(h)
            rlpy_logger.addHandler(logging.StreamHandler())
            rlpy_logger.addHandler(logging.FileHandler(os.path.join(self.full_path, self.log_filename)))
            rlpy_logger.setLevel(logging.INFO)
Пример #3
0
 def saveStats(self):
     fullpath_output = os.path.join(self.project_path, self.output_filename)
     print ">>> ", fullpath_output
     checkNCreateDirectory(self.project_path + '/')
     with open(fullpath_output, "w") as f:
         json.dump(self.result, f, indent=4, sort_keys=True)
Пример #4
0
 def saveStats(self):
     fullpath_output = os.path.join(self.project_path, self.output_filename)
     print(">>> ", fullpath_output)
     checkNCreateDirectory(self.project_path + '/')
     with open(fullpath_output, "w") as f:
         json.dump(self.result, f, indent=4, sort_keys=True)