azureml-registry-tools 0.1.0a29__py3-none-any.whl → 0.1.0a31__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.
@@ -304,10 +304,10 @@
304
304
  "type": "string",
305
305
  "format": "long-string"
306
306
  },
307
- "fineTuningMethods": {
308
- "description": "Fine-tuning strategy applied to customize the model behavior",
307
+ "fineTuneOnlyModel": {
308
+ "description": "Indicates the model is available only for fine-tuning. The model itself is not deployable for inferencing.",
309
309
  "type": "string",
310
- "pattern": "^(Supervised|Direct Preference Optimization|Reinforcement)(?:\\s*,\\s*(Supervised|Direct Preference Optimization|Reinforcement))*$"
310
+ "enum": ["true", "false"]
311
311
  },
312
312
  "maas-finetuning": {
313
313
  "description": "Whether MaaS fine-tuning is enabled. True means enabled, if disabled remove the key",
@@ -361,7 +361,7 @@
361
361
  "modelCapabilities": {
362
362
  "description": "Model capabilities (e.g., agents, assistants) as a comma-separated string",
363
363
  "type": "string",
364
- "pattern": "^(agents|agentsV2|assistants|routing|reasoning|streaming|tool-calling|function-calling|image-input)(?:\\s*,\\s*(agents|agentsV2|assistants|routing|reasoning|streaming|tool-calling|function-calling|image-input))*$"
364
+ "pattern": "^(agents|agentsV2|assistants|routing|reasoning|reasoning-summary|streaming|tool-calling|function-calling|image-input|fine-tuning)(?:\\s*,\\s*(agents|agentsV2|assistants|routing|reasoning|reasoning-summary|streaming|tool-calling|function-calling|image-input|fine-tuning))*$"
365
365
  },
366
366
  "modelHash": {
367
367
  "description": "Hash of the model",
@@ -40,7 +40,7 @@ def load_schema(schema_file: Path, allow_additional_properties: bool = False) ->
40
40
  dict: Loaded model schema
41
41
  """
42
42
  # Load schema from file
43
- with open(schema_file, 'r') as file:
43
+ with open(schema_file, 'r', encoding='utf-8') as file:
44
44
  schema = yaml.safe_load(file)
45
45
 
46
46
  if allow_additional_properties:
@@ -101,7 +101,7 @@ def validate_model_schema(input_dirs: List[Path],
101
101
  changed_model_count += 1
102
102
  # Validate the file against the schema
103
103
  try:
104
- with open(file_path, "r") as f:
104
+ with open(file_path, "r", encoding="utf-8") as f:
105
105
  spec_config = yaml.safe_load(f)
106
106
 
107
107
  # Collect all validation errors
@@ -123,7 +123,7 @@ def validate_model_schema(input_dirs: List[Path],
123
123
  else:
124
124
  # Try to find line number by looking at the path and instance
125
125
  try:
126
- with open(file_path, "r") as f:
126
+ with open(file_path, "r", encoding="utf-8") as f:
127
127
  yaml_content = f.readlines()
128
128
  yaml_lines = []
129
129
  for idx, line in enumerate(yaml_content):
@@ -32,7 +32,7 @@ def validate_model_variant_schema(input_dirs: List[Path],
32
32
  """
33
33
  # Load variantInfo schema from file
34
34
  model_variant_info_schema = {}
35
- with open(model_variant_schema_file, 'r') as file:
35
+ with open(model_variant_schema_file, 'r', encoding="utf-8") as file:
36
36
  model_variant_info_schema = yaml.safe_load(file)
37
37
 
38
38
  asset_count = 0
@@ -45,7 +45,7 @@ def validate_model_variant_schema(input_dirs: List[Path],
45
45
  model_count += 1
46
46
  # Extract model variant info from spec
47
47
  variant_info = None
48
- with open(asset_config.spec_with_path, "r") as f:
48
+ with open(asset_config.spec_with_path, "r", encoding="utf-8") as f:
49
49
  spec_config = yaml.safe_load(f)
50
50
  variant_info = spec_config.get("variantInfo")
51
51
 
@@ -167,7 +167,7 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str, overrid
167
167
  spec_config_file = mutable_asset_dir / base_spec_file.relative_to(common_dir)
168
168
  model_config_file = mutable_asset_dir / base_model_file.relative_to(common_dir)
169
169
 
170
- with open(spec_config_file, "r") as f:
170
+ with open(spec_config_file, "r", encoding="utf-8") as f:
171
171
  spec_config = yaml.safe_load(f)
172
172
 
173
173
  # Override storage info for model card preview
@@ -182,7 +182,7 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str, overrid
182
182
  spec_config["properties"].pop("intellectualPropertyPublisher", None)
183
183
 
184
184
  # Create dummy file to upload to storage
185
- with open(mutable_asset_dir / "dummy.txt", "w") as f:
185
+ with open(mutable_asset_dir / "dummy.txt", "w", encoding="utf-8") as f:
186
186
  f.write("This is a dummy file used in the artifact for model card preview.")
187
187
 
188
188
  yaml_content = """
@@ -196,8 +196,8 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str, overrid
196
196
  new_model_config = yaml.safe_load(yaml_content)
197
197
 
198
198
  # Overwrite model config
199
- with open(model_config_file, "w") as f:
200
- yaml.dump(new_model_config, f)
199
+ with open(model_config_file, "w", encoding="utf-8") as f:
200
+ yaml.dump(new_model_config, f, allow_unicode=True, default_flow_style=False)
201
201
 
202
202
  # Extract system_metadata from model spec
203
203
  # PUT request will be made after asset creation while the SDK update/PATCH logic is being updated
@@ -210,8 +210,8 @@ def build_mutable_asset(base_asset: AssetConfig, mutable_asset_dir: str, overrid
210
210
 
211
211
  # Write updated spec config back to the file
212
212
  if override_storage or system_metadata_payload:
213
- with open(spec_config_file, "w") as f:
214
- yaml.dump(spec_config, f)
213
+ with open(spec_config_file, "w", encoding="utf-8") as f:
214
+ yaml.dump(spec_config, f, allow_unicode=True, default_flow_style=False)
215
215
 
216
216
  mutable_asset = AssetConfig(asset_config_file)
217
217
 
@@ -66,7 +66,7 @@ def _resolve_from_file(value: Union[str, Path]) -> Tuple[bool, Union[str, None]]
66
66
  """
67
67
  if os.path.isfile(value):
68
68
  try:
69
- with open(value, 'r') as f:
69
+ with open(value, 'r', encoding='utf-8') as f:
70
70
  content = f.read()
71
71
  return (True, content)
72
72
  except Exception as e:
@@ -33,7 +33,7 @@ class AssetSpec:
33
33
 
34
34
  def __init__(self, file_name: str, asset_type: str):
35
35
  """Asset spec init."""
36
- with open(file_name) as f:
36
+ with open(file_name, "r", encoding="utf-8") as f:
37
37
  self._yaml = YAML().load(f)
38
38
 
39
39
  self._file_name_with_path = Path(file_name)
@@ -132,7 +132,7 @@ def merge_yamls(existing_asset_file_name: str,
132
132
  Returns:
133
133
  dict: Merged asset data.
134
134
  """
135
- with open(existing_asset_file_name, "r") as existing_asset_file, open(updated_asset.file_name_with_path, "r") as updated_asset_file:
135
+ with open(existing_asset_file_name, "r", encoding="utf-8") as existing_asset_file, open(updated_asset.file_name_with_path, "r", encoding="utf-8") as updated_asset_file:
136
136
  existing_asset_dict = yaml.safe_load(existing_asset_file)
137
137
  updated_asset_dict = yaml.safe_load(updated_asset_file)
138
138
 
@@ -173,8 +173,8 @@ def merge_assets(existing_asset: Union[Component, Data, Model],
173
173
  with tempfile.NamedTemporaryFile(suffix=".yaml", delete=False) as merged_asset_temp_file:
174
174
  merged_asset_temp_file_name = merged_asset_temp_file.name
175
175
 
176
- with open(merged_asset_temp_file_name, "w") as merged_asset_temp_file:
177
- merged_asset_temp_file.write(yaml.dump(merged_result))
176
+ with open(merged_asset_temp_file_name, "w", encoding="utf-8") as merged_asset_temp_file:
177
+ merged_asset_temp_file.write(yaml.dump(merged_result, allow_unicode=True))
178
178
 
179
179
  if asset.type == AssetType.MODEL:
180
180
  merged_asset = load_model(merged_asset_temp_file_name)
@@ -211,8 +211,8 @@ def write_results(results_dict: dict,
211
211
  # Produce JSON output on status and diffs
212
212
  print("\nAsset create_or_update results:")
213
213
  print(json.dumps(results_dict, indent=2))
214
- with open(output_json_file_name, "w") as f:
215
- json.dump(results_dict, f, indent=2)
214
+ with open(output_json_file_name, "w", encoding="utf-8") as f:
215
+ json.dump(results_dict, f, indent=2, ensure_ascii=False)
216
216
  print(f"Wrote asset create_or_update results to file {output_json_file_name}")
217
217
 
218
218
 
@@ -100,7 +100,7 @@ def create_repo2registry_config(registry_name: str, subscription: str, resource_
100
100
  repo2registry_config.set("settings", "continue_on_asset_failure", continue_on_asset_failure)
101
101
 
102
102
  # Write to path
103
- with open(repo2registry_config_file_name, "w") as repo2registry_config_file:
103
+ with open(repo2registry_config_file_name, "w", encoding="utf-8") as repo2registry_config_file:
104
104
  repo2registry_config.write(repo2registry_config_file)
105
105
 
106
106
  repo2registry_cfg_abs_path = Path(repo2registry_config_file_name).resolve().as_posix()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: azureml-registry-tools
3
- Version: 0.1.0a29
3
+ Version: 0.1.0a31
4
4
  Summary: AzureML Registry tools and CLI
5
5
  Author: Microsoft Corp
6
6
  License: https://aka.ms/azureml-sdk-license
@@ -9,7 +9,7 @@ License-File: LICENSE.txt
9
9
  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
- Requires-Dist: azure-ai-ml<2.0
12
+ Requires-Dist: azure-ai-ml<2.0,>=1.30.0
13
13
  Requires-Dist: azureml-assets<2.0
14
14
  Dynamic: author
15
15
  Dynamic: license
@@ -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=GbpT9kqZ-7t_2YxoU4QX1ojI_yo9XJfR2bAhrG0LgZc,47085
16
+ azureml/registry/data/model.schema.json,sha256=BtzhaZFp2FeQMBcTsYLj5KoC9l36Zvzmt_k2v4hti9Y,47073
17
17
  azureml/registry/data/model.yaml.template,sha256=h5uqAN22FLaWrbPxIb8yVKH9cGDBrIwooXYYfsKhxDw,245
18
18
  azureml/registry/data/notes.md.template,sha256=rgGGHQaxfVg6COIzZU8EVBa48sRPnNezVkCMGNyRRNo,1528
19
- azureml/registry/data/validate_model_schema.py,sha256=OQp2E01kdxSphvUQYQvelSiD24-qUG6nTFuzW60wX2c,8322
20
- azureml/registry/data/validate_model_variant_schema.py,sha256=JPVNtRBn6qciMu4PaRXOvS86OGGW0cocL2Rri4xYKo8,3629
19
+ azureml/registry/data/validate_model_schema.py,sha256=4Exd9K6ry93URbx21gn2wSJ6xPacYfO7tmZ96cr8ViM,8376
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=NeYjjtOFlXJT1c0s9pW5mBjJgyxQ7zqZbB-YzmNOg9s,14465
22
+ azureml/registry/mgmt/asset_management.py,sha256=Gnkea8N2UTfZljkPuQ1ZLmEY8ejFaMYZSB3DjmjXJ0U,14629
23
23
  azureml/registry/mgmt/create_asset_template.py,sha256=ejwLuIsmzJOoUePoxbM-eGMg2E3QHfdX-nPMBzYUVMQ,3525
24
24
  azureml/registry/mgmt/create_manifest.py,sha256=N9wRmjAKO09A3utN_lCUsM_Ufpj7PL0SJz-XHPHWuyM,9528
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
27
  azureml/registry/mgmt/syndication_manifest.py,sha256=8Sfd49QuCA5en5_mIOLE21kZVpnReUXowx_g0TVRgWg,9025
28
- azureml/registry/mgmt/util.py,sha256=BeVUsiMbZdO6rc9tHlsFg0AkVX62lzKn4Ko_y329r-I,2385
28
+ azureml/registry/mgmt/util.py,sha256=1q90sLr70w8FrXYqyHUwszjXa7OdT2MRSI_gJf-aVdY,2403
29
29
  azureml/registry/tools/__init__.py,sha256=IAuWWpGfZm__pAkBIxmpJz84QskpkxBr0yDk1TUSnkE,223
30
- azureml/registry/tools/config.py,sha256=tjPaoBsWtPXBL8Ww1hcJtsr2SuIjPKt79dR8iovcebg,3639
31
- azureml/registry/tools/create_or_update_assets.py,sha256=7LcuBzwU-HNE9ADG2igFXI696aKR028yTYxMuDtjVmA,16095
30
+ azureml/registry/tools/config.py,sha256=eZ8F6vKvKX-rHkZrnLmjX-h_1ccqSSTkUK0s3ADoD9o,3662
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
- azureml/registry/tools/repo2registry_config.py,sha256=eXp_tU8Jyi30g8xGf7wbpLgKEPpieohBANKxMSLzq7s,4873
34
- azureml_registry_tools-0.1.0a29.dist-info/licenses/LICENSE.txt,sha256=n20rxwp7_NGrrShv9Qvcs90sjI1l3Pkt3m-5OPCWzgs,845
35
- azureml_registry_tools-0.1.0a29.dist-info/METADATA,sha256=l6pLVmMr-nw8Cd7XPT2XSlcxd2r6prXEkAK8ch6OGqE,522
36
- azureml_registry_tools-0.1.0a29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
- azureml_registry_tools-0.1.0a29.dist-info/entry_points.txt,sha256=iRUkAeQidMnO6RQzpLqMUBTcyYtNzAfSin9WnSdVGLw,147
38
- azureml_registry_tools-0.1.0a29.dist-info/top_level.txt,sha256=ZOeEa0TAXo6i5wOjwBoqfIGEuxOcKuscGgNSpizqREY,8
39
- azureml_registry_tools-0.1.0a29.dist-info/RECORD,,
33
+ azureml/registry/tools/repo2registry_config.py,sha256=YxSpLl16m-Cs9RkrXjpWgg6la2zukl-y1i12pV4UIco,4891
34
+ azureml_registry_tools-0.1.0a31.dist-info/licenses/LICENSE.txt,sha256=n20rxwp7_NGrrShv9Qvcs90sjI1l3Pkt3m-5OPCWzgs,845
35
+ azureml_registry_tools-0.1.0a31.dist-info/METADATA,sha256=xs_wccLvrMlgq5hb8yhSy7HNJ9tHU_6kbAavpRub_HU,531
36
+ azureml_registry_tools-0.1.0a31.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
37
+ azureml_registry_tools-0.1.0a31.dist-info/entry_points.txt,sha256=iRUkAeQidMnO6RQzpLqMUBTcyYtNzAfSin9WnSdVGLw,147
38
+ azureml_registry_tools-0.1.0a31.dist-info/top_level.txt,sha256=ZOeEa0TAXo6i5wOjwBoqfIGEuxOcKuscGgNSpizqREY,8
39
+ azureml_registry_tools-0.1.0a31.dist-info/RECORD,,