Skip to content
Prev Previous commit
Next Next commit
[lint-python]
Signed-off-by: mehmettokgoz <mehmet.tokgoz@hazelcast.com>
Signed-off-by: Danny C <d.chiao@gmail.com>
  • Loading branch information
mehmettokgoz authored and adchia committed Sep 5, 2023
commit 1b4bf8d169a52928d45a88a136f76da7ae4719c7
5 changes: 1 addition & 4 deletions sdk/python/feast/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,10 +720,7 @@ def serve_command(
)
@click.pass_context
def listen_command(
ctx: click.Context,
address: str,
stream_feature_view: str,
push_mode: str
ctx: click.Context, address: str, stream_feature_view: str, push_mode: str
):
repo = ctx.obj["CHDIR"]
fs_yaml_file = ctx.obj["FS_YAML_FILE"]
Expand Down
16 changes: 11 additions & 5 deletions sdk/python/feast/infra/contrib/grpc_server.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
from feast.protos.feast.serving.GrpcServer_pb2 import GrpcIngestFeatureResponse
from feast.protos.feast.serving.GrpcServer_pb2_grpc import GrpcIngestFeatureServiceServicer, \
add_GrpcIngestFeatureServiceServicer_to_server
from concurrent import futures
Comment thread
adchia marked this conversation as resolved.

import grpc
import pandas as pd
from feast.feature_store import FeatureStore

from feast.data_source import PushMode
from feast.feature_store import FeatureStore
from feast.protos.feast.serving.GrpcServer_pb2 import GrpcIngestFeatureResponse
from feast.protos.feast.serving.GrpcServer_pb2_grpc import (
GrpcIngestFeatureServiceServicer,
add_GrpcIngestFeatureServiceServicer_to_server,
)


class GrpcIngestFeatureService(GrpcIngestFeatureServiceServicer):
Expand Down Expand Up @@ -37,7 +41,9 @@ def __init__(self, address, fs: FeatureStore, sfv_name, to):
self.fs = fs
self.sfv = sfv_name
self.server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
Comment thread
adchia marked this conversation as resolved.
Outdated
add_GrpcIngestFeatureServiceServicer_to_server(GrpcIngestFeatureService(self.fs, self.sfv, to), self.server)
add_GrpcIngestFeatureServiceServicer_to_server(
Comment thread
adchia marked this conversation as resolved.
Outdated
GrpcIngestFeatureService(self.fs, self.sfv, to), self.server
)
self.server.add_insecure_port(self.address)

def start(self):
Expand Down