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

Feature/add redis config option #176

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Conversation

emrgnt-cmplxty
Copy link
Contributor

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

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

Summary:

This PR introduces the ability to save and load configurations from Redis in the R2RConfig class, and includes minor cleanups in other files.

Key points:

  • Added save_to_redis and load_from_redis methods to R2RConfig class in /r2r/main/utils.py for saving and loading configurations from Redis.
  • Removed unnecessary print statements in /r2r/core/providers/logging.py.
  • Renamed R2RConfig class to Config in /r2r/core/utils/splitter/text.py.
  • Removed duplicate import statements in /r2r/main/app.py.

Generated with ❤️ by ellipsis.dev

@emrgnt-cmplxty emrgnt-cmplxty merged commit f4ce856 into dev Mar 15, 2024
1 of 3 checks passed
Copy link

vercel bot commented Mar 15, 2024

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

Name Status Preview Updated (UTC)
r2r-cloud-docs ❌ Failed (Inspect) Mar 15, 2024 6:21am
r2r-docs 🔄 Building (Inspect) Visit Preview Mar 15, 2024 6:21am

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 c81b925
  • Looked at 84 lines of code in 4 files
  • Took 1 minute and 59 seconds to review
More info
  • Skipped 0 files when reviewing.
  • Skipped posting 3 additional comments because they didn't meet confidence threshold of 50%.
1. r2r/core/providers/logging.py:210:
  • Assessed confidence : 0%
  • Comment:
    Good job removing the print statements used for debugging. It's a good practice to not leave them in the production code.
  • Reasoning:
    The print statements in the get_logs function in the logging.py file have been removed. This is a good change as print statements should not be used for debugging in production code.
2. r2r/core/utils/splitter/text.py:149:
  • Assessed confidence : 0%
  • Comment:
    Good job renaming the class 'R2RConfig' to 'Config'. It makes the code more consistent and easier to understand.
  • Reasoning:
    The class name 'R2RConfig' has been changed to 'Config' in the text.py file. This seems to be a good change as it makes the code more consistent and easier to understand.
3. r2r/main/app.py:18:
  • Assessed confidence : 0%
  • Comment:
    Good job removing the duplicate imports for GenerationConfig and IngestionPipeline. It makes the code cleaner and easier to understand.
  • Reasoning:
    In the app.py file, the imports for GenerationConfig and IngestionPipeline are duplicated. The duplicates have been removed in this PR, which is a good change as it makes the code cleaner and easier to understand.

Workflow ID: wflow_3VDC8JYEY7R33EgF


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

@@ -60,6 +60,22 @@ def load_config(cls, config_path: str = None) -> "R2RConfig":

return cls(config_data)

# TODO - How to type 'redis.Redis' without introducing dependency on 'redis' package?
def save_to_redis(self, redis_client: Any, key: str):
Copy link
Contributor

Choose a reason for hiding this comment

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

The methods to save and load the configuration from a Redis database are a good addition. However, consider using a more specific type for the 'redis_client' parameter. If introducing a dependency on the 'redis' package is a concern, you could consider using a protocol or interface that specifies the required methods and their signatures, without depending on the specific Redis client implementation.

emrgnt-cmplxty added a commit that referenced this pull request Mar 15, 2024
* feat: introduce Config class and update E2EPipelineFactory to use it (#172)

* add changes

* decouple config

* Feature/blast web and chat (#173)

* add changes

* decouple config

* blast web and chat

* Feature/prompt provider and type reno (#174)

* modify

* mostly complete.

* tweak types

* Feature/add app field to config (#175)

* modify

* mostly complete.

* tweak types

* fix config name issue, add app field

* tweak imports and all that

* Feature/add redis config option (#176)

* modify

* mostly complete.

* tweak types

* add redis config option

* erase cruft

* Feature/add redis config option (#177)

* modify

* mostly complete.

* tweak types

* add redis config option

* erase cruft

* update package deps (#178)
@emrgnt-cmplxty emrgnt-cmplxty deleted the feature/add-redis-config-option branch March 17, 2024 01:53
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.

None yet

1 participant