← 返回首页
fix: Using repo_config parameter in teardown to allow for feature-store-yaml overrides by danbaron63 · Pull Request #4413 · feast-dev/feast · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (3) All 1 file type selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
  • sdk/python
    • feast
    • tests/integration/feature_repos/universal/data_sources
      • file.py
2 changes: 1 addition & 1 deletion sdk/python/feast/repo_operations.py
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ def apply_total(repo_config: RepoConfig, repo_path: Path, skip_source_validation

def teardown(repo_config: RepoConfig, repo_path: Optional[str]):
# Cannot pass in both repo_path and repo_config to FeatureStore.
feature_store = FeatureStore(repo_path=repo_path, config=None)
feature_store = FeatureStore(repo_path=repo_path, config=repo_config)
feature_store.teardown()


Expand Down
9 changes: 4 additions & 5 deletions sdk/python/feast/transformation/pandas_transformation.py
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from types import FunctionType
from typing import Any
from typing import Any, Callable

import dill
import pandas as pd
Expand All @@ -15,7 +14,7 @@


class PandasTransformation:
def __init__(self, udf: FunctionType, udf_string: str = ""):
def __init__(self, udf: Callable[[Any], Any], udf_string: str = ""):
"""
Creates an PandasTransformation object.

Expand All @@ -30,11 +29,11 @@ def __init__(self, udf: FunctionType, udf_string: str = ""):
def transform_arrow(
self, pa_table: pyarrow.Table, features: list[Field]
) -> pyarrow.Table:
output_df_pandas = self.udf.__call__(pa_table.to_pandas())
output_df_pandas = self.udf(pa_table.to_pandas())
return pyarrow.Table.from_pandas(output_df_pandas)

def transform(self, input_df: pd.DataFrame) -> pd.DataFrame:
return self.udf.__call__(input_df)
return self.udf(input_df)

def infer_features(self, random_input: dict[str, list[Any]]) -> list[Field]:
df = pd.DataFrame.from_dict(random_input)
Expand Down
Show comments View file Edit file Delete file Open in desktop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import tempfile
import uuid
from pathlib import Path
from subprocess import Popen
from typing import Any, Dict, List, Optional

import pandas as pd
Expand Down Expand Up @@ -367,7 +368,7 @@ class RemoteOfflineStoreDataSourceCreator(FileDataSourceCreator):
def __init__(self, project_name: str, *args, **kwargs):
super().__init__(project_name)
self.server_port: int = 0
self.proc = None
self.proc: Optional[Popen[bytes]] = None

def setup(self, registry: RegistryConfig):
parent_offline_config = super().create_offline_store_config()
Expand All @@ -382,13 +383,13 @@ def setup(self, registry: RegistryConfig):
repo_path = Path(tempfile.mkdtemp())
with open(repo_path / "feature_store.yaml", "w") as outfile:
yaml.dump(config.model_dump(by_alias=True), outfile)
repo_path = str(repo_path.resolve())
repo_path = repo_path.resolve()

self.server_port = free_port()
host = "0.0.0.0"
cmd = [
"feast",
"-c" + repo_path,
"-c" + str(repo_path),
Comment thread
danbaron63 marked this conversation as resolved.
Show resolved Hide resolved
"serve_offline",
"--host",
host,
Expand Down
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.