Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/aimanager/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.4.1
++++++
* ``az aimanager modelsource`` and ``az aimanager namespace modeldeployment``: Accept
``--manager`` and ``-m`` as aliases of ``--aimanager-name``.

1.4.0
+++++++
* Mark ``az aimanager`` command groups as preview.
Expand Down
4 changes: 2 additions & 2 deletions src/aimanager/azext_aimanager/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def load_arguments(self, _):
help='Comma-separated key=value pairs to specify custom headers.')

with self.argument_context('aimanager modelsource') as c:
c.argument('ai_manager_name', options_list=['--aimanager-name'],
c.argument('ai_manager_name', options_list=['--aimanager-name', '--manager', '-m'],
validator=validate_ai_manager_name,
help='The name of the AI Manager resource.')
c.argument('model_source_name', options_list=['--name', '-n'],
Expand Down Expand Up @@ -118,7 +118,7 @@ def load_arguments(self, _):
help='Comma-separated key=value pairs to specify custom headers.')

with self.argument_context('aimanager namespace modeldeployment') as c:
c.argument('ai_manager_name', options_list=['--aimanager-name'],
c.argument('ai_manager_name', options_list=['--aimanager-name', '--manager', '-m'],
validator=validate_ai_manager_name,
help='The name of the AI Manager resource.')
c.argument('namespace_name', options_list=['--namespace-name'],
Expand Down
2 changes: 1 addition & 1 deletion src/aimanager/azext_aimanager/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.61.0",
"version": "1.2.1b1"
"version": "1.4.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def test_modeldeployment_commands(self):
command_prefix.format('list'),
checks=[self.check("length([?name=='deployment'])", 1)])

self.cmd(
'aimanager namespace modeldeployment list -g rg '
'-m manager --namespace-name namespace',
checks=[self.check("length([?name=='deployment'])", 1)])

self.cmd(
command_prefix.format('update') +
' -n deployment --performance-mode Throughput --replicas 0 '
Expand All @@ -101,6 +106,7 @@ def test_modeldeployment_commands(self):
checks=[self.is_empty()])

self.assertEqual(operations.begin_create_or_update.call_count, 2)
operations.list_by_ai_manager_namespace.assert_called_once_with(
self.assertEqual(operations.list_by_ai_manager_namespace.call_count, 2)
operations.list_by_ai_manager_namespace.assert_called_with(
'rg', 'manager', 'namespace')
operations.begin_delete.assert_called_once()
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ def test_modelsource_commands(self):
command_prefix.format('list'),
checks=[self.check("length([?name=='hf'])", 1)])

self.cmd(
'aimanager modelsource list -g rg --manager manager',
checks=[self.check("length([?name=='hf'])", 1)])

self.cmd(
command_prefix.format('update') + ' -n hf --token hf_yyy --no-wait',
checks=[self.is_empty()])
Expand All @@ -66,7 +70,8 @@ def test_modelsource_commands(self):

self.assertEqual(operations.get.call_count, 4)
self.assertEqual(operations.begin_create_or_update.call_count, 2)
operations.list.assert_called_once_with('rg', 'manager')
self.assertEqual(operations.list.call_count, 2)
operations.list.assert_called_with('rg', 'manager')
operations.begin_delete.assert_called_once()

# the source type is immutable and must be carried over on update
Expand Down
2 changes: 1 addition & 1 deletion src/aimanager/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from distutils import log as logger
logger.warn("Wheel is not available, disabling bdist_wheel hook")

VERSION = '1.4.0'
VERSION = '1.4.1'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down
Loading