Skip to content

Commit

Permalink
Fix pydantic error
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Mar 3, 2024
1 parent 871acbe commit bf7dfe5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bioimageio/engine/app_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
from pathlib import Path
import logging
from yaml import safe_load
from typing import Callable, Optional
import sys
from typing import Optional
import importlib.util
from enum import Enum

logger = logging.getLogger(__name__)

# define runtime type enum for app runtime
class AppRuntime(str):
class AppRuntime(Enum):
python = "python"
pyodide = "pyodide"
triton = "triton"
Expand All @@ -20,7 +19,7 @@ class AppInfo(BaseModel):
description: str
runtime: AppRuntime
entrypoint: Optional[str] = None

async def run(self, server):
if self.runtime == AppRuntime.python:
assert self.entrypoint
Expand All @@ -35,6 +34,7 @@ async def run(self, server):
else:
raise NotImplementedError(f"Runtime {self.runtime} is not implemented yet.")


def load_apps():
current_dir = Path(__file__).parent
apps_dir = current_dir.parent.parent / "apps"
Expand Down

0 comments on commit bf7dfe5

Please sign in to comment.