MCPcopy
hub / github.com/feast-dev/feast / RegistryConfig

Class RegistryConfig

sdk/python/feast/repo_config.py:162–218  ·  view source on GitHub ↗

Metadata Store Configuration. Configuration that relates to reading from and writing to the Feast registry.

Source from the content-addressed store, hash-verified

160
161
162class RegistryConfig(FeastBaseModel):
163 """Metadata Store Configuration. Configuration that relates to reading from and writing to the Feast registry."""
164
165 registry_type: StrictStr = "file"
166 """ str: Provider name or a class name that implements Registry."""
167
168 registry_store_type: Optional[StrictStr] = None
169 """ str: Provider name or a class name that implements RegistryStore. """
170
171 path: StrictStr = ""
172 """ str: Path to metadata store.
173 If registry_type is 'file', then an be a local path, or remote object storage path, e.g. a GCS URI
174 If registry_type is 'sql', then this is a database URL as expected by SQLAlchemy """
175
176 cache_ttl_seconds: StrictInt = 600
177 """int: The cache TTL is the amount of time registry state will be cached in memory. If this TTL is exceeded then
178 the registry will be refreshed when any feature store method asks for access to registry state. The TTL can be
179 set to infinity by setting TTL to 0 seconds, which means the cache will only be loaded once and will never
180 expire. Users can manually refresh the cache by calling feature_store.refresh_registry() """
181
182 cache_mode: StrictStr = "sync"
183 """str: Cache mode type. Possible options are 'sync' (immediate refresh after each write operation) and
184 'thread' (asynchronous background refresh at cache_ttl_seconds intervals). In 'sync' mode, registry changes
185 are immediately visible. In 'thread' mode, changes may take up to
186 cache_ttl_seconds to be visible."""
187
188 s3_additional_kwargs: Optional[Dict[str, str]] = None
189 """ Dict[str, str]: Extra arguments to pass to boto3 when writing the registry file to S3. """
190
191 purge_feast_metadata: StrictBool = False
192 """ bool: Stops using feast_metadata table and delete data from feast_metadata table.
193 Once this is set to True, it cannot be reverted back to False. Reverting back to False will
194 only reset the project but not all the projects"""
195
196 enable_online_feature_view_versioning: StrictBool = False
197 """ bool: Enable versioned online store tables and version-qualified reads
198 (e.g., 'fv@v2:feature'). When True, each schema version gets its own
199 online store table and can be queried independently. Version history
200 tracking in the registry is always active regardless of this setting. """
201
202 mcp: Optional[McpRegistryConfig] = None
203 """ McpRegistryConfig: MCP (Model Context Protocol) configuration for the registry REST server. """
204
205 @field_validator("path")
206 def validate_path(cls, path: str, values: ValidationInfo) -> str:
207 if values.data.get("registry_type") == "sql":
208 if path.startswith("postgresql://"):
209 _logger.warning(
210 "The `path` of the `RegistryConfig` starts with a plain "
211 "`postgresql` string. We are updating this to `postgresql+psycopg` "
212 "to ensure that the `psycopg3` driver is used by `sqlalchemy`. If "
213 "you want to use `psycopg2` pass `postgresql+psycopg2` explicitely "
214 "to `path`. To silence this warning, pass `postgresql+psycopg` "
215 "explicitely to `path`."
216 )
217 return path.replace("postgresql://", "postgresql+psycopg://")
218 return path
219

Callers 15

registryFunction · 0.90
_make_storeMethod · 0.90
local_registryFunction · 0.90
gcs_registryFunction · 0.90
s3_registryFunction · 0.90
minio_registryFunction · 0.90
hdfs_registryFunction · 0.90
mock_remote_registryFunction · 0.90
test_commitFunction · 0.90

Calls

no outgoing calls

Tested by 15

registryFunction · 0.72
_make_storeMethod · 0.72
local_registryFunction · 0.72
gcs_registryFunction · 0.72
s3_registryFunction · 0.72
minio_registryFunction · 0.72
hdfs_registryFunction · 0.72
mock_remote_registryFunction · 0.72
test_commitFunction · 0.72