Skip to content

Commit

Permalink
Merge pull request #29 from tudorpintea999/fix-typos
Browse files Browse the repository at this point in the history
fix: documentation improvements
  • Loading branch information
Gonmeso authored Jan 18, 2024
2 parents ad986e8 + f3f3a91 commit a2b5f44
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 28 deletions.
18 changes: 9 additions & 9 deletions docs/examples/full_transpilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ test_loader = torch.utils.data.DataLoader(
])), shuffle=True)
```

Now lets see an example of the data that we have just downloaded:
Now let's see an example of the data that we have just downloaded:


```python
Expand All @@ -103,7 +103,7 @@ print(f"example_targets.shape: {example_targets.shape}")

## How To Train The Model

Now its time to train the model, for this we are going to define a basic neural network with 2 hidden layers and 1 output layer.
Now it's time to train the model, for this we are going to define a basic neural network with 2 hidden layers and 1 output layer.

We will follow the usual way of training a model in Pytorch by creating a `torch.nn.Module` class and defining the `forward` method. The `forward` method is the method that will be called when we pass an input to the model.

Expand All @@ -121,7 +121,7 @@ class Net(nn.Module):
return F.log_softmax(x, dim=1)
```

Now lets instantiate the model and define the optimizer:
Now let's instantiate the model and define the optimizer:


```python
Expand Down Expand Up @@ -224,7 +224,7 @@ for i in range(10):
Train Epoch: 9 [50000/60000 (83%)] Loss: 0.000008


Lets perform a simple prediction to see how the model performs:
Let's perform a simple prediction to see how the model performs:


```python
Expand Down Expand Up @@ -276,13 +276,13 @@ Enter your email 📧: # YOUR EMAIL GOES HERE
[giza][2023-10-12 12:04:13.875] User created ✅. Check for a verification email 📧
```

You will be prompted to add tour username, password and email. Finally you will need to verify your email address by clicking on the link that you will receive in your inbox.
You will be prompted to add your username, password and email. Finally you will need to verify your email address by clicking on the link that you will receive in your inbox.

![email](img/email.png)

Once we click the link we will be redirected to a verification endpoint and we will see a message saying that our email has been verified. Now we are ready to start using Giza CLI!

Lets start by login into the platform:
Let's start by login into the platform:

```console
giza users login
Expand All @@ -307,7 +307,7 @@ We should be ready to start using Giza's capabilities, we can easily check by ru

Now we are ready to transpile our model to Cairo! We want to help you jumpstart your journey into ZKML by helping you to create this amazing models, we abstract you from the tedious process of introspecting the model and getting the information needed to use it in Cairo, that's why we build the transpilation process, to ease this and improve the iteration time from creating a model to using it in Cairo!

Lets check how we can do it:
Let's check how we can do it:

```console
giza transpile mnist_pytorch.onnx --output-path mnist_cairo
Expand Down Expand Up @@ -336,7 +336,7 @@ Also, if you ever have a question about the commands that you can run you can al

Back to the transpilation!

So we have received a file that we have saved in the `mnist_cairo` directory, lets check the contents of the directory:
So we have received a file that we have saved in the `mnist_cairo` directory, let's check the contents of the directory:

```console
tree mnist_cairo
Expand Down Expand Up @@ -408,7 +408,7 @@ mod inference;
+mod input;
```

Now lets create the `input.cairo` file. For this we are going to take the example data that we used to train the model and we are going to convert it to Cairo tensors. In cairo the tensors that contains `floats` are represented as `FP16x16` numbers, so we need to convert the data to this format.
Now let's create the `input.cairo` file. For this we are going to take the example data that we used to train the model and we are going to convert it to Cairo tensors. In cairo the tensors that contains `floats` are represented as `FP16x16` numbers, so we need to convert the data to this format.


```python
Expand Down
6 changes: 3 additions & 3 deletions docs/frameworks/cairo/transpile.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ There are three main methods for transpiling a model:
- The output of the transpilation process is saved in the same location as the original model.

```console
# Using the previous model (id: 2) we can transpile a new model, which will create verion 2 of the model.
# Using the previous model (id: 2) we can transpile a new model, which will create version 2 of the model.
giza transpile --model-id 29 awesome_model.onnx --output-path new_awesome_model
[giza][2023-09-13 14:11:30.015] Model found with id -> 2! ✅
[giza][2023-09-13 14:11:30.541] Sending model for transpilation ✅
Expand Down Expand Up @@ -117,7 +117,7 @@ giza versions list --model-id 29
"size": 52735,
"status": "COMPLETED",
"message": "Transpilation Successful!",
"description": "Intial version",
"description": "Initial version",
"created_date": "2023-09-13T12:08:38.177605",
"last_update": "2023-09-13T12:08:43.986137"
},
Expand All @@ -126,7 +126,7 @@ giza versions list --model-id 29
"size": 52735,
"status": "COMPLETED",
"message": "Transpilation Successful!",
"description": "Intial version",
"description": "Initial version",
"created_date": "2023-09-13T12:11:30.165440",
"last_update": "2023-09-13T12:11:31.625834"
}
Expand Down
6 changes: 3 additions & 3 deletions docs/frameworks/ezkl/transpile.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ There are three main methods for transpiling a model:
- The output of the transpilation process is saved in the same location as the original model.

```console
# Using the previous model (id: 2) we can transpile a new model, which will create verion 2 of the model.
# Using the previous model (id: 2) we can transpile a new model, which will create version 2 of the model.
> giza transpile --framework EZKL --model-id 2 --input-data input.json awesome_model.onnx
[giza][2023-12-04 19:40:10.646] Model found with id -> 2! ✅
[giza][2023-12-04 19:40:12.176] Sending model for Setup ✅
Expand Down Expand Up @@ -96,7 +96,7 @@ giza versions list --model-id 29
"size": 52735,
"status": "COMPLETED",
"message": "Setup Successful!",
"description": "Intial version",
"description": "Initial version",
"created_date": "2023-09-13T12:08:38.177605",
"last_update": "2023-09-13T12:08:43.986137"
},
Expand All @@ -105,7 +105,7 @@ giza versions list --model-id 29
"size": 52735,
"status": "Setup",
"message": "Transpilation Successful!",
"description": "Intial version",
"description": "Initial version",
"created_date": "2023-12-04T12:11:30.165440",
"last_update": "2023-12-04T12:11:31.625834"
}
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- [`client.VersionsClient`](./client.md#class-versionsclient): Client to interact with `versions` endpoint.
- [`client.WorkspaceClient`](./client.md#class-workspaceclient): Client to interact with `workspaces` endpoint.
- [`exceptions.PasswordError`](./exceptions.md#class-passworderror)
- [`echo.Echo`](./utils.echo.md#class-echo): Helper class to use when printin output of the CLI.
- [`echo.Echo`](./utils.echo.md#class-echo): Helper class to use when printing output of the CLI.
- [`enums.Framework`](./utils.enums.md#class-framework)
- [`enums.JobKind`](./utils.enums.md#class-jobkind)
- [`enums.JobSize`](./utils.enums.md#class-jobsize)
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/api/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ Make a call to the API to retrieve model information.

**Args:**

- <b>`model_id`</b>: Model identfier to retrieve information
- <b>`model_id`</b>: Model identifier to retrieve information



Expand Down Expand Up @@ -780,7 +780,7 @@ Update a model.

**Args:**

- <b>`model_id`</b>: Model identfier to retrieve information
- <b>`model_id`</b>: Model identifier to retrieve information
- <b>`model_update`</b>: body to partially update the model


Expand Down Expand Up @@ -866,7 +866,7 @@ Make a call to the API to retrieve job information.

**Args:**

- <b>`job_id`</b>: Job identfier to retrieve information
- <b>`job_id`</b>: Job identifier to retrieve information



Expand Down Expand Up @@ -1029,7 +1029,7 @@ Make a call to the API to retrieve job information.

**Args:**

- <b>`job_id`</b>: Job identfier to retrieve information
- <b>`job_id`</b>: Job identifier to retrieve information



Expand Down Expand Up @@ -1179,7 +1179,7 @@ Make a call to the API to retrieve proof information.

**Args:**

- <b>`proof_id`</b>: Proof identfier to retrieve information
- <b>`proof_id`</b>: Proof identifier to retrieve information



Expand Down
2 changes: 1 addition & 1 deletion docs/reference/api/commands.transpile.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This command will do a couple of things behind the scenes: * Create a Model ent

**Raises:**

- <b>`BadZipFile`</b>: if the recieved file is not a zip, could be due to a transpilation error at the API.
- <b>`BadZipFile`</b>: if the received file is not a zip, could be due to a transpilation error at the API.
- <b>`HTTPError`</b>: request error to the API, 4XX or 5XX


2 changes: 1 addition & 1 deletion docs/reference/api/frameworks.cairo.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ prove(
) → None
```

Command to prove as spceific cairo program, previously converted to CASM. This will create a proving job and check the status, once it finishes if COMPLETED the proof is downloaded at the output path The daily jobs allowed are rate limited by the backend.
Command to prove as specific cairo program, previously converted to CASM. This will create a proving job and check the status, once it finishes if COMPLETED the proof is downloaded at the output path The daily jobs allowed are rate limited by the backend.



Expand Down
4 changes: 2 additions & 2 deletions docs/reference/api/utils.echo.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a href="https://github.com/gizatechxyz/giza-cli/blob/main/giza/utils/echo.py#L11"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a>

## <kbd>class</kbd> `Echo`
Helper class to use when printin output of the CLI.
Helper class to use when printing output of the CLI.

Provides utilities to print different levels of the messages and provides formatting capabilities to each of the levels.

Expand Down Expand Up @@ -80,7 +80,7 @@ Main function to print information of a message, original message is provided as
error(message: str) → None
```

Format and echo a error message
Format and echo an error message



Expand Down
2 changes: 1 addition & 1 deletion docs/resources/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Transpiling a model in Giza can be done in three ways, each designed to provide

3. **Using a previous model:** If you have a previously created model, you can transpile it by indicating the model-id in the `giza transpile --model-id ...` or `giza versions transpile --model-id` command. This method is useful when you want to create a new version of an existing model.

*Note: remember to use the `--framework` flag to indicate which one to use. It defaultss to Cairo*
*Note: remember to use the `--framework` flag to indicate which one to use. It defaults to Cairo*

Remember, the choice of method depends on your specific needs and workflow. Giza provides these options to ensure that you can work with your models in the most efficient way possible.

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/users.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ This will create an *inactive* user in Giza, to activate it you need to verify y

If there is an error or you want to have more information about what it's going on there is a `--debug` flag that will add more information about the error. This will print outgoing requests to the API, debug logs and python traceback about what happened.

⚠️**Note**: be aware that the debug option will print everything that its going to the API, in this case the password will be printed as plain text in the terminal, if you are using the debug option to fill a issue make sure to remove the credentials.
⚠️**Note**: be aware that the debug option will print everything that its going to the API, in this case the password will be printed as plain text in the terminal, if you are using the debug option to fill an issue make sure to remove the credentials.

### Login

Log into Giza platfrom and retieve a JWT for authentication. This JWT will be stored to authenticate you later until the token expires.
Log into Giza platfrom and retrieve a JWT for authentication. This JWT will be stored to authenticate you later until the token expires.

**You need te have an active account to log in**

Expand Down

0 comments on commit a2b5f44

Please sign in to comment.