-
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add redis config option #177
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
馃憤 Looks good to me!
- Reviewed the entire pull request up to c81b925
- Looked at
84
lines of code in4
files - Took 1 minute and 58 seconds to review
More info
- Skipped
0
files when reviewing. - Skipped posting
4
additional comments because they didn't meet confidence threshold of50%
.
1. r2r/core/providers/logging.py:210
:
- Assessed confidence :
0%
- Comment:
Good job on removing the print statements. This makes the code cleaner and more professional. - Reasoning:
The PR author has removed some print statements from the get_logs method in the logging.py file. This is a good change as print statements should not be used for debugging in production code. The change is straightforward and does not introduce any bugs.
2. r2r/core/utils/splitter/text.py:149
:
- Assessed confidence :
33%
- Comment:
The renaming of 'R2RConfig' to 'Config' is fine as long as it's not referenced elsewhere in the codebase under its old name. - Reasoning:
The PR author has renamed the class 'R2RConfig' to 'Config' in two places in the text.py file. This seems to be a simple renaming operation and does not introduce any bugs. However, it's important to ensure that this class is not referenced elsewhere in the codebase under its old name 'R2RConfig'.
3. r2r/main/app.py:18
:
- Assessed confidence :
0%
- Comment:
Good job on removing the duplicate imports. This makes the code cleaner and more efficient. - Reasoning:
The PR author has removed duplicate imports of 'GenerationConfig' and 'IngestionPipeline' in the app.py file. This is a good change as it removes unnecessary code and makes the file cleaner. The change is straightforward and does not introduce any bugs.
4. r2r/main/utils.py:64
:
- Assessed confidence :
66%
- Grade:
0%
- Comment:
The 'save_to_redis' and 'load_from_redis' methods seem to be implemented correctly, but there are a few potential issues. First, the 'redis_client' parameter is typed as 'Any', which is not ideal. It would be better to use a more specific type if possible. Second, the 'load_from_redis' method assumes that the data in Redis is always valid JSON. It might be a good idea to add some error handling for the case where the data is not valid JSON. - Reasoning:
The PR author has added two new methods 'save_to_redis' and 'load_from_redis' to the R2RConfig class in the utils.py file. These methods are used to save and load the configuration data to and from a Redis database. The methods seem to be implemented correctly, but there are a few potential issues that need to be addressed.
Workflow ID: wflow_B78ZwfkDemt8KcvU
Not what you expected? You can customize the content of the reviews using rules. Learn more here.
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)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
This PR introduces the ability to save and load configurations from a Redis database 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 a Redis database./r2r/core/providers/logging.py
.R2RConfig
toConfig
in two places in/r2r/core/utils/splitter/text.py
./r2r/main/app.py
.Generated with 鉂わ笍 by ellipsis.dev