Creates a FeatureStore object. Args: repo_path (optional): Path to the feature repo. Defaults to the current working directory. config (optional): Configuration object used to configure the feature store. fs_yaml_file (optional): Path to the `fea
(
self,
repo_path: Optional[str] = None,
config: Optional[RepoConfig] = None,
fs_yaml_file: Optional[Path] = None,
)
| 163 | _feature_service_cache: Dict[str, List[str]] |
| 164 | |
| 165 | def __init__( |
| 166 | self, |
| 167 | repo_path: Optional[str] = None, |
| 168 | config: Optional[RepoConfig] = None, |
| 169 | fs_yaml_file: Optional[Path] = None, |
| 170 | ): |
| 171 | """ |
| 172 | Creates a FeatureStore object. |
| 173 | |
| 174 | Args: |
| 175 | repo_path (optional): Path to the feature repo. Defaults to the current working directory. |
| 176 | config (optional): Configuration object used to configure the feature store. |
| 177 | fs_yaml_file (optional): Path to the `feature_store.yaml` file used to configure the feature store. |
| 178 | At most one of 'fs_yaml_file' and 'config' can be set. |
| 179 | |
| 180 | Raises: |
| 181 | ValueError: If both or neither of repo_path and config are specified. |
| 182 | """ |
| 183 | if fs_yaml_file is not None and config is not None: |
| 184 | raise ValueError("You cannot specify both fs_yaml_file and config.") |
| 185 | |
| 186 | configure_ca_trust_store_env_variables() |
| 187 | |
| 188 | if repo_path: |
| 189 | self.repo_path = Path(repo_path) |
| 190 | else: |
| 191 | self.repo_path = Path(os.getcwd()) |
| 192 | |
| 193 | # If config is specified, or fs_yaml_file is specified, those take precedence over |
| 194 | # the default feature_store.yaml location under repo_path. |
| 195 | if config is not None: |
| 196 | self.config = config |
| 197 | elif fs_yaml_file is not None: |
| 198 | self.config = load_repo_config(self.repo_path, fs_yaml_file) |
| 199 | else: |
| 200 | self.config = load_repo_config( |
| 201 | self.repo_path, utils.get_default_yaml_file_path(self.repo_path) |
| 202 | ) |
| 203 | |
| 204 | # Initialize lazy-loaded components as None |
| 205 | self._registry = None |
| 206 | self._provider = None |
| 207 | self._openlineage_emitter = None |
| 208 | |
| 209 | # Initialize feature service cache for performance optimization |
| 210 | self._feature_service_cache = {} |
| 211 | |
| 212 | # Cache for _resolve_feature_service_name lookups |
| 213 | self._fs_name_cache: Dict[frozenset, Optional[str]] = {} |
| 214 | self._fs_name_index: Dict[frozenset, str] = {} |
| 215 | self._fs_name_index_ts: float = -self._FS_NAME_INDEX_TTL_SECONDS |
| 216 | |
| 217 | self._mlflow_client: Any = _UNSET |
| 218 | |
| 219 | def _init_mlflow(self) -> Optional[Any]: |
| 220 | """Bootstrap MLflow integration on first access. |
nothing calls this directly
no test coverage detected