Sllambias / yucca

Apache License 2.0
14 stars 1 forks source link

No more maybe #185

Closed asbjrnmunk closed 3 weeks ago

asbjrnmunk commented 4 weeks ago

Fixes #82. Finally.

The following are renamed:


maybe_mkdir_p ~> ensure_dir_exists
maybe_to_gpu ~> move_to_available_device (which fwiw breaks 'cpu' support on mps device, but this pr doesnt change that)
maybe_get_task_from_task_id -> get_task_from_task_id (including refactor!)

Not changed:

load_and_maybe_keep_volume
load_and_maybe_keep_pickle
asbjrnmunk commented 4 weeks ago

@Sllambias FWIW i am unsure if the maybe_to_gpu solution works in a distributed setting where you have "cuda:0" and "cuda:1", since it just returns "cuda".

asbjrnmunk commented 4 weeks ago

@Sllambias I think it is solid, but would be nice if you could have a carefull look at https://github.com/Sllambias/yucca/pull/185/commits/d370f0b90a525756a805be305e5e33fe7420eb52, to make sure it is in fact solid.