Skip to content

keying subset splits to identify test set #477

Description

@ethane4

Summary

It would be helpful to have some method for keying collections of splits ex. subset.slices['target_slice'] currently returns a list with no information on which slice is the test slice

Motivation

When we are doing anything other than k-fold splitting, we currently have no method for enforcing which split index should be dedicated to train. To avoid downstream issues, it would also be convenient to just key the split of interest from subset.slices['target_slice'] to avoid ambiguity

Proposed solution

  • First proposed solution: we add a name attribute to DatasetSlice that is either None in the case of k-fold CV splits, or train/val/test if a more principled split is being used. Users/downstream pipelines can check the names of all DatasetSlices in a given list of splits and act accordingly. (I think this would involve very minimal changes to pg-base, the generic pg-benchmark entrypoint, and dvc)

  • Second proposed solution: we swap the datatype of subset.slices['target_slice'] from list to dict. The dict keys are either integers in the k-fold split case, or 'train' 'test' 'val' in any other case. This would probably be cleaner for validation ex. checking there aren't more than one of each split type etc. but may require some changes to the split assignment functions in pg-base

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

PG-frameworkRelated to the Foundations/Framework paperrefineIssues with this tag needs refinement by team. Typically used to brain dump issues that pop up

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions