Skip to content

Commit

Permalink
Merge pull request #27 from normal-computing/clean-import
Browse files Browse the repository at this point in the history
Remove import warning from torchopt
  • Loading branch information
SamDuffield authored Feb 28, 2024
2 parents cb47f7d + ae13951 commit e396cd5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ packages = ["uqlib"]

[tool.ruff]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401", "F821"]
"__init__.py" = ["F401", "F821", "E402"]
15 changes: 13 additions & 2 deletions uqlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
from uqlib import laplace
from uqlib import sgmcmc
from uqlib import types
from uqlib import vi
from uqlib import optim
from uqlib import torchopt


from uqlib.utils import model_to_function
from uqlib.utils import linearized_forward_diag
Expand All @@ -23,3 +22,15 @@
from uqlib.utils import tree_map_inplacify_
from uqlib.utils import flexi_tree_map
from uqlib.utils import per_samplify


import logging

logger = logging.getLogger("torch.distributed.elastic.multiprocessing.redirects")
logger.setLevel(logging.ERROR)

from uqlib import vi
from uqlib import torchopt

del logging
del logger

0 comments on commit e396cd5

Please sign in to comment.