Skip to content
This repository has been archived by the owner on Jan 14, 2025. It is now read-only.

Ensembles can now track a group of labeled frames #217

Merged
merged 1 commit into from
Aug 31, 2023

Conversation

wilsonbb
Copy link
Collaborator

@wilsonbb wilsonbb commented Aug 30, 2023

Provides methods for an Ensemble to track EnsembleFrames (a subclass of Dask Dataframes), supporting functionality to add, update, drop, select, and print info about the frames.

Each EnsembleFrame object is tracked by a user-provided string label. However "source" and "object" are reserved labels for the respective source and object tables. Though these are not currently populated by the Ensemble loader functions, we go ahead and prevent the user from adding, updating, or removing frames tracked with those reserved labels.

This functionality was proposed in issue #193.

Copy link
Collaborator

@dougbrn dougbrn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, this looks good!

raise ValueError(
f"Unable to update frame with no populated `EnsembleFrame.label`."
)
if frame.label == SOURCE_FRAME_LABEL or frame.label == OBJECT_FRAME_LABEL:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, we will probably want to update this to check if the frame to be updated is an instance of an ObjectFrame or SourceFrame, we may want to allow users to update in that case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that makes sense to me!

@wilsonbb wilsonbb merged commit 1cd049e into tape_ensemble_refactor Aug 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EnsembleFrame Refactor Milestone 2: Add Ensemble Functionality for EnsembleFrame objects
2 participants