[Need Help] Access data from one job (FedJob) in another job (FedAvgJob) #3251
Unanswered
aayush-kapoor
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Python version (
python3 -V
)3.9.18
NVFlare version (
python3 -m pip list | grep "nvflare"
)2.5.2
NVFlare branch (if running examples, please use the branch that corresponds to the NVFlare version,
git branch
)main
Operating system
Rocky Linux 9.3
Have you successfully run any of the following examples?
Please describe your question
I'm not exactly running into a problem per se, but need help from the developers in figuring out how I can send data between 2 different clients that are defined on separate jobs and are ran separately.
I've been using the
streaming
class that was setup in the recent version of the library in order to stream the dataset in batches for training my model. I'm using this class especially because even though we can use Pytorch to stream data, I wanted to decouple the compute layer of the model from the data layer (if that makes sense)So the following are the 2 classes that I've setup for my use-case (Controller and Executor class):
So the above streaming classes when ran with the following commands:
are able to fetch the batches of the dataset.
I run my training script for a simple federated average job in the following way:
As you can see, I define a separate job to train the model using a different class. And so in this
train_script
, particularly in the training loop, I want to access the batches that are being streamed. Here's where exactlyI hope the question makes sense, and if not, kindly let me know what further context I can provide. I've been stuck on figuring out a solution for this for days now so I hope this forum will be able to help me.
Beta Was this translation helpful? Give feedback.
All reactions