azureml-registry-tools 0.1.0a30__tar.gz → 0.1.0a32__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.
- {azureml_registry_tools-0.1.0a30/azureml_registry_tools.egg-info → azureml_registry_tools-0.1.0a32}/PKG-INFO +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/model.schema.json +56 -42
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/validate_model_schema.py +3 -3
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/validate_model_variant_schema.py +2 -2
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/asset_management.py +7 -7
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/util.py +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/config.py +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/create_or_update_assets.py +5 -5
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/repo2registry_config.py +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32/azureml_registry_tools.egg-info}/PKG-INFO +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/setup.py +1 -1
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/LICENSE.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/MANIFEST.in +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_cli/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_cli/registry_syndication_cli.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_cli/repo2registry_cli.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_rest_client/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_rest_client/arm_client.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_rest_client/base_rest_client.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_rest_client/registry_management_client.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/_rest_client/registry_model_client.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/asset.yaml.template +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/description.md.template +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/evaluation.md.template +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/model-variant.schema.json +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/model.yaml.template +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/data/notes.md.template +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/create_asset_template.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/create_manifest.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/create_model_spec.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/model_management.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/syndication_manifest.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/__init__.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/registry_utils.py +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml_registry_tools.egg-info/SOURCES.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml_registry_tools.egg-info/dependency_links.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml_registry_tools.egg-info/entry_points.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml_registry_tools.egg-info/requires.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml_registry_tools.egg-info/top_level.txt +0 -0
- {azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/setup.cfg +0 -0
|
@@ -304,10 +304,10 @@
|
|
|
304
304
|
"type": "string",
|
|
305
305
|
"format": "long-string"
|
|
306
306
|
},
|
|
307
|
-
"
|
|
308
|
-
"description": "
|
|
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
|
-
"
|
|
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|reasoning-summary|streaming|tool-calling|function-calling|image-input)(?:\\s*,\\s*(agents|agentsV2|assistants|routing|reasoning|reasoning-summary|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",
|
|
@@ -495,6 +495,7 @@
|
|
|
495
495
|
"invisibleUntil": {
|
|
496
496
|
"type": "string",
|
|
497
497
|
"format": "date-time",
|
|
498
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
498
499
|
"description": "Date until which the model is invisible"
|
|
499
500
|
},
|
|
500
501
|
"playgroundRateLimitTier": {
|
|
@@ -605,16 +606,6 @@
|
|
|
605
606
|
},
|
|
606
607
|
"description": "Model capabilities (e.g., agents, assistants)"
|
|
607
608
|
},
|
|
608
|
-
"playground_rate_limit_tier": {
|
|
609
|
-
"type": "string",
|
|
610
|
-
"description": "Rate limit tier for playground",
|
|
611
|
-
"enum": [
|
|
612
|
-
"high",
|
|
613
|
-
"low",
|
|
614
|
-
"custom",
|
|
615
|
-
"embeddings"
|
|
616
|
-
]
|
|
617
|
-
},
|
|
618
609
|
"azureOffers": {
|
|
619
610
|
"type": "array",
|
|
620
611
|
"items": {
|
|
@@ -643,7 +634,8 @@
|
|
|
643
634
|
},
|
|
644
635
|
"sharedComputeCapacityEnabled": {
|
|
645
636
|
"type": "boolean",
|
|
646
|
-
"
|
|
637
|
+
"enum": [true],
|
|
638
|
+
"description": "Whether shared compute capacity is enabled. Only true values are allowed - remove this field when disabled."
|
|
647
639
|
},
|
|
648
640
|
"freePlayground": {
|
|
649
641
|
"type": "boolean",
|
|
@@ -678,7 +670,8 @@
|
|
|
678
670
|
},
|
|
679
671
|
"isDirectFromAzure": {
|
|
680
672
|
"type": "boolean",
|
|
681
|
-
"
|
|
673
|
+
"enum": [true],
|
|
674
|
+
"description": "If the model is an Azure Direct model. Only true values are allowed - remove this field when disabled."
|
|
682
675
|
},
|
|
683
676
|
"inferenceEnvironmentAssetId": {
|
|
684
677
|
"type": "string",
|
|
@@ -855,14 +848,17 @@
|
|
|
855
848
|
}
|
|
856
849
|
}
|
|
857
850
|
},
|
|
858
|
-
"
|
|
851
|
+
"SKU": {
|
|
859
852
|
"type": "object",
|
|
860
853
|
"description": "SKU specifications for different operations",
|
|
861
854
|
"additionalProperties": false,
|
|
862
855
|
"properties": {
|
|
863
|
-
"
|
|
864
|
-
"
|
|
865
|
-
"
|
|
856
|
+
"finetuneRecommendedSkus": {
|
|
857
|
+
"type": "array",
|
|
858
|
+
"items": {
|
|
859
|
+
"$ref": "#/definitions/skuEnum"
|
|
860
|
+
},
|
|
861
|
+
"description": "Skus that can be used for finetune maap"
|
|
866
862
|
},
|
|
867
863
|
"evaluationMinSkuSpec": {
|
|
868
864
|
"type": "string",
|
|
@@ -870,9 +866,12 @@
|
|
|
870
866
|
"pattern": "^\\d+\\|\\d+\\|\\d+\\|\\d+$",
|
|
871
867
|
"format": "sku-spec"
|
|
872
868
|
},
|
|
873
|
-
"
|
|
874
|
-
"
|
|
875
|
-
"
|
|
869
|
+
"evaluationRecommendedSkus": {
|
|
870
|
+
"type": "array",
|
|
871
|
+
"items": {
|
|
872
|
+
"$ref": "#/definitions/skuEnum"
|
|
873
|
+
},
|
|
874
|
+
"description": "Evaluation recommended skus"
|
|
876
875
|
},
|
|
877
876
|
"finetuneMinSkuSpec": {
|
|
878
877
|
"type": "string",
|
|
@@ -886,9 +885,12 @@
|
|
|
886
885
|
"pattern": "^\\d+\\|\\d+\\|\\d+\\|\\d+$",
|
|
887
886
|
"format": "sku-spec"
|
|
888
887
|
},
|
|
889
|
-
"
|
|
890
|
-
"
|
|
891
|
-
"
|
|
888
|
+
"inferenceRecommendedSkus": {
|
|
889
|
+
"type": "array",
|
|
890
|
+
"items": {
|
|
891
|
+
"$ref": "#/definitions/skuEnum"
|
|
892
|
+
},
|
|
893
|
+
"description": "A list of skus that the client should use to deploy the model"
|
|
892
894
|
}
|
|
893
895
|
}
|
|
894
896
|
},
|
|
@@ -899,7 +901,8 @@
|
|
|
899
901
|
"properties": {
|
|
900
902
|
"maasFinetuningTest": {
|
|
901
903
|
"type": "boolean",
|
|
902
|
-
"
|
|
904
|
+
"enum": [true],
|
|
905
|
+
"description": "Used for testing maas-finetuning in INT. Only true values are allowed - remove this field when disabled."
|
|
903
906
|
},
|
|
904
907
|
"maasFinetuningDeployRegions": {
|
|
905
908
|
"type": "array",
|
|
@@ -918,12 +921,23 @@
|
|
|
918
921
|
},
|
|
919
922
|
"maasFinetuningOffer": {
|
|
920
923
|
"type": "boolean",
|
|
921
|
-
"
|
|
924
|
+
"enum": [true],
|
|
925
|
+
"description": "Whether MaaS fine-tuning offer is available. Only true values are allowed - remove this field when disabled."
|
|
922
926
|
},
|
|
923
|
-
"
|
|
924
|
-
"type": "
|
|
925
|
-
"
|
|
926
|
-
|
|
927
|
+
"maasFinetuningAzureRegions": {
|
|
928
|
+
"type": "array",
|
|
929
|
+
"items": {
|
|
930
|
+
"type": "string",
|
|
931
|
+
"enum": [
|
|
932
|
+
"westus3",
|
|
933
|
+
"eastus2",
|
|
934
|
+
"eastus",
|
|
935
|
+
"southcentralus",
|
|
936
|
+
"northcentralus",
|
|
937
|
+
"westus"
|
|
938
|
+
]
|
|
939
|
+
},
|
|
940
|
+
"description": "Regions where fine-tuning is available"
|
|
927
941
|
}
|
|
928
942
|
}
|
|
929
943
|
},
|
|
@@ -934,32 +948,32 @@
|
|
|
934
948
|
"properties": {
|
|
935
949
|
"finetuneDeprecationDate": {
|
|
936
950
|
"type": "string",
|
|
937
|
-
"description": "The date that finetune will be deprecated.
|
|
938
|
-
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
951
|
+
"description": "The date that finetune will be deprecated. This date-time should be in midnight UTC.",
|
|
952
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
939
953
|
"format": "date-time"
|
|
940
954
|
},
|
|
941
955
|
"finetuneRetirementDate": {
|
|
942
956
|
"type": "string",
|
|
943
|
-
"description": "The date that finetune will be retired.
|
|
944
|
-
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
957
|
+
"description": "The date that finetune will be retired. This date-time should be in midnight UTC.",
|
|
958
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
945
959
|
"format": "date-time"
|
|
946
960
|
},
|
|
947
961
|
"inferenceDeprecationDate": {
|
|
948
962
|
"type": "string",
|
|
949
|
-
"description": "The date that inference will be deprecated.
|
|
950
|
-
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
963
|
+
"description": "The date that inference will be deprecated. This date-time should be in midnight UTC.",
|
|
964
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
951
965
|
"format": "date-time"
|
|
952
966
|
},
|
|
953
967
|
"inferenceLegacyDate": {
|
|
954
968
|
"type": "string",
|
|
955
|
-
"description": "The date that inference will become legacy.
|
|
956
|
-
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
969
|
+
"description": "The date that inference will become legacy. This date-time should be in midnight UTC.",
|
|
970
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
957
971
|
"format": "date-time"
|
|
958
972
|
},
|
|
959
973
|
"inferenceRetirementDate": {
|
|
960
974
|
"type": "string",
|
|
961
|
-
"description": "The date that inference will be retired.
|
|
962
|
-
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
|
|
975
|
+
"description": "The date that inference will be retired. This date-time should be in midnight UTC.",
|
|
976
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{1,6}Z$",
|
|
963
977
|
"format": "date-time"
|
|
964
978
|
}
|
|
965
979
|
}
|
|
@@ -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
|
|
|
@@ -236,7 +236,7 @@ def create_or_update_asset(readonly_asset: AssetConfig, registry_name: str, subs
|
|
|
236
236
|
subscription_id=subscription_id,
|
|
237
237
|
resource_group_name=resource_group,
|
|
238
238
|
registry_name=registry_name,
|
|
239
|
-
credential=DefaultAzureCredential(),
|
|
239
|
+
credential=DefaultAzureCredential(), # CodeQL [SM05139] DefaultAzureCredential should only be used for local development and testing purposes.
|
|
240
240
|
)
|
|
241
241
|
|
|
242
242
|
with tempfile.TemporaryDirectory() as mutable_asset_dir:
|
{azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/mgmt/util.py
RENAMED
|
@@ -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:
|
{azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/tools/config.py
RENAMED
|
@@ -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()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{azureml_registry_tools-0.1.0a30 → azureml_registry_tools-0.1.0a32}/azureml/registry/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|