You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I don't think LABLoader is behaved as expected. If I call it directly, e.g. loader = LABLoader(path='../only_words/labs/dev/{uri}.lab')
It works smoothly.
But when I use it with a protocol pipeline, with database.yml as following:
msg=f"No such file or directory: '{path}' (via '{template}' template)."
raiseFileNotFoundError(msg)
loader=Loader(path)
returnloader(current_file)
Hence, when the LABLoader is called during the protocol pipeline, the placeholder in the template has already been resolved to certain uri. And when you check over the resolved path, it will always raise the error of no placeholder.
So, I'm doubting the necessity of doing this sanity check in the LABLoader function, since in gather_loader function, you have already done such sanity check.
Unless you are assuming a use case that the LABLoader is called solely, outside the protocol pipeline. In that case I think it better to simply use load_lab.
I expect your opinion.
The text was updated successfully, but these errors were encountered:
Related to #99
Hi, I don't think
LABLoader
is behaved as expected. If I call it directly, e.g.loader = LABLoader(path='../only_words/labs/dev/{uri}.lab')
It works smoothly.
But when I use it with a protocol pipeline, with
database.yml
as following:and something like
It will throw the error
ValueError: path must contain the {uri} placeholder.
By debugging, I notice that in
LABLoader
, you explicitly check if the path contains the{uri}
placeholder.pyannote-database/pyannote/database/loader.py
Lines 258 to 261 in 6816228
While in
load
function inTemplate
class, this loader is called after theresolve_path
.pyannote-database/pyannote/database/custom.py
Lines 105 to 114 in 6816228
Hence, when the LABLoader is called during the protocol pipeline, the placeholder in the template has already been resolved to certain uri. And when you check over the resolved path, it will always raise the error of no placeholder.
So, I'm doubting the necessity of doing this sanity check in the LABLoader function, since in
gather_loader
function, you have already done such sanity check.pyannote-database/pyannote/database/custom.py
Lines 225 to 227 in 6816228
Unless you are assuming a use case that the LABLoader is called solely, outside the protocol pipeline. In that case I think it better to simply use
load_lab
.I expect your opinion.
The text was updated successfully, but these errors were encountered: