Gardenia-zx opened a new pull request, #323: URL: https://github.com/apache/hugegraph-ai/pull/323
## Purpose This PR handles the empty examples case in `BuildGremlinExampleIndex`. Previously, when `examples` was empty, `run()` could access `examples_embedding[0]` and raise an `IndexError`. ## Changes - Return early when `examples` is empty. - Return early when generated embeddings are empty. - Update the unit test to verify that no embedding or vector index operation is triggered for empty examples. - Adjust the mock target to avoid coroutine warnings in tests. ## Tests ```bash uv run pytest src/tests/operators/index_op/test_build_gremlin_example_index.py -v -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
