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

removed HydraJobException #1614

Merged
merged 4 commits into from
May 11, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions hydra/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@

from hydra.core.hydra_config import HydraConfig
from hydra.core.singleton import Singleton
from hydra.errors import HydraJobException
from hydra.types import HydraContext, TaskFunction

if TYPE_CHECKING:
from hydra._internal.callbacks import Callbacks

from hydra.types import HydraContext, TaskFunction

log = logging.getLogger(__name__)


Expand Down Expand Up @@ -229,9 +227,10 @@ def return_value(self) -> Any:
if self.status == JobStatus.COMPLETED:
return self._return_value
else:
raise HydraJobException(
f"Error executing job with overrides: {self.overrides}"
) from self._return_value
sys.stderr.write(
f"Error executing job with overrides: {self.overrides}" + os.linesep
)
raise self._return_value

@return_value.setter
def return_value(self, value: Any) -> None:
Expand Down
6 changes: 0 additions & 6 deletions hydra/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,3 @@ def __init__(
super(MissingConfigException, self).__init__(message)
self.missing_cfg_file = missing_cfg_file
self.options = options


class HydraJobException(HydraException):
"""Raised when accessing a result of a failed job."""

...