texar-pytorch icon indicating copy to clipboard operation
texar-pytorch copied to clipboard

A bunch of doc issues

Open ZhitingHu opened this issue 6 years ago • 1 comments

  • [ ] TransformerDecoder.forward: where does self.training come from? https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/transformer_decoders.py#L448-L449

  • [ ] All arguments should say their types explicitly in the docstring. E.g., what is the type of infer_mode? The method signature is too dense to read for the type https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/transformer_decoders.py#L448-L449

  • [ ] TransformerDecoder.forward: start_tokens and end_token are mentioned but they are not explained in the argument docstring, and there is not explicit pointer that tells users where they can find the explanation. https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/transformer_decoders.py#L353

  • [ ] RNNDecoderBase.forward: An ordinary user (not developer) does not need to know dynamic_decode. It's confusing say Please refer to .. here. Say explicitly that it's needed only when one wants to over-write forward .. Also, we are using our own dynamic_decode -- should refer to here instead of tf.contrib.seq2seq.dynamic_decode https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/rnn_decoder_base.py#L104-L107

  • [ ] XLNetDecoder.forward: Is output just a list of sampled tokens or XLNetDecoderOutput? https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/xlnet_decoder.py#L318-L320

  • [ ] "helper" should be "helper_type" https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/xlnet_decoder.py#L313-L314

ZhitingHu avatar Nov 29 '19 02:11 ZhitingHu

  • [ ] DecoderBase should be exposed in readthedocs, cuz a few important methods in it are used by users, like: https://github.com/asyml/texar-pytorch/blob/d17d502b50da1d95cb70435ed21c6603370ce76d/texar/torch/modules/decoders/decoder_base.py#L144-L150

ZhitingHu avatar Nov 29 '19 02:11 ZhitingHu