Skip to content

Dockerized Version#1

Open
nachoDRT wants to merge 5 commits into
btrude:mainfrom
nachoDRT:main
Open

Dockerized Version#1
nachoDRT wants to merge 5 commits into
btrude:mainfrom
nachoDRT:main

Conversation

@nachoDRT

Copy link
Copy Markdown

Run the project in a Docker container

@btrude

btrude commented Sep 29, 2025

Copy link
Copy Markdown
Owner

Hey thanks for your interest in this work, I will try to get this reviewed ASAP but before that I am curious if you have a publicly available link to wandb for a successful run of this code?

@nachoDRT

Copy link
Copy Markdown
Author

Hey @btrude, thank you for your reply!

Of course, please find the link to a quick training session: https://wandb.ai/ciclab-comillas/jet?nw=nwuseriderodrigo

@btrude

btrude commented Sep 29, 2025

Copy link
Copy Markdown
Owner

Thanks, I'm glad to see that it is robust to non-imagenet data. I will try to get the review in later today or tomorrow...

@btrude btrude left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

As far as I can tell, the only things making the /4090/ code Ada-specific are the use of pre-Blackwell base image and pytorch versions. I think this should just be updated to use the latest pytorch and latest CUDA base images which should allow any currently released nvidia GPU to run this code without modification. I don't see memory usage in your public wandb runs, but I'm assuming its <24gb so these changes could make for a nice MNIST configuration for those interested in running the code but not wanting to train on imagenet (which takes a few days on a 4090 iirc) or who don't have a 24gb+ GPU.

My apologies if these seem like nitpicks, I don't think any of these comments truly matter given the general lack of interest in this work, these are just my first thoughts when looking through the changes so please feel free to push back if anything seems wrong or excessive. Thanks!

@@ -0,0 +1,34 @@
FROM nvidia/cuda:11.8.0-base-ubuntu22.04

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Can we use a Blackwell compatible image here (ie >= 12.8)?

Comment thread jet_pytorch/train.py
gn=gn,
lr=lr,
))
wandb.log({

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

What happens when this is run without a wandb api key passed in? I wouldn't want to make wandb a hard requirement for this script.

Comment on lines +26 to +27
ENV WANDB_API_KEY=<your_token>
ENV HUGGINGFACE_HUB_TOKEN=<your_token>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Writing a dockerfile like this leaves your secrets exposed in the final built image. I would consider re-writing this with build secrets if there is any risk of a 3rd party having access to the built image.

Comment on lines +1 to +13
chmod +x docker_src/docker_test.py
chmod +x docker_src/docker_train.py

python docker_src/docker_test.py \
--repo_id "de-Rodrigo/jet-mnist" \
--model_name "jet_mnist"

# python docker_src/docker_train.py \
# --dataset_name "ylecun/mnist" \
# --wandb_entity "ciclab-comillas" \
# --wandb_project "jet" \
# --wandb_run_name "mnist" \
# --hf_repo_id "de-Rodrigo/jet-mnist" No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I think ideally this would be two scripts with each script accepting command line arguments that are then passed to their respective python scripts: e.g:

chmod +x docker_src/docker_test.py

python docker_src/docker_test.py \
    --repo_id $0 \
    --model_name $1

Invoked as:

./docker_test.sh "de-Rodrigo/jet-mnist" "jet_mnist"

Comment thread jet_pytorch/train.py
state_dict = orig_model.state_dict()
save_file(state_dict, "jet_mnist.safetensors")

upload_file(

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Same question as above but for the huggingface api key.

@nachoDRT

nachoDRT commented Oct 1, 2025

Copy link
Copy Markdown
Author

@btrude, happy to consider your comments. I'll try to address them by the end of the week.

In the meantime, are you one of the authors of the original implementation? Thank you!

@btrude

btrude commented Oct 1, 2025

Copy link
Copy Markdown
Owner

@btrude, happy to consider your comments. I'll try to address them by the end of the week.

In the meantime, are you one of the authors of the original implementation? Thank you!

I am not. The original paper's code was written in JAX and so I put this together to enable integration with pytorch models (specifically for training "jetformers" with arbitrary backbones).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants