-
Notifications
You must be signed in to change notification settings - Fork 15
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
Audio PR - Adding support for file list reader #123
Changes from all commits
a52ae62
35765e8
bb9eb8c
0c5f173
2d6eaa5
d248676
eac59e3
ab165ee
e2fe45c
e5ff5e4
3988643
8790f57
8134705
deeb04a
9d58ec6
e37bcad
760ba3a
2534ca9
73f8a31
585e6d5
6feedda
c3babe0
ae68313
34d5474
a6d7333
9b62359
f7b8aee
0c6e543
be1f7b7
02f5249
dce8b25
d614f50
3d1bbc0
a0c3b9e
ca06049
006438e
9994a29
5527cc0
d0139d0
40c9ef1
1a4ebc3
a308980
7d17186
0b058bb
18a8a83
e5f3840
6d01c41
a8507bf
421cc29
ea6158b
4874e4f
75c360f
38dc894
13ea715
95b0115
033f967
f4bf553
1e6240a
dfee595
7014a0c
dae8f53
253a508
c236bdf
8922538
d6f60ac
b1624bb
b9a39a9
6018273
9b6c93a
bfbbc7b
bcc222b
08cf352
9282f05
4d6982a
0c3a974
ca9c74b
7789333
741a677
2150bbc
e1eda57
4a4cb3c
582bbfb
19d26be
da8b26c
dd97798
db1bf39
fb23b54
a2c6a42
2a39822
aaae9fa
9567eab
46b0bcc
191a88d
ebb6212
61ac122
79ff879
968570e
6873d81
16403cb
6595c43
da86d51
a79d484
c42638b
4c31be2
f5e4877
ba65268
e2efa14
7e6c498
d5d826f
17824e4
db7f126
acffb66
f887af3
03dee69
df64a4a
6302b4e
0404a9e
b1d11ce
45680cf
7674427
87ab2c3
6077ff8
2da5856
d5bf0d1
0455d20
784f77b
e21d617
b46c6f8
1ed758c
433857d
8f3b595
0527822
41ecb2a
80907a6
f4550b2
41ea790
47fde8a
77a59ed
54e802c
d52755e
d782686
ede4508
c9a6dbb
ca6f311
8d34902
ffb284d
ff12843
e53388f
0774f69
90b9d83
531e5fb
98ce527
7d4c1fd
a9e6497
85d21e6
6856e9b
57c8a0d
3a86507
7f46a25
70aa700
0693605
44e654d
c77140c
eabf7aa
f96a92b
46b7e5e
91d0615
bb4e5a5
50829f6
d0a456b
a80a3a6
f648feb
6146bac
47263d9
8623be3
c4af22c
5b9be3d
47dea85
660071b
5bd4fa8
4f9ab6b
6c430cf
416180e
0f0be88
3114a18
ac6e6e3
e496f3a
5df0055
7dc7092
19e30cf
34deb3b
4c02dfb
e3f350f
67cda83
d36df07
42c844d
8b1c59f
241ce67
07ba1f6
abc63c9
bb8908b
91fed39
6a80714
689985d
db758fd
67190bf
ffdcb0a
b2de5f4
d000af0
7415447
f6bffef
cb034b0
d8031b5
d894aba
689c55f
1079d50
1f63cab
2967b68
42d1bb1
3375f41
d7c8884
d928c48
c0d2309
c01325d
549def5
c1d9cc5
7874f09
0f48da9
37921de
96ace00
6602895
aa13a35
2873d8c
2dd31f8
1cd9779
d1d5241
f4bcbca
d152dca
e4c5788
fb33f06
be416ef
8a7bb3c
2021ab9
c41f363
70e12cd
89f9f95
ceb7991
f45ff71
559a12b
833841b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1136,7 +1136,8 @@ std::vector<rocalTensorList *> MasterGraph::create_label_reader(const char *sour | |||||
THROW("A metadata reader has already been created") | ||||||
if (_augmented_meta_data) | ||||||
THROW("Metadata can only have a single output") | ||||||
|
||||||
if (strlen(source_path) == 0) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
use is_empty instead There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The source path is passed as const char array so strlen is used here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't you check for nullptr in that case? |
||||||
THROW("Source path needs to be provided") | ||||||
MetaDataConfig config(MetaDataType::Label, reader_type, source_path); | ||||||
_meta_data_reader = create_meta_data_reader(config, _augmented_meta_data); | ||||||
_meta_data_reader->read_all(source_path); | ||||||
|
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.
is this for checking empty string. please use is_empty() instead.
Why can't the caller to this api pass single path (source_path or file_list) depending on the use case so it is not required to change here
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 source path is passed as const char array so strlen is used here
We are creating different metadata readers depending on whether file_list_path is passed or not so both are needed.
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.
In that case, check if file_list_path == nullptr ?
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.
Both source_path and file_list_path have default values of "" so nullptr checks won't work for them