Update quality tooling for formatting (#21480)
* Result of black 23.1 * Update target to Python 3.7 * Switch flake8 to ruff * Configure isort * Configure isort * Apply isort with line limit * Put the right black version * adapt black in check copies * Fix copies
This commit is contained in:
@@ -96,7 +96,7 @@ while True:
|
||||
queues.append(rq)
|
||||
strings
|
||||
outs = pipe(strings, batch_size=len(strings))
|
||||
for (rq, out) in zip(queues, outs):
|
||||
for rq, out in zip(queues, outs):
|
||||
await rq.put(out)
|
||||
```
|
||||
|
||||
|
||||
@@ -166,7 +166,6 @@ Unlike other data collators, this specific data collator needs to apply a differ
|
||||
|
||||
>>> @dataclass
|
||||
... class DataCollatorCTCWithPadding:
|
||||
|
||||
... processor: AutoProcessor
|
||||
... padding: Union[bool, str] = "longest"
|
||||
|
||||
|
||||
@@ -213,7 +213,6 @@ The `image_processor` expects the annotations to be in the following format: `{'
|
||||
|
||||
```py
|
||||
>>> def formatted_anns(image_id, category, area, bbox):
|
||||
|
||||
... annotations = []
|
||||
... for i in range(0, len(category)):
|
||||
... new_ann = {
|
||||
@@ -399,6 +398,7 @@ First, prepare the `cppe5["test"]` set: format the annotations and save the data
|
||||
```py
|
||||
>>> import json
|
||||
|
||||
|
||||
>>> # format annotations the same as for training, no need for data augmentation
|
||||
>>> def val_formatted_anns(image_id, objects):
|
||||
... annotations = []
|
||||
|
||||
Reference in New Issue
Block a user