How to use the hub.client.hub_control.HubControlClient function in hub

To help you get started, we’ve selected a few hub 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 snarkai / Hub / hub / collections / dataset / core.py View on Github external
def _connect(tag):
    """ Connects to the backend and receive credentials
    """

    creds = HubControlClient().get_config()
    dataset = HubControlClient().get_dataset_path(tag)

    if dataset and "path" in dataset:
        path = dataset["path"]
    else:
        path = f"{creds['bucket']}/{tag}"

    return path, creds
github snarkai / Hub / hub / collections / dataset / core.py View on Github external
def _connect(tag):
    """ Connects to the backend and receive credentials
    """

    creds = HubControlClient().get_config()
    dataset = HubControlClient().get_dataset_path(tag)

    if dataset and "path" in dataset:
        path = dataset["path"]
    else:
        path = f"{creds['bucket']}/{tag}"

    return path, creds
github snarkai / Hub / hub / client / hub_control.py View on Github external
def __init__(self):
        super(HubControlClient, self).__init__()
        self.details = self.get_config()