Title: Performing I/O on instantiation · Issue #2697 · feast-dev/feast · GitHub
Open Graph Title: Performing I/O on instantiation · Issue #2697 · feast-dev/feast
X Title: Performing I/O on instantiation · Issue #2697 · feast-dev/feast
Description: Expected Behavior FeatureStore didn't use to perform any I/O on instantiation. This should be the expected behavior. As far as I can tell, all other abstractions follow this convention. Some examples include all implementations of Provid...
Open Graph Description: Expected Behavior FeatureStore didn't use to perform any I/O on instantiation. This should be the expected behavior. As far as I can tell, all other abstractions follow this convention. Some exampl...
X Description: Expected Behavior FeatureStore didn't use to perform any I/O on instantiation. This should be the expected behavior. As far as I can tell, all other abstractions follow this convention. Some ex...
Opengraph URL: https://github.com/feast-dev/feast/issues/2697
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Performing I/O on instantiation ","articleBody":"## Expected Behavior \r\n`FeatureStore` didn't use to perform any I/O on instantiation. This should be the expected behavior. As far as I can tell, all other abstractions follow this convention. Some examples include all implementations of `Provider`, `DataSource`, `RegistryStore`, `InfraObject`, and `RetrievalJob`.\r\n\r\nThis is also consistent with other python APIs such as Amazon's [boto3](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)\r\n```python\r\ns3 = boto3.client('s3') # no I/O; doesn't try to read credentials from config file on disk; etc\r\ns3.list_buckets() # explicit I/O operation\r\nbucket_policy = s3.BucketPolicy('bucket_name') # no I/O; doesn't verify if bucket exists\r\nbucket_policy.load() # explicit I/O operation\r\n```\r\n\r\nHowever this is not consistent across the [PEP 249](https://peps.python.org/pep-0249/) implementations. Trino doesn't perform any I/O. However, by default, the BigQuery SDK tries to load a credentials file from disk, the psycopg2 library tries to establish a valid connection, and sqlite3 will try to create or open a file database.\r\n\r\n## Current Behavior\r\n#2256 introduced the `self._registry._initialize_registry()` line to `FeatureStore`'s `__init__` method. This tries to fetch the registry's proto from the registry and fails if this does not exist or if the remote registry is not accessible from the current environment.\r\n\r\n## Steps to reproduce\r\n\r\n```pycon\r\n>>> store = FeatureStore(\r\n... config=RepoConfig(\r\n... project=\"foo\",\r\n... provider=\"local\",\r\n... registry=\"s3://my-bucket/registry.db\",\r\n... )\r\n... )\r\n[...]\r\n File \".venv/lib/python3.9/site-packages/botocore/signers.py\", line 103, in handler\r\n return self.sign(operation_name, request)\r\n File \".venv/lib/python3.9/site-packages/botocore/signers.py\", line 187, in sign\r\n auth.add_auth(request)\r\n File \".venv/lib/python3.9/site-packages/botocore/auth.py\", line 405, in add_auth\r\n raise NoCredentialsError()\r\nbotocore.exceptions.NoCredentialsError: Unable to locate credentials\r\n```\r\n\r\n### Specifications\r\n\r\n- Version: 0.20.2\r\n- Platform: macOS\r\n- Subsystem: \r\n\r\n## Possible Solution\r\n\r\nLazy load the registry's proto. I think this can be achieved by removing `self._registry._initialize_registry()` from the `__init__` method. Maybe @adchia @felixwang9817 can provide more context here. Also, interested in hearing your take on this.\r\n","author":{"url":"https://github.com/tpvasconcelos","@type":"Person","name":"tpvasconcelos"},"datePublished":"2022-05-15T22:36:19Z","url":"https://github.com/feast-dev/feast/issues/2697"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:54fa8401-40d8-e3ef-b403-e0d96935438b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B880:178215:735D8E:9B908D:6AFEABC7 |
| html-safe-nonce | b1f2f2bbf2d16106047592a38623f9f68b0613a2b77cc1ebc501d4f10eb27de2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCODgwOjE3ODIxNTo3MzVEOEU6OUI5MDhEOjZBRkVBQkM3IiwidmlzaXRvcl9pZCI6IjgyMDUxNjkwODUyOTQ0ODg1MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5dda0362454b62f4fe1b510a9e8611e59efc502ac0dfa682744dc4741771c0b3 |
| hovercard-subject-tag | issue:1236444153 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/feast-dev/feast/2697/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16925049953696ce67184f48eb32b54c6c12fd6a52daaa2f06fd64bdda4409ae/feast-dev/feast/issues/2697 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16925049953696ce67184f48eb32b54c6c12fd6a52daaa2f06fd64bdda4409ae/feast-dev/feast/issues/2697 |
| og:image:alt | Expected Behavior FeatureStore didn't use to perform any I/O on instantiation. This should be the expected behavior. As far as I can tell, all other abstractions follow this convention. Some exampl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tpvasconcelos |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95b2753c978240785d6cca00783c00a371b2d7d9879bb32e305170a1b19bd28e |
| turbo-cache-control | no-preview |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3f25273206cd841171bca0002261ae4c9757d934 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width