from __future__ import annotations

from typing import Any, Optional

class Server:
    def __init__(self) -> None: ...

class Worker:
    def __init__(self) -> None: ...

class DownpourServer(Server):
    def __init__(self) -> None: ...
    def add_sparse_table(self, table_id: Any, strategy: Any) -> None: ...
    def add_dense_table(self, table_id: Any, param_var: Any, grad_var: Any, strategy: Any, sparse_table_names: Any): ...
    def add_data_norm_table(
        self, table_id: Any, learning_rate: Any, param_var: Any, grad_var: Any, strategy: Any, sparse_table_names: Any
    ): ...
    def add_sparse_optimizer(self, sgd: Any, strategy: Any, prefix: Any) -> None: ...
    def add_sparse_table_common_config(self, table: Any, strategy: Any) -> None: ...
    def get_desc(self): ...

class DownpourWorker(Worker):
    window: Any = ...
    def __init__(self, window: Any) -> None: ...
    def add_sparse_table(
        self, table_id: Any, slot_key_vars: Any, slot_value_vars: Any, slot_value_grads: Optional[Any] = ...
    ) -> None: ...
    def add_dense_table(
        self,
        table_id: Any,
        learning_rate: Any,
        param_vars: Any,
        grad_vars: Any,
        dense_start_table_id: Any,
        sparse_table_names: Any,
    ) -> None: ...
    def get_desc(self): ...
