-
Notifications
You must be signed in to change notification settings - Fork 165
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this 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 in4
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 of50%
.
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): |
There was a problem hiding this comment.
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.
* 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)
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:
save_to_redis
andload_from_redis
methods toR2RConfig
class in/r2r/main/utils.py
for saving and loading configurations from Redis./r2r/core/providers/logging.py
.R2RConfig
class toConfig
in/r2r/core/utils/splitter/text.py
./r2r/main/app.py
.Generated with ❤️ by ellipsis.dev