Skip to content

Commit

Permalink
Update readme Windows note
Browse files Browse the repository at this point in the history
Updated README.md note on use on Windows to indicate only main function needed, not also freeze_support. Also noted that llama index RelikPathExtractor / PropertyGraphIndex runs 8 times slower for me on Windows vs Linux
  • Loading branch information
stevereiner committed Sep 24, 2024
1 parent 588d0c3 commit 4eecc0d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,10 @@ Output:
)

### Note on use on Windows only
On Windows only, in your main starting file you need freeze_support() even if its just a python file (not the documented "only if frozen to produce an executable").
Otherwise you can get a RuntimeError: "An attempt has been made to start a new process before the current process has finished its bootstrapping phase."
Also need to have a main function:
On Windows only, in your main starting file you need to have code in a function.
Otherwise you can get a RuntimeError: "An attempt has been made to start a new process before the current process has finished its bootstrapping phase" or hang.
Looks like all you need is having the function structure. Don't need freeze_support() unless producing an executable on Windows as documented.
Note: Llamma Index RelikPathExtractor / PropertyGraphIndex.from_documents ran about 8 times slower on Windows vs Linux whether gpu or cpu. See [relik-llama](https://github.com/stevereiner/llama-relik)

```python
from relik import Relik
Expand All @@ -322,7 +323,7 @@ def main():
relik_out: RelikOutput = relik("Michael Jordan was one of the best players in the NBA.")

if __name__ == "__main__":
freeze_support()
#freeze_support()
main()
```

Expand Down

0 comments on commit 4eecc0d

Please sign in to comment.