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

Corrections for KG SDK usage #1330

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Corrections for KG SDK usage #1330

merged 4 commits into from
Oct 4, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Oct 3, 2024

Important

Improves KG SDK by making functions asynchronous, refining input handling, updating data types, and enhancing error handling.

  • Behavior:
    • create_graph and enrich_graph functions in kg.py are now asynchronous.
    • Default run_type set to KGRunType.ESTIMATE if not provided in kg_router.py.
    • kg_creation_settings and kg_enrichment_settings default to empty dicts if not provided in kg.py and kg_router.py.
  • Data Types:
    • KGRunType changed to inherit from str in kg.py and abstractions/kg.py.
    • collection_id and run_type in KGMethods now accept Union[UUID, str] and Union[str, KGRunType] respectively.
  • Error Handling:
    • Added ValidationError import in kg_router.py for potential future use.
  • Misc:
    • Removed redundant JSON string conversion for settings in kg.py and kg_router.py.
    • Minor logging improvements in kg_router.py.

This description was created by Ellipsis for 0ad0827. It will automatically update as commits are pushed.

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yc_demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 11:31pm
yc-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 11:31pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
recommendation_platform ⬜️ Ignored (Inspect) Oct 3, 2024 11:31pm

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to fa6000e in 25 seconds

More details
  • Looked at 283 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. py/cli/commands/kg.py:109
  • Draft comment:
    Overwriting kg_enrichment_settings unconditionally when force_kg_enrichment is true may lead to loss of other settings. Consider updating the dictionary instead of overwriting it.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_JNmHC5M686NZ7Gu5


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

run_type = "run"
kg_creation_settings = {}

run_type = "run" if run else "estimate"

if force_kg_creation:
kg_creation_settings = {"force_kg_creation": True}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overwriting kg_creation_settings unconditionally when force_kg_creation is true may lead to loss of other settings. Consider updating the dictionary instead of overwriting it.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 830fa66 in 13 seconds

More details
  • Looked at 38 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_Axdq55B2P9OmCeHJ


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 0ad0827 in 17 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. py/cli/commands/kg.py:33
  • Draft comment:
    The create_graph function should be asynchronous as per the PR description. Use async def create_graph instead of def create_graph.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is based on the PR description, which is not visible in the code. The change in the function signature from 'async def' to 'def' suggests an intentional change. Without strong evidence from the code itself, the comment seems speculative.
    I might be missing the context of the PR description, which could provide a reason for the function to be asynchronous. However, the code change suggests a deliberate decision to make it synchronous.
    The code change itself is the strongest evidence we have, and it suggests the function should be synchronous. Without seeing the PR description, we should not assume it overrides the code change.
    Delete the comment as it is speculative and not based on strong evidence from the code itself.

Workflow ID: wflow_LuSYXpDMXFhAW4QF


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@emrgnt-cmplxty emrgnt-cmplxty merged commit 084b1fc into dev-minor Oct 4, 2024
6 of 8 checks passed
emrgnt-cmplxty added a commit that referenced this pull request Oct 4, 2024
* fix issues in compose (#1324)

* Update Hatchet compose setup (#1327)

* add ingest chunks workflows (#1329)

* add ingest chunks workflows

* finalize ingest chunks

* fix

* Allow for exclusion of postgres (#1328)

* update type checks (#1331)

* Limiting KG Creation Scheduling  (#1332)

* try

* up

* up

* space

* add it in ingestion

* rm ingestion

* up

* bump pkg

* add a global project config (#1333)

* Corrections for KG SDK usage (#1330)

* Corrections for KG SDK usage

* Clean up

* missed file

* Adding a completions endpoint (#1326)

* up

* rm unnecessary import

* add completion model

* up

* Update JS (#1335)

---------

Co-authored-by: Nolan Tremelling <[email protected]>
Co-authored-by: Shreyas Pimpalgaonkar <[email protected]>
@NolanTrem NolanTrem deleted the Nolan/KGSDKSettings branch October 4, 2024 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants