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

find more accurately which files need to be doctested #5782

Merged
merged 6 commits into from
Aug 7, 2021

Conversation

doombeaker
Copy link
Contributor

现有根据 py 文件中是否又 "doctest" 来作为是否测试的标准,有些情况下容易误判,比如:

>>> output #doctest: +ELLIPSIS

为了能够愉快的使用 #doctest 一类的命令,改为根据 import doctest 判断,这和 https://github.com/Oneflow-Inc/oneflow/blob/master/ci/check/run_license_format.py#L38 这里的判断是一致的,更合理。

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 139.2ms (= 6957.5ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.4ms (= 6419.8ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 139.2ms / 128.4ms)

PyTorch resnet50 time: 83.1ms (= 4154.5ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.7ms (= 3735.5ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.11 (= 83.1ms / 74.7ms)

PyTorch resnet50 time: 58.4ms (= 2921.9ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 47.6ms (= 2381.0ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.23 (= 58.4ms / 47.6ms)

PyTorch resnet50 time: 47.7ms (= 2386.1ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 38.2ms (= 1911.1ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.25 (= 47.7ms / 38.2ms)

PyTorch resnet50 time: 45.1ms (= 2254.1ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 41.2ms (= 2059.7ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.09 (= 45.1ms / 41.2ms)

@oneflow-ci-bot oneflow-ci-bot removed their request for review August 7, 2021 06:44
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 7, 2021 13:13
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 7, 2021 14:25
@doombeaker doombeaker requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 7, 2021 15:20
@oneflow-ci-bot oneflow-ci-bot removed their request for review August 7, 2021 16:23
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 7, 2021 16:23
@oneflow-ci-bot oneflow-ci-bot self-requested a review August 7, 2021 19:08
@oneflow-ci-bot oneflow-ci-bot requested review from oneflow-ci-bot and removed request for oneflow-ci-bot August 7, 2021 20:34
@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2021

Speed stats:
GPU Name: GeForce GTX 1080 

PyTorch resnet50 time: 141.5ms (= 7077.4ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 128.4ms (= 6420.6ms / 50, input_shape=[16, 3, 224, 224], backward is enabled)
Relative speed: 1.10 (= 141.5ms / 128.4ms)

PyTorch resnet50 time: 84.5ms (= 4223.2ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 74.3ms (= 3716.4ms / 50, input_shape=[8, 3, 224, 224], backward is enabled)
Relative speed: 1.14 (= 84.5ms / 74.3ms)

PyTorch resnet50 time: 58.7ms (= 2935.3ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 50.4ms (= 2521.4ms / 50, input_shape=[4, 3, 224, 224], backward is enabled)
Relative speed: 1.16 (= 58.7ms / 50.4ms)

PyTorch resnet50 time: 48.4ms (= 2417.7ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 44.7ms (= 2233.3ms / 50, input_shape=[2, 3, 224, 224], backward is enabled)
Relative speed: 1.08 (= 48.4ms / 44.7ms)

PyTorch resnet50 time: 42.3ms (= 2115.4ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
OneFlow resnet50 time: 40.2ms (= 2009.2ms / 50, input_shape=[1, 3, 224, 224], backward is enabled)
Relative speed: 1.05 (= 42.3ms / 40.2ms)

@oneflow-ci-bot oneflow-ci-bot merged commit be1126b into master Aug 7, 2021
@oneflow-ci-bot oneflow-ci-bot deleted the refine_which_files_to_be_doctested branch August 7, 2021 21:59
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.

3 participants