@@ -1,98 +1,65 @@ | |||||
import os | import os | ||||
import sys | |||||
def find_all(path='../fastNLP'): | |||||
head_list = [] | |||||
alias_list = [] | |||||
for path, dirs, files in os.walk(path): | |||||
def find_all_modules(): | |||||
modules = {} | |||||
children = {} | |||||
to_doc = set() | |||||
root = '../fastNLP' | |||||
for path, dirs, files in os.walk(root): | |||||
for file in files: | for file in files: | ||||
if file.endswith('.py'): | if file.endswith('.py'): | ||||
name = ".".join(path.split('/')[1:]) | name = ".".join(path.split('/')[1:]) | ||||
if file.split('.')[0] != "__init__": | if file.split('.')[0] != "__init__": | ||||
name = name + '.' + file.split('.')[0] | name = name + '.' + file.split('.')[0] | ||||
if len(name.split('.')) < 3 or name.startswith('fastNLP.core'): | |||||
heads, alias = find_one(path + '/' + file) | |||||
for h in heads: | |||||
head_list.append(name + "." + h) | |||||
for a in alias: | |||||
alias_list.append(a) | |||||
heads = {} | |||||
for h in head_list: | |||||
end = h.split('.')[-1] | |||||
file = h[:-len(end) - 1] | |||||
if end not in heads: | |||||
heads[end] = set() | |||||
heads[end].add(file) | |||||
alias = {} | |||||
for a in alias_list: | |||||
for each in a: | |||||
end = each.split('.')[-1] | |||||
file = each[:-len(end) - 1] | |||||
if end not in alias: | |||||
alias[end] = set() | |||||
alias[end].add(file) | |||||
print("IN alias NOT IN heads") | |||||
for item in alias: | |||||
if item not in heads: | |||||
print(item, alias[item]) | |||||
elif len(heads[item]) != 2: | |||||
print(item, alias[item], heads[item]) | |||||
print("\n\nIN heads NOT IN alias") | |||||
for item in heads: | |||||
if item not in alias: | |||||
print(item, heads[item]) | |||||
__import__(name) | |||||
m = sys.modules[name] | |||||
modules[name] = m | |||||
try: | |||||
m.__all__ | |||||
except: | |||||
print(name, "__all__ missing") | |||||
continue | |||||
if m.__doc__ is None: | |||||
print(name, "__doc__ missing") | |||||
continue | |||||
if "undocumented" not in m.__doc__: | |||||
to_doc.add(name) | |||||
for module in to_doc: | |||||
t = ".".join(module.split('.')[:-1]) | |||||
if t in to_doc: | |||||
if t not in children: | |||||
children[t] = set() | |||||
children[t].add(module) | |||||
for m in children: | |||||
children[m] = sorted(children[m]) | |||||
return modules, to_doc, children | |||||
def find_class(path): | |||||
with open(path, 'r') as fin: | |||||
lines = fin.readlines() | |||||
pars = {} | |||||
for i, line in enumerate(lines): | |||||
if line.strip().startswith('class'): | |||||
line = line.strip()[len('class'):-1].strip() | |||||
if line[-1] == ')': | |||||
line = line[:-1].split('(') | |||||
name = line[0].strip() | |||||
parents = line[1].split(',') | |||||
for i in range(len(parents)): | |||||
parents[i] = parents[i].strip() | |||||
if len(parents) == 1: | |||||
pars[name] = parents[0] | |||||
else: | |||||
pars[name] = tuple(parents) | |||||
return pars | |||||
def create_rst_file(modules, name, children): | |||||
m = modules[name] | |||||
with open("./source/" + name + ".rst", "w") as fout: | |||||
t = "=" * len(name) | |||||
fout.write(name + "\n") | |||||
fout.write(t + "\n") | |||||
fout.write("\n") | |||||
fout.write(".. automodule:: " + name + "\n") | |||||
if len(m.__all__) > 0: | |||||
fout.write(" :members: " + ", ".join(m.__all__) + "\n") | |||||
fout.write(" :inherited-members:\n") | |||||
fout.write("\n") | |||||
if name in children: | |||||
fout.write("子模块\n------\n\n.. toctree::\n\n") | |||||
for module in children[name]: | |||||
fout.write(" " + module + "\n") | |||||
def find_one(path): | |||||
head_list = [] | |||||
alias = [] | |||||
with open(path, 'r') as fin: | |||||
lines = fin.readlines() | |||||
flag = False | |||||
for i, line in enumerate(lines): | |||||
if line.strip().startswith('__all__'): | |||||
line = line.strip()[len('__all__'):].strip() | |||||
if line[-1] == ']': | |||||
line = line[1:-1].strip()[1:].strip() | |||||
head_list.append(line.strip("\"").strip("\'").strip()) | |||||
else: | |||||
flag = True | |||||
elif line.strip() == ']': | |||||
flag = False | |||||
elif flag: | |||||
line = line.strip()[:-1].strip("\"").strip("\'").strip() | |||||
if len(line) == 0 or line[0] == '#': | |||||
continue | |||||
head_list.append(line) | |||||
if line.startswith('def') or line.startswith('class'): | |||||
if lines[i + 2].strip().startswith("别名:"): | |||||
names = lines[i + 2].strip()[len("别名:"):].split() | |||||
names[0] = names[0][len(":class:`"):-1] | |||||
names[1] = names[1][len(":class:`"):-1] | |||||
alias.append((names[0], names[1])) | |||||
return head_list, alias | |||||
def main(): | |||||
modules, to_doc, children = find_all_modules() | |||||
for name in to_doc: | |||||
create_rst_file(modules, name, children) | |||||
if __name__ == "__main__": | if __name__ == "__main__": | ||||
find_all() # use to check __all__ | |||||
main() |
@@ -48,12 +48,14 @@ extensions = [ | |||||
autodoc_default_options = { | autodoc_default_options = { | ||||
'member-order': 'bysource', | 'member-order': 'bysource', | ||||
'special-members': '__init__', | 'special-members': '__init__', | ||||
'undoc-members': True, | |||||
'undoc-members': False, | |||||
} | } | ||||
autoclass_content = "class" | |||||
# Add any paths that contain templates here, relative to this directory. | # Add any paths that contain templates here, relative to this directory. | ||||
templates_path = ['_templates'] | templates_path = ['_templates'] | ||||
# template_bridge | |||||
# The suffix(es) of source filenames. | # The suffix(es) of source filenames. | ||||
# You can specify multiple suffix as a list of string: | # You can specify multiple suffix as a list of string: | ||||
# | # | ||||
@@ -113,7 +115,7 @@ html_static_path = ['_static'] | |||||
# -- Options for HTMLHelp output --------------------------------------------- | # -- Options for HTMLHelp output --------------------------------------------- | ||||
# Output file base name for HTML help builder. | # Output file base name for HTML help builder. | ||||
htmlhelp_basename = 'fastNLPdoc' | |||||
htmlhelp_basename = 'fastNLP doc' | |||||
# -- Options for LaTeX output ------------------------------------------------ | # -- Options for LaTeX output ------------------------------------------------ | ||||
@@ -2,6 +2,6 @@ fastNLP.core.batch | |||||
================== | ================== | ||||
.. automodule:: fastNLP.core.batch | .. automodule:: fastNLP.core.batch | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: BatchIter, DataSetIter, TorchLoaderIter | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.callback | |||||
===================== | ===================== | ||||
.. automodule:: fastNLP.core.callback | .. automodule:: fastNLP.core.callback | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Callback, GradientClipCallback, EarlyStopCallback, FitlogCallback, EvaluateCallback, LRScheduler, ControlC, LRFinder, TensorboardCallback, WarmupCallback, SaveModelCallback, EchoCallback, TesterCallback, CallbackException, EarlyStopError | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.const | |||||
================== | ================== | ||||
.. automodule:: fastNLP.core.const | .. automodule:: fastNLP.core.const | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Const | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.dataset | |||||
==================== | ==================== | ||||
.. automodule:: fastNLP.core.dataset | .. automodule:: fastNLP.core.dataset | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: DataSet | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.field | |||||
================== | ================== | ||||
.. automodule:: fastNLP.core.field | .. automodule:: fastNLP.core.field | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Padder, AutoPadder, EngChar2DPadder | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.instance | |||||
===================== | ===================== | ||||
.. automodule:: fastNLP.core.instance | .. automodule:: fastNLP.core.instance | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Instance | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.losses | |||||
=================== | =================== | ||||
.. automodule:: fastNLP.core.losses | .. automodule:: fastNLP.core.losses | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: LossBase, LossFunc, LossInForward, CrossEntropyLoss, BCELoss, L1Loss, NLLLoss | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.metrics | |||||
==================== | ==================== | ||||
.. automodule:: fastNLP.core.metrics | .. automodule:: fastNLP.core.metrics | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: MetricBase, AccuracyMetric, SpanFPreRecMetric, ExtractiveQAMetric | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.optimizer | |||||
====================== | ====================== | ||||
.. automodule:: fastNLP.core.optimizer | .. automodule:: fastNLP.core.optimizer | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Optimizer, SGD, Adam, AdamW | |||||
:inherited-members: | |||||
@@ -2,12 +2,11 @@ fastNLP.core | |||||
============ | ============ | ||||
.. automodule:: fastNLP.core | .. automodule:: fastNLP.core | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: DataSet, Instance, FieldArray, Padder, AutoPadder, EngChar2DPadder, Vocabulary, DataSetIter, BatchIter, TorchLoaderIter, Const, Tester, Trainer, cache_results, seq_len_to_mask, get_seq_len, logger, Callback, GradientClipCallback, EarlyStopCallback, FitlogCallback, EvaluateCallback, LRScheduler, ControlC, LRFinder, TensorboardCallback, WarmupCallback, SaveModelCallback, EchoCallback, TesterCallback, CallbackException, EarlyStopError, LossFunc, CrossEntropyLoss, L1Loss, BCELoss, NLLLoss, LossInForward, AccuracyMetric, SpanFPreRecMetric, ExtractiveQAMetric, Optimizer, SGD, Adam, AdamW, SequentialSampler, BucketSampler, RandomSampler, Sampler | |||||
:inherited-members: | |||||
Submodules | |||||
---------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||
@@ -2,6 +2,6 @@ fastNLP.core.sampler | |||||
==================== | ==================== | ||||
.. automodule:: fastNLP.core.sampler | .. automodule:: fastNLP.core.sampler | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Sampler, BucketSampler, SequentialSampler, RandomSampler | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.tester | |||||
=================== | =================== | ||||
.. automodule:: fastNLP.core.tester | .. automodule:: fastNLP.core.tester | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Tester | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.trainer | |||||
==================== | ==================== | ||||
.. automodule:: fastNLP.core.trainer | .. automodule:: fastNLP.core.trainer | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Trainer | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.utils | |||||
================== | ================== | ||||
.. automodule:: fastNLP.core.utils | .. automodule:: fastNLP.core.utils | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: cache_results, seq_len_to_mask, get_seq_len | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.core.vocabulary | |||||
======================= | ======================= | ||||
.. automodule:: fastNLP.core.vocabulary | .. automodule:: fastNLP.core.vocabulary | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Vocabulary, VocabularyOption | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.embeddings.bert\_embedding | |||||
================================== | |||||
fastNLP.embeddings.bert_embedding | |||||
================================= | |||||
.. automodule:: fastNLP.embeddings.bert_embedding | .. automodule:: fastNLP.embeddings.bert_embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: BertEmbedding, BertWordPieceEncoder | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.embeddings.char\_embedding | |||||
================================== | |||||
fastNLP.embeddings.char_embedding | |||||
================================= | |||||
.. automodule:: fastNLP.embeddings.char_embedding | .. automodule:: fastNLP.embeddings.char_embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: CNNCharEmbedding, LSTMCharEmbedding | |||||
:inherited-members: | |||||
@@ -0,0 +1,7 @@ | |||||
fastNLP.embeddings.contextual_embedding | |||||
======================================= | |||||
.. automodule:: fastNLP.embeddings.contextual_embedding | |||||
:members: ContextualEmbedding | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.embeddings.elmo\_embedding | |||||
================================== | |||||
fastNLP.embeddings.elmo_embedding | |||||
================================= | |||||
.. automodule:: fastNLP.embeddings.elmo_embedding | .. automodule:: fastNLP.embeddings.elmo_embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: ElmoEmbedding | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.embeddings.embedding | |||||
============================ | ============================ | ||||
.. automodule:: fastNLP.embeddings.embedding | .. automodule:: fastNLP.embeddings.embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Embedding, TokenEmbedding | |||||
:inherited-members: | |||||
@@ -2,17 +2,17 @@ fastNLP.embeddings | |||||
================== | ================== | ||||
.. automodule:: fastNLP.embeddings | .. automodule:: fastNLP.embeddings | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Embedding, TokenEmbedding, StaticEmbedding, ElmoEmbedding, BertEmbedding, BertWordPieceEncoder, StackEmbedding, LSTMCharEmbedding, CNNCharEmbedding, get_embeddings | |||||
:inherited-members: | |||||
Submodules | |||||
---------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||
fastNLP.embeddings.bert_embedding | fastNLP.embeddings.bert_embedding | ||||
fastNLP.embeddings.char_embedding | fastNLP.embeddings.char_embedding | ||||
fastNLP.embeddings.contextual_embedding | |||||
fastNLP.embeddings.elmo_embedding | fastNLP.embeddings.elmo_embedding | ||||
fastNLP.embeddings.embedding | fastNLP.embeddings.embedding | ||||
fastNLP.embeddings.stack_embedding | fastNLP.embeddings.stack_embedding | ||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.embeddings.stack\_embedding | |||||
=================================== | |||||
fastNLP.embeddings.stack_embedding | |||||
================================== | |||||
.. automodule:: fastNLP.embeddings.stack_embedding | .. automodule:: fastNLP.embeddings.stack_embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: StackEmbedding | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.embeddings.static\_embedding | |||||
==================================== | |||||
fastNLP.embeddings.static_embedding | |||||
=================================== | |||||
.. automodule:: fastNLP.embeddings.static_embedding | .. automodule:: fastNLP.embeddings.static_embedding | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: StaticEmbedding | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.embeddings.utils | |||||
======================== | ======================== | ||||
.. automodule:: fastNLP.embeddings.utils | .. automodule:: fastNLP.embeddings.utils | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: get_embeddings | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.io.data\_bundle | |||||
======================= | |||||
fastNLP.io.data_bundle | |||||
====================== | |||||
.. automodule:: fastNLP.io.data_bundle | .. automodule:: fastNLP.io.data_bundle | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: DataBundle | |||||
:inherited-members: | |||||
@@ -1,8 +0,0 @@ | |||||
fastNLP.io.data\_loader | |||||
======================= | |||||
.. automodule:: fastNLP.io.data_loader | |||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
@@ -1,7 +1,6 @@ | |||||
fastNLP.io.dataset\_loader | |||||
========================== | |||||
fastNLP.io.dataset_loader | |||||
========================= | |||||
.. automodule:: fastNLP.io.dataset_loader | .. automodule:: fastNLP.io.dataset_loader | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: CSVLoader, JsonLoader | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.io.embed\_loader | |||||
======================== | |||||
fastNLP.io.embed_loader | |||||
======================= | |||||
.. automodule:: fastNLP.io.embed_loader | .. automodule:: fastNLP.io.embed_loader | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: EmbedLoader, EmbeddingOption | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.io.file\_utils | |||||
====================== | |||||
fastNLP.io.file_utils | |||||
===================== | |||||
.. automodule:: fastNLP.io.file_utils | .. automodule:: fastNLP.io.file_utils | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: cached_path, get_filepath, get_cache_path, split_filename_suffix, get_from_cache | |||||
:inherited-members: | |||||
@@ -2,7 +2,6 @@ fastNLP.io.loader | |||||
================= | ================= | ||||
.. automodule:: fastNLP.io.loader | .. automodule:: fastNLP.io.loader | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Loader, YelpLoader, YelpFullLoader, YelpPolarityLoader, IMDBLoader, SSTLoader, SST2Loader, ConllLoader, Conll2003Loader, Conll2003NERLoader, OntoNotesNERLoader, CTBLoader, MsraNERLoader, PeopleDailyNERLoader, WeiboNERLoader, CSVLoader, JsonLoader, CWSLoader, MNLILoader, QuoraLoader, SNLILoader, QNLILoader, RTELoader | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.io.model\_io | |||||
==================== | |||||
fastNLP.io.model_io | |||||
=================== | |||||
.. automodule:: fastNLP.io.model_io | .. automodule:: fastNLP.io.model_io | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: ModelLoader, ModelSaver | |||||
:inherited-members: | |||||
@@ -2,7 +2,6 @@ fastNLP.io.pipe | |||||
=============== | =============== | ||||
.. automodule:: fastNLP.io.pipe | .. automodule:: fastNLP.io.pipe | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Pipe, CWSPipe, YelpFullPipe, YelpPolarityPipe, SSTPipe, SST2Pipe, IMDBPipe, Conll2003NERPipe, OntoNotesNERPipe, MsraNERPipe, WeiboNERPipe, PeopleDailyPipe, Conll2003Pipe, MatchingBertPipe, RTEBertPipe, SNLIBertPipe, QuoraBertPipe, QNLIBertPipe, MNLIBertPipe, MatchingPipe, RTEPipe, SNLIPipe, QuoraPipe, QNLIPipe, MNLIPipe | |||||
:inherited-members: | |||||
@@ -2,27 +2,18 @@ fastNLP.io | |||||
========== | ========== | ||||
.. automodule:: fastNLP.io | .. automodule:: fastNLP.io | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: DataBundle, EmbedLoader, Loader, YelpLoader, YelpFullLoader, YelpPolarityLoader, IMDBLoader, SSTLoader, SST2Loader, ConllLoader, Conll2003Loader, Conll2003NERLoader, OntoNotesNERLoader, CTBLoader, MsraNERLoader, WeiboNERLoader, PeopleDailyNERLoader, CSVLoader, JsonLoader, CWSLoader, MNLILoader, QuoraLoader, SNLILoader, QNLILoader, RTELoader, Pipe, YelpFullPipe, YelpPolarityPipe, SSTPipe, SST2Pipe, IMDBPipe, Conll2003Pipe, Conll2003NERPipe, OntoNotesNERPipe, MsraNERPipe, PeopleDailyPipe, WeiboNERPipe, CWSPipe, MatchingBertPipe, RTEBertPipe, SNLIBertPipe, QuoraBertPipe, QNLIBertPipe, MNLIBertPipe, MatchingPipe, RTEPipe, SNLIPipe, QuoraPipe, QNLIPipe, MNLIPipe, ModelLoader, ModelSaver | |||||
:inherited-members: | |||||
Subpackages | |||||
----------- | |||||
.. toctree:: | |||||
fastNLP.io.data_loader | |||||
fastNLP.io.loader | |||||
fastNLP.io.pipe | |||||
Submodules | |||||
---------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||
fastNLP.io.data_bundle | fastNLP.io.data_bundle | ||||
fastNLP.io.dataset_loader | |||||
fastNLP.io.embed_loader | fastNLP.io.embed_loader | ||||
fastNLP.io.file_utils | fastNLP.io.file_utils | ||||
fastNLP.io.loader | |||||
fastNLP.io.model_io | fastNLP.io.model_io | ||||
fastNLP.io.pipe | |||||
fastNLP.io.utils | fastNLP.io.utils |
@@ -2,6 +2,6 @@ fastNLP.io.utils | |||||
================ | ================ | ||||
.. automodule:: fastNLP.io.utils | .. automodule:: fastNLP.io.utils | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: check_loader_paths | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.models.biaffine\_parser | |||||
=============================== | |||||
fastNLP.models.biaffine_parser | |||||
============================== | |||||
.. automodule:: fastNLP.models.biaffine_parser | .. automodule:: fastNLP.models.biaffine_parser | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: BiaffineParser, GraphParser | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.models.cnn\_text\_classification | |||||
======================================== | |||||
fastNLP.models.cnn_text_classification | |||||
====================================== | |||||
.. automodule:: fastNLP.models.cnn_text_classification | .. automodule:: fastNLP.models.cnn_text_classification | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: CNNText | |||||
:inherited-members: | |||||
@@ -2,12 +2,11 @@ fastNLP.models | |||||
============== | ============== | ||||
.. automodule:: fastNLP.models | .. automodule:: fastNLP.models | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: CNNText, SeqLabeling, AdvSeqLabel, ESIM, StarTransEnc, STSeqLabel, STNLICls, STSeqCls, BiaffineParser, GraphParser | |||||
:inherited-members: | |||||
Submodules | |||||
---------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.models.sequence\_labeling | |||||
================================= | |||||
fastNLP.models.sequence_labeling | |||||
================================ | |||||
.. automodule:: fastNLP.models.sequence_labeling | .. automodule:: fastNLP.models.sequence_labeling | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: SeqLabeling, AdvSeqLabel | |||||
:inherited-members: | |||||
@@ -2,6 +2,6 @@ fastNLP.models.snli | |||||
=================== | =================== | ||||
.. automodule:: fastNLP.models.snli | .. automodule:: fastNLP.models.snli | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: ESIM | |||||
:inherited-members: | |||||
@@ -1,7 +1,7 @@ | |||||
fastNLP.models.star\_transformer | |||||
================================ | |||||
fastNLP.models.star_transformer | |||||
=============================== | |||||
.. automodule:: fastNLP.models.star_transformer | .. automodule:: fastNLP.models.star_transformer | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: StarTransEnc, STNLICls, STSeqCls, STSeqLabel | |||||
:inherited-members: | |||||
@@ -2,7 +2,6 @@ fastNLP.modules.decoder | |||||
======================= | ======================= | ||||
.. automodule:: fastNLP.modules.decoder | .. automodule:: fastNLP.modules.decoder | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: MLP, ConditionalRandomField, viterbi_decode, allowed_transitions | |||||
:inherited-members: | |||||
@@ -2,7 +2,6 @@ fastNLP.modules.encoder | |||||
======================= | ======================= | ||||
.. automodule:: fastNLP.modules.encoder | .. automodule:: fastNLP.modules.encoder | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: ConvolutionCharEncoder, LSTMCharEncoder, ConvMaxpool, LSTM, StarTransformer, TransformerEncoder, VarRNN, VarLSTM, VarGRU, MaxPool, MaxPoolWithMask, AvgPool, AvgPoolWithMask, MultiHeadAttention | |||||
:inherited-members: | |||||
@@ -2,21 +2,14 @@ fastNLP.modules | |||||
=============== | =============== | ||||
.. automodule:: fastNLP.modules | .. automodule:: fastNLP.modules | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: ConvolutionCharEncoder, LSTMCharEncoder, ConvMaxpool, LSTM, StarTransformer, TransformerEncoder, VarRNN, VarLSTM, VarGRU, MaxPool, MaxPoolWithMask, AvgPool, AvgPoolWithMask, MultiHeadAttention, MLP, ConditionalRandomField, viterbi_decode, allowed_transitions, TimestepDropout | |||||
:inherited-members: | |||||
Subpackages | |||||
----------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||
fastNLP.modules.decoder | fastNLP.modules.decoder | ||||
fastNLP.modules.encoder | fastNLP.modules.encoder | ||||
Submodules | |||||
---------- | |||||
.. toctree:: | |||||
fastNLP.modules.utils | fastNLP.modules.utils |
@@ -2,6 +2,6 @@ fastNLP.modules.utils | |||||
===================== | ===================== | ||||
.. automodule:: fastNLP.modules.utils | .. automodule:: fastNLP.modules.utils | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: initial_parameter, summary | |||||
:inherited-members: | |||||
@@ -2,12 +2,11 @@ fastNLP | |||||
======= | ======= | ||||
.. automodule:: fastNLP | .. automodule:: fastNLP | ||||
:members: | |||||
:undoc-members: | |||||
:show-inheritance: | |||||
:members: Instance, FieldArray, DataSetIter, BatchIter, TorchLoaderIter, Vocabulary, DataSet, Const, Trainer, Tester, Callback, GradientClipCallback, EarlyStopCallback, TensorboardCallback, LRScheduler, ControlC, LRFinder, Padder, AutoPadder, EngChar2DPadder, AccuracyMetric, SpanFPreRecMetric, ExtractiveQAMetric, Optimizer, SGD, Adam, AdamW, Sampler, SequentialSampler, BucketSampler, RandomSampler, LossFunc, CrossEntropyLoss, L1Loss, BCELoss, NLLLoss, LossInForward, cache_results, logger | |||||
:inherited-members: | |||||
Subpackages | |||||
----------- | |||||
子模块 | |||||
------ | |||||
.. toctree:: | .. toctree:: | ||||