from __future__ import annotations

from typing import Any, Optional

from paddle.fluid.dygraph.dygraph_to_static.logging_utils import (
    set_code_level as set_code_level,
)
from paddle.fluid.dygraph.dygraph_to_static.logging_utils import (
    set_verbosity as set_verbosity,
)

dygraph_to_static_func: Any

def declarative(
    function: Optional[Any] = ..., input_spec: Optional[Any] = ..., build_strategy: Optional[Any] = ...
): ...
def not_to_static(func: Optional[Any] = ...): ...

class _SaveLoadConfig:
    with_hook: bool = ...
    def __init__(self) -> None: ...
    @property
    def output_spec(self): ...
    @output_spec.setter
    def output_spec(self, spec: Any) -> None: ...
    @property
    def model_filename(self): ...
    @model_filename.setter
    def model_filename(self, filename: Any) -> None: ...
    @property
    def params_filename(self): ...
    @params_filename.setter
    def params_filename(self, filename: Any) -> None: ...
    @property
    def keep_name_table(self): ...
    @keep_name_table.setter
    def keep_name_table(self, value: Any) -> None: ...

class HookRemoveHelper:
    def __init__(self, hook: Any) -> None: ...
    def remove(self) -> None: ...

def save(layer: Any, path: Any, input_spec: Optional[Any] = ..., **configs: Any) -> None: ...
def load(path: Any, **configs: Any): ...

class TracedLayer:
    def __init__(self, program: Any, parameters: Any, feed_names: Any, fetch_names: Any) -> None: ...
    @property
    def program(self): ...
    @staticmethod
    def trace(layer: Any, inputs: Any): ...
    def set_strategy(self, build_strategy: Optional[Any] = ..., exec_strategy: Optional[Any] = ...) -> None: ...
    def __call__(self, inputs: Any): ...
    def save_inference_model(self, path: Any, feed: Optional[Any] = ..., fetch: Optional[Any] = ..., **kwargs: Any): ...
