Skip to content

Commit

Permalink
fixed type issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlov721 committed Sep 10, 2024
1 parent da8430e commit 6ead271
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
cache: pip

- name: Install dependencies
run: pip install .
run: pip install .[dev]

- uses: jakebailey/pyright-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion luxonis_train/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def archive(

def version_callback(value: bool):
if value:
typer.echo(f"LuxonisTrain Version: {version(__package__)}")
typer.echo(f"LuxonisTrain Version: {version('luxonis_train')}")
raise typer.Exit()


Expand Down
2 changes: 2 additions & 0 deletions luxonis_train/callbacks/metadata_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def _get_editable_package_git_hash(
"""
try:
distribution = pkg_resources.get_distribution(package_name)
if distribution.location is None:
return None
package_location = osp.join(distribution.location, package_name)

# remove any additional folders in path (e.g. "/src")
Expand Down
4 changes: 2 additions & 2 deletions luxonis_train/nodes/backbones/efficientnet.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

import torch
from torch import Tensor
from torch import Tensor, nn

from luxonis_train.nodes.base_node import BaseNode

Expand Down Expand Up @@ -36,7 +36,7 @@ def __init__(
"""
super().__init__(**kwargs)

self.backbone = torch.hub.load( # type: ignore
self.backbone: nn.Module = torch.hub.load( # type: ignore
"rwightman/gen-efficientnet-pytorch",
"efficientnet_lite0",
pretrained=download_weights,
Expand Down

0 comments on commit 6ead271

Please sign in to comment.