Skip to content

Commit 6a7144d

Browse files
authored
adding a Unit test case for scheduler yaml load (#35116)
* adding a UT for scheduler * correcting a pip install when specifying version * reformatting * removing the comment from test file
1 parent 9e6f009 commit 6a7144d

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

doc/dev/dev_setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ or execute the various commands available in the toolbox.
3737
```
3838
azure-sdk-for-python> cd sdk/formrecognizer/azure-ai-formrecognizer
3939
azure-sdk-for-python/sdk/formrecognizer/azure-ai-formrecognizer> pip install -r dev_requirements.txt
40-
azure-sdk-for-python/sdk/formrecognizer/azure-ai-formrecognizer> pip install tox<5
40+
azure-sdk-for-python/sdk/formrecognizer/azure-ai-formrecognizer> pip install "tox<5"
4141
azure-sdk-for-python/sdk/formrecognizer/azure-ai-formrecognizer> pip install -e .
4242
```
4343

sdk/ml/azure-ai-ml/tests/schedule/unittests/test_schedule_entity.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,3 +184,8 @@ def test_invalid_date_string(self):
184184
with pytest.raises(Exception) as e:
185185
job_schedule._validate(raise_error=True)
186186
assert "Not a valid ISO8601-formatted datetime string" in str(e)
187+
188+
def test_schedule_create_out_of_box_monitoring_job(self):
189+
test_path = "./tests/test_configs/schedule/out_of_box_monitoring.yaml"
190+
schedule = load_schedule(test_path)
191+
assert "genai_app_monitoring", schedule.name
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#source ../configs/genai-momo/out-of-box-monitoring.yaml
2+
$schema: http://azureml/sdk-2-0/Schedule.json
3+
name: genai_app_monitoring
4+
display_name: Virtual Assistant application monitoring
5+
description: Monitoring setup for virutal Assistant GenAI application with minimal configuration
6+
7+
trigger:
8+
type: recurrence
9+
frequency: day
10+
interval: 1 # runs data analysis job daily at 23:15pm
11+
schedule:
12+
hours: 23
13+
minutes: 15
14+
15+
create_monitor:
16+
compute: # clusterless spark compute to run monitoring job
17+
instance_type: standard_e4s_v3
18+
runtime_version: "3.2"
19+
monitoring_target:
20+
ml_task: questionanswering #question_answering
21+
endpoint_deployment_id: azureml:va-endpoint:va-deployment
22+
23+
# by default, production data associated with prompt flow deployment will be used
24+
# by default, monitoring will include token usage and generation quality metrics that don't require any data column mapping.
25+
# if any signal/metrics require data column mapping, user will need to use advanced setting or CLI/SDK for setup

0 commit comments

Comments
 (0)