Skip to content

Commit

Permalink
move torch import ?
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jan 16, 2025
1 parent b7dc931 commit b5b06a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/test_new_style_annotations_min_py39.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from typing import Any, Literal, Optional, Type, Union

import pytest
from torch.optim.lr_scheduler import LinearLR, LRScheduler

from helptext_utils import get_helptext_with_checks

import tyro
Expand Down Expand Up @@ -72,8 +74,6 @@ def test_tuple_direct() -> None:

def test_type_with_init_false() -> None:
"""https://github.com/brentyi/tyro/issues/235"""
from torch.optim.lr_scheduler import LinearLR, LRScheduler

@dataclasses.dataclass(frozen=True)
class LinearLRConfig:
_target: type[LRScheduler] = dataclasses.field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import pytest
from helptext_utils import get_helptext_with_checks
from torch.optim.lr_scheduler import LinearLR, LRScheduler

import tyro

Expand Down Expand Up @@ -72,7 +73,6 @@ def test_tuple_direct() -> None:

def test_type_with_init_false() -> None:
"""https://github.com/brentyi/tyro/issues/235"""
from torch.optim.lr_scheduler import LinearLR, LRScheduler

@dataclasses.dataclass(frozen=True)
class LinearLRConfig:
Expand Down

0 comments on commit b5b06a8

Please # to comment.