Coverage for bioimageio/core/_settings.py: 100%

10 statements  

« prev     ^ index     » next       coverage.py v7.6.7, created at 2024-11-19 09:02 +0000

1from typing import Literal 

2 

3from dotenv import load_dotenv 

4from pydantic import Field 

5from typing_extensions import Annotated 

6 

7from bioimageio.spec._internal._settings import Settings as SpecSettings 

8 

9_ = load_dotenv() 

10 

11 

12class Settings(SpecSettings): 

13 """environment variables for bioimageio.spec and bioimageio.core""" 

14 

15 keras_backend: Annotated[ 

16 Literal["torch", "tensorflow", "jax"], Field(alias="KERAS_BACKEND") 

17 ] = "torch" 

18 

19 

20settings = Settings() 

21"""parsed environment variables for bioimageio.spec and bioimageio.core"""