static spatiotemporal train/val/test splits for dataset

Open
#10,853 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python

Research direction

The issue proposes static spatiotemporal train, validation, and test splits for a large xarray dataset, with sample sizes, strides, holdout regions, and an optional land mask. Start by reviewing the existing prototype mentioned in the issue and determine where this functionality belongs. Done would be an agreed design and an implementation that returns coordinate dictionaries for each split.

Written by the indexing model from the issue text.

Description

enhancement
Is your feature request related to a problem?

Unable to create easy, good static splits for train val and test sets of an xarray dataset for Deep Learning

Describe the solution you'd like

Is your feature request related to a problem?
Hi everyone,

I’d like to open the discussion about adding functionality to create static spatiotemporal train, validation, and test splits from a single large xarray dataset (e.g., global-scale data).

The goal is to generate these splits based on:

The spatial and temporal size of each sample
The stride between samples
A list of user-defined validation and test regions (as static spatiotemporal holdouts)
Potentially a land mask, used to ignore samples which only contain ocean, or land data.
The expected output would be, for each split, a list of dictionaries containing the coordinates (start and end) of each slice. This structure would make it straightforward to iterate over samples in a dataloader.

Keeping the validation and test regions static is important to ensure consistent model evaluation and comparability across experiments.
I am already working on a prototype for this with my work, and wanted to open the discussion to gather feedback and seeing if and to which library this could be a contribution!

Describe alternatives you've considered

none, it doesnt exist yet

Additional context

No response

Dominant language
Python
Stars
4.2k
Forks
1.5k
Avg merge
2d 21h
Merged PRs (30d)
74

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pydata/xarray

All issues in pydata/xarray

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.