azureml-registry-tools 0.1.0a8__tar.gz → 0.1.0a10__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 (42) hide show
  1. {azureml_registry_tools-0.1.0a8/azureml_registry_tools.egg-info → azureml_registry_tools-0.1.0a10}/PKG-INFO +2 -2
  2. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/asset_management.py +15 -2
  3. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10/azureml_registry_tools.egg-info}/PKG-INFO +2 -2
  4. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml_registry_tools.egg-info/requires.txt +1 -1
  5. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/setup.py +2 -2
  6. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/LICENSE.txt +0 -0
  7. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/MANIFEST.in +0 -0
  8. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/__init__.py +0 -0
  9. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/__init__.py +0 -0
  10. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_cli/__init__.py +0 -0
  11. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_cli/registry_syndication_cli.py +0 -0
  12. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_cli/repo2registry_cli.py +0 -0
  13. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_rest_client/__init__.py +0 -0
  14. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_rest_client/arm_client.py +0 -0
  15. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_rest_client/base_rest_client.py +0 -0
  16. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/_rest_client/registry_management_client.py +0 -0
  17. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/__init__.py +0 -0
  18. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/asset.yaml.template +0 -0
  19. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/description.md.template +0 -0
  20. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/evaluation.md.template +0 -0
  21. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/model-variant.schema.json +0 -0
  22. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/model.schema.json +0 -0
  23. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/model.yaml.template +0 -0
  24. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/notes.md.template +0 -0
  25. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/validate_model_schema.py +0 -0
  26. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/data/validate_model_variant_schema.py +0 -0
  27. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/__init__.py +0 -0
  28. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/create_asset_template.py +0 -0
  29. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/create_manifest.py +0 -0
  30. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/create_model_spec.py +0 -0
  31. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/registry_config.py +0 -0
  32. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/mgmt/syndication_manifest.py +0 -0
  33. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/tools/__init__.py +0 -0
  34. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/tools/config.py +0 -0
  35. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/tools/create_or_update_assets.py +0 -0
  36. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/tools/registry_utils.py +0 -0
  37. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml/registry/tools/repo2registry_config.py +0 -0
  38. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml_registry_tools.egg-info/SOURCES.txt +0 -0
  39. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml_registry_tools.egg-info/dependency_links.txt +0 -0
  40. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml_registry_tools.egg-info/entry_points.txt +0 -0
  41. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/azureml_registry_tools.egg-info/top_level.txt +0 -0
  42. {azureml_registry_tools-0.1.0a8 → azureml_registry_tools-0.1.0a10}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a8
3
+ Version: 0.1.0a10
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
13
- Requires-Dist: azureml-assets<2.0
13
+ Requires-Dist: azureml-assets<=1.16.86
14
14
  Dynamic: author
15
15
  Dynamic: license
16
16
  Dynamic: license-file
@@ -107,12 +107,13 @@ def set_storage_and_sas(asset: AssetConfig, storage_config: dict):
107
107
  _ = extra_config.path.get_uri(token_expiration=timedelta(hours=1))
108
108
 
109
109
 
110
- def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str) -> AssetConfig:
110
+ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str, storage_overrides_exist: bool = False) -> AssetConfig:
111
111
  """Build a mutable copy of the asset in a temporary directory.
112
112
 
113
113
  Args:
114
114
  base_asset (AssetConfig): Base asset configuration to copy
115
115
  mutable_asset_dir (str): Directory path for the mutable asset copy
116
+ storage_overrides_exist (bool, optional): If True, model config will be modified to set type to custom_model.
116
117
 
117
118
  Returns:
118
119
  AssetConfig: Mutable asset configuration object
@@ -124,12 +125,14 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str) -> Asse
124
125
  mutable_asset_dir = Path(mutable_asset_dir).resolve()
125
126
  base_asset_file = base_asset.file_name_with_path.resolve()
126
127
  base_spec_file = base_asset.spec_with_path.resolve()
128
+ base_model_file = base_asset.extra_config_with_path.resolve()
127
129
 
128
130
  shutil.copytree(common_dir, mutable_asset_dir, dirs_exist_ok=True)
129
131
 
130
132
  # Reference asset files in mutable directory
131
133
  asset_config_file = mutable_asset_dir / base_asset_file.relative_to(common_dir)
132
134
  spec_config_file = mutable_asset_dir / base_spec_file.relative_to(common_dir)
135
+ model_config_file = mutable_asset_dir / base_model_file.relative_to(common_dir)
133
136
 
134
137
  # Autoincrement version for mutable asset
135
138
  with open(spec_config_file, "r") as f:
@@ -139,6 +142,16 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str) -> Asse
139
142
  with open(spec_config_file, "w") as f:
140
143
  yaml.dump(spec_config, f)
141
144
 
145
+ # If storage overrides are provided, default set model type to custom_model
146
+ if storage_overrides_exist:
147
+ print("Storage overrides provided, default setting model type to custom_model")
148
+ with open(model_config_file, "r") as f:
149
+ model_config = yaml.safe_load(f)
150
+ model_config["publish"]["type"] = "custom_model"
151
+
152
+ with open(model_config_file, "w") as f:
153
+ yaml.dump(model_config, f)
154
+
142
155
  mutable_asset = AssetConfig(asset_config_file)
143
156
 
144
157
  return mutable_asset
@@ -162,7 +175,7 @@ def create_or_update_asset(readonly_asset: AssetConfig, config: RegistryConfig):
162
175
  )
163
176
 
164
177
  with tempfile.TemporaryDirectory() as mutable_asset_dir:
165
- mutable_asset = build_mutable_asset(base_asset=readonly_asset, mutable_asset_dir=mutable_asset_dir)
178
+ mutable_asset = build_mutable_asset(base_asset=readonly_asset, mutable_asset_dir=mutable_asset_dir, storage_overrides_exist=bool(config.storage_config))
166
179
  # autoincrement version
167
180
  try:
168
181
  set_storage_and_sas(mutable_asset, config.storage_config)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a8
3
+ Version: 0.1.0a10
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
13
- Requires-Dist: azureml-assets<2.0
13
+ Requires-Dist: azureml-assets<=1.16.86
14
14
  Dynamic: author
15
15
  Dynamic: license
16
16
  Dynamic: license-file
@@ -2,4 +2,4 @@ azure-identity<2.0
2
2
  ruamel-yaml<0.19,>=0.17.21
3
3
  diskcache~=5.6
4
4
  azure-ai-ml<2.0
5
- azureml-assets<2.0
5
+ azureml-assets<=1.16.86
@@ -11,14 +11,14 @@ DEPENDENCIES = [
11
11
  "ruamel-yaml>=0.17.21,<0.19",
12
12
  "diskcache~=5.6",
13
13
  "azure-ai-ml<2.0",
14
- "azureml-assets<2.0"
14
+ "azureml-assets<=1.16.86"
15
15
  ]
16
16
 
17
17
  exclude_list = ["*.tests"]
18
18
 
19
19
  setup(
20
20
  name='azureml-registry-tools',
21
- version="0.1.0a8",
21
+ version="0.1.0a10",
22
22
  description='AzureML Registry tools and CLI',
23
23
  author='Microsoft Corp',
24
24
  license="https://aka.ms/azureml-sdk-license",