Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new version of neural type system #307

Merged
merged 43 commits into from
Feb 12, 2020
Merged

new version of neural type system #307

merged 43 commits into from
Feb 12, 2020

Conversation

okuchaiev
Copy link
Member

@okuchaiev okuchaiev commented Jan 29, 2020

Implements new neural types into NeMo.
Updates core, all collections and tests to work with new types

  • New implementation of neural type system
  • Split unittests into "core, asr, nlp and tts"
  • Integrate new type system into "nemo_core"
  • Integrate new type system into "nemo_asr" collection
  • Integrate new type system into "nemo_tts" collection
  • Integrate new type system into "nemo_nlp" collection
  • Integrate new type system into "nemo_simple_gan" collection

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Jan 29, 2020

This pull request introduces 801 alerts when merging 21e7f31 into 1fddca2 - view on LGTM.com

new alerts:

  • 782 for Wrong number of arguments in a class instantiation
  • 15 for 'import *' may pollute namespace
  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Variable defined multiple times

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Jan 31, 2020

This pull request introduces 501 alerts when merging b8f633f into 1fddca2 - view on LGTM.com

new alerts:

  • 481 for Wrong number of arguments in a class instantiation
  • 15 for 'import *' may pollute namespace
  • 2 for First parameter of a method is not named 'self'
  • 1 for Unused import
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Variable defined multiple times

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 4, 2020

This pull request introduces 501 alerts when merging ac5e7ec into b4aba85 - view on LGTM.com

new alerts:

  • 481 for Wrong number of arguments in a class instantiation
  • 16 for 'import *' may pollute namespace
  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Variable defined multiple times

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 4, 2020

This pull request introduces 501 alerts when merging 0cec895 into b4aba85 - view on LGTM.com

new alerts:

  • 481 for Wrong number of arguments in a class instantiation
  • 16 for 'import *' may pollute namespace
  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Variable defined multiple times

@lgtm-com
Copy link

lgtm-com bot commented Feb 5, 2020

This pull request introduces 527 alerts when merging a296fc2 into ad32363 - view on LGTM.com

new alerts:

  • 523 for Wrong number of arguments in a class instantiation
  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Variable defined multiple times

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 6, 2020

This pull request introduces 3 alerts when merging ce5cb07 into ad32363 - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 6, 2020

This pull request introduces 3 alerts when merging e0742e8 into ad32363 - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 6, 2020

This pull request introduces 3 alerts when merging f549c7c into 47f7346 - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented Feb 6, 2020

This pull request introduces 3 alerts when merging a35c2b6 into 29efd5c - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'

enable deployment test

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 7, 2020

This pull request introduces 5 alerts when merging 8e3b2c2 into 18b528e - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 2 for Unused import
  • 1 for Module is imported with 'import' and 'import from'

@lgtm-com
Copy link

lgtm-com bot commented Feb 7, 2020

This pull request introduces 5 alerts when merging 7b0398b into 4f299f4 - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 2 for Unused import
  • 1 for Module is imported with 'import' and 'import from'

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@tkornuta-nvidia
Copy link
Contributor

tkornuta-nvidia commented Feb 11, 2020

For comparison, I am pasting screenshots from NeMo documentation for the same modules generated straight from the master code (after fixing errors with PR-349):

Screenshot from 2020-02-11 15-46-33

Screenshot from 2020-02-11 15-47-01

This information seems to be quite important for the user at the moment of building his/her graph. Why do we want to get rid of it?

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging 5bf06af into 233a0fe - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 2 for Unused import
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging 5ddb513 into 233a0fe - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 2 for Unused import
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Copy link
Contributor

@tkornuta-nvidia tkornuta-nvidia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this is a really good piece of work.

Major issue: removing comments explaining the port definitions will force the user to actually look into the code. IMO we should add those comments back and update them so will inform what a given module expects as input and/or produces as output.

Two minor issues:

  1. Dimension -> Channel
  2. order of arguments in NeuralType init

nemo/core/neural_types/axes.py Show resolved Hide resolved
nemo/core/neural_types/elements.py Outdated Show resolved Hide resolved
nemo/core/neural_types/neural_type.py Outdated Show resolved Hide resolved
nemo/core/neural_types/neural_type.py Show resolved Hide resolved
nemo/core/neural_types/axes.py Show resolved Hide resolved
nemo/core/neural_types/axes.py Outdated Show resolved Hide resolved
tests/asr/test_zeroDS.py Show resolved Hide resolved
tests/core/test_infer.py Outdated Show resolved Hide resolved
tests/core/test_neural_modules.py Show resolved Hide resolved
tests/core/test_neural_types.py Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging 6f64078 into ce0cfe6 - view on LGTM.com

new alerts:

  • 2 for First parameter of a method is not named 'self'
  • 2 for Unused import
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging ecbec6c into d46374e - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@okuchaiev
Copy link
Member Author

@tkornuta-nvidia and @yzhang123 I think I've addressed/responded to your comments.
Regarding: "removing comments explaining the port definitions" - yes, this is #1 on my to-do list. But I'd like to make it part of "documentation" PR since I'd like to try to do this automagically, instead of manually adding it into every neural module again. Regardless, this will be part of my next (documentation) PR.

@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging e964e46 into d46374e - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 6 alerts and fixes 1 when merging b692692 into 33d14dc - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

Signed-off-by: Oleksii Kuchaiev <okuchaiev@nvidia.com>
@lgtm-com
Copy link

lgtm-com bot commented Feb 12, 2020

This pull request introduces 7 alerts and fixes 1 when merging 196a248 into 33d14dc - view on LGTM.com

new alerts:

  • 4 for Unused import
  • 1 for First parameter of a method is not named 'self'
  • 1 for Module is imported with 'import' and 'import from'
  • 1 for Wrong number of arguments in a class instantiation

fixed alerts:

  • 1 for Unused import

@okuchaiev okuchaiev merged commit f7b534a into master Feb 12, 2020
@okuchaiev okuchaiev deleted the neural_type_system2 branch February 13, 2020 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request/PR for a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants