Skip to content
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

Conversion to string can be stuck when using random variables #26

Open
hagenw opened this issue Mar 5, 2024 · 3 comments
Open

Conversion to string can be stuck when using random variables #26

hagenw opened this issue Mar 5, 2024 · 3 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@hagenw
Copy link
Member

hagenw commented Mar 5, 2024

When defining

import audb
import auglib

db = audb.load("musan", only_metadata=True, tables="speech")
olist = auglib.observe.List(list(db.files), draw=True)
transform = auglib.transform.BabbleNoise(list(db.files))

If we now execute the following two statements, they return immediatly:

print(olist)
print(transform)

But when using the observe object as part of the transform definition, the print statement uses 100% CPU and never returns:

transform = auglib.transform.BabbleNoise(auglib.observe.List(list(db.files), draw=True))
print(transform)
@hagenw hagenw added the bug Something isn't working label Mar 5, 2024
@hagenw
Copy link
Member Author

hagenw commented Mar 5, 2024

This error does not happen for the last non open-source version 0.12.2 of auglib.

@hagenw
Copy link
Member Author

hagenw commented Mar 5, 2024

The error seems to happen only for the auglib.transform.BabbleNoise transform, not when using auglib.transform.Mix.

@hagenw
Copy link
Member Author

hagenw commented Mar 5, 2024

The problem is that we are not supposed to provide the speech list as an observe argument here, as it is internally transformed to an observe object anyway:

transform = auglib.transform.BabbleNoise(list(db.files))

We also state in the docstring that only a sequence and not an observe object is expected as input:

image

But as the code is simply stuck forever when providing an observe object, we might think raising an error in this case to avoid this.

@hagenw hagenw added enhancement New feature or request question Further information is requested and removed bug Something isn't working labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant