Skip to content

Commit

Permalink
Followup to #901: Tweak repocard_types.py (#931)
Browse files Browse the repository at this point in the history
* fix link

* `verified` should be omitted when false

* move docstring to its actual attribute

* Attempt to show that `args` should be a dict
  • Loading branch information
julien-c authored Jun 27, 2022
1 parent 90c0589 commit f47eabe
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/huggingface_hub/repocard_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SingleMetric:
The arguments passed during `Metric.compute()`. Example for `bleu`: max_order: 4
"""

verified: Optional[bool] = False
verified: Optional[bool] = None
"""
If true, indicates that evaluation was generated by Hugging Face (vs. self-reported).
"""
Expand All @@ -52,8 +52,7 @@ class SingleResultTask:
type: str
"""
Example: automatic-speech-recognition Use task id from
https://github.com/huggingface/huggingface_hub/blob/main/js/src/lib/int
erfaces/Types.ts
hhttps://github.com/huggingface/hub-docs/blob/main/js/src/lib/interfaces/Types.ts
"""

name: Optional[str] = None
Expand All @@ -64,11 +63,6 @@ class SingleResultTask:

@dataclass
class SingleResultDataset:
"""
This will switch to required at some point. in any case, we need them to
link to PWC
"""

name: str
"""
Example: Common Voice (French). A pretty name for the dataset.
Expand Down Expand Up @@ -96,16 +90,16 @@ class SingleResultDataset:

args: Any = None
"""
Example: zh-CN
Optional. Additional arguments to `load_dataset()`. Example for wikipedia: { language: "en" }
"""


@dataclass
class SingleResult:
task: "SingleResultTask"
dataset: "Optional[SingleResultDataset]"
metrics: "List[SingleMetric]"
"""
This will switch to required at some point. in any case, we need them to
link to PWC
"""
metrics: "List[SingleMetric]"

0 comments on commit f47eabe

Please sign in to comment.