Release/2.8.0#1242
Open
chakravarthik27 wants to merge 15 commits into
Open
Conversation
- Changed imports from `langchain.prompts` to `langchain_core.prompts` in `prompts.py`. - Updated import from `langchain.evaluation.qa` to `langchain_classic.evaluation.qa` in `helpers.py`. - Updated `poetry.lock` to reflect new versions of `langchain` and `langchain-core` to mitigate security issues. - Updated `pyproject.toml` to require `langchain` version `1.3.13`.
…r and ResponseEvaluator classes
…rn for model initialization
…s v5+ task consolidation
…elerate version constraint
… translation test to use 'German' as target language
…d enhance translation handling in PretrainedModelForTranslation
fix: update imports and dependencies to address vulnerabilities
pratacosmin
approved these changes
Jul 22, 2026
This file contains hidden or 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
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.
This pull request introduces several improvements and fixes across the codebase, focusing on enhanced translation model support, improved HuggingFace embedding loading, bug fixes, and minor refactoring. The most significant changes include a major refactor of the translation model handler to support both encoder-decoder and causal language models, improved caching and loading for HuggingFace embeddings, and updates to dataset and prompt handling for better compatibility and correctness.
Translation Model Refactor and Improvements:
Refactored
PretrainedModelForTranslationto support both encoder-decoder and causal language models, including improved language handling, prompt support, target language token insertion, and more robust model loading and prediction logic. Added architecture validation and clearer error messages for unsupported models. (langtest/modelhandler/transformers_modelhandler.py,langtest/errors.py) [1] [2]Updated dataset references and field names for SST2 to use
SetFit/sst2and changed the expected field fromsentencetotextfor better compatibility with HuggingFace datasets. (langtest/datahandler/datasource.py,langtest/transform/constants.py) [1] [2]HuggingFace Embeddings and Paraphrasing:
Improved
HuggingfaceEmbeddingsto cache and reuse model and tokenizer instances, preventing redundant loads and improving performance. (langtest/embeddings/huggingface.py)Refactored grammar transformation to use the
paraphraseutility fromlangtest.utils.hf_utilsinstead of directly instantiating a pipeline, improving modularity and maintainability. (langtest/transform/grammar.py)Prompt and Pipeline Handling:
Updated prompt template imports to use
langchain_core.promptsfor improved compatibility, and fixed template sorting to only include valid fields. (langtest/prompts.py) [1] [2] [3]Fixed a bug in NER pipeline training and retraining by passing the tokenizer as
processing_classinstead oftokenizer. (langtest/pipelines/transformers/ner_pipeline.py) [1] [2]Bug Fixes and Miscellaneous:
get_criteria_scoresto handle non-string score values safely, and corrected the path for saving CSV files inload_csvfromamgeatoamega. (langtest/transform/utils.py) [1] [2]Encoded references:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]