From 39be3c772b7b32ead519bd586c8dabd8143f18aa Mon Sep 17 00:00:00 2001 From: isaac hershenson Date: Mon, 9 Dec 2024 13:14:29 -0800 Subject: [PATCH] flags in tests --- python/tests/integration_tests/test_client.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/python/tests/integration_tests/test_client.py b/python/tests/integration_tests/test_client.py index 53e940c06..ae866521c 100644 --- a/python/tests/integration_tests/test_client.py +++ b/python/tests/integration_tests/test_client.py @@ -379,6 +379,9 @@ def test_error_surfaced_invalid_uri(uri: str) -> None: def test_upload_examples_multipart(langchain_client: Client): """Test uploading examples with attachments via multipart endpoint.""" + langchain_client._info = { + "instance_flags": {"dataset_examples_multipart_enabled": True} + } dataset_name = "__test_upload_examples_multipart" + uuid4().hex[:4] if langchain_client.has_dataset(dataset_name=dataset_name): langchain_client.delete_dataset(dataset_name=dataset_name) @@ -1245,11 +1248,11 @@ def test_list_examples_attachments_keys(langchain_client: Client) -> None: langchain_client.delete_dataset(dataset_id=dataset.id) -@pytest.mark.skip( - reason="Need to land https://github.com/langchain-ai/langsmith-sdk/pull/1209 first" -) def test_evaluate_with_attachments(langchain_client: Client) -> None: """Test evaluating examples with attachments.""" + langchain_client._info = { + "instance_flags": {"dataset_examples_multipart_enabled": True} + } dataset_name = "__test_evaluate_attachments" + uuid4().hex[:4] # 1. Create dataset dataset = langchain_client.create_dataset( @@ -1305,6 +1308,9 @@ def evaluator(run: Run, example: Example) -> Dict[str, Any]: def test_evaluate_with_no_attachments(langchain_client: Client) -> None: """Test evaluating examples without attachments using a target with attachments.""" + langchain_client._info = { + "instance_flags": {"dataset_examples_multipart_enabled": True} + } dataset_name = "__test_evaluate_no_attachments" + uuid4().hex[:4] dataset = langchain_client.create_dataset( dataset_name,