Skip to content

Commit

Permalink
Merge pull request #349 from NVIDIA/fix-doc
Browse files Browse the repository at this point in the history
Fix of documentation after package reorganization
  • Loading branch information
tkornuta-nvidia authored Feb 12, 2020
2 parents ee4bf33 + 2316a34 commit 233a0fe
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 66 deletions.
6 changes: 3 additions & 3 deletions docs/docs_zh/sources/source/collections/nemo_asr.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
NeMo_ASR collection
NeMo ASR collection
===================

语音数据处理模块
------------------------------
.. automodule:: nemo_asr.data_layer
.. automodule:: nemo.collections.asr.data_layer
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

语音识别模块
------------------------------------
.. automodule:: nemo_asr.jasper
.. automodule:: nemo.collections.asr.jasper
:members:
:undoc-members:
:show-inheritance:
Expand Down
54 changes: 39 additions & 15 deletions docs/docs_zh/sources/source/collections/nemo_nlp.rst
Original file line number Diff line number Diff line change
@@ -1,76 +1,100 @@
NeMo_NLP collection
NeMo NLP collection
===================

NLP 数据处理模块
---------------------------
.. automodule:: nemo_nlp.data_layers
.. automodule:: nemo.collections.nlp.data.datasets
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

NLP 分词器
--------------

.. automodule:: nemo_nlp.data.tokenizers.bert_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.bert_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.char_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.char_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.gpt2_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.gpt2_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.spc_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.sentencepiece_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.tokenizer_spec
.. automodule:: nemo.collections.nlp.data.tokenizers.tokenizer_spec
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.word_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.word_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.yttm_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.youtokentome_tokenizer
:members:
:undoc-members:
:show-inheritance:

NLP 神经模块
------------------

.. automodule:: nemo_nlp.modules.classifiers

.. automodule:: nemo.collections.nlp.nm.data_layers
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward


.. automodule:: nemo_nlp.modules.losses
.. automodule:: nemo.collections.nlp.nm.losses
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward


.. automodule:: nemo_nlp.modules.pytorch_utils
.. automodule:: nemo.collections.nlp.nm.trainables.common.sequence_classification_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.common.sequence_regression_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.common.token_classification_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.common.transformer.transformer_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.dialogue_state_tracking.state_tracking_trade_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo_nlp.modules.transformer_nm
.. automodule:: nemo.collections.nlp.nm.trainables.joint_intent_slot.joint_intent_slot_nm
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -79,7 +103,7 @@ NLP 神经模块
NLP Hugging Face 神经模块
-------------------------------

.. automodule:: nemo_nlp.huggingface.bert
.. automodule:: nemo.collections.nlp.nm.trainables.common.huggingface.bert_nm
:members:
:undoc-members:
:show-inheritance:
Expand Down
8 changes: 4 additions & 4 deletions docs/docs_zh/sources/source/collections/nemo_tts.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
NeMo_TTS collection
NeMo TTS collection
===================

语音数据处理模块
------------------------------
.. automodule:: nemo_tts.data_layers
.. automodule:: nemo.collections.tts.data_layers
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

Tacotron 2 模块
------------------
.. automodule:: nemo_tts.tacotron2_modules
.. automodule:: nemo.collections.tts.tacotron2_modules
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

Waveglow 模块
------------------
.. automodule:: nemo_tts.waveglow_modules
.. automodule:: nemo.collections.tts.waveglow_modules
:members:
:undoc-members:
:show-inheritance:
Expand Down
6 changes: 1 addition & 5 deletions docs/docs_zh/sources/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@

sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../../../"))
sys.path.insert(0, os.path.abspath("../../../nemo/nemo"))
sys.path.insert(0, os.path.abspath("../../../collections"))
sys.path.insert(0, os.path.abspath("../../../collections/nemo_asr"))
sys.path.insert(0, os.path.abspath("../../../collections/nemo_nlp"))
# sys.path.insert(0, os.path.abspath("../../../collections/nemo_lpr"))

# ---- Mocking up the classes. -----
MOCK_CLASSES = {'Dataset': 'torch.utils.data', 'Module': 'torch.nn'}
Expand Down Expand Up @@ -63,6 +58,7 @@ def __getattr__(cls, name):
'h5py',
'kaldi_io',
'transformers',
'transformers.tokenization_bert',
]

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
Expand Down
6 changes: 3 additions & 3 deletions docs/sources/source/collections/nemo_asr.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
NeMo_ASR collection
NeMo ASR collection
===================

Speech data processing modules
------------------------------
.. automodule:: nemo_asr.data_layer
.. automodule:: nemo.collections.asr.data_layer
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

Automatic Speech Recognition modules
------------------------------------
.. automodule:: nemo_asr.jasper
.. automodule:: nemo.collections.asr.jasper
:members:
:undoc-members:
:show-inheritance:
Expand Down
53 changes: 38 additions & 15 deletions docs/sources/source/collections/nemo_nlp.rst
Original file line number Diff line number Diff line change
@@ -1,76 +1,99 @@
NeMo_NLP collection
NeMo NLP collection
===================

NLP data processing modules
---------------------------
.. automodule:: nemo_nlp.data_layers
.. automodule:: nemo.collections.nlp.data.datasets
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

NLP Tokenizers
--------------

.. automodule:: nemo_nlp.data.tokenizers.bert_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.bert_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.char_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.char_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.gpt2_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.gpt2_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.spc_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.sentencepiece_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.tokenizer_spec
.. automodule:: nemo.collections.nlp.data.tokenizers.tokenizer_spec
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.word_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.word_tokenizer
:members:
:undoc-members:
:show-inheritance:

.. automodule:: nemo_nlp.data.tokenizers.yttm_tokenizer
.. automodule:: nemo.collections.nlp.data.tokenizers.youtokentome_tokenizer
:members:
:undoc-members:
:show-inheritance:

NLP Neural Modules
------------------

.. automodule:: nemo_nlp.modules.classifiers
.. automodule:: nemo.collections.nlp.nm.data_layers
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward


.. automodule:: nemo_nlp.modules.losses
.. automodule:: nemo.collections.nlp.nm.losses
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward


.. automodule:: nemo_nlp.modules.pytorch_utils
.. automodule:: nemo.collections.nlp.nm.trainables.common.sequence_classification_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo_nlp.modules.transformer_nm
.. automodule:: nemo.collections.nlp.nm.trainables.common.sequence_regression_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.common.token_classification_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.common.transformer.transformer_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.dialogue_state_tracking.state_tracking_trade_nm
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

.. automodule:: nemo.collections.nlp.nm.trainables.joint_intent_slot.joint_intent_slot_nm
:members:
:undoc-members:
:show-inheritance:
Expand All @@ -79,7 +102,7 @@ NLP Neural Modules
NLP Hugging Face Neural Modules
-------------------------------

.. automodule:: nemo_nlp.huggingface.bert
.. automodule:: nemo.collections.nlp.nm.trainables.common.huggingface.bert_nm
:members:
:undoc-members:
:show-inheritance:
Expand Down
8 changes: 4 additions & 4 deletions docs/sources/source/collections/nemo_tts.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
NeMo_TTS collection
NeMo TTS collection
===================

Speech data processing modules
------------------------------
.. automodule:: nemo_tts.data_layers
.. automodule:: nemo.collections.tts.data_layers
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

Tacotron 2 modules
------------------
.. automodule:: nemo_tts.tacotron2_modules
.. automodule:: nemo.collections.tts.tacotron2_modules
:members:
:undoc-members:
:show-inheritance:
:exclude-members: forward

Waveglow modules
------------------
.. automodule:: nemo_tts.waveglow_modules
.. automodule:: nemo.collections.tts.waveglow_modules
:members:
:undoc-members:
:show-inheritance:
Expand Down
7 changes: 1 addition & 6 deletions docs/sources/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@

sys.path.insert(0, os.path.abspath("."))
sys.path.insert(0, os.path.abspath("../../../"))
sys.path.insert(0, os.path.abspath("../../../nemo/nemo"))
sys.path.insert(0, os.path.abspath("../../../collections"))
sys.path.insert(0, os.path.abspath("../../../collections/nemo_asr"))
sys.path.insert(0, os.path.abspath("../../../collections/nemo_nlp"))
sys.path.insert(0, os.path.abspath("../../../collections/nemo_tts"))
# sys.path.insert(0, os.path.abspath("../../../collections/nemo_lpr"))

# ---- Mocking up the classes. -----
MOCK_CLASSES = {'Dataset': 'torch.utils.data', 'Module': 'torch.nn'}
Expand Down Expand Up @@ -66,6 +60,7 @@ def __getattr__(cls, name):
'h5py',
'kaldi_io',
'transformers',
'transformers.tokenization_bert',
]

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
Expand Down
2 changes: 1 addition & 1 deletion examples/image/gan.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
batch_size=batch_size, shuffle=True, train=True, root=args.train_dataset
)

generator = nemo_simple_gan.SimpleGenerator()
generator = nemo_simple_gan.SimpleGenerator(batch_size)
discriminator = nemo_simple_gan.SimpleDiscriminator()
neg_disc_loss = nemo_simple_gan.DiscriminatorLoss(neg=True)
disc_loss = nemo_simple_gan.DiscriminatorLoss()
Expand Down
Loading

0 comments on commit 233a0fe

Please sign in to comment.