Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception Raised on Fetching Schedule Using ml_client.schedules.get(SCHEDULE_NAME) #37466

Open
t9i9m opened this issue Sep 19, 2024 · 1 comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.

Comments

@t9i9m
Copy link

t9i9m commented Sep 19, 2024

  • Package Name: azure.ai.ml
  • Package Version: 1.20.0
  • Operating System: Windows 11
  • Python Version: Python 3.11.9

Describe the bug
When attempting to retrieve a schedule using the function ml_client.schedules.get(SCHEDULE_NAME), an exception is raised: ScheduleException: Job definition for schedule SCHEDULE_NAME can not be None. This issue seems to originate from a sanity check in the get function at line 231 in azure\ai\ml\operations_schedule_operations.py.

Additionally, there is confusion as to why there can be a schedule in Azure Machine Learning services without an associated job definition. This inconsistency needs to be addressed.

To Reproduce
Steps to reproduce the behavior:
from azure.ai.ml import MLClient
ml_client = MLClient(subscription_id, resource_group, workspace_name)
schedule = ml_client.schedules.get(SCHEDULE_NAME

Expected behavior
The ml_client.schedules.get(SCHEDULE_NAME) function should return the details of the specified schedule instead of raising an exception. The schedule exists, so it should have an associated job definition, or the system should handle cases where the job definition is missing more gracefully.

Screenshots
Exception: ScheduleException: Job definition for schedule SCHEDULE_NAME can not be None.
Stack:
...
schedule = ml_client.schedules.get(SCHEDULE_NAME)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\core\tracing\decorator.py", line 94, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml_telemetry\activity.py", line 372, in wrapper
return_value = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml\operations_schedule_operations.py", line 227, in get
return self.service_client.get(
^^^^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\core\tracing\decorator.py", line 94, in wrapper_use_tracer
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml_restclient\v2023_06_01_preview\operations_schedules_operations.py", line 498, in get
return cls(pipeline_response, deserialized, {})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml\operations_schedule_operations.py", line 231, in
cls=lambda _, obj, __: Schedule._from_rest_object(obj),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml\entities_schedule\schedule.py", line 171, in _from_rest_object
return JobSchedule._from_rest_object(obj)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\venv\Lib\site-packages\azure\ai\ml\entities_schedule\schedule.py", line 385, in _from_rest_object
raise ScheduleException(
.

@github-actions github-actions bot added Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team. labels Sep 19, 2024
Copy link

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @Azure/azure-ml-sdk @azureml-github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. Machine Learning needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Attention Workflow: This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

1 participant