Skip to content

Commit

Permalink
Integrate tests to evals folder
Browse files Browse the repository at this point in the history
  • Loading branch information
nagkumar91 committed Apr 18, 2024
1 parent ea5d5f3 commit 5205979
Show file tree
Hide file tree
Showing 16 changed files with 52 additions and 169 deletions.
17 changes: 17 additions & 0 deletions src/promptflow-evals/tests/evals/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,20 @@ def _mock_process_wrapper(*args, **kwargs):
def _mock_create_spawned_fork_process_manager(*args, **kwargs):
setup_recording_injection_if_enabled()
return create_spawned_fork_process_manager(*args, **kwargs)


@pytest.fixture
def ml_client_config() -> dict:
conn_name = "azure_ai_project_scope"

with open(
file=CONNECTION_FILE,
mode="r",
encoding="utf-8", # Add the encoding parameter
) as f:
dev_connections = json.load(f)

if conn_name not in dev_connections:
raise ValueError(f"Connection '{conn_name}' not found in dev connections.")

return dev_connections[conn_name]["value"]
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def test_export_format(self, qa_type, structure):
model_config = dict(api_base=API_BASE, api_key=API_KEY, deployment=DEPLOYMENT, model=MODEL)
qa_generator = QADataGenerator(model_config=model_config)
qas = list(zip(questions, answers))
filepath = os.path.join(pathlib.Path(__file__).parent.parent.resolve(), "test_configs")
filepath = os.path.join(pathlib.Path(__file__).parent.resolve(), "data")
output_file = os.path.join(filepath, f"test_{qa_type.value}_{structure.value}.jsonl")
qa_generator.export_to_file(output_file, qa_type, qas, structure)

Expand Down
Empty file.
160 changes: 0 additions & 160 deletions src/promptflow-evals/tests/simulator/conftest.py

This file was deleted.

Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
'e812113f391afbb4b12aafd0b7e93c9b4fd5633f', (0, 3992)
'e5a1c88060db56a1f098ee4343ddca0bb97fa620', (4096, 5484)
'34501a2950464ae7eece224e06278dde3addcfb0', (9728, 4814)
'5cd313845b5581923f342e6fee8c7247b765e0f4', (14848, 3871)
'e812113f391afbb4b12aafd0b7e93c9b4fd5633f', (0, 3992)
'e5a1c88060db56a1f098ee4343ddca0bb97fa620', (4096, 5484)
'34501a2950464ae7eece224e06278dde3addcfb0', (9728, 4814)
'5cd313845b5581923f342e6fee8c7247b765e0f4', (14848, 3871)
'359d733942e7ab2d1e8aaaef37646963d3c2217a', (18944, 4031)
'150c9f5d4c033d237d8ba7c69e77329eb425777a', (23040, 2586)
'37466a662f9a12d4285959ba159203e8f44c913f', (26112, 4361)
'c0fd61dba210c701671e3d0de1b6a58b84931e11', (30720, 2779)
'd2105d2b315c0b0a86ac5a246e2c5b22661e7c7f', (33792, 4329)
'b52fcdb3e35e6a47cc67195189a63ab633b135ee', (38400, 5024)
'458bfde1e4da8554d3113babc6dfc6cf6953933c', (43520, 5788)
'85554f1b55073110df6738f841e7e4b880a21228', (49664, 6737)
'fe4b4e43d8955f8edde50292bf83e3ce1a6441c1', (56832, 3120)
'ce9dfc7543c5c7e9acc7ff9513f7ea9ba2be915b', (60416, 4649)
'1084eea656037fc4bdab3f5a0c182b7c5b64dd22', (65536, 6570)
'8d32fa0a507dd1dc6471601647bfa9b2f13198d3', (72192, 8518)
'58b2a6a32d8a862e37d2f9fd0a46c53c88e888af', (80896, 9493)
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
'e812113f391afbb4b12aafd0b7e93c9b4fd5633f', (0, 3992)
'e5a1c88060db56a1f098ee4343ddca0bb97fa620', (4096, 5484)
'34501a2950464ae7eece224e06278dde3addcfb0', (9728, 4814)
'5cd313845b5581923f342e6fee8c7247b765e0f4', (14848, 3871)
'e812113f391afbb4b12aafd0b7e93c9b4fd5633f', (0, 3992)
'e5a1c88060db56a1f098ee4343ddca0bb97fa620', (4096, 5484)
'34501a2950464ae7eece224e06278dde3addcfb0', (9728, 4814)
'5cd313845b5581923f342e6fee8c7247b765e0f4', (14848, 3871)
'359d733942e7ab2d1e8aaaef37646963d3c2217a', (18944, 4031)
'150c9f5d4c033d237d8ba7c69e77329eb425777a', (23040, 2586)
'37466a662f9a12d4285959ba159203e8f44c913f', (26112, 4361)
'c0fd61dba210c701671e3d0de1b6a58b84931e11', (30720, 2779)
'd2105d2b315c0b0a86ac5a246e2c5b22661e7c7f', (33792, 4329)
'b52fcdb3e35e6a47cc67195189a63ab633b135ee', (38400, 5024)
'458bfde1e4da8554d3113babc6dfc6cf6953933c', (43520, 5788)
'85554f1b55073110df6738f841e7e4b880a21228', (49664, 6737)
'fe4b4e43d8955f8edde50292bf83e3ce1a6441c1', (56832, 3120)
'ce9dfc7543c5c7e9acc7ff9513f7ea9ba2be915b', (60416, 4649)
'1084eea656037fc4bdab3f5a0c182b7c5b64dd22', (65536, 6570)
'8d32fa0a507dd1dc6471601647bfa9b2f13198d3', (72192, 8518)
'58b2a6a32d8a862e37d2f9fd0a46c53c88e888af', (80896, 9493)

0 comments on commit 5205979

Please sign in to comment.