Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade python package #42

Merged
merged 5 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
5 changes: 0 additions & 5 deletions backend/graphrag-wheel/note.txt

This file was deleted.

6 changes: 0 additions & 6 deletions backend/src/api/index_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,13 @@ 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"))
data["input"]["container_name"] = sanitized_storage_name
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)

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion backend/src/meta_agent/community/retrieve.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def read_community_info(
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",
Expand Down
2 changes: 1 addition & 1 deletion notebooks/2-Advanced_Getting_Started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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()"
]
Expand Down
798 changes: 83 additions & 715 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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>",
Expand Down Expand Up @@ -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"
Expand Down
Loading