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

[UX] Show error and traceback when something goes wrong #62

Open
eddiebergman opened this issue Apr 25, 2024 · 0 comments
Open

[UX] Show error and traceback when something goes wrong #62

eddiebergman opened this issue Apr 25, 2024 · 0 comments
Assignees
Labels

Comments

@eddiebergman
Copy link
Contributor

eddiebergman commented Apr 25, 2024

While testing some new things, I get this error and it's got no information useful for understanding what went wrong.

/home/skantify/code/neps/neps_examples/efficiency/multi_fidelity.py:81: in <module>
    neps.run(
/home/skantify/code/neps/neps/api.py:273: in run
    metahyper_run(
/home/skantify/code/neps/neps/metahyper/api.py:586: in metahyper_run
    post_evaluation_hook(
/home/skantify/code/neps/neps/api.py:39: in _post_evaluation_hook
    loss = get_loss(result, loss_value_on_error, ignore_errors)
    
    
    def get_loss(
        result: str | dict | float,
        loss_value_on_error: float | None = None,
        ignore_errors: bool = False,
    ) -> float | Any:
        if result == "error":
            if ignore_errors:
                return "error"
            elif loss_value_on_error is None:
>               raise ValueError(
                    "An error happened during the execution of your run_pipeline function."
                    " You have three options: 1. If the error is expected and corresponds to"
                    " a loss value in your application (e.g., 0% accuracy), you can set"
                    " loss_value_on_error to some float. 2. If sometimes your pipeline"
                    " crashes randomly, you can set ignore_errors=True. 3. Fix your error."
                )
E               ValueError: An error happened during the execution of your run_pipeline function. You have three options: 1. If the error is expected and corresponds to a loss value in your application (e.g., 0% accuracy), you can set loss_value_on_error to some float. 2. If sometimes your pipeline crashes randomly, you can set ignore_errors=True. 3. Fix your error.

It did show something in the logs which is nice but I feel like these errors should get bubbled all the way up.

@eddiebergman eddiebergman self-assigned this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant