Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed May 28, 2024
1 parent 86c9444 commit be95203
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ dependencies = [
"anemoi-utils>=0.2.0",
"semantic-version",
"pyyaml",
"torch",
]

[project.optional-dependencies]
Expand Down
7 changes: 6 additions & 1 deletion src/anemoi/inference/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
LOG = logging.getLogger(__name__)


def main():
def create_parser():
parser = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)

parser.add_argument(
Expand All @@ -41,6 +41,11 @@ def main():
command_parser = subparsers.add_parser(name, help=command.__doc__)
command.add_arguments(command_parser)

return parser


def main():
parser = create_parser()
args = parser.parse_args()

if args.version:
Expand Down
1 change: 1 addition & 0 deletions src/anemoi/inference/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def run(
progress_callback=ignore,
add_ensemble_dimension=False,
):
import torch

if autocast is None:
autocast = self.checkpoint.precision
Expand Down

0 comments on commit be95203

Please sign in to comment.