Installation

How to install Giza ecosystem,

To use Giza ecosystem, you'll need Giza CLI and Giza Agents SDK.

In that ressource you'll see how to:

Handling Python versions with Pyenv

All our tools have been tested with Python 3.11, so we recommend using this version.

You should install Giza tools in a virtual environment. If you’re unfamiliar with Python virtual environments, take a look at this guide. A virtual environment makes it easier to manage different projects and avoid compatibility issues between dependencies.

pyenv install 3.11.0
pyenv local 3.11.0
pyenv virtualenv 3.11.0 my-env
pyenv activate my-env

Now, your terminal session will use Python 3.11 for this project.

Install giza-sdk to set up the complete Giza stack.

giza-sdk is a meta-package that installs the entire Giza stack, including CLI, agents, datasets and zkcook.

Option 2 - Install from source

Install giza-sdk from source with the following command:

pip install git+https://github.com/gizatechxyz/giza-sdk

This command installs the bleeding edge main version rather than the latest stable version. The main version is useful for staying up-to-date with the latest developments. For instance, if a bug has been fixed since the last official release but a new release hasn’t been rolled out yet. However, this means the main version may not always be stable. We strive to keep the main version operational, and most issues are usually resolved within a few hours or a day. If you run into a problem, please open an Issue so we can fix it even sooner!

Once installed, you can use each of these packages independently under the Giza namespace. Some examples might be:

from giza.datasets import DatasetsLoader
from giza.agents import GizaAgent
from giza.zkcook import serialize_model

And the CLI will be usabe from the command line:

giza --help

Install CLI

The Giza CLI facilitates user creation and login, transpiles models into ZK models, and deploys a verifiable inference endpoint. These steps are essential for creating an Agent.

Option 2 - Installing from source

Clone the repository and install it with pip:

git clone git@github.com:gizatechxyz/giza-cli.git
cd giza-cli
pip install .

Or install it directly from the repo:

pip install git+ssh://git@github.com/gizatechxyz/giza-cli.git

Install Agents SDK

The Agent SDK lets you build verifiable inferences and connect them to smart contracts, directly in Python.

Option 2 - Install from source

Install Agents from source with the following command:

pip install 'giza-agents @ git+https://github.com/gizatechxyz/giza-agents'

This command installs the bleeding edge main version rather than the latest stable version. The main version is useful for staying up-to-date with the latest developments. For instance, if a bug has been fixed since the last official release but a new release hasn’t been rolled out yet. However, this means the main version may not always be stable. We strive to keep the main version operational, and most issues are usually resolved within a few hours or a day. If you run into a problem, please open an Issue so we can fix it even sooner!

Option 3 - Editable install

You will need an editable install if you’d like to:

  • Use the main version of the source code.

  • Contribute to Agents or ⚡Actions and need to test changes in the code.

Clone the repository and install Agents with the following commands:

git clone https://github.com/gizatechxyz/giza-agents.git
cd giza-agents
pip install -e .

These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. For example, if your Python packages are typically installed in ~/anaconda3/envs/main/lib/python3.11/site-packages/, Python will also search the folder you cloned to: ~/giza-agents/.

You must keep the giza-agents folder if you want to keep using the library.

Now you can easily update your clone to the latest version of Agents and⚡Actions with the following command:

cd ~/giza-agents/
git pull

Your Python environment will find the main version of ⚡Actions on the next run.

Install Datasets SDK

The Dataset SDK gives you access to curated datasets for Web3.

Option 2 - Install from source

Install giza-datasets from source with the following command:

pip install git+https://github.com/gizatechxyz/datasets

This command installs the bleeding edge main version rather than the latest stable version. The main version is useful for staying up-to-date with the latest developments. For instance, if a bug has been fixed since the last official release but a new release hasn’t been rolled out yet. However, this means the main version may not always be stable. We strive to keep the main version operational, and most issues are usually resolved within a few hours or a day. If you run into a problem, please open an Issue so we can fix it even sooner!

Option 3 - Editable install

You will need an editable install if you’d like to:

  • Use the main version of the source code.

  • Contribute to giza-datasets and need to test changes in the code.

Clone the repository and install giza-datasets with the following commands:

git clone https://github.com/gizatechxyz/datasets.git
cd datasets
pip install -e .

These commands will link the folder you cloned the repository to and your Python library paths. Python will now look inside the folder you cloned to in addition to the normal library paths. For example, if your Python packages are typically installed in ~/anaconda3/envs/main/lib/python3.7/site-packages/, Python will also search the folder you cloned to: ~/datasets/.

You must keep the datasets folder if you want to keep using the library.

Now you can easily update your clone to the latest version of giza-datasets with the following command:

cd ~/datasets/
git pull

Your Python environment will find the main version of giza-datasets on the next run.

Last updated