-
Notifications
You must be signed in to change notification settings - Fork 885
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
docs(framework) Add examples to records docstrings #4021
Conversation
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.
The PR looks good! Just a few small things to improve.
FYI, both our TypedDict
and built-in dict
inherit the MutableMapping
class, and thus we are safe to claim that TypedDict
/*Record
are just python dictionaries that users are very familiar with. This claim may help users get start with our records easilier.
Co-authored-by: Heng Pan <pan@flower.ai>
The usage of a :code:`ConfigsRecord` is envisioned for storing Python built-in | ||
types such as :code:`int`, :code:`float`, :code:`str`, :code:`bytes` and lists of | ||
these. All types allowed are defined in |
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.
It might be better to not only tell the user what they can technically do with ConfigsRecord
, but what it is intended for. It's intended to send configuration values to the client, along with the model. Perhaps we can give a few examples, like sending the number of local epochs the client should perform? Or time-related things?
The usage of a :code:`MetricsRecord` is envisioned for single scalar | ||
(:code:`int`, :code:`float`) or list of scalars. A :code:`MetricsRecord` is | ||
one of the types of records that a :code:`common.RecordSet` supports. | ||
Let's see some examples: |
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.
Same comment as for ConfigsRecord
Updated docstrings for
ConfigsRecords
,MetricsRecords
andParametersRecords
showing examples.The existing docstrings have been moved out of the
__init__()
since otherwise they were not shown in the docs.Not entirely sure if using
docs(framework)
is a correct tag