Ejemplo n.º 1
0
 def test_auth_success_with_insecure_channel_on_core_url(
         self, insecure_core_server_with_auth):
     client = Client(
         core_url="localhost:50056",
         core_enable_auth=True,
         core_auth_token=_FAKE_JWT_TOKEN,
     )
     client.list_feature_sets()
Ejemplo n.º 2
0
def feature_set_list():
    """
    List all feature sets
    """
    feast_client = Client()  # type: Client

    table = []
    for fs in feast_client.list_feature_sets():
        table.append([fs.name, fs.version])

    from tabulate import tabulate

    print(tabulate(table, headers=["NAME", "VERSION"], tablefmt="plain"))
Ejemplo n.º 3
0
def client(core_url, serving_url, allow_dirty):
    # Get client for core and serving
    client = Client(core_url=core_url, serving_url=serving_url)

    # Ensure Feast core is active, but empty
    if not allow_dirty:
        feature_sets = client.list_feature_sets()
        if len(feature_sets) > 0:
            raise Exception(
                "Feast cannot have existing feature sets registered. Exiting tests."
            )

    return client
Ejemplo n.º 4
0
def feature_set_list():
    """
    List all feature sets
    """
    feast_client = Client()  # type: Client

    table = []
    for fs in feast_client.list_feature_sets(project="*", name="*"):
        table.append([fs.name, repr(fs)])

    from tabulate import tabulate

    print(tabulate(table, headers=["NAME", "REFERENCE"], tablefmt="plain"))
Ejemplo n.º 5
0
def list():
    """
    List all feature sets
    """
    feast_client = Client(core_url=feast_config.get_config_property_or_fail(
        "core_url"))  # type: Client

    table = []
    for fs in feast_client.list_feature_sets():
        table.append([fs.name, fs.version])

    from tabulate import tabulate

    print(tabulate(table, headers=["NAME", "VERSION"], tablefmt="plain"))
Ejemplo n.º 6
0
def feature_set_list(project: str, name: str, labels: str):
    """
    List all feature sets
    """
    feast_client = Client()  # type: Client

    labels_dict = _get_labels_dict(labels)

    table = []
    for fs in feast_client.list_feature_sets(project=project,
                                             name=name,
                                             labels=labels_dict):
        table.append([fs.name, repr(fs)])

    from tabulate import tabulate

    print(tabulate(table, headers=["NAME", "REFERENCE"], tablefmt="plain"))
Ejemplo n.º 7
0
def client(core_url, serving_url, allow_dirty):
    # Get client for core and serving
    # if enable_auth is True, Google Id token will be
    # passed in the metadata for authentication.
    client = Client(core_url=core_url,
                    serving_url=serving_url,
                    core_enable_auth=enable_auth,
                    core_auth_provider="google")
    client.create_project(PROJECT_NAME)

    # Ensure Feast core is active, but empty
    if not allow_dirty:
        feature_sets = client.list_feature_sets()
        if len(feature_sets) > 0:
            raise Exception(
                "Feast cannot have existing feature sets registered. Exiting tests."
            )

    return client
Ejemplo n.º 8
0
 def test_no_auth_sent_when_auth_disabled(
         self, insecure_core_server_that_blocks_auth):
     client = Client(core_url="localhost:50057")
     client.list_feature_sets()