Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions protos/feast/registry/RegistryServer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -563,4 +563,5 @@ message GetFeatureRequest {
string project = 1;
string feature_view = 2;
string name = 3;
bool allow_cache = 4;
}
4 changes: 3 additions & 1 deletion sdk/python/feast/api/registry/rest/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,18 +63,20 @@ def get_feature(
include_relationships: bool = Query(
False, description="Include relationships for this feature"
),
allow_cache: bool = Query(True),
):
req = RegistryServer_pb2.GetFeatureRequest(
project=project,
feature_view=feature_view,
name=name,
allow_cache=allow_cache,
)

response = grpc_call(grpc_handler.GetFeature, req)

if include_relationships:
response["relationships"] = get_object_relationships(
grpc_handler, "feature", name, project
grpc_handler, "feature", name, project, allow_cache
)

if response:
Expand Down
28 changes: 21 additions & 7 deletions sdk/python/feast/api/registry/rest/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,41 +65,54 @@ async def resource_counts(
project: Optional[str] = Query(
None, description="Project name to filter resource counts"
),
allow_cache: bool = Query(True),
):
def count_resources_for_project(project_name: str):
entities = grpc_call(
grpc_handler.ListEntities,
RegistryServer_pb2.ListEntitiesRequest(project=project_name),
RegistryServer_pb2.ListEntitiesRequest(
project=project_name, allow_cache=allow_cache
),
)
data_sources = grpc_call(
grpc_handler.ListDataSources,
RegistryServer_pb2.ListDataSourcesRequest(project=project_name),
RegistryServer_pb2.ListDataSourcesRequest(
project=project_name, allow_cache=allow_cache
),
)
try:
saved_datasets = grpc_call(
grpc_handler.ListSavedDatasets,
RegistryServer_pb2.ListSavedDatasetsRequest(project=project_name),
RegistryServer_pb2.ListSavedDatasetsRequest(
project=project_name, allow_cache=allow_cache
),
)
except Exception:
saved_datasets = {"savedDatasets": []}
try:
features = grpc_call(
grpc_handler.ListFeatures,
RegistryServer_pb2.ListFeaturesRequest(project=project_name),
RegistryServer_pb2.ListFeaturesRequest(
project=project_name, allow_cache=allow_cache
),
)
except Exception:
features = {"features": []}
try:
feature_views = grpc_call(
grpc_handler.ListFeatureViews,
RegistryServer_pb2.ListFeatureViewsRequest(project=project_name),
RegistryServer_pb2.ListFeatureViewsRequest(
project=project_name, allow_cache=allow_cache
),
)
except Exception:
feature_views = {"featureViews": []}
try:
feature_services = grpc_call(
grpc_handler.ListFeatureServices,
RegistryServer_pb2.ListFeatureServicesRequest(project=project_name),
RegistryServer_pb2.ListFeatureServicesRequest(
project=project_name, allow_cache=allow_cache
),
)
except Exception:
feature_services = {"featureServices": []}
Expand All @@ -118,7 +131,8 @@ def count_resources_for_project(project_name: str):
else:
# List all projects via gRPC
projects_resp = grpc_call(
grpc_handler.ListProjects, RegistryServer_pb2.ListProjectsRequest()
grpc_handler.ListProjects,
RegistryServer_pb2.ListProjectsRequest(allow_cache=allow_cache),
)
all_projects = [
p["spec"]["name"] for p in projects_resp.get("projects", [])
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/api/registry/rest/saved_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def list_saved_datasets(
saved_datasets = response.get("savedDatasets", [])

result = {
"saved_datasets": saved_datasets,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh i see. why this changed?

"savedDatasets": saved_datasets,
"pagination": response.get("pagination", {}),
}

Expand Down
30 changes: 15 additions & 15 deletions sdk/python/feast/protos/feast/core/DataFormat_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
Copyright 2020 The Feast Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

Copyright 2020 The Feast Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import builtins
Expand Down Expand Up @@ -81,7 +81,7 @@ class StreamFormat(google.protobuf.message.Message):

CLASS_PATH_FIELD_NUMBER: builtins.int
class_path: builtins.str
"""Classpath to the generated Java Protobuf class that can be used to decode
"""Classpath to the generated Java Protobuf class that can be used to decode
Feature data from the obtained stream message
"""
def __init__(
Expand All @@ -98,7 +98,7 @@ class StreamFormat(google.protobuf.message.Message):

SCHEMA_JSON_FIELD_NUMBER: builtins.int
schema_json: builtins.str
"""Optional if used in a File DataSource as schema is embedded in avro file.
"""Optional if used in a File DataSource as schema is embedded in avro file.
Specifies the schema of the Avro message as JSON string.
"""
def __init__(
Expand Down
26 changes: 13 additions & 13 deletions sdk/python/feast/protos/feast/core/DatastoreTable_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
* Copyright 2021 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and

* Copyright 2021 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
"""
import builtins
Expand Down
26 changes: 13 additions & 13 deletions sdk/python/feast/protos/feast/core/Entity_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and

* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
"""
import builtins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ else:
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

class FeatureViewProjection(google.protobuf.message.Message):
"""A projection to be applied on top of a FeatureView.
"""A projection to be applied on top of a FeatureView.
Contains the modifications to a FeatureView such as the features subset to use.
"""

Expand Down
26 changes: 13 additions & 13 deletions sdk/python/feast/protos/feast/core/OnDemandFeatureView_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
Copyright 2020 The Feast Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

Copyright 2020 The Feast Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
import builtins
Expand Down
26 changes: 13 additions & 13 deletions sdk/python/feast/protos/feast/core/Project_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and

* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
"""
import builtins
Expand Down
26 changes: 13 additions & 13 deletions sdk/python/feast/protos/feast/core/Registry_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and

* Copyright 2020 The Feast Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
"""
import builtins
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1824,16 +1824,19 @@ class GetFeatureRequest(google.protobuf.message.Message):
PROJECT_FIELD_NUMBER: builtins.int
FEATURE_VIEW_FIELD_NUMBER: builtins.int
NAME_FIELD_NUMBER: builtins.int
ALLOW_CACHE_FIELD_NUMBER: builtins.int
project: builtins.str
feature_view: builtins.str
name: builtins.str
allow_cache: builtins.bool
def __init__(
self,
*,
project: builtins.str = ...,
feature_view: builtins.str = ...,
name: builtins.str = ...,
allow_cache: builtins.bool = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["feature_view", b"feature_view", "name", b"name", "project", b"project"]) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["allow_cache", b"allow_cache", "feature_view", b"feature_view", "name", b"name", "project", b"project"]) -> None: ...

global___GetFeatureRequest = GetFeatureRequest
Loading
Loading