Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove outdated doctest api and "@experimental_api" #5564

Merged
merged 48 commits into from
Jul 24, 2021

Conversation

kevinzhangcode
Copy link
Contributor

@kevinzhangcode kevinzhangcode commented Jul 22, 2021

  1. 去掉 @experimental_api ,使得新接口直接在 oneflow 名称空间下
  2. 同步修改对应的 docstring,去掉 oneflow.experimentalenable_eager_execution
  3. 去掉了测试代码中的的 experimental,现在 python 目录下已经没有因为新接口更替引入的 experimetal
  4. 修改 rst 接口
  5. 修正了整理过程中发现的文档的一些格式问题、接口导出问题

本地已经测试通过 ci/test/doctest.sh, python/test/modules, python/test/tensor, python/test/graph

文档已经编译并查看效果正常

image
image

@CLAassistant
Copy link

CLAassistant commented Jul 22, 2021

CLA assistant check
All committers have signed the CLA.

@doombeaker doombeaker changed the base branch from master to remove_singleclient_outdated_api July 22, 2021 02:20
@doombeaker doombeaker force-pushed the remove_singleclient_outdated_api branch 2 times, most recently from eabb7a8 to dbf38f7 Compare July 22, 2021 03:45
@doombeaker doombeaker changed the base branch from remove_singleclient_outdated_api to master July 22, 2021 03:48
@@ -231,7 +231,7 @@ def __repr__(self):


@oneflow_export("nn.graph.GraphConfig")
@experimental_api

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

多出这个空行是不行的(语法上就会报错吧?)

@@ -44,15 +43,14 @@ def acos_op(tensor):

.. code-block:: python

>>> import oneflow.experimental as flow
>>> import oneflow as flow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 acos 我改了,没有复现你的问题

@doombeaker doombeaker marked this pull request as ready for review July 22, 2021 17:30
@doombeaker doombeaker requested review from oneflow-ci-bot, chengtbf and clackhan and removed request for oneflow-ci-bot July 22, 2021 17:32
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 138.3ms (= 6913.5ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 124.0ms (= 6199.7ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.12 (= 138.3ms / 124.0ms)

PyTorch resnet50 time: 83.2ms (= 4160.0ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 72.3ms (= 3615.7ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.15 (= 83.2ms / 72.3ms)

PyTorch resnet50 time: 56.4ms (= 2819.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 52.1ms (= 2604.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 56.4ms / 52.1ms)

PyTorch resnet50 time: 45.2ms (= 2258.4ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 52.4ms (= 2617.8ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 0.86 (= 45.2ms / 52.4ms)

PyTorch resnet50 time: 43.2ms (= 2158.5ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 60.0ms (= 2998.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.72 (= 43.2ms / 60.0ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review July 24, 2021 06:04
@@ -0,0 +1,8 @@
oneflow.linalg
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件名错了

@jackalcooper jackalcooper requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 24, 2021 07:06
@jackalcooper jackalcooper requested review from oneflow-ci-bot and removed request for oneflow-ci-bot July 24, 2021 07:50
@github-actions
Copy link
Contributor

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 137.3ms (= 6863.9ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 124.1ms (= 6207.5ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 137.3ms / 124.1ms)

PyTorch resnet50 time: 82.1ms (= 4102.9ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 72.3ms (= 3612.8ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 82.1ms / 72.3ms)

PyTorch resnet50 time: 56.2ms (= 2809.3ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 50.8ms (= 2539.9ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 56.2ms / 50.8ms)

PyTorch resnet50 time: 47.3ms (= 2364.0ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 51.8ms (= 2588.6ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 0.91 (= 47.3ms / 51.8ms)

PyTorch resnet50 time: 41.7ms (= 2083.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 51.7ms (= 2587.5ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 0.81 (= 41.7ms / 51.7ms)

@oneflow-ci-bot oneflow-ci-bot merged commit 8e9e61d into master Jul 24, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the remove_doctest_outdate_api branch July 24, 2021 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants