Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify Datasource #103

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

Conversation

mdr223
Copy link
Collaborator

@mdr223 mdr223 commented Feb 3, 2025

This PR covers changes which simplify the use of the DataSource class for:

  1. Users writing programs (especially with validation data), and
  2. The internal management of DataSources in PZ

The primary changes I made were to:

  1. Reduce the three data source classes (DataSource, AbstractDataSource, and ValidationDataSource) down to a single DataSource class
  2. Limit the number of methods the user needs to implement to just __len__() and get_item()

This in turn led to a number of other changes / simplifications in the code including:

  1. Using datasource directly in the scan operators (both logical and physical) instead of dataset_id
  2. Changing source_id --> source_idx everywhere (this eliminated some weird renaming logic)
  3. And various other small fixes which resulted from these changes

Finally, I added a large set of documentation for the DataSource class(es)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant