microsoft / graphrag

A modular graph-based Retrieval-Augmented Generation (RAG) system
https://microsoft.github.io/graphrag/
MIT License
12.11k stars 984 forks source link

datashaper.AsyncType not found #445

Closed myan-o closed 1 week ago

myan-o commented 1 week ago

from datashaper import AsyncType

Import Error: cannot import name 'AsyncType'

try in termux

AlonsoGuevara commented 1 week ago

Hi @myan-o Are you running from pip or are you building the source code? datashaper = "^0.0.49" has support for the AsyncType enum, so I would suggest to double check which version of the lib you have installed, and either rerunning pip install or poetry install

myan-o commented 1 week ago

I am trying to install on termux.

i installed datashaper = "^0.0.49"  from github source code.

AsyncType does not exist even if I search the datashaper source code. Is it automatically generated somehow?

myan-o commented 1 week ago
(graphrag-py3.11) [u0_a335 datashaper]$ ag -
R Async /data/data/com.termux/files/home/.ca
che/pypoetry/virtualenvs/graphrag-1-DCWpPl-p
y3.11/lib/python3.11/site-packages/datashape
r
/data/data/com.termux/files/home/.cache/pypo
etry/virtualenvs/graphrag-1-DCWpPl-py3.11/li
b/python3.11/site-packages/datashaper/__init
__.py
14:from .utils.parallelization import AsyncS
trategy, derive_from_rows
106:    "AsyncStrategy",

/data/data/com.termux/files/home/.cache/pypo
etry/virtualenvs/graphrag-1-DCWpPl-py3.11/li
b/python3.11/site-packages/datashaper/utils/
parallelization/__init__.py
6:from .types import AsyncStrategy
9:    "AsyncStrategy",

/data/data/com.termux/files/home/.cache/pypo
etry/virtualenvs/graphrag-1-DCWpPl-py3.11/li
b/python3.11/site-packages/datashaper/utils/
parallelization/derive_from_rows.py
13:from .types import AsyncStrategy
24:    scheduling_type: AsyncStrategy = Asyn
cStrategy.AsyncIO,
28:        case AsyncStrategy.AsyncIO:
32:        case AsyncStrategy.Threaded:

/data/data/com.termux/files/home/.cache/pypo
etry/virtualenvs/graphrag-1-DCWpPl-py3.11/li
b/python3.11/site-packages/datashaper/utils/
parallelization/types.py
6:class AsyncStrategy(str, Enum):
9:    AsyncIO = "asyncio"

/data/data/com.termux/files/home/.cache/pypo
etry/virtualenvs/graphrag-1-DCWpPl-py3.11/li
b/python3.11/site-packages/datashaper/verbs/
decorators/parallel_verb.py
21:from datashaper.utils.parallelization imp
ort AsyncStrategy
64:    asyncio_type: AsyncStrategy = AsyncSt
rategy.AsyncIO,
144:            if asyncio_type == AsyncStra
tegy.Threaded:
myan-o commented 1 week ago

There was no AsyncType defined in the datashaper master branch. It was in the workflow branch.