Update LangChain Tests #498
Merged
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.
The current way of saving the original LangChain's
get_type_to_cls_dict
method is not correct.Because
get_type_to_cls_dict
is a function but the code is saving as a dictionary.After running this test, the subsequent calls to
get_type_to_cls_dict
will fail withDepending on the order when running the test, some tests may appear to fail randomly due to this issue:
https://github.com/oracle/accelerated-data-science/actions/runs/7137179363/job/19453780865#step:8:3440
https://github.com/oracle/accelerated-data-science/actions/runs/7115504771/job/19371812840
Since the embedding and LLM models in this test are for serialization only without inference. There is no need to use the "fake" one. We can use the real embedding and LLM models to avoid modifying
get_type_to_cls_dict
in LangChain.This PR also updated the tests to skip checking ID fields in the serialization, since LangChain is updating frequently and this field might change. Users should use the same version of LangChain for serialization and de-serialization.