feat(dataset): Enable versioned access and S3 credential caching - #263
Merged
briangreunke merged 1 commit intoDec 11, 2025
Conversation
briangreunke
deleted the
brian/eng-3708-feat-sdk-updates-for-loading-datasets-by-version
branch
December 11, 2025 14:54
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces the ability to load datasets by a specific version. It also implements S3 credential caching within the
DatasetManagerto optimize performance by reducing redundant API calls for temporary S3 credentials. Additionally, it includes minor refactoring for clarity and consistency across the dataset loading workflow.Changes
Features
ApiClient.get_dataset_access_credentialsmethod now accepts aversionparameter, allowing for the retrieval of S3 credentials specific to a dataset version.DatasetDownloadRequestmodel has been updated to require aversionstring, ensuring that all download requests are version-aware. The default "latest" is now handled at the call site withinDatasetManager.get_remote_load_uri.DatasetManager.get_remote_load_uriandDatasetManager.get_s3_confighave been modified to pass the requested dataset version to the API, enabling version-specific URI generation and credential retrieval.load_datasetfunction indreadnode/dataset.pynow leverages these version-awareDatasetManagermethods to support loading datasets by their specified version.DatasetManager.get_remote_load_urimethod now stores thepafs.S3FileSystemobject and its associated credentials' expiration time (_credentials_expiry). This lays the groundwork for reusing an active S3 filesystem, reducing the overhead of repeatedly fetching new temporary S3 credentials from the API.Refactoring & Improvements
fsmparameter indreadnode/dataset.py::load_datasetand its call site indreadnode/main.py::Dreadnode.load_dataset_from_diskhas been renamed todataset_managerfor improved clarity and consistency._ensure_version_bumphas been changed fromprint_infotoprint_warningto better reflect the significance of data changes triggering a new version.ApiClient.download_datasetmethod has been slightly refactored to pass theversionqueryGenerated Summary:
get_dataset_access_credentialsmethod inApiClientto now require aversionparameter.DatasetDownloadRequestmodel to require aversionstring instead of allowing None.DatasetManagerto reflect the new naming convention for the parameter fromfsmtodataset_managerfor clarity.print_infotoprint_warningto better reflect the significance of the version change.get_remote_load_urito handle version defaulting internally, ensuring backward compatibility with existing code.This summary was generated with ❤️ by rigging