azureml-registry-tools 0.1.0a33__tar.gz → 0.1.0a34__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.0a33/azureml_registry_tools.egg-info → azureml_registry_tools-0.1.0a34}/PKG-INFO +1 -1
  2. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/create_manifest.py +0 -8
  3. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/syndication_manifest.py +22 -2
  4. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34/azureml_registry_tools.egg-info}/PKG-INFO +1 -1
  5. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/setup.py +1 -1
  6. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/LICENSE.txt +0 -0
  7. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/MANIFEST.in +0 -0
  8. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/__init__.py +0 -0
  9. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/__init__.py +0 -0
  10. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_cli/__init__.py +0 -0
  11. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_cli/registry_syndication_cli.py +0 -0
  12. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_cli/repo2registry_cli.py +0 -0
  13. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_rest_client/__init__.py +0 -0
  14. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_rest_client/arm_client.py +0 -0
  15. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_rest_client/base_rest_client.py +0 -0
  16. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_rest_client/registry_management_client.py +0 -0
  17. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/_rest_client/registry_model_client.py +0 -0
  18. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/__init__.py +0 -0
  19. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/asset.yaml.template +0 -0
  20. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/description.md.template +0 -0
  21. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/evaluation.md.template +0 -0
  22. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/model-variant.schema.json +0 -0
  23. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/model.schema.json +0 -0
  24. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/model.yaml.template +0 -0
  25. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/notes.md.template +0 -0
  26. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/validate_model_schema.py +0 -0
  27. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/data/validate_model_variant_schema.py +0 -0
  28. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/__init__.py +0 -0
  29. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/asset_management.py +0 -0
  30. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/create_asset_template.py +0 -0
  31. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/create_model_spec.py +0 -0
  32. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/model_management.py +0 -0
  33. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/mgmt/util.py +0 -0
  34. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/tools/__init__.py +0 -0
  35. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/tools/config.py +0 -0
  36. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/tools/create_or_update_assets.py +0 -0
  37. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/tools/registry_utils.py +0 -0
  38. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml/registry/tools/repo2registry_config.py +0 -0
  39. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml_registry_tools.egg-info/SOURCES.txt +0 -0
  40. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml_registry_tools.egg-info/dependency_links.txt +0 -0
  41. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml_registry_tools.egg-info/entry_points.txt +0 -0
  42. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml_registry_tools.egg-info/requires.txt +0 -0
  43. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/azureml_registry_tools.egg-info/top_level.txt +0 -0
  44. {azureml_registry_tools-0.1.0a33 → azureml_registry_tools-0.1.0a34}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a33
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
@@ -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.0a33
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
@@ -18,7 +18,7 @@ exclude_list = ["*.tests"]
18
18
 
19
19
  setup(
20
20
  name='azureml-registry-tools',
21
- version="0.1.0a33",
21
+ version="0.1.0a34",
22
22
  description='AzureML Registry tools and CLI',
23
23
  author='Microsoft Corp',
24
24
  license="https://aka.ms/azureml-sdk-license",