graphrag icon indicating copy to clipboard operation
graphrag copied to clipboard

fix - in run_local_search(), avoid re-reading create_final_nodes.parquet file

Open ksachdeva opened this issue 1 year ago • 1 comments

Description

The file create_final_nodes.parquet is being read twice in run_local_search function in query component

Checklist

  • [x] I have tested these changes locally.
  • [x] I have reviewed the code changes.
  • [ ] I have updated the documentation (if necessary).
  • [ ] I have added appropriate unit tests (if applicable).

ksachdeva avatar Jul 16 '24 21:07 ksachdeva

LGTM

duanxinhuan avatar Jul 17 '24 07:07 duanxinhuan

Please run poetry run semversioner add-change -t patch -d "remove duplicate file read" and add/commit the generated json file to the repo. Feel free to modify the message commit message if you wish.

This will allow the PR to pass the Semver Check.

jgbradley1 avatar Jul 24 '24 11:07 jgbradley1

Looks like there is some trailing whitespace. Please run ruff format . --check --preview and re-comit the cli.py file. I tried to do it myself but did not have permissions to push the change to your fork.

jgbradley1 avatar Jul 24 '24 17:07 jgbradley1

I think you just ran ruff format on the file. It needs the --preview flag for proper formatting or else our ci/cd pipeline will flag it. ruff format graphrag/query/cli.py --preview should fix the file.

jgbradley1 avatar Jul 24 '24 18:07 jgbradley1

Thank you @ksachdeva for your contribution and your patience! We have a minor issue with the cicd pipeline but it did pass the formatting checks so I will go ahead and merge.

jgbradley1 avatar Jul 24 '24 19:07 jgbradley1