azureml-registry-tools 0.1.0a26__tar.gz → 0.1.0a28__tar.gz

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.
Files changed (44) hide show
  1. {azureml_registry_tools-0.1.0a26/azureml_registry_tools.egg-info → azureml_registry_tools-0.1.0a28}/PKG-INFO +1 -1
  2. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/model.schema.json +13 -2
  3. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/asset_management.py +5 -1
  4. azureml_registry_tools-0.1.0a28/azureml/registry/mgmt/util.py +75 -0
  5. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28/azureml_registry_tools.egg-info}/PKG-INFO +1 -1
  6. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml_registry_tools.egg-info/SOURCES.txt +1 -0
  7. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/setup.py +1 -1
  8. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/LICENSE.txt +0 -0
  9. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/MANIFEST.in +0 -0
  10. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/__init__.py +0 -0
  11. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/__init__.py +0 -0
  12. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_cli/__init__.py +0 -0
  13. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_cli/registry_syndication_cli.py +0 -0
  14. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_cli/repo2registry_cli.py +0 -0
  15. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_rest_client/__init__.py +0 -0
  16. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_rest_client/arm_client.py +0 -0
  17. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_rest_client/base_rest_client.py +0 -0
  18. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_rest_client/registry_management_client.py +0 -0
  19. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/_rest_client/registry_model_client.py +0 -0
  20. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/__init__.py +0 -0
  21. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/asset.yaml.template +0 -0
  22. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/description.md.template +0 -0
  23. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/evaluation.md.template +0 -0
  24. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/model-variant.schema.json +0 -0
  25. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/model.yaml.template +0 -0
  26. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/notes.md.template +0 -0
  27. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/validate_model_schema.py +0 -0
  28. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/data/validate_model_variant_schema.py +0 -0
  29. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/__init__.py +0 -0
  30. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/create_asset_template.py +0 -0
  31. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/create_manifest.py +0 -0
  32. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/create_model_spec.py +0 -0
  33. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/model_management.py +0 -0
  34. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/mgmt/syndication_manifest.py +0 -0
  35. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/tools/__init__.py +0 -0
  36. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/tools/config.py +0 -0
  37. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/tools/create_or_update_assets.py +0 -0
  38. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/tools/registry_utils.py +0 -0
  39. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml/registry/tools/repo2registry_config.py +0 -0
  40. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml_registry_tools.egg-info/dependency_links.txt +0 -0
  41. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml_registry_tools.egg-info/entry_points.txt +0 -0
  42. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml_registry_tools.egg-info/requires.txt +0 -0
  43. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/azureml_registry_tools.egg-info/top_level.txt +0 -0
  44. {azureml_registry_tools-0.1.0a26 → azureml_registry_tools-0.1.0a28}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a26
3
+ Version: 0.1.0a28
4
4
  Summary: AzureML Registry tools and CLI
5
5
  Author: Microsoft Corp
6
6
  License: https://aka.ms/azureml-sdk-license
@@ -272,6 +272,11 @@
272
272
  "type": "string",
273
273
  "enum": ["true"]
274
274
  },
275
+ "isCustomerInfoRequired": {
276
+ "description": "This will trigger a customer info form to be shown to the user before they can access the model",
277
+ "type": "string",
278
+ "enum": ["true", "false"]
279
+ },
275
280
  "keywords": {
276
281
  "description": "List of key words as a comma-separated string. Max 3 keywords",
277
282
  "type": "string",
@@ -299,6 +304,11 @@
299
304
  "type": "string",
300
305
  "format": "long-string"
301
306
  },
307
+ "fineTuningMethods": {
308
+ "description": "Fine-tuning strategy applied to customize the model behavior",
309
+ "type": "string",
310
+ "pattern": "^(Supervised|Direct Preference Optimization|Reinforcement)(?:\\s*,\\s*(Supervised|Direct Preference Optimization|Reinforcement))*$"
311
+ },
302
312
  "maas-finetuning": {
303
313
  "description": "Whether MaaS fine-tuning is enabled. True means enabled, if disabled remove the key",
304
314
  "type": "string",
@@ -351,7 +361,7 @@
351
361
  "modelCapabilities": {
352
362
  "description": "Model capabilities (e.g., agents, assistants) as a comma-separated string",
353
363
  "type": "string",
354
- "pattern": "^(agents|assistants|routing|reasoning|streaming|tool-calling)(?:\\s*,\\s*(agents|assistants|routing|reasoning|streaming|tool-calling))*$"
364
+ "pattern": "^(agents|agentsV2|assistants|routing|reasoning|streaming|tool-calling)(?:\\s*,\\s*(agents|agentsV2|assistants|routing|reasoning|streaming|tool-calling))*$"
355
365
  },
356
366
  "modelHash": {
357
367
  "description": "Hash of the model",
@@ -385,7 +395,7 @@
385
395
  "task": {
386
396
  "description": "Tasks supported by the model as a comma-separated string",
387
397
  "type": "string",
388
- "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)(?:\\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))*$"
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)(?:\\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))*$"
389
399
  },
390
400
  "textContextWindow": {
391
401
  "description": "Context window size",
@@ -583,6 +593,7 @@
583
593
  "type": "string",
584
594
  "enum": [
585
595
  "agents",
596
+ "agentsV2",
586
597
  "assistants",
587
598
  "routing",
588
599
  "reasoning",
@@ -18,6 +18,7 @@ from azure.identity import DefaultAzureCredential
18
18
  from azureml.registry.data.validate_model_schema import validate_model_schema
19
19
  from azureml.registry.data.validate_model_variant_schema import validate_model_variant_schema
20
20
  from azureml.registry._rest_client.registry_management_client import RegistryManagementClient
21
+ from azureml.registry.mgmt.util import resolve_from_file_for_asset
21
22
 
22
23
  # Windows compatibility patch - must be applied before importing azureml.assets
23
24
  from subprocess import run
@@ -98,6 +99,9 @@ def put_system_metadata(ml_client: MLClient, asset: AssetConfig, registry: str,
98
99
  registry (str): Name of registry.
99
100
  system_metadata (dict): System metadata payload.
100
101
  """
102
+ # First, transform system metadata such that any files are read and their content used
103
+ system_metadata = {k: resolve_from_file_for_asset(asset, v) for k, v in system_metadata.items()}
104
+
101
105
  # Use RegistryManagementClient for discovery
102
106
  registry_mgmt_client = RegistryManagementClient(registry_name=registry)
103
107
  discovery = registry_mgmt_client.discovery()
@@ -120,7 +124,7 @@ def put_system_metadata(ml_client: MLClient, asset: AssetConfig, registry: str,
120
124
  }
121
125
 
122
126
  print("Attempting to PUT system metadata")
123
- print(f"Payload: {system_metadata}")
127
+ print(f"System Metadata Payload: {system_metadata}")
124
128
 
125
129
  response = requests.put(url, headers=headers, json=system_metadata)
126
130
 
@@ -0,0 +1,75 @@
1
+ """File resolution utilities for asset management."""
2
+
3
+ import os
4
+ from pathlib import Path, PurePath
5
+ from typing import Tuple, Union, Any
6
+
7
+ import azureml.assets as assets # noqa: E402
8
+
9
+
10
+ def is_file_relative_to_asset_path(asset: assets.AssetConfig, value: Any) -> bool:
11
+ """Check if the value is a file with respect to the asset path.
12
+
13
+ Args:
14
+ asset (AssetConfig): the asset to try and resolve the value for
15
+ value: value to check
16
+
17
+ Returns:
18
+ bool: True if value represents a file relative to asset path, False otherwise
19
+ """
20
+ if not isinstance(value, str) and not isinstance(value, PurePath):
21
+ return False
22
+
23
+ path_value = value if isinstance(value, Path) else Path(value)
24
+
25
+ if not path_value.is_relative_to(asset.file_path):
26
+ path_value = asset._append_to_file_path(path_value)
27
+
28
+ return os.path.isfile(path_value)
29
+
30
+
31
+ def resolve_from_file_for_asset(asset: assets.AssetConfig, value: Any) -> Any:
32
+ """Resolve the value from a file for an asset if it is a file, otherwise returns the value.
33
+
34
+ Args:
35
+ asset (AssetConfig): the asset to try and resolve the value for
36
+ value: value to try and resolve
37
+
38
+ Returns:
39
+ Any: File content if value is a file path relative to asset, otherwise the original value
40
+ """
41
+ if not is_file_relative_to_asset_path(asset, value):
42
+ return value
43
+
44
+ path_value = value if isinstance(value, Path) else Path(value)
45
+
46
+ if not path_value.is_relative_to(asset.file_path):
47
+ path_value = asset._append_to_file_path(path_value)
48
+
49
+ is_resolved_from_file, resolved_value = _resolve_from_file(path_value)
50
+
51
+ if is_resolved_from_file:
52
+ return resolved_value
53
+ else:
54
+ return value
55
+
56
+
57
+ def _resolve_from_file(value: Union[str, Path]) -> Tuple[bool, Union[str, None]]:
58
+ """Resolve file content (internal helper).
59
+
60
+ Args:
61
+ value: File path to resolve
62
+
63
+ Returns:
64
+ Tuple[bool, Union[str, None]]: (success, content) where success indicates
65
+ if file was read and content is the file content
66
+ """
67
+ if os.path.isfile(value):
68
+ try:
69
+ with open(value, 'r') as f:
70
+ content = f.read()
71
+ return (True, content)
72
+ except Exception as e:
73
+ raise Exception(f"Failed to read file {value}: {e}")
74
+ else:
75
+ return (False, None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a26
3
+ Version: 0.1.0a28
4
4
  Summary: AzureML Registry tools and CLI
5
5
  Author: Microsoft Corp
6
6
  License: https://aka.ms/azureml-sdk-license
@@ -29,6 +29,7 @@ azureml/registry/mgmt/create_manifest.py
29
29
  azureml/registry/mgmt/create_model_spec.py
30
30
  azureml/registry/mgmt/model_management.py
31
31
  azureml/registry/mgmt/syndication_manifest.py
32
+ azureml/registry/mgmt/util.py
32
33
  azureml/registry/tools/__init__.py
33
34
  azureml/registry/tools/config.py
34
35
  azureml/registry/tools/create_or_update_assets.py
@@ -18,7 +18,7 @@ exclude_list = ["*.tests"]
18
18
 
19
19
  setup(
20
20
  name='azureml-registry-tools',
21
- version="0.1.0a26",
21
+ version="0.1.0a28",
22
22
  description='AzureML Registry tools and CLI',
23
23
  author='Microsoft Corp',
24
24
  license="https://aka.ms/azureml-sdk-license",