tlc.core.objects.table_view¶
A thin map-style view over a Table that applies a sample-level transform on read.
Module Contents¶
Classes¶
Class |
Description |
|---|---|
A map-style view over a |
API¶
- class TableView( )¶
A map-style view over a
Tablethat applies a sample-level transform on every read.Implements the
MapDatasetprotocol used bytlc.collect_metrics()and anytorch.utils.data.DataLoader. Not itself aTable: it has no schema, no persistence, and no object-registry identity. Itsurlforwards to the underlyingTableso metrics collected through it can be linked back to the source.Views compose: wrapping a
TableViewin anotherTableViewchains the transforms.sourceandurlalways resolve to the rootTable, regardless of chain depth.Construct via
Table.with_transform()or by chainingTableView.with_transform().- property source: Table¶
The root
Tableunderlying this view (walking through any chainedTableViewwrappers).Useful for sampler construction (e.g.
create_sampler(view.source, ...)).
- with_transform( ) TableView¶
Return a new
TableViewthat appliestransformon top of this view’s transform.- Parameters:
transform – A callable applied to each sample after this view’s transform has run. Must be picklable (top-level function or importable callable, not a
lambdaor local closure) when the view is consumed by atorch.utils.data.DataLoaderwithnum_workers > 0.- Returns:
A
TableViewchainingtransformon top of this view.