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

Emrgnt cmplxty patch 1 #253

Merged
merged 2 commits into from
Mar 31, 2024
Merged

Emrgnt cmplxty patch 1 #253

merged 2 commits into from
Mar 31, 2024

Conversation

emrgnt-cmplxty
Copy link
Contributor

@emrgnt-cmplxty emrgnt-cmplxty commented Mar 31, 2024

Ellipsis 🚀 This PR description was created by Ellipsis for commit bb4af63.

Summary:

This PR enhances the application's performance by enabling multi-worker processes in the Dockerfile and improves error handling in the initialization of the Client class in client.py.

Key points:

  • Updated /Dockerfile to include --workers flag in CMD command
  • Added exception handling in __init__ method of Client class in /r2r/vecs/client.py

Generated with ❤️ by ellipsis.dev

Copy link

vercel bot commented Mar 31, 2024

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

Name Status Preview Updated (UTC)
r2r-docs 🔄 Building (Inspect) Visit Preview Mar 31, 2024 8:53pm

@emrgnt-cmplxty emrgnt-cmplxty marked this pull request as ready for review March 31, 2024 20:53
@emrgnt-cmplxty emrgnt-cmplxty merged commit f9420c0 into main Mar 31, 2024
1 of 2 checks passed
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 the entire pull request up to bb4af63
  • Looked at 48 lines of code in 2 files
  • Took 48 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 0 additional comments because they didn't meet confidence threshold of 50%.

Workflow ID: wflow_BYPpzDT5iBV2Msas


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. We'll respond in a few minutes. Learn more here.

CMD ["uvicorn", "r2r.examples.basic.app:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "8"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider making the number of workers configurable instead of hard-coding it to 8. This can be done by using an environment variable.

sess.execute(text("create schema if not exists vecs;"))
except Exception as e:
if "already exists" not in str(e):
raise ValueError(
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider raising a more specific exception type or a custom exception instead of ValueError. ValueError is typically used for different kinds of issues.

raise ValueError(
f"Error {e} occurred while creating the 'vector' extension."
)

def _supports_hnsw(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

The removal of the line that fetches the 'vector' extension version might cause an AttributeError in the '_supports_hnsw' method. Consider adding it back.

emrgnt-cmplxty added a commit that referenced this pull request Mar 31, 2024
emrgnt-cmplxty added a commit that referenced this pull request Mar 31, 2024
@emrgnt-cmplxty emrgnt-cmplxty deleted the emrgnt-cmplxty-patch-1 branch April 1, 2024 07:07
iCUE-Solutions pushed a commit to DeweyLearn/DeweyLearnR2R that referenced this pull request Jul 18, 2024
* Update Dockerfile

* Update client.py
iCUE-Solutions pushed a commit to DeweyLearn/DeweyLearnR2R that referenced this pull request Jul 18, 2024
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.

1 participant