Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Ai/fix tests for cpu #273

Draft
wants to merge 3 commits into
base: ote
Choose a base branch
from
Draft

Ai/fix tests for cpu #273

wants to merge 3 commits into from

Conversation

aiarkinx
Copy link

Hotfix for run tests on CPU

Comment on lines 226 to 229
if os.getenv("CUDA_VISIBLE_DEVICES") == "":
self.assertLess(time.time() - start_time, 400, 'Expected to stop within 400 seconds.')
else:
self.assertLess(time.time() - start_time, 100, 'Expected to stop within 100 seconds.')

Choose a reason for hiding this comment

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

2 @aiarkinx : I propose to do as follows

if os.getenv("CUDA_VISIBLE_DEVICES") == "":
    timeout = 400
else:
    timeout = 100

self.assertLess(time.time() - start_time, timeout, f'Expected to stop within {timeout} seconds.')

(please, do not move complicated code inside if - then - else clause if it is possible to move only one variable into it.)

Copy link
Author

Choose a reason for hiding this comment

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

done

if os.getenv("CUDA_VISIBLE_DEVICES") == "":
self.assertLess(time.time() - start_time, 400)
else:
self.assertLess(time.time() - start_time, 25) # stopping process has to happen in less than 25 seconds

Choose a reason for hiding this comment

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

Make the same changes related timeout variable as I wrote above

@druzhkov-paul
Copy link

@LeonidBeynenson Please review once again.

@druzhkov-paul druzhkov-paul marked this pull request as draft January 17, 2022 09:49
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants