google-research / federated

A collection of Google research projects related to Federated Learning and Federated Analytics.
Apache License 2.0
686 stars 196 forks source link

Updating of requirements.txt is necessary #39

Closed ealexbarros closed 3 years ago

ealexbarros commented 3 years ago

Hi,

I noticed that you should include "pip install scipy==1.1.0 " and pip install tensorflow_addons" into your library required document.

Thanks

nightldj commented 3 years ago

Could you elaborate on which project/folder you are working on? Note that this repo is a collection of research projects and we are not intended to have a single requirements for all projects.

Thanks.

ealexbarros commented 3 years ago

I was working with /optimization

ealexbarros commented 3 years ago

And after the last commit at /optimization, I couldn't execute it anymore.

It seems that folder /utils/tasks needs some updating.

"tff.simulation.baselines.cifar100.create_image_classification_task, AttributeError: module 'tensorflow_federated.python.simulation' has no attribute 'baselines'"

zcharles8 commented 3 years ago

Hi @ealexbarros. The tff.simulation.baselines API is available via the tensorflow-federated-nightly pip package. We recommend using the nightly package for any and all projects in this repository.

ealexbarros commented 3 years ago

Thanks @zcharles8 , I cloned the code last week, I was simulating the impact of increasing epochs with FedAVG and FedOPT. Yesterday, I cloned the last commited version, modified the fed_avg_schedule.py to test one adaptation to avoid overfitting when using epochs=10 and couldn't execute anymore.

To perform my simulations I still using the old version, but I will try again this last one.

As I watched your tutorial on youtube, I have one question: Is it still not possible to implement early stopping using tff?

Or there is any update about this topic? Example: https://stackoverflow.com/questions/66265109/federated-learning-in-tensorflow-federated-is-there-any-way-to-apply-early-stop

Tell me if It is a problem to ask about this here. Should I open a question at stackoverflow?

Thanks

zcharles8 commented 3 years ago

@ealexbarros Stack overflow is probably a better venue for your question on early stopping. That being said, the stack overflow answer linked seems mostly complete to me. You'd probably have to write your own iterative process and use some kind of conditional on the client to determine when to end.

Please let me know if your simulation code works after switching to the nightly package.

zcharles8 commented 3 years ago

@ealexbarros Any updates on your end? Did the nightly package help?

ealexbarros commented 3 years ago

Hi @zcharles8 , sorry for the delay to answer you.

I updated to nightly pkg as you recommended and everything worked again. Thanks!

This week I will start to take a look at others tasks. For while, I tried only eminist-cr;

I noticed you changed something into the way you save metrics. Is there any issue about validation metrics or just to improve the results.csv file?

Thanks again!

zcharles8 commented 3 years ago

There have been some recent changes to exactly which metrics are saved. This was to have the validation metrics better mirror the training metrics. Glad that everything is working!