brainglobe / brainglobe.github.io

brainglobe.info website
https://brainglobe.info/
Creative Commons Attribution 4.0 International
10 stars 8 forks source link

TensorFlow to PyTorch migration #189

Closed IgorTatarnikov closed 5 months ago

IgorTatarnikov commented 5 months ago

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

Why is this PR needed? We're changing the backend for cellfinder to use PyTorch instead of Tensorflow.

What does this PR do? Removes most mentions of TensorFlow as it relates to cellfinder and replaces them with the relevant PyTorch instruction.

I've made these changes with the understanding that cellfinder is the only package that currently uses TensorFlow so migrating to PyTorch allows us to not instruct users on setting it up. I didn't change the mentions in error-messages.md as those remain relevant for people using the older version.

References

Closes #183

How has this PR been tested?

Built locally.

Is this a breaking change?

No.

Checklist:

IgorTatarnikov commented 5 months ago

I had one question about these lines, after we remove TensorFlow are we still going to recommend a Python 3.10 dev environment? If so, what's our official reason?

@adamltyson @alessandrofelder

adamltyson commented 5 months ago

Nope, once we move to torch, the plan is to update everything to recommend 3.11. Once all dependencies also support it, we can then move to 3.12.

tensorflow is/was the only thing keeping us on 3.10

alessandrofelder commented 5 months ago

IIUC as we're following NEP 29, we will recommend 3.11 but still support 3.10 until April 2025

adamltyson commented 5 months ago

Yeah we haven't updated supported versions while we've been stuck with 3.10 as the latest. I suggest once the torch version of cf is released, we go through and NEP29-ify everything.

adamltyson commented 5 months ago

Looks good to me - we should wait until https://github.com/brainglobe/cellfinder/pull/418#issue-comment-box is merged before merging this.

*is released.

IgorTatarnikov commented 5 months ago

Build Sphinx Docs is failing due to:

(documentation/brainglobe-atlasapi/usage/atlas-details: line  131) broken    https://doi.org/10.1101/2021.05.04.442625 - HTTPConnectionPool(host='biorxiv.org', port=80): Max retries exceeded with url: /lookup/doi/10.1101/2021.05.04.442625 (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7fd2980e6780>, 'Connection to biorxiv.org timed out. (connect timeout=30)'))

The link works when I try to access it via browser.

adamltyson commented 5 months ago

I've re-run the build. I've sometimes noticed that biorxiv does this, but it works itself out