Skip to content

idea2story_pipeline.py keeps failing novelty index check even after successful rebuild #41

@ruizhengu

Description

@ruizhengu

Running idea2story_pipeline.py fails with a novelty index error, even though build_novelty_index.py reports a successful build.

Steps to Reproduce

  1. Run the main pipeline:
    python Paper-KG-Pipeline/scripts/idea2story_pipeline.py "idea"
    Output:
    ❌ 错误: Novelty index build failed or incomplete. Please run build_novelty_index.py manually. Traceback (most recent call last): File "/Idea2Paper/Paper-KG-Pipeline/scripts/idea2story_pipeline.py", line 348, in main ensure_required_indexes(logger) File "/Idea2Paper/Paper-KG-Pipeline/scripts/idea2story_pipeline.py", line 224, in ensure_required_indexes raise RuntimeError("Novelty index build failed or incomplete. Please run build_novelty_index.py manually.") RuntimeError: Novelty index build failed or incomplete. Please run build_novelty_index.py manually.
  2. Build the novelty index:
    python Paper-KG-Pipeline/scripts/tools/build_novelty_index.py
    Output:
    ✅ Index already exists. Use --force-rebuild to rebuild.
    Force-rebuild the novelty index:
    python Paper-KG-Pipeline/scripts/tools/build_novelty_index.py --force-rebuild
    Output:
    ✅ Build done. index_count=1501, skipped=6784 index_dir=/Idea2Paper/Paper-KG-Pipeline/output/novelty_index__voyage-4
  3. Run the main pipeline again:
    python Paper-KG-Pipeline/scripts/idea2story_pipeline.py "idea"
    Output:
    ❌ 错误: Novelty index build failed or incomplete. Please run build_novelty_index.py manually. Traceback (most recent call last): File "/Idea2Paper/Paper-KG-Pipeline/scripts/idea2story_pipeline.py", line 348, in main ensure_required_indexes(logger) File "/Idea2Paper/Paper-KG-Pipeline/scripts/idea2story_pipeline.py", line 224, in ensure_required_indexes raise RuntimeError("Novelty index build failed or incomplete. Please run build_novelty_index.py manually.") RuntimeError: Novelty index build failed or incomplete. Please run build_novelty_index.py manually.

Expected Behaviour

After successfully building (or force-rebuilding) the novelty index, idea2story_pipeline.py should detect the existing index and proceed without raising RuntimeError.

Actual Behavior

idea2story_pipeline.py always raises:
RuntimeError: Novelty index build failed or incomplete. Please run build_novelty_index.py manually.

Environment:

OS: macOS 26.2
Python version: 3.11.14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions