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

Slight refactor of TypeVar definition in shampoo_types_test.py #71

Closed
Closed
Changes from all commits
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
8 changes: 4 additions & 4 deletions distributed_shampoo/tests/shampoo_types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _get_grafting_config_type(


PreconditionerConfigType = TypeVar(
"PreconditionerConfigType", bound=Type[PreconditionerConfig]
"PreconditionerConfigType", bound=PreconditionerConfig
)


Expand Down Expand Up @@ -104,12 +104,12 @@ def test_illegal_num_tolerated_failed_amortized_computations(self) -> None:
@abstractmethod
def _get_preconditioner_config_type(
self,
) -> PreconditionerConfigType: ...
) -> Type[PreconditionerConfigType]: ...


class ShampooPreconditionerConfigTest(
AbstractPreconditionerConfigTest.PreconditionerConfigTest[
Type[ShampooPreconditionerConfig]
ShampooPreconditionerConfig
]
):
def _get_preconditioner_config_type(
Expand All @@ -120,7 +120,7 @@ def _get_preconditioner_config_type(

class EigenvalueCorrectedShampooPreconditionerConfigTest(
AbstractPreconditionerConfigTest.PreconditionerConfigTest[
Type[EigenvalueCorrectedShampooPreconditionerConfig]
EigenvalueCorrectedShampooPreconditionerConfig
]
):
def _get_preconditioner_config_type(
Expand Down
Loading