Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
flybirding10011
DI-treetensor
提交
3422e98c
D
DI-treetensor
项目概览
flybirding10011
/
DI-treetensor
与 Fork 源项目一致
Fork自
OpenDILab开源决策智能平台 / DI-treetensor
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
DI-treetensor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3422e98c
编写于
9月 19, 2021
作者:
HansBug
😆
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
doc(hansbug): add mark of the functions
上级
f8349bc4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
6 deletion
+38
-6
docs/source/api_doc/torch/funcs.rst.py
docs/source/api_doc/torch/funcs.rst.py
+17
-2
docs/source/api_doc/torch/trees.rst.py
docs/source/api_doc/torch/trees.rst.py
+21
-4
未找到文件。
docs/source/api_doc/torch/funcs.rst.py
浏览文件 @
3422e98c
...
...
@@ -21,15 +21,30 @@ if __name__ == '__main__':
_item
=
getattr
(
ttorch
.
funcs
,
_name
)
_origin
=
get_origin
(
_item
)
with
codecs
.
open
(
_filename
,
'w'
)
as
p_func
:
print_title
(
_name
,
levelc
=
'='
,
file
=
p_func
)
_has_own_doc
=
(
_item
.
__doc__
or
''
).
lstrip
()
_has_origin_doc
=
(
_origin
is
not
None
)
and
(
_origin
.
__doc__
or
''
).
lstrip
()
print_title
(
_name
+
(
(
' [Reprint Only]'
if
_has_origin_doc
else
' [No Doc]'
)
if
not
_has_own_doc
else
''
),
levelc
=
'='
,
file
=
p_func
)
current_module
(
ttorch
.
__name__
,
file
=
p_func
)
print_title
(
"Documentation"
,
levelc
=
'-'
,
file
=
p_func
)
with
print_block
(
'autofunction'
,
value
=
_name
,
file
=
p_func
):
pass
if
not
_has_own_doc
:
with
print_block
(
'admonition'
,
value
=
(
'Reprinted Documentation Only'
if
_has_origin_doc
else
"No Documentation"
),
params
=
{
'class'
:
'warning'
if
_has_origin_doc
else
"error"
},
file
=
p_func
)
as
f_nodoc
:
print_doc
(
'No ``__doc__`` is provided yet, need to be completed.'
,
file
=
f_nodoc
)
if
_origin
:
_has_origin_doc
=
(
_origin
.
__doc__
or
''
).
lstrip
()
with
print_block
(
'admonition'
,
value
=
'Torch Version Related'
,
params
=
{
'class'
:
'tip'
},
file
=
p_func
)
as
f_note
:
print_doc
(
f
"""
...
...
docs/source/api_doc/torch/trees.rst.py
浏览文件 @
3422e98c
...
...
@@ -33,21 +33,38 @@ if __name__ == '__main__':
print
(
_item_file_tag
,
file
=
cls_toctree
)
with
codecs
.
open
(
f
'
{
_item_file_tag
}
.rst'
,
'w'
)
as
p_item
:
print_title
(
_name
,
levelc
=
'='
,
file
=
p_item
)
_item
=
getattr
(
_tree
,
_name
)
_origin
=
get_origin
(
_item
)
_has_own_doc
=
(
_item
.
__doc__
or
''
).
lstrip
()
_has_origin_doc
=
(
_origin
is
not
None
)
and
(
_origin
.
__doc__
or
''
).
strip
()
print_title
(
_name
+
(
(
' [Reprint Only]'
if
_has_origin_doc
else
' [No Doc]'
)
if
not
_has_own_doc
else
''
),
levelc
=
'='
,
file
=
p_item
)
current_module
(
ttorch
.
__name__
,
file
=
p_item
)
print_title
(
f
"Documentation"
,
levelc
=
'-'
,
file
=
p_item
)
with
print_block
(
'autoclass'
,
value
=
_tree
.
__name__
,
file
=
p_item
)
as
f_class
:
_item
=
getattr
(
_tree
,
_name
)
_origin
=
get_origin
(
_item
)
with
print_block
(
'autoproperty'
if
isinstance
(
_item
,
property
)
else
'automethod'
,
value
=
_name
,
file
=
f_class
):
pass
if
not
_has_own_doc
:
with
print_block
(
'admonition'
,
value
=
(
'Reprinted Documentation Only'
if
_has_origin_doc
else
"No Documentation"
),
params
=
{
'class'
:
'warning'
if
_has_origin_doc
else
"error"
},
file
=
p_item
)
as
f_nodoc
:
print_doc
(
'No ``__doc__`` is provided yet, need to be completed.'
,
file
=
f_nodoc
)
if
_origin
:
_has_origin_doc
=
(
_origin
.
__doc__
or
''
).
strip
()
with
print_block
(
'admonition'
,
value
=
'Torch Version Related'
,
params
=
{
'class'
:
'tip'
},
file
=
p_item
)
as
f_note
:
print_doc
(
f
"""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录