Skip to content

Commit

Permalink
1.2.1 release notes (apache#11478)
Browse files Browse the repository at this point in the history
* Release notes 1.2.1

* Fix RELEASE Notes

* Remove line

* Fix within namescope issue

* Remove bullet

* Change the tutorial link

* Fix gluon without namescope line

* Fix gluon book link

* Add info to NEWS

* Add Saving and Loading Gluon models tutorial line

* Add NEWS.md

* Fix save_parameters and load_parameters

* Fix NEWS

* Add NEWS.md

* Change save_params/load_params to save_params

* Semantic versioning line
  • Loading branch information
anirudh2290 authored Jul 9, 2018
1 parent 71fc119 commit 106391a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ MXNet Change Log
================
## 1.2.1
### Deprecations
- An incorrect [usage](https://github.com/apache/incubator-mxnet/issues/11091) of `save_params` was advertised in the gluon book which led to MXNet users depending on the incorrect usage and developing a hack around it. A change was made to the internal structure of the `.params` file saved by `save_params` to resolve a bug. This led to user scripts with the above mentioned hack to break. To fix this, `save_params` and `load_params` APIs have been reverted to previous format and marked as deprecated. New APIs: `save_parameters` and `load_parameters` have been added for the new format. All scripts to save and load parameters for a Gluon model should now use the new API for `save_parameters` and `load_parameters`. If your model is hybridizable and you want to export a serialized structure of the model as well as parameters you need to use the `export` API and the newly added `imports` API instead of `save_params` and `load_params` API. For more details, Please see: [issue](https://github.com/apache/incubator-mxnet/issues/11091), [PR](https://github.com/apache/incubator-mxnet/pull/11127).
The [usage](https://github.com/apache/incubator-mxnet/issues/11091) of `save_params` described in the [gluon book](https://github.com/zackchase/mxnet-the-straight-dope/blob/master/chapter07_distributed-learning/hybridize.ipynb) did not reflect the intended usage of the API and led MXNet users to depend on the unintended usage of `save_params` and `load_params`. In 1.2.0 release an internal bug fix was made which broke the unintended usage use case and users scripts.
To correct the API change, the behavior of `save_params` API has been reverted to the behavior of MXNet v1.1.0 in v1.2.1. The intended and correct use are now supported with the new APIs `save_parameters` and `load_parameters`.
With v1.2.1, usage of `save_params` and `load_params` APIs will resume their former functionality and a deprecation warning will appear.
All scripts to save and load parameters for a Gluon model should use the new APIs: `save_parameters` and `load_parameters`. If your model is hybridizable and you want to export a serialized structure of the model as well as parameters you should migrate your code to use `export` API and the newly added `imports` API instead of `save_params` and `load_params` API. Please refer to the [Saving and Loading Gluon Models Tutorial](https://mxnet.incubator.apache.org/versions/1.2.0/tutorials/gluon/save_load_params.html) for more information.

### User Code Changes
- If you have been using the `save_params` and `load_params` API, below are the recommendations on how to update your code:
1. If you save parameters to load it back into a `SymbolBlock`, it is strongly recommended to use `export` and `imports` API instead. For more information, please see the [Saving and Loading Gluon Models Tutorial](https://mxnet.incubator.apache.org/versions/1.2.0/tutorials/gluon/save_load_params.html).
2. If you created gluon layers without a `name_scope` using MXNet 1.2.0, you must replace `save_params` with `save_parameters`. Otherwise, your models saved in 1.2.1 will fail to load back, although this worked in 1.2.0.
3. For the other use cases, such as models created within a `name_scope` (inside a `with name_scope()` block) or models being loaded back into gluon and not `SymbolBlock`, we strongly recommend replacing `save_params` and `load_params` with `save_parameters` and `load_parameters`. Having said that, your code won't break in 1.2.1 but will give you a deprecated warning message for `save_params` and `load_params`.

### Incompatible API Changes
- We are breaking semantic versioning by making a backwards incompatible change from 1.2.0 in the 1.2.1 patch release. The breaking use case is documented in point 2 above. The reason for doing this is because the 1.2.0 release broke a documented [use case](https://github.com/apache/incubator-mxnet/issues/11091) from the [gluon book](https://github.com/zackchase/mxnet-the-straight-dope/blob/master/chapter07_distributed-learning/hybridize.ipynb) and this release reverts the breakage.
- We did break the promise with semantic versioning due to the API behavior change in 1.2.0 and the backward incompatible change between 1.2.0 and 1.2.1 patch release. The breaking use case is documented in point 2 above. The reason for doing this is because the 1.2.0 release broke a documented [use case](https://github.com/apache/incubator-mxnet/issues/11091) from the [gluon book](https://github.com/zackchase/mxnet-the-straight-dope/blob/master/chapter07_distributed-learning/hybridize.ipynb) and this release reverts the breakage. As a community, we apologize for the inconvenience caused and will continue to strive to uphold semantic versioning.

### Bug Fixes
- Fixed MKLDNN bugs (#10613, #10021, #10616, #10764, #10591, #10731, #10918, #10706, #10651, #10979).
Expand Down

0 comments on commit 106391a

Please sign in to comment.