Conversation
|
Documentation preview for cd222c7 is available at: More info
|
38e3417 to
936fbac
Compare
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
|
|
||
| agent = create_openai_agent() | ||
| llm = FakeOpenAI() | ||
| agent = create_agent(llm, [add, multiply], system_prompt="You are a helpful assistant") |
There was a problem hiding this comment.
note: AgentExecutor is removed and now create_agent returns a langgraph-based agent.
|
|
||
| # NB: We run this test suite twice - once with langchain_community installed and once without. | ||
| try: | ||
| from langchain_community.chat_models import ChatOpenAI |
There was a problem hiding this comment.
note: ChatOpenAI in the community version is deprecated since 0.0.10, we don't need to test
| # So the expected output will be the prompt itself. | ||
| TEST_CONTENT = "What is MLflow?" | ||
|
|
||
| _SIMPLE_MODEL_CODE_PATH = "tests/langchain/sample_code/simple_runnable.py" |
There was a problem hiding this comment.
note: Serialization-based logging does not work with LangChain v1. Switching to code-based logging only. Will update the doc in a follow-up.
| assert trace.data.spans[0].name == "always_fail" | ||
|
|
||
|
|
||
| def test_llmchain_autolog(async_logging_enabled): |
There was a problem hiding this comment.
note: LLMChain has been deprecated since 0.1.17
|
|
||
| @skip_when_testing_trace_sdk | ||
| @pytest.mark.parametrize("log_traces", [True, False]) | ||
| def test_langchain_tracing_evaluate(log_traces): |
There was a problem hiding this comment.
note: Updated evaluation test to use the new GenAI evaluate and removed the legacy test_langchain_evaluation.py
|
|
||
|
|
||
| def get_vector_search( | ||
| use_partner_package: bool, |
There was a problem hiding this comment.
note: We only need to test the partner package (databricks-langchain). The community version has been deprecated long ago.
There was a problem hiding this comment.
note: Duplicates to a test case in callback test.
There was a problem hiding this comment.
note: There are many tests that use chain classes deprecated long ago (0.1.x). Removed most of them.
There was a problem hiding this comment.
Maybe we can remove them first in a separate PR to reduce the amount of diff?
BenWilson2
left a comment
There was a problem hiding this comment.
Quite the overhaul. All the legacy cleanup looks great!
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com> Signed-off-by: Tian Lan <sky.blue266000@gmail.com>
🛠 DevTools 🛠
Install mlflow from this PR
For Databricks, use the following command:
What changes are proposed in this pull request?
Enable LangChain v1 tests and fix them.
How is this PR tested?
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.