From 630ea02a2a4e0afd0329880f3a5c61d87ca689fa Mon Sep 17 00:00:00 2001 From: Alonso Guevara Date: Tue, 20 Aug 2024 11:39:40 -0600 Subject: [PATCH] Remove unnecessary E2E test, and add skip_validations flag to cli --- .github/workflows/python-smoke-tests.yml | 11 ----------- graphrag/index/__main__.py | 6 ++++++ graphrag/index/cli.py | 4 +++- scripts/e2e-test.sh | 4 ---- 4 files changed, 9 insertions(+), 16 deletions(-) delete mode 100755 scripts/e2e-test.sh diff --git a/.github/workflows/python-smoke-tests.yml b/.github/workflows/python-smoke-tests.yml index 8afcccb9d2..47b975dbe9 100644 --- a/.github/workflows/python-smoke-tests.yml +++ b/.github/workflows/python-smoke-tests.yml @@ -102,14 +102,3 @@ jobs: with: name: smoke-test-artifacts-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ runner.os }} path: tests/fixtures/*/output - - - name: E2E Test - if: steps.changes.outputs.python == 'true' - run: | - ./scripts/e2e-test.sh - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: e2e-test-artifacts-${{ matrix.python-version }}-${{ matrix.poetry-version }}-${{ runner.os }} - path: examples/*/output diff --git a/graphrag/index/__main__.py b/graphrag/index/__main__.py index 06c2d81a57..0530290a63 100644 --- a/graphrag/index/__main__.py +++ b/graphrag/index/__main__.py @@ -68,6 +68,11 @@ help="Overlay default configuration values on a provided configuration file (--config).", action="store_true", ) + parser.add_argument( + "--skip-validations", + help="Skip any preflight validation. Useful when running no LLM steps.", + action="store_true", + ) args = parser.parse_args() if args.overlay_defaults and not args.config: @@ -85,4 +90,5 @@ dryrun=args.dryrun or False, init=args.init or False, overlay_defaults=args.overlay_defaults or False, + skip_validations=args.skip_validations or False, ) diff --git a/graphrag/index/cli.py b/graphrag/index/cli.py index 7e5a0ec2a2..764920271e 100644 --- a/graphrag/index/cli.py +++ b/graphrag/index/cli.py @@ -118,6 +118,7 @@ def index_cli( emit: str | None, dryrun: bool, overlay_defaults: bool, + skip_validations: bool, ): """Run the pipeline with the given config.""" progress_reporter = load_progress_reporter(reporter or "rich") @@ -154,7 +155,8 @@ def index_cli( True, ) - validate_config_names(progress_reporter, default_config) + if skip_validations: + validate_config_names(progress_reporter, default_config) info(f"Starting pipeline run for: {run_id}, {dryrun=}", verbose) info( diff --git a/scripts/e2e-test.sh b/scripts/e2e-test.sh deleted file mode 100755 index 5c260a148b..0000000000 --- a/scripts/e2e-test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash - -# Use CLI Form -poetry run python -m graphrag.index --config ./examples/single_verb/pipeline.yml \ No newline at end of file