-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve configuration experience (#22)
* fix(readme): pip install add quotes for optional deps syntax + readme formatting * feat(logging): focoos_log_level env var (default info) * feat(.gitignore): .envrc * feat(linting): .envrc * fix(http-client): api_key None default * refactor(http-client): api_key, host_url required params * feat(logging): default log level DEBUG * feat(local-model): runtime_type default arg Focoos * refactor(playground): unused import * feat(gh-actions): test actions uv * feat(gh-actions): test action with python version matrix * release: 0.2.0 * fix(logging): runtime_type with onnx available providers
- Loading branch information
1 parent
1f1362a
commit 47eade1
Showing
13 changed files
with
68 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,7 @@ profile_default/ | |
ipython_config.py | ||
|
||
.env | ||
.envrc | ||
.focoos | ||
.data | ||
notebooks/.data | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import typing | ||
from typing import Optional | ||
|
||
from pydantic_settings import BaseSettings | ||
|
||
from focoos.ports import PROD_API_URL, RuntimeTypes | ||
|
||
LogLevel = typing.Literal["DEBUG", "INFO", "WARNING", "ERROR", "FATAL", "CRITICAL"] | ||
|
||
|
||
class FocoosConfig(BaseSettings): | ||
focoos_api_key: Optional[str] = None | ||
focoos_log_level: LogLevel = "DEBUG" | ||
default_host_url: str = PROD_API_URL | ||
runtime_type: RuntimeTypes = RuntimeTypes.ONNX_CUDA32 | ||
warmup_iter: int = 2 | ||
|
||
|
||
FOCOOS_CONFIG = FocoosConfig() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters