How to use the dtlpy.BasePluginRunner function in dtlpy

To help you get started, we’ve selected a few dtlpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dataloop-ai / ZazuML / plugins / tuner_main.py View on Github external
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 #
        #######################
github dataloop-ai / ZazuML / plugins / trainer_main.py View on Github external
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)