Beispiel #1
0
def _require_asset(doc_cls, barrel_cls, obj_name: str, tgt_path: str, model: str = None):
    
    model = model or Project.load().model
    doc: [Dataset, ModelVersion] = doc_cls.find_one(name=obj_name, model=model)
    dyr = os.path.join(tgt_path, doc.get_dir_name())
    os.makedirs(dyr, exist_ok=True)
    barrel_cls(doc).deploy(dyr)
    MetaCargo(docs=[doc], section=get_purpose()).deploy()
    return dyr
Beispiel #2
0
    def __init__(self, debug=False):

        super().__init__(timeout=3)
        self.debug = debug
        self.proj = Project.load()
        self.proc_mon = load_proc_monitor()

        if self.debug:
            LOG.debug_mode = True
Beispiel #3
0
    def __init__(self):

        self.proj = Project.load()
        self.train = Training.load(ignore=True)
        self.mv_api = ModelVersionAPI(self.proj)