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

TDC just exits rather than raising an exception #194

Open
davidegraff opened this issue Jan 24, 2023 · 1 comment
Open

TDC just exits rather than raising an exception #194

davidegraff opened this issue Jan 24, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@davidegraff
Copy link

Describe the bug
This isn't so much of a bug as it is a suboptimal developer. In certain instances when attempting to load a dataset with an improper task name, TDC causes the whole program to exit

To Reproduce

from tdc.single_pred import ADME
ADME("caco2_wang", label_name="bad task name")
# Found local copy...
# Loading...
# ['Drug_ID' 'Drug' 'Y']
# Please report this error to contact@tdcommons.ai, thanks!

Expected behavior
That TDC would raise a more descriptive Exception rather than just exiting, allowing the end user to (1) except it, if necessary, and (2) diagnose it via a full stack trace.

More Details
the culprit in my instance is specifically here. The blanket except in L334 is likely catching the appropriate exception raised in fuzzy_search() and instead just exiting the program. IMO you should be propagating the error or at least convert it to a different error rather than just exiting

@kexinhuang12345
Copy link
Collaborator

Great point, will update the try-exception scheme

@kexinhuang12345 kexinhuang12345 self-assigned this Jan 24, 2023
@kexinhuang12345 kexinhuang12345 added the enhancement New feature or request label Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants