Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import logging
import dtlpy as dl
import numpy as np
from PIL import Image
import uuid
import os
logger = logging.getLogger(__name__)
class PluginRunner(dl.BasePluginRunner):
"""
Plugin runner class
"""
def __init__(self):
pass
def run(self, dataset, configs=None, progress=None):
project = dataset.project
assert isinstance(project, dl.entities.Project)
pipeline_id = str(uuid.uuid1())
local_path = os.path.join(os.getcwd(), pipeline_id)
#######################
# download for resume #
#######################
import logging
import dtlpy as dl
import numpy as np
from PIL import Image
import os
from .plugin_utils import download_data
from importlib import import_module
logger = logging.getLogger(__name__)
class PluginRunner(dl.BasePluginRunner):
"""
Plugin runner class
"""
def __init__(self):
pass
def run(self, dataset_obj, model_specs, hp_values, config=None, progress=None):
download_data(dataset_obj)
# get project
project = dataset_obj.project
assert isinstance(project, dl.entities.Project)