DataGroupSpec#
- class coffea.dataset_tools.DataGroupSpec(root: RootModelRootType = PydanticUndefined)[source]#
Bases:
RootModel[dict[str, DatasetSpec]],MutableMappingAttributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].Total entries across all datasets, or None if any dataset's count is unknown.
Total selected entries across all datasets, or None if any is unknown.
Get the steps per dataset file, if available.
Methods Summary
filter_datasets([filter_name, filter_callable])Filter files by a regex pattern on the dataset names(filter_name) or callable applied to DatasetSpecs (filter_callable).
filter_files([filter_name, filter_callable])Filter files by a regex pattern on the file names(filter_name) or callable applied to Filespecs (filter_callable).
limit_files(max_files[, per_dataset])Limit the number of files.
limit_steps(max_steps[, per_file])Limit the steps
preprocess_data(data)Attributes Documentation
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- num_entries#
Total entries across all datasets, or None if any dataset’s count is unknown.
- num_selected_entries#
Total selected entries across all datasets, or None if any is unknown.
- steps#
Get the steps per dataset file, if available.
Methods Documentation
- filter_datasets(filter_name: str | None = None, filter_callable: Callable[[DatasetSpec], bool] | None = None) Self[source]#
Filter files by a regex pattern on the dataset names(filter_name) or callable applied to DatasetSpecs (filter_callable).
- filter_files(filter_name: str | None = None, filter_callable: Callable[[CoffeaROOTFileSpec | CoffeaParquetFileSpec | CoffeaROOTFileSpecOptional | CoffeaParquetFileSpecOptional], bool] | None = None) Self[source]#
Filter files by a regex pattern on the file names(filter_name) or callable applied to Filespecs (filter_callable).