Exemplo n.º 1
0
def new(details, **kwargs):
    """Record a new Treasure Chest in the framework"""

    CMD.run(API,
            'new',
            **kwargs,
            details=assert_dict(details, allow_none=True))
Exemplo n.º 2
0
def update(details, **kwargs):
    """Update a Treasure Chest"""

    CMD.run(API,
            'update',
            **kwargs,
            details=assert_dict(details, allow_none=True))
Exemplo n.º 3
0
def new(model_files, data_files, **kwargs):
    """Record a new model in the database"""

    CMD.run(API,
            'new',
            **kwargs,
            model_files=[assert_dict(f) for f in model_files],
            data_files=[assert_dict(f) for f in data_files])
Exemplo n.º 4
0
def setup(ctx, **kwargs):
    
    """Start and configure this plugin"""
    
    CMD.run(
        API, 'setup', **kwargs,
        name=ctx.obj['ISLE_NAME']
    )
Exemplo n.º 5
0
def new(details, path=None, **kwargs):
    """Record a new model version in the framework"""

    CMD.run(API,
            'new',
            **kwargs,
            path=path or os.getcwd(),
            details=assert_dict(details, allow_none=True))
Exemplo n.º 6
0
def update(details, path=None, **kwargs):
    """Update a model version's details or files"""

    CMD.run(API,
            'update',
            **kwargs,
            path=path,
            details=assert_dict(details, allow_none=True))
Exemplo n.º 7
0
def info(**kwargs):
    """Information about a deployment"""
    def callback(x):
        avail = x.get('availability', 0)
        x['availability'] = '{}%'.format(int(100 * avail))
        return x

    CMD.run(API, 'info', _response_callback=callback, **kwargs)
Exemplo n.º 8
0
def _list(_filter, expand):
    """List model records"""

    CMD.run(API,
            'lyst',
            _filter=assert_dict(_filter, allow_none=True),
            _response_callback=ListingCallback(obj_title='Model Record',
                                               expand=expand))
Exemplo n.º 9
0
def _list(_filter, expand, **kwargs):
    
    """List training executions"""
    
    CMD.run(
        API, 'lyst', **kwargs,
        _filter=assert_dict(_filter, allow_none=True),
        _response_callback=ListingCallback(obj_title='Training Execution', expand=expand)
    )
Exemplo n.º 10
0
def _list(_filter, expand, **kwargs):
    
    """List datasets"""
    
    CMD.run(
        API, 'lyst', **kwargs,
        _filter=assert_dict(_filter, allow_none=True),
        _response_callback=ListingCallback(obj_title='Dataset', expand=expand)
    )
Exemplo n.º 11
0
def new(details, path=None, **kwargs):
    
    """Add a new dataset"""
    
    CMD.run(
        API, 'new', **kwargs,
        path=path or os.getcwd(),
        details=assert_dict(details, allow_none=True)
    )
Exemplo n.º 12
0
def new(params, env_vars, mounts, **kwargs):
    
    """Execute a new training"""
    
    CMD.run(
        API, 'new', **kwargs,
        params=assert_dict(params, allow_none=True),
        env_vars=kv_list_to_dict(env_vars),
        mounts=list(mounts)
    )
Exemplo n.º 13
0
def new(params, env_vars, mounts, port: int, n_tasks: int = 1, **kwargs):
    """Setup a deployment"""

    CMD.run(API,
            'new',
            **kwargs,
            params=assert_dict(params, allow_none=True),
            env_vars=kv_list_to_dict(env_vars),
            mounts=list(mounts),
            port=None if port is None else int(port),
            tasks=int(n_tasks))
Exemplo n.º 14
0
def update(model_files,
           data_files,
           no_model_files: bool = False,
           no_ds_files: bool = False,
           **kwargs):
    """Update a model record"""

    CMD.run(
        API,
        'update',
        **kwargs,
        model_files=[]
        if no_model_files else [assert_dict(f) for f in model_files] or None,
        data_files=[] if no_ds_files else [assert_dict(f)
                                           for f in data_files] or None)
Exemplo n.º 15
0
def note(env_vars: list,
         mounts: list,
         port: int,
         edit: bool = False,
         **kwargs):
    """Access to the Jupyter Notebook (IDE)"""

    edit_mount = ['{}:{}:rw'.format(os.getcwd(), OnBoard.APP_HOME)
                  ] if edit else []

    CMD.run(API,
            '__call__',
            **kwargs,
            env_vars=kv_list_to_dict(env_vars),
            mounts=list(mounts) + edit_mount,
            port=int(port))
Exemplo n.º 16
0
def rm(**kwargs):
    
    """Remove a training's metadata"""
    
    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 17
0
def rm(**kwargs):
    """Remove a model along with all of it's versions and datasets"""

    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 18
0
def new(**kwargs):
    
    """Host a new project in the framework"""
    
    CMD.run(API, 'new', **kwargs)
Exemplo n.º 19
0
def info(**kwargs):
    
    """Information about a training execution"""
    
    CMD.run(API, 'info', **kwargs)
Exemplo n.º 20
0
def info(**kwargs):
    """Information about a model version"""

    CMD.run(API, 'info', **kwargs)
Exemplo n.º 21
0
def rm(**kwargs):
    
    """Remove a project and everything related to it"""
    
    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 22
0
def info(**kwargs):
    
    """Information about a dataset"""
    
    CMD.run(API, 'info', **kwargs)
Exemplo n.º 23
0
def rm(**kwargs):
    
    """Remove a dataset and all of its files"""
    
    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 24
0
def build(**kwargs):
    
    """Encapsulates the project in a new Docker image"""
    
    CMD.run(API, 'build', **kwargs)
Exemplo n.º 25
0
def rm(**kwargs):
    """Remove a deployment"""

    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 26
0
def rm(**kwargs):
    """Remove a model version and all of its files"""

    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 27
0
def info(**kwargs):
    
    """Information about a project"""
    
    CMD.run(API, 'info', **kwargs)
Exemplo n.º 28
0
def rm(**kwargs):
    """Remove a Treasure Chest"""

    CMD.run(API, 'rm', **kwargs)
Exemplo n.º 29
0
def info(**kwargs):
    """Information about a Treasure Chest"""

    CMD.run(API, 'info', **kwargs)
Exemplo n.º 30
0
def update(**kwargs):
    
    """Updates a projects in the database"""
    
    CMD.run(API, 'update', **kwargs)