• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# mypy: allow-untyped-defs
2from typing import Any, TYPE_CHECKING
3
4"""
5This was semi-automatically generated by running
6
7    stubgen torch.utils._config_module.py
8
9And then manually extracting the methods of ConfigModule and converting them into top-level functions.
10
11This file should be imported into any file that uses install_config_module like so:
12
13    if TYPE_CHECKING:
14        from torch.utils._config_typing import *  # noqa: F401, F403
15
16    from torch.utils._config_module import install_config_module
17
18    # adds patch, save_config, etc
19    install_config_module(sys.modules[__name__])
20
21Note that the import should happen before the call to install_config_module(), otherwise runtime errors may occur.
22"""
23
24assert TYPE_CHECKING, "Do not use at runtime"
25
26def save_config() -> bytes: ...
27def save_config_portable() -> dict[str, Any]: ...
28def codegen_config() -> str: ...
29def get_hash() -> bytes: ...
30def to_dict() -> dict[str, Any]: ...
31def shallow_copy_dict() -> dict[str, Any]: ...
32def load_config(config: bytes | dict[str, Any]) -> None: ...
33def get_config_copy() -> dict[str, Any]: ...
34def patch(arg1: str | dict[str, Any] | None = None, arg2: Any = None, **kwargs): ...
35