FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
feast/sdk/python/feast/cli/feature_services.py at v0.65.0 · feast-dev/feast · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
feast-dev
/
feast
Public
Notifications
You must be signed in to change notification settings
Fork
1.4k
Star
7.2k
Code
Issues
218
Pull requests
191
Discussions
Actions
Security and quality
1
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
cli
/
feature_services.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
62 lines (51 loc) · 1.66 KB
Breadcrumbs
feast
/
sdk
/
python
/
feast
/
cli
/
feature_services.py
Copy path
File metadata and controls
62 lines (51 loc) · 1.66 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import
click
import
yaml
from
feast
import
utils
from
feast
.
cli
.
cli_options
import
tagsOption
from
feast
.
errors
import
FeastObjectNotFoundException
from
feast
.
repo_operations
import
create_feature_store
@
click
.
group
(
name
=
"feature-services"
)
def
feature_services_cmd
():
"""
Access feature services
"""
pass
@
feature_services_cmd
.
command
(
"describe"
)
@
click
.
argument
(
"name"
,
type
=
click
.
STRING
)
@
click
.
pass_context
def
feature_service_describe
(
ctx
:
click
.
Context
,
name
:
str
):
"""
Describe a feature service
"""
store
=
create_feature_store
(
ctx
)
try
:
feature_service
=
store
.
get_feature_service
(
name
)
except
FeastObjectNotFoundException
as
e
:
print
(
e
)
exit
(
1
)
print
(
yaml
.
dump
(
yaml
.
safe_load
(
str
(
feature_service
)),
default_flow_style
=
False
,
sort_keys
=
False
,
)
)
@
feature_services_cmd
.
command
(
name
=
"list"
)
@
tagsOption
@
click
.
pass_context
def
feature_service_list
(
ctx
:
click
.
Context
,
tags
:
list
[
str
]):
"""
List all feature services
"""
store
=
create_feature_store
(
ctx
)
feature_services
=
[]
tags_filter
=
utils
.
tags_list_to_dict
(
tags
)
for
feature_service
in
store
.
list_feature_services
(
tags
=
tags_filter
):
feature_names
=
[]
for
projection
in
feature_service
.
feature_view_projections
:
feature_names
.
extend
(
[
f"
{
projection
.
name
}
:
{
feature
.
name
}
"
for
feature
in
projection
.
features
]
)
feature_services
.
append
([
feature_service
.
name
,
", "
.
join
(
feature_names
)])
from
tabulate
import
tabulate
print
(
tabulate
(
feature_services
,
headers
=
[
"NAME"
,
"FEATURES"
],
tablefmt
=
"plain"
))
Back
|
FazBrowse Home
|
New Git URL