add api import optimization

Signed-off-by: Ting Wang <kathy.wangting@huawei.com>
This commit is contained in:
Ting Wang 2022-08-02 11:31:29 +08:00
parent 3a047c05e2
commit 236fa153ac
2 changed files with 26 additions and 0 deletions

View File

@ -167,6 +167,19 @@
- TimeMonitor printing content changes, and the printed content is added to "train" or "eval" to distinguish between training and inference phases. - TimeMonitor printing content changes, and the printed content is added to "train" or "eval" to distinguish between training and inference phases.
- `filter_prefix` of `mindspore.load_checkpoint` interface: empty string ("") is no longer supported, and the matching rules are changed from strong matching to fuzzy matching. - `filter_prefix` of `mindspore.load_checkpoint` interface: empty string ("") is no longer supported, and the matching rules are changed from strong matching to fuzzy matching.
#### Import Optimization
APIs in `mindspore.context`, `mindspore.parallel`, `mindspore.profiler` and `mindspore.train` can be directly used in `mindspore`. The original usage can still be supported.
For examples:
-`mindspore.context.set_context` can be simplified to `mindspore.set_context`.
-`mindspore.parallel.set_algo_parameters` can be simplified to `mindspore.set_algo_parameters`.
-`mindspore.profiler.Profiler` can be simplified to `mindspore.Profiler`.
-`mindspore.train.callback.Callback` can be simplified to `mindspore.Callback`.
The API pages are aggregated to <https://www.mindspore.cn/docs/en/master/api_python/mindspore.html>.
## MindSpore Lite ## MindSpore Lite
### Major Features and Improvements ### Major Features and Improvements

View File

@ -167,6 +167,19 @@
- TimeMonitor打印内容变更打印内容加入"train"或"eval"用于区分训练和推理阶段。 - TimeMonitor打印内容变更打印内容加入"train"或"eval"用于区分训练和推理阶段。
- load_checkpoint 接口的`filter_prefix`:不再支持空字符串(""),匹配规则由强匹配修改为模糊匹配。 - load_checkpoint 接口的`filter_prefix`:不再支持空字符串(""),匹配规则由强匹配修改为模糊匹配。
#### import优化
mindspore.context、mindspore.parallel、mindspore.profiler、mindspore.train模块的接口可直接在mindspore模块使用。原有用法仍可以继续支持。
例如:
-`mindspore.context.set_context`可简化为`mindspore.set_context`。
-`mindspore.parallel.set_algo_parameters`可简化为`mindspore.set_algo_parameters`。
-`mindspore.profiler.Profiler`可简化为`mindspore.Profiler`。
-`mindspore.train.callback.Callback`可简化为`mindspore.Callback`。
API页面统一汇总至<https://www.mindspore.cn/docs/zh-CN/master/api_python/mindspore.html>
## MindSpore Lite ## MindSpore Lite
### 主要特性和增强 ### 主要特性和增强