generated from fastai/nbdev_template
-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add cli * fix * fix * fix * fix * test fix
- Loading branch information
1 parent
cbd518e
commit 01c76cd
Showing
11 changed files
with
45 additions
and
37 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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
"""Deep Learning library for Model Building, Interpretability, Visualization, API Building & Deployment.""" | ||
|
||
__version__ = "0.1.0" | ||
__version__ = "0.1.1a0" | ||
__license__ = "Apache License 2.0" | ||
|
||
from chitra.image import Chitra |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import typer | ||
|
||
app = typer.Typer() |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import typer | ||
|
||
from chitra import __version__ | ||
from chitra.cli import app | ||
|
||
|
||
@app.command() | ||
def hello(): | ||
typer.echo(f"Hey! You're running chitra version={__version__}") |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from chitra.constants import _FLAX, _JAX, _TF, _TF_GPU, _TORCH, _TORCHVISION | ||
from chitra.utility.import_utils import is_installed | ||
|
||
INSTALLED_MODULES = { | ||
module: is_installed(module) | ||
for module in (_TF, _TF_GPU, _TORCH, _TORCHVISION, _JAX, _FLAX) | ||
} | ||
|
||
_FASTAPI_INSTALLED = is_installed("fastapi") | ||
_UVICORN_INSTALLED = is_installed("uvicorn") | ||
_PYDANTIC_INSTALLED = is_installed("pydantic") | ||
_MULTIPART_INSTALLED = is_installed("multipart") | ||
_SERVE_INSTALLED = ( | ||
_FASTAPI_INSTALLED | ||
and _UVICORN_INSTALLED | ||
and _PYDANTIC_INSTALLED | ||
and _MULTIPART_INSTALLED | ||
) | ||
|
||
_LOGURU_INSTALLED = is_installed("loguru") | ||
_RICH_INSTALLED = is_installed("rich") |
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,27 +1,5 @@ | ||
import importlib | ||
|
||
from chitra.constants import _FLAX, _JAX, _TF, _TF_GPU, _TORCH, _TORCHVISION | ||
|
||
|
||
def is_installed(module_name: str): | ||
return importlib.util.find_spec(module_name) is not None | ||
|
||
|
||
INSTALLED_MODULES = { | ||
module: is_installed(module) | ||
for module in (_TF, _TF_GPU, _TORCH, _TORCHVISION, _JAX, _FLAX) | ||
} | ||
|
||
_FASTAPI_INSTALLED = is_installed("fastapi") | ||
_UVICORN_INSTALLED = is_installed("uvicorn") | ||
_PYDANTIC_INSTALLED = is_installed("pydantic") | ||
_MULTIPART_INSTALLED = is_installed("multipart") | ||
_SERVE_INSTALLED = ( | ||
_FASTAPI_INSTALLED | ||
and _UVICORN_INSTALLED | ||
and _PYDANTIC_INSTALLED | ||
and _MULTIPART_INSTALLED | ||
) | ||
|
||
_LOGURU_INSTALLED = is_installed("loguru") | ||
_RICH_INSTALLED = is_installed("rich") |
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 |
---|---|---|
|
@@ -56,3 +56,6 @@ test = [ | |
|
||
[tool.isort] | ||
profile = "black" | ||
|
||
[tool.flit.scripts] | ||
chitra = "chitra.cli:app" |
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