Skip to content

Big renaming and cleanups#45

Open
jpc wants to merge 10 commits intojpc/modal-shardsfrom
jpc/big-renaming
Open

Big renaming and cleanups#45
jpc wants to merge 10 commits intojpc/modal-shardsfrom
jpc/big-renaming

Conversation

@jpc
Copy link
Member

@jpc jpc commented Feb 13, 2026

Renaming things to be more consistent, better tests and docstrings, better documentation.

jpc and others added 10 commits February 11, 2026 20:25
- Add old/new index format detection (partition vs dataset_path columns)
- Add _partition_col property for unified SQL partition expression
- Add lookup_by_index() and lookup_by_key() methods to WSIndex
- Add shard_n_samples() and shard_global_offset() via _query_shard() helper
- Simplify WSDataset.__getitem__ to delegate to WSIndex lookups
- Replace all raw index.query() calls in WSDataset with WSIndex methods
- Update ws_tools.py to use new format detection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Extract is_notebook() from convplayer.py into utils.py (simplified)
- Remove redundant _ipython_display_ from AudioReader and WSAudio
  (IPython already calls _repr_html_ automatically)
- Add is_notebook() guard to WSDataset and WSSample _ipython_display_
  so they fall back to print() in terminal IPython sessions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- subdir → column_dir (utils, ws_sample, ws_modal_shard)
- shard_name → shard_ref on shard interfaces and WSSample
- dataset_path → partition in index and shard code
- dataset_dir → dataset_root in ws_indexer

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Centralizes audio column lookup logic so it can be reused outside
of WSSample (e.g. from plain dicts or other sample types).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows passing rng=42 (or a Random instance) to get deterministic
sample ordering in random_sample() and sql_select(). Also removes
unused needs_key variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remap hume_wsds.* loader paths to wsds.* for backward compatibility
  with old index files that reference the former package name
- Use pl.first() instead of exprs[0] in sql_filter for correctness

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add comprehensive docstring to __init__.py with working doctests
  showcasing SQL queries, random access, lazy loading, and audio
- Fix ws_dataset.py doctests (AudioReader src type, add shard_subsample=1)
- Fix ws_sink.py doctest (remove invalid batch_size param)
- Update tests.py to run wsds module doctests and fix imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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