-
Notifications
You must be signed in to change notification settings - Fork 216
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
Pytorch Taskrunner Workspace with Keras 3 #1333
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
Signed-off-by: yes <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tanwarsh ! Some open ended comments/questions:
- We should consider having this one directory down, either under
keras/pytorch
workspace or underpytorch/keras
. This would simply be a way to further indicate that is either (1) an extended functionality of the native keras taskrunner or (2) a special case for pytorch that uses the keras taskrunner. - Is there a reason you decided to go with a customized
fit()
function as opposed to a custom training loop? This way is not wrong, of course, but the custom training loop seems like a more natural addition to the task runner since a dev would be expected to modify thetrain_
andvalidate
functions, whereas inheritingkeras.Model
and then modifyingtrain_step
andtest_step
may be confusing. If we stick to this, I suggest we move the model definition to a separate file then import it intaskrunner.py
. Also, even if we stick with this, I think we should also add in the a workspace that takes advantage of the custom training loop (it can be added as backlog item to be added in a separate PR)
|
||
compression_pipeline : | ||
defaults : plan/defaults/compression_pipeline.yaml | ||
# To use different Compression Pipeline, uncomment the following lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We an remove these comments since we have dedicated workspaces / docs for compression pipeline
""" | ||
super().__init__(batch_size, **kwargs) | ||
|
||
# TODO: We should be downloading the dataset shard into a directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can remove these TODOs and add it as a backlog item. FYI, I don't think it's entirely necessary to download the dataset shard into a directory for the --template
workspaces, but automatic sharding based on rank / size of collab list could be interesting
|
||
from openfl.federated import KerasTaskRunner | ||
|
||
class CNNModel(keras.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from my previous comment, we should move this to a separate file then import it
Pytorch Taskrunner Workspace with Keras 3
This PR is blocked due to keras-team/keras#20847.