def initProject(projectname, setting): rtn = {'success': False} proj_path = PathProxy.getProjectDir(projectname) if os.path.exists(proj_path): rtn['error'] = "can not init project because it has exists" return rtn PathProxy.mkdir(proj_path) PathProxy.mkdir(os.path.join(proj_path, "train")) PathProxy.mkdir(os.path.join(proj_path, "model")) PathProxy.mkdir(os.path.join(proj_path, "test")) # cnn type here psetting = CNNDivSetting(projectname) psetting.createConfig() rtn['success'] = True return rtn
def isExists(projectname): proj_path = PathProxy.getProjectDir(projectname) return os.path.exists(proj_path)