From 01f491757ab4fb57da76e1b92e85f0fa16f136a0 Mon Sep 17 00:00:00 2001 From: "Keyan (Kyrie) Zhang" <79576162+Zhangky11@users.noreply.github.com> Date: Mon, 1 Apr 2024 02:03:40 -0700 Subject: [PATCH] Modify the link in Langchain-upstream ut (#10608) * Modify the link in Langchain-upstream ut * fix langchain-upstream ut --- python/llm/test/run-langchain-upstream-tests.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/llm/test/run-langchain-upstream-tests.sh b/python/llm/test/run-langchain-upstream-tests.sh index f130df3e..861b040e 100644 --- a/python/llm/test/run-langchain-upstream-tests.sh +++ b/python/llm/test/run-langchain-upstream-tests.sh @@ -6,16 +6,18 @@ export VICUNA_7B_1_3_ORIGIN_PATH=${VICUNA_7B_1_3_ORIGIN_PATH} set -e -rm -rf ${LLM_INFERENCE_TEST_DIR}/langchain_upstream echo ">>> Testing LangChain upstream unit test" mkdir ${LLM_INFERENCE_TEST_DIR}/langchain_upstream -wget https://raw.githubusercontent.com/langchain-ai/langchain/master/libs/community/tests/integration_tests/llms/test_bigdl.py -P ${LLM_INFERENCE_TEST_DIR}/langchain_upstream -sed -i "s,model_id=\"[^\"]*\",model_id=\"$VICUNA_7B_1_3_ORIGIN_PATH\",g" ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/test_bigdl.py +wget https://raw.githubusercontent.com/langchain-ai/langchain/master/libs/community/tests/integration_tests/llms/test_bigdl_llm.py -P ${LLM_INFERENCE_TEST_DIR}/langchain_upstream +wget https://raw.githubusercontent.com/langchain-ai/langchain/master/libs/community/tests/integration_tests/llms/test_ipex_llm.py -P ${LLM_INFERENCE_TEST_DIR}/langchain_upstream +sed -i "s,model_id=\"[^\"]*\",model_id=\"$VICUNA_7B_1_3_ORIGIN_PATH\",g" ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/test_bigdl_llm.py +sed -i "s,model_id=\"[^\"]*\",model_id=\"$VICUNA_7B_1_3_ORIGIN_PATH\",g" ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/test_ipex_llm.py +sed -i 's/langchain_community.llms.ipex_llm/langchain_community.llms/g' ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/test_ipex_llm.py python -m pytest -s ${LLM_INFERENCE_TEST_DIR}/langchain_upstream echo ">>> Testing LangChain upstream ipynb" -wget https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/docs/integrations/llms/bigdl.ipynb -P ${LLM_INFERENCE_TEST_DIR}/langchain_upstream -mv ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/bigdl.ipynb ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/langchain_example.ipynb +wget https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/docs/integrations/llms/ipex_llm.ipynb -P ${LLM_INFERENCE_TEST_DIR}/langchain_upstream +mv ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/ipex_llm.ipynb ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/langchain_example.ipynb bash ./apps/ipynb2py.sh ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/langchain_example sed -i '/^get_ipython/d' ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/langchain_example.py sed -i "s,model_id=\"[^\"]*\",model_id=\"$VICUNA_7B_1_3_ORIGIN_PATH\",g" ${LLM_INFERENCE_TEST_DIR}/langchain_upstream/langchain_example.py