Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Vision Transformer tutorial using experimental workflow interface #836

Merged

Conversation

kta-intel
Copy link
Collaborator

This tutorials demonstrates how to set up a basic OpenFL workload using the experimental workflow interface to fine-tune a vision transformer model on the medmnist dataset.

This notebook makes use of standard pytorch practices and leverages HuggingFace's transformer library to build a vision transformer with a pretrained backbone and custom classification head for an image classification workload using medmnist.

It is heavily modeled after the 101_MNIST workflow tutorial

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you renumber this example to something like Workflow_Interface_102_Vision_Transformer.ipynb?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sure, all set!

@psfoley
Copy link
Contributor

psfoley commented Jan 26, 2024

Hi @kta-intel! This PR looks good. Once the number of the example is changed I think this is ready to merge.

@manuelhsantana
Copy link
Collaborator

When I install !pip install -r requirements_vision_transformer.txt in a clean environment with only openFL, I got an error with torch version:
ERROR: Could not find a version that satisfies the requirement torch==2.0.1+cpu (from versions: 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2, 1.11.0, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 2.0.0, 2.0.1, 2.1.0, 2.1.1, 2.1.2)
ERROR: No matching distribution found for torch==2.0.1+cpu

Copy link
Collaborator

@manuelhsantana manuelhsantana left a comment

Choose a reason for hiding this comment

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

LGTM!
I ran the workflow from the beginning to the end and it ran without any problems!
Great Work Kevin!

@psfoley psfoley merged commit 6d7aee6 into securefederatedai:develop Feb 7, 2024
25 of 26 checks passed
nammbash pushed a commit to nammbash/openfl that referenced this pull request Feb 27, 2024
…face (securefederatedai#836)

* adding new workflow interface tutorial (vision transformer)

Signed-off-by: kta-intel <[email protected]>

* fix image not displaying properly

Signed-off-by: kta-intel <[email protected]>

* change name to workflow_interface_102...

Signed-off-by: kta-intel <[email protected]>

* update notebook title, update collab link, fix requirements_vision_transformers.txt

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
Signed-off-by: nammbash <[email protected]>
nammbash pushed a commit to nammbash/openfl that referenced this pull request Feb 27, 2024
…face (securefederatedai#836)

* adding new workflow interface tutorial (vision transformer)

Signed-off-by: kta-intel <[email protected]>

* fix image not displaying properly

Signed-off-by: kta-intel <[email protected]>

* change name to workflow_interface_102...

Signed-off-by: kta-intel <[email protected]>

* update notebook title, update collab link, fix requirements_vision_transformers.txt

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
Signed-off-by: nammbash <[email protected]>
nammbash pushed a commit to nammbash/openfl that referenced this pull request Feb 29, 2024
…face (securefederatedai#836)

* adding new workflow interface tutorial (vision transformer)

Signed-off-by: kta-intel <[email protected]>

* fix image not displaying properly

Signed-off-by: kta-intel <[email protected]>

* change name to workflow_interface_102...

Signed-off-by: kta-intel <[email protected]>

* update notebook title, update collab link, fix requirements_vision_transformers.txt

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
Signed-off-by: nammbash <[email protected]>
nammbash pushed a commit to nammbash/openfl that referenced this pull request Feb 29, 2024
…face (securefederatedai#836)

* adding new workflow interface tutorial (vision transformer)

Signed-off-by: kta-intel <[email protected]>

* fix image not displaying properly

Signed-off-by: kta-intel <[email protected]>

* change name to workflow_interface_102...

Signed-off-by: kta-intel <[email protected]>

* update notebook title, update collab link, fix requirements_vision_transformers.txt

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
Signed-off-by: nammbash <[email protected]>
manuelhsantana pushed a commit that referenced this pull request Jul 10, 2024
…face (#836)

* adding new workflow interface tutorial (vision transformer)

Signed-off-by: kta-intel <[email protected]>

* fix image not displaying properly

Signed-off-by: kta-intel <[email protected]>

* change name to workflow_interface_102...

Signed-off-by: kta-intel <[email protected]>

* update notebook title, update collab link, fix requirements_vision_transformers.txt

Signed-off-by: kta-intel <[email protected]>

---------

Signed-off-by: kta-intel <[email protected]>
Signed-off-by: manuelhsantana <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants