Upgrade python package (#42)

This commit is contained in:
Josh Bradley 2024-07-01 23:39:06 -04:00 committed by GitHub
parent 8cc83ff365
commit 04db7597d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 84 additions and 727 deletions

View File

@ -1,5 +0,0 @@
This graphrag wheel file was built from the following repo
https://github.com/microsoft/graphrag
on commit hash b860d08a907e834166edf03e617d9cfeac946a64

View File

@ -272,8 +272,6 @@ async def generate_prompts(storage_name: str, limit: int = 5):
this_directory = os.path.dirname(
os.path.abspath(inspect.getfile(inspect.currentframe()))
)
print("THIS DIRECTORY: ", this_directory)
print("CWD: ", os.getcwd())
# write custom settings.yaml to a file and store in a temporary directory
data = yaml.safe_load(open(f"{this_directory}/pipeline-settings.yaml"))
@ -281,7 +279,6 @@ async def generate_prompts(storage_name: str, limit: int = 5):
temp_dir = f"/tmp/{sanitized_storage_name}_prompt_tuning"
shutil.rmtree(temp_dir, ignore_errors=True)
os.makedirs(temp_dir, exist_ok=True)
print(f"TEMP SETTINGS DIR: {temp_dir}")
with open(f"{temp_dir}/settings.yaml", "w") as f:
yaml.dump(data, f, default_flow_style=False)
@ -306,9 +303,6 @@ async def generate_prompts(storage_name: str, limit: int = 5):
f"{temp_dir}/prompts" # will become a zip file with the name prompts.zip
)
shutil.make_archive(temp_archive, "zip", root_dir=temp_dir, base_dir="prompts")
print(f"ARCHIVE: {temp_archive}.zip")
for f in os.listdir(temp_dir):
print(f"FILE: {f}")
def iterfile(file_path: str):
with open(file_path, mode="rb") as file_like:

View File

@ -176,7 +176,7 @@ class CommunitySearchHelpers:
relationships=relationships, entities=entities, ranking_attribute="rank"
)
if covariate_df:
if covariate_df is not None:
claims = read_covariates(
df=covariate_df,
id_col="id",

View File

@ -529,7 +529,7 @@
"metadata": {},
"outputs": [],
"source": [
"generate_prompts(storage_name=storage_name, limit=5, zip_file_name=\"prompts.zip\")\n",
"generate_prompts(storage_name=storage_name, limit=1, zip_file_name=\"prompts.zip\")\n",
"with ZipFile(\"prompts.zip\", \"r\") as zip_ref:\n",
" zip_ref.extractall()"
]

792
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "graphrag-solution-accelerator"
version = "0.0.1"
version = "0.1.1"
description = ""
authors = [
"Josh Bradley <joshbradley@microsoft.com>",
@ -46,7 +46,7 @@ environs = ">=9.5.0"
fastapi = ">=0.110.0"
fastparquet = ">=2023.10.1"
fsspec = ">=2024.2.0"
graphrag = {path = "backend/graphrag-wheel/graphrag-0.0.1-py3-none-any.whl"}
graphrag = "==0.1.1"
graspologic = ">=3.3.0"
httpx = ">=0.25.2"
kubernetes = ">=29.0.0"