Enhanced the get() function of Plato's model register #264
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a series of work related to PR#263. To be specific, following the same target and mechanism of adding
**kwargs
argument, this PR aims to enhance theget()
functions ofregistry.py
undermodels
folder of Plato.Description
Following the same motivation as PR#263, the modification purpose of this PR is to allow the
get()
function to support more flexible and extensive model definitions.For example, in the personalized federated learning domain, the global model can be defined by calling
model_registry.get()
while the personalized model can be directly defined by callingHow has this been tested?
Two tests, including the
examples
and the unit test running, are performed to guarantee that this modification does not influence the existing Plato code and supports the personalized model definition.More details can be accessed in the PR#263.
For convenience and clarity, we show how to run unit tests below.
After switching to Plato's root folder, you can run
Types of changes
Checklist: