FNet setup issues due to outdated dependencies – any updated version or Docker?

Hi everyone,

I am currently running some experiments and would like to compare my results with outputs obtained using the FNet architecture.

However, while setting up the environment and installing the required dependencies, I am encountering several compatibility issues due to outdated library versions.

I was wondering if there is an updated version of the code available, or perhaps a Docker container or environment specification that works with more recent library versions.

Any guidance would be greatly appreciated, as it would really help ensure a fair and consistent comparison in my experiments.

Thanks in advance!

Hi, can you share which specific repository you are trying to set up? Thanks!

– Jess

Hi,

I’m working with this repository:

icon-lab/ResViT: Official Implementation of ResViT: Residual Vision Transformers for Multi-modal Medical Image Synthesis : (main branch)

Thanks!

-Inés

Thanks @ines_varona! We are not (to my knowledge) involved with the development of the code base you shared. Let me know if there is an Allen Institute for Cell Science repository that you are trying to use.

– Jess

Hi Jess,

Apologies for the confusion — that was completely my mistake.

I realised I shared the wrong repository earlier. The one I actually meant to refer to is the Allen Institute repository for FNet:

Thanks again, and sorry for the mix-up.

- Inés

Hi, Inés! This repo is no longer being actively maintained, but hopefully the following will be a useful starting point:

Clone the repository and add a Dockerfile with the below content. This uses an Ubuntu 20.04 base image with Python 3.8.10. Note the additional quilt3 dependency for downloading our data; you may be able to drop this if you are using your own data.

FROM ubuntu:20.04

RUN apt update && apt install -y python3-pip

COPY . /root/projects/pytorch_fnet
WORKDIR "/root/projects/pytorch_fnet"

RUN pip install --upgrade pip
RUN pip install .
RUN pip install quilt3

Then you should be able to build the image and use it to run the code:

# build the Docker image
docker build -t pytorch_fnet:latest . 

# call the Docker image to run code (see README for examples)
docker run --rm -it pytorch_fnet:latest python3 examples/download_and_train.py
docker run --rm -it pytorch_fnet:latest fnet -h