计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
serialization【效率与协作】Save, load, and share BERTopic models locally or on the Hugging Face Hub with safe format and dependency choices.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about persisting an already fitted BERTopic model, reloading it locally, or publishing/loading it through the Hugging Face Hub.
BERTopic.save(...) and BERTopic.load(...) workflows.serialization="safetensors", serialization="pytorch", and serialization="pickle".save_ctfidf=True for topic-term inspection after reload.save_embedding_model: a lightweight model pointer, omitting the backend, or reinjecting a backend at load time.BERTopic.push_to_hf_hub(...) and Hub loading with BERTopic.load("namespace/repo").BERTopic.merge_models(...), such as missing torch or safetensors; route the model-combination decision itself to topic-modeling.references/api-reference.md for save/load/push signatures, format behavior, local file layout, and load-path resolution.references/workflows.md for local exact round trips, portable lightweight saves, embedding-model restoration, Hub upload/load, and local-vs-Hub decisions.references/troubleshooting.md for import failures, optional dependency errors, invalid paths, credential issues, embedding-backend gaps, and version/security warnings.scripts/smoke_serialization.py for a tiny local-only smoke check of pickle plus a lightweight format when the BERTopic runtime dependencies are available.pickle is the most complete format because it stores the full BERTopic object, including dimensionality-reduction and clustering sub-models.safetensors with save_ctfidf=True when topic-term inspection after reload matters.safetensors is unavailable but torch is already an accepted dependency, use pytorch; it creates the same lightweight directory style with .bin weights.transform(...) calls should work without passing embeddings=, save a SentenceTransformer-compatible model id with save_embedding_model="sentence-transformers/..." or pass a freshly constructed backend to BERTopic.load(..., embedding_model=...).push_to_hf_hub(...) only after confirming huggingface_hub is installed and the process is authenticated or has a token./, BERTopic treats it as a Hub repo id.push_to_hf_hub(...) and BERTopic.load("namespace/repo") require Hub-oriented dependencies and network/auth conditions.transform(...) behavior.