Skip to content

Commit

Permalink
Fix CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jesszzzz committed Feb 6, 2025
1 parent 2d2e991 commit 43fd5c6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion hydra/_internal/callbacks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import warnings
from typing import Any, Dict, List, Optional, TYPE_CHECKING
from typing import TYPE_CHECKING, Any, Dict, List, Optional

from omegaconf import DictConfig, OmegaConf

Expand Down Expand Up @@ -28,6 +28,8 @@ def __init__(self) -> None:


class Callbacks:
callbacks: List[Any]

def __init__(
self, config: Optional[DictConfig] = None, check_cache: bool = True
) -> None:
Expand Down
4 changes: 2 additions & 2 deletions hydra/experimental/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import logging
from typing import Any, List, Optional

from omegaconf import DictConfig

from hydra.core.utils import JobReturn
from hydra.types import TaskFunction

from omegaconf import DictConfig

logger = logging.getLogger(__name__)


Expand Down
5 changes: 2 additions & 3 deletions hydra/experimental/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from pathlib import Path
from typing import Any, List, Optional

from omegaconf import DictConfig, flag_override, OmegaConf
from omegaconf import DictConfig, OmegaConf, flag_override

from hydra.core.global_hydra import GlobalHydra
from hydra.core.utils import JobReturn, JobStatus
Expand Down Expand Up @@ -97,8 +97,7 @@ def on_compose_config(
if not d.package.startswith("hydra")
]
self.log.info(
f"""
====
f"""====
Composed config {config_dir}/{str(config_name)}
{OmegaConf.to_yaml(config)}
----
Expand Down
7 changes: 3 additions & 4 deletions tests/test_callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,13 @@
["age=10"],
dedent(
"""\
[HYDRA]
====
Composed config .*tests/test_apps/app_with_callbacks/app_with_log_compose_callback/config
[HYDRA] ====
Composed config .*tests.test_apps.app_with_callbacks.app_with_log_compose_callback.config
age: 10
name: James Bond
group:
name: a
----
Includes overrides \\[.*'age=10'.*\\]
Used defaults \\['config_schema', 'config', 'group/a'\\]
Expand Down

0 comments on commit 43fd5c6

Please sign in to comment.