From 192dbc9aaf997ba030ec788c89640c21bbbaaf9b Mon Sep 17 00:00:00 2001 From: Aleksandr Movchan Date: Thu, 11 Jul 2024 15:06:54 +0000 Subject: [PATCH] Update Aana SDK version to 0.2.1 --- README.md | 34 +++++++++++++++---------- aana_app_project/core/__init__.py | 0 aana_app_project/core/prompts/loader.py | 2 +- pyproject.toml | 3 +-- 4 files changed, 23 insertions(+), 16 deletions(-) create mode 100644 aana_app_project/core/__init__.py diff --git a/README.md b/README.md index a826aa5..3d87d76 100644 --- a/README.md +++ b/README.md @@ -47,30 +47,38 @@ To install the project, follow these steps: 1. Clone the repository. -2. Install additional libraries. +2. Install the package with Poetry. + +The project is managed with [Poetry](https://python-poetry.org/docs/). See the [Poetry installation instructions](https://python-poetry.org/docs/#installation) on how to install it on your system. + +It will install the package and all dependencies in a virtual environment. ```bash -apt update && apt install -y libgl1 +poetry install ``` -> **🗒️ Note** -> -> For optimal performance, you should also install [PyTorch](https://pytorch.org/get-started/locally/) version >=2.1 appropriate for your system. You can continue directly to the next step, but it will install a default version that may not make optimal use of your system's resources, for example, a GPU or even some SIMD operations. Therefore we recommend choosing your PyTorch package carefully and installing it manually. -> **🗒️ Note** -> -> Some models use Flash Attention. Install Flash Attention library for better performance. See [flash attention installation instructions](https://github.com/Dao-AILab/flash-attention?tab=readme-ov-file#installation-and-features) for more details and supported GPUs. +3. Install additional libraries. -3. Install the package with poetry. +For optimal performance, you should also install [PyTorch](https://pytorch.org/get-started/locally/) version >=2.1 appropriate for your system. You can continue directly to the next step, but it will install a default version that may not make optimal use of your system's resources, for example, a GPU or even some SIMD operations. Therefore we recommend choosing your PyTorch package carefully and installing it manually. -The project is managed with [Poetry](https://python-poetry.org/docs/). See the [Poetry installation instructions](https://python-poetry.org/docs/#installation) on how to install it on your system. +Some models use Flash Attention. Install Flash Attention library for better performance. See [flash attention installation instructions](https://github.com/Dao-AILab/flash-attention?tab=readme-ov-file#installation-and-features) for more details and supported GPUs. -It will install the package and all dependencies in a virtual environment. + +4. Activate the Poetry environment. + +To activate the Poetry environment, run the following command: ```bash -poetry install +poetry shell +``` + +Alternatively, you can run commands in the Poetry environment by prefixing them with `poetry run`. For example: + +```bash +poetry run aana deploy aana_app_project.app:aana_app ``` -4. Run the app. +5. Run the app. ```bash aana deploy aana_app_project.app:aana_app diff --git a/aana_app_project/core/__init__.py b/aana_app_project/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/aana_app_project/core/prompts/loader.py b/aana_app_project/core/prompts/loader.py index 09d9cc5..f71aa9e 100644 --- a/aana_app_project/core/prompts/loader.py +++ b/aana_app_project/core/prompts/loader.py @@ -20,6 +20,6 @@ def get_prompt_template(name: str) -> Template: Template: The prompt template. """ env = Environment(loader=PackageLoader( - "aana_app_project", "core", "prompts")) + "aana_app_project.core", "prompts")) template = env.get_template(f"{name}.j2") return template diff --git a/pyproject.toml b/pyproject.toml index 5a2ac9e..da4f5a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.10" -aana = ">=0.2.0" - +aana = ">=0.2.1" [tool.poetry.group.dev.dependencies] ipykernel = "^6.29.4"