You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.6 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ## maintain docs
  2. 1. install requirements needed to build docs
  3. ```shell
  4. # in maas_lib root dir
  5. pip install requirements/docs.txt
  6. ```
  7. 2. build docs
  8. ```shell
  9. # in maas_lib/docs dir
  10. bash build_docs.sh
  11. ```
  12. 3. doc string format
  13. We adopt the google style docstring format as the standard, please refer to the following documents.
  14. 1. Google Python style guide docstring [link](http://google.github.io/styleguide/pyguide.html#381-docstrings)
  15. 2. Google docstring example [link](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html)
  16. 3. sample:torch.nn.modules.conv [link](https://pytorch.org/docs/stable/_modules/torch/nn/modules/conv.html#Conv1d)
  17. 4. load fucntion as an example:
  18. ```python
  19. def load(file, file_format=None, **kwargs):
  20. """Load data from json/yaml/pickle files.
  21. This method provides a unified api for loading data from serialized files.
  22. Args:
  23. file (str or :obj:`Path` or file-like object): Filename or a file-like
  24. object.
  25. file_format (str, optional): If not specified, the file format will be
  26. inferred from the file extension, otherwise use the specified one.
  27. Currently supported formats include "json", "yaml/yml".
  28. Examples:
  29. >>> load('/path/of/your/file') # file is storaged in disk
  30. >>> load('https://path/of/your/file') # file is storaged in Internet
  31. >>> load('oss://path/of/your/file') # file is storaged in petrel
  32. Returns:
  33. The content from the file.
  34. """
  35. ```

致力于通过开放的社区合作,开源AI模型以及相关创新技术,推动基于模型即服务的生态繁荣发展