mindspore 2.2.11__cp38-none-any.whl → 2.2.14__cp38-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.
Potentially problematic release.
This version of mindspore might be problematic. Click here for more details.
- mindspore/.commit_id +1 -1
- mindspore/__init__.py +2 -1
- mindspore/_akg/akg/topi/cpp/impl.py +1 -1
- mindspore/_akg/akg/tvm/_ffi/base.py +1 -1
- mindspore/_c_dataengine.cpython-38-aarch64-linux-gnu.so +0 -0
- mindspore/_c_expression.cpython-38-aarch64-linux-gnu.so +0 -0
- mindspore/_c_mindrecord.cpython-38-aarch64-linux-gnu.so +0 -0
- mindspore/_mindspore_offline_debug.cpython-38-aarch64-linux-gnu.so +0 -0
- mindspore/bin/cache_admin +0 -0
- mindspore/bin/cache_server +0 -0
- mindspore/common/tensor.py +0 -2
- mindspore/communication/management.py +3 -0
- mindspore/context.py +34 -4
- mindspore/dataset/engine/datasets.py +23 -0
- mindspore/dataset/engine/validators.py +1 -1
- mindspore/dataset/vision/py_transforms_util.py +2 -2
- mindspore/experimental/optim/lr_scheduler.py +5 -6
- mindspore/lib/libdnnl.so.2 +0 -0
- mindspore/lib/libmindspore.so +0 -0
- mindspore/lib/libmindspore_backend.so +0 -0
- mindspore/lib/libmindspore_common.so +0 -0
- mindspore/lib/libmindspore_core.so +0 -0
- mindspore/lib/libmindspore_glog.so.0 +0 -0
- mindspore/lib/libmindspore_gpr.so.15 +0 -0
- mindspore/lib/libmindspore_grpc++.so.1 +0 -0
- mindspore/lib/libmindspore_grpc.so.15 +0 -0
- mindspore/lib/libmindspore_shared_lib.so +0 -0
- mindspore/lib/libopencv_core.so.4.5 +0 -0
- mindspore/lib/libopencv_imgcodecs.so.4.5 +0 -0
- mindspore/lib/libopencv_imgproc.so.4.5 +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_aicpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/aicpu_kernel/impl/libcust_cpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_impl/cpu/config/cust_aicpu_kernel.json +48 -0
- mindspore/lib/plugin/ascend/custom_aicpu_ops/op_proto/libcust_op_proto.so +0 -0
- mindspore/lib/plugin/ascend/libakg.so +0 -0
- mindspore/lib/plugin/ascend/libascend_collective.so +0 -0
- mindspore/lib/plugin/ascend/libdvpp_utils.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_aicpu_kernels.so +0 -0
- mindspore/lib/plugin/ascend/libmindspore_cpu_kernels.so +0 -0
- mindspore/lib/plugin/libmindspore_ascend.so.1 +0 -0
- mindspore/mindrecord/tools/cifar100_to_mr.py +49 -57
- mindspore/mindrecord/tools/cifar10_to_mr.py +46 -55
- mindspore/mindrecord/tools/csv_to_mr.py +3 -8
- mindspore/mindrecord/tools/mnist_to_mr.py +4 -9
- mindspore/mindrecord/tools/tfrecord_to_mr.py +1 -4
- mindspore/nn/layer/activation.py +1 -1
- mindspore/nn/layer/embedding.py +2 -2
- mindspore/nn/loss/loss.py +1 -1
- mindspore/nn/optim/ada_grad.py +2 -2
- mindspore/nn/optim/sgd.py +3 -2
- mindspore/numpy/math_ops.py +1 -1
- mindspore/ops/__init__.py +3 -0
- mindspore/ops/_grad_experimental/grad_array_ops.py +0 -31
- mindspore/ops/_grad_experimental/grad_comm_ops.py +4 -2
- mindspore/ops/_grad_experimental/grad_inner_ops.py +8 -0
- mindspore/ops/_grad_experimental/grad_math_ops.py +37 -17
- mindspore/ops/_op_impl/aicpu/__init__.py +1 -0
- mindspore/ops/_op_impl/aicpu/generate_eod_mask.py +38 -0
- mindspore/ops/function/array_func.py +6 -5
- mindspore/ops/function/debug_func.py +1 -1
- mindspore/ops/function/linalg_func.py +21 -11
- mindspore/ops/function/math_func.py +3 -0
- mindspore/ops/function/nn_func.py +13 -11
- mindspore/ops/function/parameter_func.py +2 -0
- mindspore/ops/function/sparse_unary_func.py +2 -2
- mindspore/ops/function/vmap_func.py +1 -0
- mindspore/ops/operations/_embedding_cache_ops.py +1 -1
- mindspore/ops/operations/_inner_ops.py +56 -1
- mindspore/ops/operations/_quant_ops.py +4 -4
- mindspore/ops/operations/_rl_inner_ops.py +1 -1
- mindspore/ops/operations/array_ops.py +15 -4
- mindspore/ops/operations/custom_ops.py +1 -1
- mindspore/ops/operations/debug_ops.py +1 -1
- mindspore/ops/operations/image_ops.py +3 -3
- mindspore/ops/operations/inner_ops.py +49 -0
- mindspore/ops/operations/math_ops.py +62 -0
- mindspore/ops/operations/nn_ops.py +7 -3
- mindspore/ops/operations/random_ops.py +2 -0
- mindspore/ops/operations/sparse_ops.py +4 -4
- mindspore/ops/silent_check.py +162 -0
- mindspore/parallel/__init__.py +3 -2
- mindspore/parallel/_auto_parallel_context.py +82 -3
- mindspore/parallel/_parallel_serialization.py +34 -2
- mindspore/parallel/_tensor.py +3 -1
- mindspore/parallel/_transformer/transformer.py +8 -8
- mindspore/parallel/checkpoint_transform.py +191 -45
- mindspore/profiler/parser/ascend_cluster_generator.py +111 -0
- mindspore/profiler/parser/ascend_communicate_generator.py +315 -0
- mindspore/profiler/parser/ascend_flops_generator.py +8 -2
- mindspore/profiler/parser/ascend_fpbp_generator.py +8 -2
- mindspore/profiler/parser/ascend_hccl_generator.py +2 -2
- mindspore/profiler/parser/ascend_msprof_exporter.py +30 -6
- mindspore/profiler/parser/ascend_msprof_generator.py +16 -5
- mindspore/profiler/parser/ascend_op_generator.py +15 -7
- mindspore/profiler/parser/ascend_timeline_generator.py +5 -2
- mindspore/profiler/parser/base_timeline_generator.py +11 -3
- mindspore/profiler/parser/cpu_gpu_timeline_generator.py +2 -1
- mindspore/profiler/parser/framework_parser.py +8 -2
- mindspore/profiler/parser/memory_usage_parser.py +8 -2
- mindspore/profiler/parser/minddata_analyzer.py +8 -2
- mindspore/profiler/parser/minddata_parser.py +1 -1
- mindspore/profiler/parser/msadvisor_analyzer.py +4 -2
- mindspore/profiler/parser/msadvisor_parser.py +9 -3
- mindspore/profiler/profiling.py +97 -25
- mindspore/rewrite/api/node.py +1 -1
- mindspore/rewrite/api/symbol_tree.py +2 -2
- mindspore/train/callback/_checkpoint.py +8 -8
- mindspore/train/callback/_landscape.py +2 -3
- mindspore/train/callback/_summary_collector.py +6 -7
- mindspore/train/dataset_helper.py +6 -0
- mindspore/train/model.py +17 -5
- mindspore/train/serialization.py +6 -1
- mindspore/train/summary/_writer_pool.py +1 -1
- mindspore/train/summary/summary_record.py +5 -6
- mindspore/version.py +1 -1
- {mindspore-2.2.11.dist-info → mindspore-2.2.14.dist-info}/METADATA +1 -1
- {mindspore-2.2.11.dist-info → mindspore-2.2.14.dist-info}/RECORD +120 -117
- mindspore/lib/plugin/libmindspore_ascend.so.2 +0 -0
- {mindspore-2.2.11.dist-info → mindspore-2.2.14.dist-info}/WHEEL +0 -0
- {mindspore-2.2.11.dist-info → mindspore-2.2.14.dist-info}/entry_points.txt +0 -0
- {mindspore-2.2.11.dist-info → mindspore-2.2.14.dist-info}/top_level.txt +0 -0
mindspore/train/model.py
CHANGED
|
@@ -22,6 +22,7 @@ import os
|
|
|
22
22
|
import math
|
|
23
23
|
import copy
|
|
24
24
|
import importlib
|
|
25
|
+
import time
|
|
25
26
|
import numpy as np
|
|
26
27
|
|
|
27
28
|
import mindspore
|
|
@@ -523,6 +524,16 @@ class Model:
|
|
|
523
524
|
dataset_sink_mode=True,
|
|
524
525
|
sink_size=sink_size)
|
|
525
526
|
self._warmup_dataset(epoch, train_dataset, sink_size)
|
|
527
|
+
if train_dataset.get_init_step() > 0:
|
|
528
|
+
mbuf_size = train_dataset.__transfer_dataset__.get_mbuf_queue_size()
|
|
529
|
+
while mbuf_size == 0:
|
|
530
|
+
time.sleep(10)
|
|
531
|
+
mbuf_size = train_dataset.__transfer_dataset__.get_mbuf_queue_size()
|
|
532
|
+
if mbuf_size != 0:
|
|
533
|
+
break
|
|
534
|
+
logger.warning(f"Failover mode, waiting for dataset recover to specify step, "
|
|
535
|
+
f"current device queue size: {mbuf_size}")
|
|
536
|
+
|
|
526
537
|
if context.get_auto_parallel_context("pipeline_stages") > 1 and valid_dataset:
|
|
527
538
|
train_network.add_flags_recursive(is_first_iteration=True)
|
|
528
539
|
for inputs in train_dataset_helper:
|
|
@@ -967,7 +978,7 @@ class Model:
|
|
|
967
978
|
of data will be transferred one by one. The limitation of data transmission per time is 256M.
|
|
968
979
|
|
|
969
980
|
When dataset_sink_mode is True, the `step_end` method of the instance of Callback will be called at the end
|
|
970
|
-
of step in PyNative mode
|
|
981
|
+
of step in PyNative mode, or will be called at the end of epoch in Graph mode.
|
|
971
982
|
|
|
972
983
|
If dataset_sink_mode is True, dataset will be bound to this model and cannot be used by other models.
|
|
973
984
|
|
|
@@ -1004,6 +1015,7 @@ class Model:
|
|
|
1004
1015
|
Default: 0.
|
|
1005
1016
|
|
|
1006
1017
|
Examples:
|
|
1018
|
+
>>> import mindspore as ms
|
|
1007
1019
|
>>> from mindspore import nn
|
|
1008
1020
|
>>> from mindspore.train import Model
|
|
1009
1021
|
>>>
|
|
@@ -1515,8 +1527,8 @@ class Model:
|
|
|
1515
1527
|
[ascend_context]
|
|
1516
1528
|
rank_table_file = [path_a](storage initial path of the rank table file)
|
|
1517
1529
|
[execution_plan]
|
|
1518
|
-
[op_name1] = data_type:float16 (operator named op_name1 is set to data type
|
|
1519
|
-
[op_name2] = data_type:float32 (operator named op_name2 is set to data type
|
|
1530
|
+
[op_name1] = data_type:float16 (operator named op_name1 is set to data type float16)
|
|
1531
|
+
[op_name2] = data_type:float32 (operator named op_name2 is set to data type float32)
|
|
1520
1532
|
|
|
1521
1533
|
When only the config_path is configured, it is done as follows:
|
|
1522
1534
|
|
|
@@ -1649,8 +1661,8 @@ class Model:
|
|
|
1649
1661
|
[ascend_context]
|
|
1650
1662
|
rank_table_file = [path_a](storage initial path of the rank table file)
|
|
1651
1663
|
[execution_plan]
|
|
1652
|
-
[op_name1] = data_type:float16 (operator named op_name1 is set to data type
|
|
1653
|
-
[op_name2] = data_type:float32 (operator named op_name2 is set to data type
|
|
1664
|
+
[op_name1] = data_type:float16 (operator named op_name1 is set to data type float16)
|
|
1665
|
+
[op_name2] = data_type:float32 (operator named op_name2 is set to data type float32)
|
|
1654
1666
|
|
|
1655
1667
|
When only the config_path is configured, it is done as follows:
|
|
1656
1668
|
|
mindspore/train/serialization.py
CHANGED
|
@@ -176,7 +176,7 @@ def _update_param(param, new_param, strict_load):
|
|
|
176
176
|
|
|
177
177
|
def _type_convert(param, new_param, strict_load):
|
|
178
178
|
"""Whether to convert parameter's type during load checkpoint into network."""
|
|
179
|
-
float_type = (mstype.float16, mstype.float32, mstype.float64)
|
|
179
|
+
float_type = (mstype.float16, mstype.float32, mstype.float64, mstype.bfloat16)
|
|
180
180
|
int_type = (mstype.int8, mstype.int16, mstype.int32, mstype.int64)
|
|
181
181
|
if not strict_load and ({param.data.dtype, new_param.data.dtype}.issubset(float_type) or
|
|
182
182
|
{param.data.dtype, new_param.data.dtype}.issubset(int_type)):
|
|
@@ -1560,6 +1560,8 @@ def export(net, *inputs, file_name, file_format, **kwargs):
|
|
|
1560
1560
|
3. Exporting functions decorated with :func:`mindspore.jit` to mindir format is supported.
|
|
1561
1561
|
4. When exporting a function decorated with :func:`mindspore.jit`, the function should not involve
|
|
1562
1562
|
class properties in calculations.
|
|
1563
|
+
5. AIR format is deprecated, and will be removed in a future version, please use other format or use
|
|
1564
|
+
MindSpore Lite to do offline inference.
|
|
1563
1565
|
|
|
1564
1566
|
Args:
|
|
1565
1567
|
net (Union[Cell, function]): MindSpore network.
|
|
@@ -1633,6 +1635,9 @@ def export(net, *inputs, file_name, file_format, **kwargs):
|
|
|
1633
1635
|
supported_formats = ['AIR', 'ONNX', 'MINDIR']
|
|
1634
1636
|
if file_format not in supported_formats:
|
|
1635
1637
|
raise ValueError(f"For 'export', 'file_format' must be one of {supported_formats}, but got {file_format}.")
|
|
1638
|
+
if file_format == 'AIR':
|
|
1639
|
+
logger.warning("AIR format is deprecated, and will be removed in a future version, please use other format or "
|
|
1640
|
+
"use MindSpore Lite to do offline inference")
|
|
1636
1641
|
Validator.check_file_name_by_regular(file_name)
|
|
1637
1642
|
logger.info("exporting model file:%s format:%s.", file_name, file_format)
|
|
1638
1643
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright 2020-
|
|
1
|
+
# Copyright 2020-2023 Huawei Technologies Co., Ltd
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -141,12 +141,11 @@ class SummaryRecord:
|
|
|
141
141
|
can be added by calling add_value.
|
|
142
142
|
|
|
143
143
|
Note:
|
|
144
|
-
1.
|
|
145
|
-
2. Make sure to close the SummaryRecord at the end, otherwise the process will not exit.
|
|
144
|
+
1. Make sure to close the SummaryRecord at the end, otherwise the process will not exit.
|
|
146
145
|
Please see the Example section below to learn how to close properly in two ways.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
146
|
+
2. Only one SummaryRecord instance is allowed at a time, otherwise it will cause data writing problems.
|
|
147
|
+
3. SummaryRecord only supports Linux systems.
|
|
148
|
+
4. The Summary is not supported when compile source with `-s on` option.
|
|
150
149
|
|
|
151
150
|
Args:
|
|
152
151
|
log_dir (str): The log_dir is a directory location to save the summary.
|
mindspore/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '2.2.
|
|
1
|
+
__version__ = '2.2.14'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mindspore
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.14
|
|
4
4
|
Summary: MindSpore is a new open source deep learning training/inference framework that could be used for mobile, edge and cloud scenarios.
|
|
5
5
|
Home-page: https://www.mindspore.cn
|
|
6
6
|
Download-URL: https://github.com/mindspore-ai/mindspore/tags
|