azureml-registry-tools 0.1.0a32__py3-none-any.whl → 0.1.0a34__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -167,7 +167,7 @@
167
167
  "_aml_system_vanity_registry": {
168
168
  "description": "AML vanity registry",
169
169
  "type": "string",
170
- "enum": ["azureml-phi"]
170
+ "enum": ["azureml-phi", "azureml-oai-oss-ft", "azureml-meta-ft"]
171
171
  },
172
172
  "author": {
173
173
  "description": "Model provider/author name",
@@ -374,7 +374,7 @@
374
374
  "outputModalities": {
375
375
  "description": "Output modalities supported (e.g., text) as a comma-separated string",
376
376
  "type": "string",
377
- "pattern": "^(audio|csv|embeddings|image|json|pdf|text|video|3D-image)(?:\\s*,\\s*(audio|csv|embeddings|image|json|pdf|text|video|3D-image))*$"
377
+ "pattern": "^(audio|csv|embeddings|image|json|pdf|text|video|3D-image|robot-action-chunks)(?:\\s*,\\s*(audio|csv|embeddings|image|json|pdf|text|video|3D-image|robot-action-chunks))*$"
378
378
  },
379
379
  "playgroundRateLimitTier": {
380
380
  "description": "Rate limit tier for playground",
@@ -395,7 +395,7 @@
395
395
  "task": {
396
396
  "description": "Tasks supported by the model as a comma-separated string",
397
397
  "type": "string",
398
- "pattern": "^(audio-analysis|audio-classification|audio-generation|automatic-speech-recognition|chat-completion|completions|content-filters|content-safety|conversational-ai|custom-extraction|data-generation|document-analysis|document-ingestion|document-translation|embeddings|face-detection|fill-mask|forecasting|image-analysis|image-classification|image-feature-extraction|image-text-to-text|image-to-image|image-to-text|intelligent-content-processing|intelligent-document-processing|text-pii-extraction|conversation-pii-extraction|document-pii-extraction|detect-language|optical-character-recognition|protein-sequence-generation|protein-structure-prediction|responses|responsible-ai|retrosynthesis-prediction|summarization|text-analysis|text-analytics|text-classification|text-generation|text-to-image|text-to-speech|time-series-forecasting|translation|speech-to-text|speech-translation|video-analysis|video-generation|video-text-to-text|visual-question-answering|zero-shot-classification|zero-shot-image-classification|materials-design|atomistic-modelling|image-to-3D|text-to-3D|3D-generation|task-completion-verification|action-affordance|next-plausible-action-prediction|Structure-Prediction|Genomics|biomolecular-complex-structure-prediction|structure-prediction|protein-folding|web-agent-tasks|gui-grounding|messages)(?:\\s*,\\s*(audio-analysis|audio-classification|audio-generation|automatic-speech-recognition|chat-completion|completions|content-filters|content-safety|conversational-ai|custom-extraction|data-generation|document-analysis|document-ingestion|document-translation|embeddings|face-detection|fill-mask|forecasting|image-analysis|image-classification|image-feature-extraction|image-text-to-text|image-to-image|image-to-text|intelligent-content-processing|intelligent-document-processing|optical-character-recognition|protein-sequence-generation|protein-structure-prediction|responses|responsible-ai|summarization|text-analysis|text-analytics|text-classification|text-generation|text-pii-extraction|conversation-pii-extraction|document-pii-extraction|detect-language|text-to-image|text-to-speech|time-series-forecasting|translation|speech-to-text|speech-translation|video-analysis|video-generation|video-text-to-text|visual-question-answering|zero-shot-classification|zero-shot-image-classification|materials-design|atomistic-modelling|image-to-3D|text-to-3D|3D-generation|task-completion-verification|action-affordance|next-plausible-action-prediction|Structure-Prediction|Genomics|biomolecular-complex-structure-prediction|structure-prediction|protein-folding|web-agent-tasks|gui-grounding|messages))*$"
398
+ "pattern": "^(audio-analysis|audio-classification|audio-generation|automatic-speech-recognition|chat-completion|completions|content-filters|content-safety|conversational-ai|custom-extraction|data-generation|document-analysis|document-ingestion|document-translation|embeddings|face-detection|fill-mask|forecasting|image-analysis|image-classification|image-feature-extraction|image-text-to-text|image-to-image|image-to-text|intelligent-content-processing|intelligent-document-processing|text-pii-extraction|conversation-pii-extraction|document-pii-extraction|detect-language|optical-character-recognition|protein-sequence-generation|protein-structure-prediction|responses|responsible-ai|retrosynthesis-prediction|summarization|text-analysis|text-analytics|text-classification|text-generation|text-to-image|text-to-speech|time-series-forecasting|translation|speech-to-text|speech-translation|video-analysis|video-generation|video-text-to-text|visual-question-answering|zero-shot-classification|zero-shot-image-classification|materials-design|atomistic-modelling|image-to-3D|text-to-3D|3D-generation|task-completion-verification|action-affordance|next-plausible-action-prediction|Structure-Prediction|Genomics|biomolecular-complex-structure-prediction|structure-prediction|protein-folding|web-agent-tasks|gui-grounding|messages|robot-control)(?:\\s*,\\s*(audio-analysis|audio-classification|audio-generation|automatic-speech-recognition|chat-completion|completions|content-filters|content-safety|conversational-ai|custom-extraction|data-generation|document-analysis|document-ingestion|document-translation|embeddings|face-detection|fill-mask|forecasting|image-analysis|image-classification|image-feature-extraction|image-text-to-text|image-to-image|image-to-text|intelligent-content-processing|intelligent-document-processing|optical-character-recognition|protein-sequence-generation|protein-structure-prediction|responses|responsible-ai|summarization|text-analysis|text-analytics|text-classification|text-generation|text-pii-extraction|conversation-pii-extraction|document-pii-extraction|detect-language|text-to-image|text-to-speech|time-series-forecasting|translation|speech-to-text|speech-translation|video-analysis|video-generation|video-text-to-text|visual-question-answering|zero-shot-classification|zero-shot-image-classification|materials-design|atomistic-modelling|image-to-3D|text-to-3D|3D-generation|task-completion-verification|action-affordance|next-plausible-action-prediction|Structure-Prediction|Genomics|biomolecular-complex-structure-prediction|structure-prediction|protein-folding|web-agent-tasks|gui-grounding|messages|robot-control))*$"
399
399
  },
400
400
  "textContextWindow": {
401
401
  "description": "Context window size",
@@ -606,6 +606,38 @@
606
606
  },
607
607
  "description": "Model capabilities (e.g., agents, assistants)"
608
608
  },
609
+ "toolsSupported": {
610
+ "type": "array",
611
+ "items": {
612
+ "type": "string",
613
+ "enum": [
614
+ "web_search",
615
+ "file_search",
616
+ "image_generation",
617
+ "code_interpreter",
618
+ "computer_use",
619
+ "mcp"
620
+ ]
621
+ },
622
+ "description": "Specific tools that the model supports (e.g., web_search, file_search, code_interpreter, computer_use)"
623
+ },
624
+ "featuresSupported": {
625
+ "type": "array",
626
+ "items": {
627
+ "type": "string",
628
+ "enum": [
629
+ "streaming",
630
+ "function_calling",
631
+ "structured_outputs",
632
+ "fine_tuning",
633
+ "distillation",
634
+ "predicted_outputs",
635
+ "inpainting",
636
+ "image_input"
637
+ ]
638
+ },
639
+ "description": "Model features and capabilities supported (e.g., streaming, function_calling, structured_outputs)"
640
+ },
609
641
  "azureOffers": {
610
642
  "type": "array",
611
643
  "items": {
@@ -20,13 +20,16 @@ from azureml.registry.data.validate_model_variant_schema import validate_model_v
20
20
  from azureml.registry._rest_client.registry_management_client import RegistryManagementClient
21
21
  from azureml.registry.mgmt.util import resolve_from_file_for_asset
22
22
 
23
- # Windows compatibility patch - must be applied before importing azureml.assets
23
+ # Cross-platform compatibility patch - must be applied before importing azureml.assets
24
+ import os
24
25
  from subprocess import run
25
26
 
26
27
 
27
28
  def patched_run_command(cmd: List[str]):
28
- """Run command with shell=True for Windows compatibility."""
29
- result = run(cmd, capture_output=True, encoding=sys.stdout.encoding, errors="ignore", shell=True)
29
+ """Run command with OS-appropriate shell setting for cross-platform compatibility."""
30
+ # Use shell=True on Windows, shell=False on Unix-like systems
31
+ use_shell = os.name == 'nt' # 'nt' is Windows
32
+ result = run(cmd, capture_output=True, encoding=sys.stdout.encoding, errors="ignore", shell=use_shell)
30
33
  return result
31
34
 
32
35
 
@@ -40,6 +43,9 @@ from azureml.assets.config import AssetConfig, AssetType # noqa: E402
40
43
  from azureml.assets.publish_utils import create_asset # noqa: E402
41
44
  from azureml.assets.validate_assets import validate_assets # noqa: E402
42
45
 
46
+ # Set azcopy job plan location to avoid permission issues
47
+ os.environ.setdefault("AZCOPY_JOB_PLAN_LOCATION", tempfile.gettempdir())
48
+
43
49
 
44
50
  def validate_model(asset_path: Path, allow_additional_properties: bool = False) -> bool:
45
51
  """Validate model.
@@ -239,6 +245,12 @@ def create_or_update_asset(readonly_asset: AssetConfig, registry_name: str, subs
239
245
  credential=DefaultAzureCredential(), # CodeQL [SM05139] DefaultAzureCredential should only be used for local development and testing purposes.
240
246
  )
241
247
 
248
+ if not shutil.which("azcopy"):
249
+ raise RuntimeError(
250
+ "azcopy is not available in PATH. "
251
+ "Please install azcopy: https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10"
252
+ )
253
+
242
254
  with tempfile.TemporaryDirectory() as mutable_asset_dir:
243
255
  mutable_asset, system_metadata_payload = build_mutable_asset(base_asset=readonly_asset, mutable_asset_dir=mutable_asset_dir, override_storage=override_storage)
244
256
  try:
@@ -20,14 +20,6 @@ ALLOWED_ASSET_TYPES = {
20
20
  'environments', 'models', 'deployment-templates', 'components', 'datasets'
21
21
  }
22
22
 
23
- ASSET_TYPE_MAP = {
24
- 'models': 'Models',
25
- 'environments': 'Environments',
26
- 'deployment-templates': 'DeploymentTemplates',
27
- 'components': 'Components',
28
- 'datasets': 'Datasets',
29
- }
30
-
31
23
 
32
24
  def validate_manifest_data(data: dict, file_path: str) -> None:
33
25
  """Validate required root-level fields and allowed values for nested fields under 'assets'.
@@ -7,6 +7,18 @@ from dataclasses import dataclass, field
7
7
  from typing import List
8
8
  from uuid import UUID
9
9
 
10
+ # Asset type mapping from YAML keys to JSON/API keys
11
+ ASSET_TYPE_MAP = {
12
+ 'models': 'Models',
13
+ 'environments': 'Environments',
14
+ 'deployment-templates': 'DeploymentTemplates',
15
+ 'components': 'Components',
16
+ 'datasets': 'Datasets',
17
+ }
18
+
19
+ # Reverse mapping for deserializing API responses back to YAML keys
20
+ ASSET_TYPE_REVERSE_MAP = {v: k for k, v in ASSET_TYPE_MAP.items()}
21
+
10
22
 
11
23
  def _norm_key(k):
12
24
  return k.replace('_', '').lower()
@@ -70,7 +82,13 @@ class SourceRegistry:
70
82
  asset_dict = {}
71
83
  for asset_type, asset_list in self.assets.items():
72
84
  if asset_list:
73
- asset_dict[asset_type] = [
85
+ # Convert YAML asset type keys for API
86
+ if asset_type not in ASSET_TYPE_MAP:
87
+ raise ValueError(
88
+ f"Invalid asset type '{asset_type}'. Allowed types: {', '.join(ASSET_TYPE_MAP.keys())}"
89
+ )
90
+ api_asset_type = ASSET_TYPE_MAP[asset_type]
91
+ asset_dict[api_asset_type] = [
74
92
  {"Name": a.name} if a.name == ".*" else {"Name": a.name, "Version": a.version}
75
93
  for a in asset_list
76
94
  ]
@@ -86,7 +104,9 @@ class SourceRegistry:
86
104
  assets = {}
87
105
  assets_dict = _get_key(d, "Assets", "assets", normalize_keys=normalize_keys)
88
106
  for asset_type, asset_list in assets_dict.items():
89
- assets[asset_type] = [Asset.from_dict(a, normalize_keys=normalize_keys) for a in asset_list]
107
+ # Normalize API keys back to YAML keys
108
+ normalized_asset_type = ASSET_TYPE_REVERSE_MAP.get(asset_type, asset_type)
109
+ assets[normalized_asset_type] = [Asset.from_dict(a, normalize_keys=normalize_keys) for a in asset_list]
90
110
  return SourceRegistry(
91
111
  registry_name=_get_key(d, "RegistryName", "registry_name", normalize_keys=normalize_keys),
92
112
  tenant_id=UUID(str(_get_key(d, "TenantId", "tenant_id", normalize_keys=normalize_keys))),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a32
3
+ Version: 0.1.0a34
4
4
  Summary: AzureML Registry tools and CLI
5
5
  Author: Microsoft Corp
6
6
  License: https://aka.ms/azureml-sdk-license
@@ -10,7 +10,7 @@ Requires-Dist: azure-identity<2.0
10
10
  Requires-Dist: ruamel-yaml<0.19,>=0.17.21
11
11
  Requires-Dist: diskcache~=5.6
12
12
  Requires-Dist: azure-ai-ml<2.0,>=1.30.0
13
- Requires-Dist: azureml-assets<2.0
13
+ Requires-Dist: azureml-assets<2.0,>=1.16.99
14
14
  Dynamic: author
15
15
  Dynamic: license
16
16
  Dynamic: license-file
@@ -13,27 +13,27 @@ azureml/registry/data/asset.yaml.template,sha256=WTgfuvKEBp-EVFSQ0JpU0h4z_ULJdUL
13
13
  azureml/registry/data/description.md.template,sha256=DiVAQEXGXoKmhV4LPqE3NupxVtcsuDZ1pn2UA5Fzd6U,2821
14
14
  azureml/registry/data/evaluation.md.template,sha256=FC9U8EI_1Dg9Vz18ftAFDDmTqvpwELDkIDlYqB8C9Dk,1031
15
15
  azureml/registry/data/model-variant.schema.json,sha256=AT4Dy6cCtp_SFUfSqYIqcER8AldpYm0QIEy1abY3QWE,1699
16
- azureml/registry/data/model.schema.json,sha256=yP5YejvH9VBrWrh8mXjBLcRotjwd5kMqs4hSNAqc9aU,47605
16
+ azureml/registry/data/model.schema.json,sha256=OoxFRCKCEnNjB5kPPTDUlzq_LAZBP_AbcQYqNNbdnvY,48726
17
17
  azureml/registry/data/model.yaml.template,sha256=h5uqAN22FLaWrbPxIb8yVKH9cGDBrIwooXYYfsKhxDw,245
18
18
  azureml/registry/data/notes.md.template,sha256=rgGGHQaxfVg6COIzZU8EVBa48sRPnNezVkCMGNyRRNo,1528
19
19
  azureml/registry/data/validate_model_schema.py,sha256=4Exd9K6ry93URbx21gn2wSJ6xPacYfO7tmZ96cr8ViM,8376
20
20
  azureml/registry/data/validate_model_variant_schema.py,sha256=0nC1zWzvtYAwowY1MG4lIhFDtBBhezwpya4z-ItafWo,3665
21
21
  azureml/registry/mgmt/__init__.py,sha256=LMhqcEC8ItmmpKZljElGXH-6olHlT3SLl0dJU01OvuM,226
22
- azureml/registry/mgmt/asset_management.py,sha256=pfQsaXzt_BllEtFHXclnHEG2ShXJmHp1H2QrU_kKj-8,14736
22
+ azureml/registry/mgmt/asset_management.py,sha256=zMAgrwMEQTDh8YjL5B1_p7_Wi0bR-vKx2qyuc3FudsE,15269
23
23
  azureml/registry/mgmt/create_asset_template.py,sha256=ejwLuIsmzJOoUePoxbM-eGMg2E3QHfdX-nPMBzYUVMQ,3525
24
- azureml/registry/mgmt/create_manifest.py,sha256=N9wRmjAKO09A3utN_lCUsM_Ufpj7PL0SJz-XHPHWuyM,9528
24
+ azureml/registry/mgmt/create_manifest.py,sha256=WuL1UNCi-vLOgI71FHNSIP3CAIYJ-jwPvTbEtJPCuTw,9335
25
25
  azureml/registry/mgmt/create_model_spec.py,sha256=1PdAcUf-LomvljoT8wKQihXMTLd7DoTgN0qDX4Lol1A,10473
26
26
  azureml/registry/mgmt/model_management.py,sha256=STTr_uvdPKV2NaJ5UvS5aMi3yejVF6Hkj9DjofJLQik,7453
27
- azureml/registry/mgmt/syndication_manifest.py,sha256=8Sfd49QuCA5en5_mIOLE21kZVpnReUXowx_g0TVRgWg,9025
27
+ azureml/registry/mgmt/syndication_manifest.py,sha256=kSL6SbbpsraIBoo2XdCv6lbg1XxHs3YqPc0ozLX1v54,9900
28
28
  azureml/registry/mgmt/util.py,sha256=1q90sLr70w8FrXYqyHUwszjXa7OdT2MRSI_gJf-aVdY,2403
29
29
  azureml/registry/tools/__init__.py,sha256=IAuWWpGfZm__pAkBIxmpJz84QskpkxBr0yDk1TUSnkE,223
30
30
  azureml/registry/tools/config.py,sha256=eZ8F6vKvKX-rHkZrnLmjX-h_1ccqSSTkUK0s3ADoD9o,3662
31
31
  azureml/registry/tools/create_or_update_assets.py,sha256=xKGmcc3GVQ0qoZav68NENL86dYN1jdTPXCHK1SfK_vM,16207
32
32
  azureml/registry/tools/registry_utils.py,sha256=zgYlCiOONtQJ4yZ9wg8tKVoE8dh6rrjB8hYBGhpV9-0,1403
33
33
  azureml/registry/tools/repo2registry_config.py,sha256=YxSpLl16m-Cs9RkrXjpWgg6la2zukl-y1i12pV4UIco,4891
34
- azureml_registry_tools-0.1.0a32.dist-info/licenses/LICENSE.txt,sha256=n20rxwp7_NGrrShv9Qvcs90sjI1l3Pkt3m-5OPCWzgs,845
35
- azureml_registry_tools-0.1.0a32.dist-info/METADATA,sha256=KG3mK4xG_yuwbfjmCRAAckAJxDOzAglwCz581KMH298,531
36
- azureml_registry_tools-0.1.0a32.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- azureml_registry_tools-0.1.0a32.dist-info/entry_points.txt,sha256=iRUkAeQidMnO6RQzpLqMUBTcyYtNzAfSin9WnSdVGLw,147
38
- azureml_registry_tools-0.1.0a32.dist-info/top_level.txt,sha256=ZOeEa0TAXo6i5wOjwBoqfIGEuxOcKuscGgNSpizqREY,8
39
- azureml_registry_tools-0.1.0a32.dist-info/RECORD,,
34
+ azureml_registry_tools-0.1.0a34.dist-info/licenses/LICENSE.txt,sha256=n20rxwp7_NGrrShv9Qvcs90sjI1l3Pkt3m-5OPCWzgs,845
35
+ azureml_registry_tools-0.1.0a34.dist-info/METADATA,sha256=PfpeXbIue5E66DwBnydtrt9LbWYm8qr3Q3b87IZLPks,541
36
+ azureml_registry_tools-0.1.0a34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ azureml_registry_tools-0.1.0a34.dist-info/entry_points.txt,sha256=iRUkAeQidMnO6RQzpLqMUBTcyYtNzAfSin9WnSdVGLw,147
38
+ azureml_registry_tools-0.1.0a34.dist-info/top_level.txt,sha256=ZOeEa0TAXo6i5wOjwBoqfIGEuxOcKuscGgNSpizqREY,8
39
+ azureml_registry_tools-0.1.0a34.dist-info/RECORD,,