Skip to content
This repository was archived by the owner on Oct 1, 2025. It is now read-only.

Improve flsim/utils/example_utils.py compatibility#58

Open
menglutao wants to merge 7 commits intofacebookresearch:mainfrom
menglutao:main
Open

Improve flsim/utils/example_utils.py compatibility#58
menglutao wants to merge 7 commits intofacebookresearch:mainfrom
menglutao:main

Conversation

@menglutao
Copy link

@menglutao menglutao commented Nov 8, 2023

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Docs change / refactoring / dependency upgrade

Motivation and Context / Related issue

This PR introduces changes in example_utils.py to handle different data types more robustly, ensuring compatibility with a wider range of datasets.

Changes:

Updated the collate_fn and fl_training_batch methods in example_utils.py to include type checks and conversions. If user is incorporating datasets beyond the initially supported ones(cifar10/cifar100 etc), these changes will solve potential compatibility issues when integrating new datasets.

How Has This Been Tested (if it applies)

Validated the updated example_utils.py with a new dataset to confirm compatibility.

Checklist

  • The documentation is up-to-date with the changes I made.
  • I have read the CONTRIBUTING document and completed the CLA (see CONTRIBUTING).
  • All tests passed, and additional code has been covered with new tests.

The tests are failing even from the initial repo I forked from there. I suggest the team improve on the tests.

@facebook-github-bot
Copy link
Contributor

Hi @menglutao!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@menglutao menglutao marked this pull request as draft November 9, 2023 00:02
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 9, 2023
@menglutao menglutao marked this pull request as ready for review November 9, 2023 22:42
@menglutao menglutao marked this pull request as draft November 9, 2023 22:44
@menglutao menglutao changed the title Add Style Check and Test Workflow to CI/CD Pipeline Improve flsim/utils/example_utils.py compatibility and integrate style & test workflows Nov 9, 2023
@menglutao menglutao closed this Nov 9, 2023
@menglutao menglutao reopened this Nov 9, 2023
@menglutao menglutao closed this Nov 9, 2023
@menglutao menglutao reopened this Nov 9, 2023
@menglutao menglutao changed the title Improve flsim/utils/example_utils.py compatibility and integrate style & test workflows Improve flsim/utils/example_utils.py compatibility Nov 9, 2023
@menglutao menglutao marked this pull request as ready for review November 9, 2023 23:06
@menglutao
Copy link
Author

@JohnlNguyen Hi Johnl, could you please review my PR when you're available? And about the CircleCI Pipeline, how to pass this?

@facebook-github-bot
Copy link
Contributor

@JohnlNguyen has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@JohnlNguyen
Copy link
Contributor

Thanks for the PR! Sorry I was out and didn't see this.

@facebook-github-bot
Copy link
Contributor

@JohnlNguyen has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@JohnlNguyen has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants