技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
read-datasets【数据与研究】Routes Petastorm dataset-reading workflows, including plain Python iteration, TensorFlow and PyTorch adapters, Spark RDD reads, row-group selection, NGrams, and throughput benchmarking.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when the user wants to open an existing Petastorm dataset or plain Parquet store and read samples back in Python, TensorFlow, PyTorch, or Spark. This route also owns predicates, sharding, row-group selectors, NGrams, shuffling, caching, and throughput measurement.
make_reader or make_batch_reader?"make_readermake_batch_readerReaderNGramWeightedSamplingReadertf_tensorsmake_petastorm_datasetDataLoader, BatchedDataLoader, and InMemBatchedDataLoaderdataset_as_rddpetastorm-throughput.pyUse sub-skills/create-datasets/ for those tasks.
Use sub-skills/spark-converter/ when the starting point is a Spark DataFrame cache.
references/workflows.md for end-to-end read recipesreferences/api-reference.md for verified signatures and semanticsreferences/cli-reference.md for the throughput CLIreferences/troubleshooting.md for import-order, metadata, and adapter failuresscripts/smoke_read_minimal_dataset.py for a tiny read-back smoke testscripts/smoke_read_plain_parquet.py for the plain Parquet batch-reader pathscripts/smoke_read_tensorflow.py when TensorFlow support needs a quick checkscripts/smoke_read_torch.py when PyTorch support needs a quick checkmake_reader for Petastorm datasets.make_batch_reader for plain Parquet stores or when batch output is acceptable.predicate, rowgroup_selector, shuffle_rows, shuffle_row_groups, or transform_spec.tf_tensors or make_petastorm_dataset for TensorFlow.DataLoader, BatchedDataLoader, or InMemBatchedDataLoader for PyTorch.NGram or WeightedSamplingReader.dataset_as_rdd or the throughput CLI.make_reader expects a Petastorm dataset and will warn if the store lacks Petastorm metadata.make_batch_reader is the route for non-Petastorm Parquet data.DataLoader and BatchedDataLoader are not interchangeable: the batched variant is optimized for tensorable fields and the in-memory variant is single-use.pyarrow before importing torch.num_epochs, not by repeating the dataset blindly.make_reader(dataset_url, ...).reader_pool_type='dummy' for the smallest deterministic smoke checks.make_batch_reader(dataset_url_or_urls, ...).schema_fields to the columns you actually need.tf_tensors(reader) or make_petastorm_dataset(reader).tf.Session() style loop.pyarrow before torch.DataLoader, BatchedDataLoader, or InMemBatchedDataLoader.petastorm-throughput.py with a real dataset URL.create-datasets.spark-converter.