Esempio n. 1
0
    def StoreCompressedModels(self):
        sZipFiles = self.RunSub.ListCompressedModels()
        sDestFolder = self.StoreSub.ExperimentModelFolder
        Storage.EnsurePathExists(sDestFolder)

        for sZipFile in sZipFiles:
            self.Log.Print("Moving model %s to storage folder %s" %
                           (sZipFile, sDestFolder))
            Storage.MoveFileToFolder(sZipFile, sDestFolder)

        Storage.DeleteEmptyFolder(self.RunSub.ExperimentModelFolder)
Esempio n. 2
0
    def __init__(self, p_oParent, p_nFoldNumber, p_bIsRun=False):
        #........ |  Instance Attributes | ..............................................
        self.ParentExperiment = p_oParent
        self.FoldNumber = p_nFoldNumber
        self.IsRun = p_bIsRun
        if self.IsRun:
            self.Folder = os.path.join(self.ParentExperiment.RunBaseFolder,
                                       "fold%.2d" % self.FoldNumber)
        else:
            self.Folder = os.path.join(self.ParentExperiment.BaseFolder,
                                       "fold%.2d" % self.FoldNumber)
        Storage.EnsurePathExists(self.Folder)

        sFolders = Storage.GetDirectoriesSorted(self.Folder)
        if len(sFolders) > 0:
            self.LastUID = sFolders[-1]
        else:
            self.LastUID = ExperimentSubFolder.NO_SUBFOLDERS

        self.__pathsToEnsure = None
Esempio n. 3
0
    def __init__(self):
        #....................... |  Instance Attributes | ...............................
        self.BaseFolder = BaseFolders.EXPERIMENTS_SYSTEM
        self.ToEvaluteFolder = Storage.JoinPath(self.BaseFolder, "toevaluate")
        self.PendingFolder = Storage.JoinPath(self.BaseFolder, "pending")
        self.ArchiveFolder = Storage.JoinPath(self.BaseFolder, "archive")
        self.ErrorFolder = Storage.JoinPath(self.PendingFolder, "errors")
        self.EditFolder = Storage.JoinPath(self.BaseFolder, "edit")
        self.RecombineFolder = Storage.JoinPath(self.BaseFolder, "recombine")

        self.CountersFileName = Storage.JoinPath(self.BaseFolder, "counters")

        self.TemplateName = None
        self.TemplateConfigFileName = None
        #................................................................................
        Storage.EnsurePathExists(self.BaseFolder)
        Storage.EnsurePathExists(self.PendingFolder)
        Storage.EnsurePathExists(self.ArchiveFolder)
        Storage.EnsurePathExists(self.ErrorFolder)
        Storage.EnsurePathExists(self.EditFolder)
        Storage.EnsurePathExists(self.ToEvaluteFolder)
        Storage.EnsurePathExists(self.RecombineFolder)

        self.SetTemplateName(None)
Esempio n. 4
0
 def Initialize(self, p_sUID, p_bIsEnsuringPaths=True):
     self.__defineExperimentFolders(p_sUID)
     if p_bIsEnsuringPaths:
         for sFolder in self.__pathsToEnsure:
             Storage.EnsurePathExists(sFolder)