Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

HybridBlock.export() to return created filenames (#17688) #17758

Merged
merged 6 commits into from
Mar 18, 2020

Conversation

athewsey
Copy link
Contributor

@athewsey athewsey commented Mar 4, 2020

Description

Minimum, non-breaking change to alleviate #17688

HybridBlock.export() to return tuple of stored filenames (rather than undefined), to expose this information to user code which would otherwise have to re-implement internal filename selection logic.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes) (No JIRA issue, to my knowledge)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage: (Sort of? See Changes section below...)
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the best of my knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Implementations for Python and Perl bindings
  • Minor Python docstring update to document change
  • Unit test for Python, but not for Perl because existing coverage wasn't there and my Perl is terrible

Comments

  • It would probably be preferable to make the output filenames overrideable by user code as well, but this would be a bigger change and add more complexity into the API.
  • First-time contributor with a very small change, so sorry if I misunderstood or missed anything!

@leezu
Copy link
Contributor

leezu commented Mar 5, 2020

Please fix

[2020-03-04T09:57:51.222Z] ************* Module mxnet.gluon.block

[2020-03-04T09:57:51.222Z] python/mxnet/gluon/block.py:1120:0: C0303: Trailing whitespace (trailing-whitespace)

[2020-03-04T09:57:51.222Z] 

@leezu
Copy link
Contributor

leezu commented Mar 9, 2020

Friendly ping @athewsey regarding the linting issues

@athewsey
Copy link
Contributor Author

Whoops, sorry! Should be there now

@leezu leezu merged commit dfb1b88 into apache:master Mar 18, 2020
rondogency added a commit to rondogency/incubator-mxnet that referenced this pull request Mar 18, 2020
anirudh2290 added a commit to anirudh2290/mxnet that referenced this pull request Mar 27, 2020
* 'master' of https://github.com/apache/incubator-mxnet: (192 commits)
  * impl - FFI for np einsum (apache#17869)
  [Numpy] FFI for diag/diagonal/diag_indices_from (apache#17789)
  [Numpy] Kron operator (apache#17323)
  cmake: Set DMLC_LOG_FATAL_THROW only for building mxnet and not for tvm (apache#17878)
  Add simplified HybridBlock.forward without F (apache#17530)
  Use FP32 copy of weights for norm (multitensor LAMB optimizer) (apache#17700)
  Use multi-tensor sumSQ in clip_global_norm (apache#17652)
  [Numpy] Add op fmax, fmin, fmod (apache#17567)
  Adding sparse support to MXTensor for custom operators (apache#17569)
  Update 3rdparty/mkldnn to v1.2.2 (apache#17313)
  Dynamic subgraph compile support (apache#17623)
  Refactor cpp-package CMakeLists.txt & add missing inference/imagenet_inference (apache#17835)
  staticbuild: Fix potential user-assisted execution of arbitrary code  (apache#17860)
  * FFI for np.argmax and np.argmin (apache#17843)
  ffi for roll/rot90 (apache#17861)
  Skip test_multi_worker_dataloader_release_pool on OS X (apache#17797)
  add ffi for full_like, binary (apache#17811)
  HybridBlock.export() to return created filenames (apache#17758)
  Fix SoftReLU fused operator numerical stability (apache#17849)
  CI: Test clang10 cpu & gpu builds with -WError (apache#17830)
  ...
MoisesHer pushed a commit to MoisesHer/incubator-mxnet that referenced this pull request Apr 10, 2020
* [Gluon] Return filenames from HybridBlock.export (apache#1579)

* [Gluon] Unittest filenames from HybridBlock.export (apache#1579)

* [Gluon] Perl HybridBlock.export return filenames (apache#1579)

* [Gluon] HybridBlock.export docstring grammar fix

* Linting - fix trailing whitespace
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request May 29, 2020
* [Gluon] Return filenames from HybridBlock.export (apache#1579)

* [Gluon] Unittest filenames from HybridBlock.export (apache#1579)

* [Gluon] Perl HybridBlock.export return filenames (apache#1579)

* [Gluon] HybridBlock.export docstring grammar fix

* Linting - fix trailing whitespace
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants