技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
spark-converter【数据与研究】Routes Spark DataFrame conversion workflows that materialize cached parquet datasets and expose TensorFlow or PyTorch loaders through Petastorm.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when the starting point is a Spark DataFrame that should be materialized once and reused many times as a TensorFlow dataset
or a PyTorch DataLoader.
This route owns the converter cache, cache cleanup, filesystem normalization, and the Spark-side API surface around
make_spark_converter.
make_spark_converterSparkDatasetConvertermake_tf_datasetmake_torch_dataloadermake_reader and make_batch_reader workflowsUse sub-skills/create-datasets/ for writing new datasets.
Use sub-skills/read-datasets/ for consuming existing datasets directly.
references/workflows.md for converter setup and adapter recipesreferences/api-reference.md for verified signatures and cache behaviorreferences/troubleshooting.md for Spark, DBFS, cache, and optional backend failuresscripts/smoke_spark_converter.py for a tiny end-to-end conversion checkmake_spark_converter(df, ...).converter.make_tf_dataset(...).converter.make_torch_dataloader(...).converter.delete() or register a custom delete handler if the filesystem needs special treatment.SparkDatasetConverter.PARENT_CACHE_DIR_URL_CONF must be set before creating a converter.make_tf_dataset and make_torch_dataloader are context managers that close their readers when the context exits.petastorm.spark.converter.parentCacheDirUrl on the Spark session.make_spark_converter(df).converter.make_tf_dataset(...).batch_size, num_epochs, and shuffling_queue_capacity as needed.converter.make_torch_dataloader(...).batch_size, num_epochs, and shuffling_queue_capacity as needed.converter.delete() after the loader is no longer needed.create-datasets.read-datasets.