Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --reports argument to Index CLI #1211

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions graphrag/index/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@
default=None,
type=str,
)
parser.add_argument(
"--reports",
help="The reports directory to use for the pipeline.",
required=False,
default=None,
type=str,
)
args = parser.parse_args()

if args.resume and args.update_index:
Expand All @@ -115,4 +122,5 @@
init=args.init,
skip_validations=args.skip_validations,
output_dir=args.output,
reports_dir=args.reports,
)
3 changes: 2 additions & 1 deletion graphrag/index/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def index_cli(
dryrun: bool,
skip_validations: bool,
output_dir: str | None,
reports_dir: str | None,
):
"""Run the pipeline with the given config."""
progress_reporter = create_progress_reporter(reporter)
Expand All @@ -99,7 +100,7 @@ def index_cli(
config = load_config(root, config_filepath)

config.storage.base_dir = output_dir or config.storage.base_dir
config.reporting.base_dir = output_dir or config.reporting.base_dir
config.reporting.base_dir = reports_dir or config.reporting.base_dir
resolve_paths(config, run_id)

if nocache:
Expand Down