Commit 3661952 1 parent fb7b6f9 commit 3661952 Copy full SHA for 3661952
File tree 3 files changed +22
-1
lines changed
docs/source/docs/command-reference/context_free
3 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
43
43
(< https://github.com/openvinotoolkit/datumaro/pull/1223 > )
44
44
- Handling undefined labels at the annotation statistics
45
45
(< https://github.com/openvinotoolkit/datumaro/pull/1232 > )
46
+ - Add unit test for item rename
47
+ (< https://github.com/openvinotoolkit/datumaro/pull/1237 > )
46
48
47
49
## 16/11/2023 - Release 1.5.1
48
50
### Enhancements
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ Examples:
157
157
158
158
- Remove the ` frame_ ` prefix from item ids
159
159
``` console
160
- datum transform -t rename -- -e "|^frame_|\1| "
160
+ datum transform -t rename -- -e "|^frame_|"
161
161
```
162
162
163
163
- Collect images from subdirectories into the base image directory using regex
Original file line number Diff line number Diff line change @@ -582,6 +582,25 @@ def test_random_split_gives_error_on_wrong_ratios(self):
582
582
],
583
583
)
584
584
585
+ @mark_requirement (Requirements .DATUM_GENERAL_REQ )
586
+ def test_rename_item (self ):
587
+ src_dataset = Dataset .from_iterable (
588
+ [
589
+ DatasetItem (id = "frame_1" ),
590
+ DatasetItem (id = "frame_2" ),
591
+ DatasetItem (id = "frame_3" ),
592
+ ]
593
+ )
594
+ expected = Dataset .from_iterable (
595
+ [
596
+ DatasetItem (id = "1" ),
597
+ DatasetItem (id = "2" ),
598
+ DatasetItem (id = "3" ),
599
+ ]
600
+ )
601
+ actual = transforms .Rename (src_dataset , "|^frame_|" )
602
+ compare_datasets (self , expected , actual )
603
+
585
604
@mark_requirement (Requirements .DATUM_GENERAL_REQ )
586
605
def test_remap_labels (self ):
587
606
src_dataset = Dataset .from_iterable (
You can’t perform that action at this time.
0 commit comments