Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Remove first result from measurement #1019

Merged
merged 2 commits into from
May 7, 2020

Conversation

tk26eng
Copy link
Contributor

@tk26eng tk26eng commented May 1, 2020

What this patch does to fix the issue.

This patch excludes first result from performance measurement because a first result includes some initialization time to read some data into memory.
That can be seen especially when we use pb file as model.

Below is the compared result of run.py which we use a same pb file

  • Before
    INFO:main:Function _run took 0.3625333949457854 seconds to complete
    INFO:main:Function _run took 0.007619671057909727 seconds to complete
    INFO:main:Function _run took 0.007477258099243045 seconds to complete
    INFO:main:Function _run took 0.0068569539580494165 seconds to complete
    INFO:main:Function _run took 0.006867909105494618 seconds to complete
    INFO:main:Function _run took 0.007176596904173493 seconds to complete
    INFO:main:Function _run took 0.007123536895960569 seconds to complete
    INFO:main:Function _run took 0.007711157901212573 seconds to complete
    INFO:main:Function _run took 0.007052185945212841 seconds to complete
    INFO:main:Function _run took 0.007207290967926383 seconds to complete

  • After
    INFO:main:Function _run took 0.00717798201367259 seconds to complete
    INFO:main:Function _run took 0.009376114001497626 seconds to complete
    INFO:main:Function _run took 0.01757289608940482 seconds to complete
    INFO:main:Function _run took 0.005577495088800788 seconds to complete
    INFO:main:Function _run took 0.0052312680054455996 seconds to complete
    INFO:main:Function _run took 0.004525961121544242 seconds to complete
    INFO:main:Function _run took 0.004832894075661898 seconds to complete
    INFO:main:Function _run took 0.004257153021171689 seconds to complete
    INFO:main:Function _run took 0.0041026161052286625 seconds to complete
    INFO:main:Function _run took 0.004274927079677582 seconds to complete

Link to any relevant issues or pull requests.

Fix #929

@blueoil-butler blueoil-butler bot added the CI: auto-run Run CI automatically label May 1, 2020
@bo-code-review-bot
Copy link

This PR needs Approvals as follows.

  • Ownership Approval for / from iizukak, tkng, ruimashita
  • Readability Approval for Python from tkng, tsawada, tfujiwar

Please choose reviewers and requet reviews!

Click to see how to approve each reviews

You can approve this PR by triggered comments as follows.

  • Approve all reviews requested to you (readability and ownership) and LGTM review
    Approval, LGTM

  • Approve all ownership reviews
    Ownership Approval or OA

  • Approve all readability reviews
    Readability Approval or RA

  • Approve specified review targets

    • Example of Ownership Reviewer of /: Ownership Approval for / or OA for /
    • Example of Readability Reviewer of Python: Readability Approval for Python or RA for Python
  • Approve LGTM review
    LGTM

See all trigger comments

Please replace [Target] to review target

  • Ownership Approval
    • Ownership Approval for [Target]
    • OA for [Target]
    • Ownership Approval
    • OA
    • Approval
  • Readability Approval
    • Readability Approval for [Target]
    • RA for [Target]
    • [Target] Readability Approval
    • [Target] RA
    • Readability Approval
    • RA
    • Approval
  • LGTM
    • LGTM
    • lgtm

@tk26eng tk26eng requested a review from iizukak May 1, 2020 14:19
Copy link
Member

@iizukak iizukak left a comment

Choose a reason for hiding this comment

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

OA

@iizukak
Copy link
Member

iizukak commented May 4, 2020

@kchygoe This PR solve your issue. What do think?

Copy link
Member

@kchygoe kchygoe left a comment

Choose a reason for hiding this comment

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

LGTM, thx

@tk26eng tk26eng requested a review from tfujiwar May 7, 2020 08:44
Copy link
Contributor

@tfujiwar tfujiwar left a comment

Choose a reason for hiding this comment

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

Readability Approval

@tk26eng
Copy link
Contributor Author

tk26eng commented May 7, 2020

/ready

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented May 7, 2020

⏳Merge job is queued...

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented May 7, 2020

😥Status check failed. Please fix problems and send /ready again.

@tfujiwar tfujiwar added the CI: test-all Run all tests once label May 7, 2020
@blueoil-butler blueoil-butler bot removed the CI: test-all Run all tests once label May 7, 2020
@tfujiwar
Copy link
Contributor

tfujiwar commented May 7, 2020

/ready

@bo-mergebot
Copy link
Contributor

bo-mergebot bot commented May 7, 2020

⏳Merge job is queued...

@bo-mergebot bo-mergebot bot merged commit 1f0b9d0 into blue-oil:master May 7, 2020
@tk26eng tk26eng deleted the remove_init_time branch May 19, 2020 07:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CI: auto-run Run CI automatically
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inference: run.py time measurement include library load
4 participants