AutoResearch / autora

Automated Research Assistant
https://autoresearch.github.io/autora/
MIT License
41 stars 5 forks source link

build: Torch 2.0.1 conditional dependency specification #409

Closed gtdang closed 1 year ago

gtdang commented 1 year ago

Description

Addressing issue #408

Type of change

Features (Optional)

Questions (Optional)

gtdang commented 1 year ago

Screenshot 2023-05-16 at 6 00 36 PM

I removed fail-fast in the gh actions pytest workflow and confirmed that this issue is only for Linux builds.

gtdang commented 1 year ago

@benwandrew Wow! That was a battle but I got it working. So this is at least one solution. I'd like to get @hollandjg perspective on this when he's back next week. So lets wait to merge?

benwandrew commented 1 year ago

@benwandrew Wow! That was a battle but I got it working. So this is at least one solution. I'd like to get @hollandjg perspective on this when he's back next week. So lets wait to merge?

@gtdang sounds good, i agree. thanks for fighting your way through!

hollandjg commented 1 year ago

This should be a problem which is isolated to autora-theorist-darts once we've done the reorganization. Is it just because torch 2.0.1 doesn't work on linux yet? If so, we can just keep the current working version 1.x until this is fixed.

gtdang commented 1 year ago

This should be a problem which is isolated to autora-theorist-darts once we've done the reorganization. Is it just because torch 2.0.1 doesn't work on linux yet? If so, we can just keep the current working version 1.x until this is fixed.

It's actually because the the default for pip install behavior differs between operating systems. Linux defaults to a GPU version and you need to specify the CPU version whl source for it. For Mac and Windows it defaults to the CPU version. This is an issue for our tests because GH Runners don't have gpu. The build works but the test fails when searching to compile GPU modules.

I'm not sure when this change happened, but it the problem arose when trying to update to v2.0.1.

I brought this up at last week's maintenance meeting. We discussed that the CPU version should be the default dependency and have a warning about GPU resources when the user imports the Darts modules. I added an issue with more info to the autora-theorist-darts for this feature. https://github.com/AutoResearch/autora-theorist-darts/issues/3

hollandjg commented 1 year ago

this needs to be closed here and moved over to the relevant subpackages which use pytorch (darts, falsification)