Skip to content

Commit f2b7c9f

Browse files
authored
Merge pull request #1853 from Giskard-AI/doc/gsk-2877-handle-kernel-migration-for-existing-projects
[GSK-2877] Update doc about ML worker to adapt kernel and multi-ML worker
2 parents 4c1faa8 + e15a717 commit f2b7c9f

10 files changed

Lines changed: 464 additions & 343 deletions

File tree

docs/cli/ngrok/index.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,13 @@ Now you can run :code:`giskard hub expose --ngrok-token <ngrok_API_key>` which s
3131
token=...
3232
client = giskard.GiskardClient("<ngrok_external_server_link>", token)
3333

34-
# To run your model with the Giskard Hub, execute these three lines on Google Colab:
34+
# To run your model with the current Python environment on Google Colab, execute these lines:
3535

3636
%env GSK_API_KEY=...
37-
!giskard worker start -d -u <ngrok_external_server_link>
37+
!giskard worker start -d -u <ngrok_external_server_link> --name <your-project-worker-id>
38+
39+
# To let Giskard Hub run your model in a managed Python environment, execute these lines:
40+
41+
%env GSK_API_KEY=...
42+
!giskard worker start -s -u <ngrok_external_server_link> --name <your-project-worker-id>
43+

docs/giskard_hub/installation_hub/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ The Giskard Hub is the app adapted for an enterprise use of Giskard. Extending t
1313
You have 3 ways to install the Hub:
1414
* **Hugging Face Space installation**: This is adapted for an **easy installation** in the cloud for prototyping purposes. If you don't want to upload your own model and just want to check some Giskard demo projects, the HF public space is perfect for you.
1515
* **On-premise installation**: This is adapted if your data and model are **private** and you don't have the possibility to use the cloud (for instance, because of privacy and connectivity issues).
16-
* **Private cloud**: This is adapted if you can easily run a **Cloud instance** by your favourite Cloud provider (AWS, GCP or Azure) and want to easily use Giskard collaborative features (collect feedback from business, share results, etc.). Make sure that you have the rights to open ports of your Cloud machine because Giskard needs to open a connection with an ML Worker running on your Python environment.
16+
* **Private cloud**: This is adapted if you can easily run a **Cloud instance** by your favourite Cloud provider (AWS, GCP or Azure) and want to easily use Giskard collaborative features (collect feedback from business, share results, etc.). Make sure that you have the rights to open ports of your Cloud machine, if you want to connect your own ML Worker to the Giskard Hub.
1717

1818
```{toctree}
1919
:caption: Table of Contents

docs/giskard_hub/installation_hub/install_cloud/install_aws/index.md

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -44,72 +44,8 @@ You can stop the instance and restart it when you need to save AWS compute costs
4444

4545
## 5. Start the ML worker
4646

47-
Giskard executes your model using a worker that runs the model directly in **your Python environment**, with all the dependencies required by your model. You can either execute the ML worker:
47+
Giskard executes your model using an ML worker that runs the model. The worker is created along with your project, using the dependencies in your current environment. You can start the worker on Giskard Hub, if it is not started automatically.
4848

49-
- From your **local notebook** within the kernel that contains all the dependencies of your model
50-
- From **Google Colab** within the kernel that contains all the dependencies of your model
51-
- Or from **your terminal** within the Python environment that contains all the dependencies of your model
52-
53-
:::{note}
54-
If you plan to use LLM-assisted tests or transformations, don’t forget to set the ``OPENAI_API_KEY`` environment
55-
variable before starting the Giskard worker.
56-
:::
57-
58-
:::::::{tab-set}
59-
::::::{tab-item} From your local notebook
60-
61-
To start the ML worker from your notebook, run the following code in your notebook:
62-
63-
```
64-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
65-
```
66-
67-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
68-
69-
70-
> ### ⚠️ Warning
71-
> To see the available commands of the worker, you can execute:
72-
>```
73-
>!giskard worker --help
74-
>```
49+
For advanced and flexible usages, please check [our doc for ML worker](../../mlworker/index.md).
7550

7651
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
77-
78-
::::::
79-
::::::{tab-item} From Colab notebook
80-
81-
To start the ML worker from your Colab notebook, run in your Colab cell:
82-
83-
```
84-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
85-
```
86-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
87-
88-
> ### ⚠️ Warning
89-
> To see the available commands of the worker, you can execute:
90-
>```
91-
>!giskard worker --help
92-
>```
93-
94-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
95-
96-
::::::
97-
::::::{tab-item} From your terminal
98-
99-
* Run the following command **within the Python environment that contains all the dependencies of your model**:
100-
101-
```
102-
giskard worker start -k YOUR_KEY -u http://<your IP address>:19000/
103-
```
104-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
105-
106-
> ### ⚠️ Warning
107-
> To see the available commands of the worker, you can execute:
108-
>```
109-
>!giskard worker --help
110-
>```
111-
112-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
113-
114-
::::::
115-
:::::::

docs/giskard_hub/installation_hub/install_cloud/install_azure/index.md

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -57,72 +57,8 @@ You can stop the instance and restart it when you need to save your Azure comput
5757

5858
## 4. Start the ML worker
5959

60-
Giskard executes your model using a worker that runs the model directly in **your Python environment**, with all the dependencies required by your model. You can either execute the ML worker:
60+
Giskard executes your model using an ML worker that runs the model. The worker is created along with your project, using the dependencies in your current environment. You can start the worker on Giskard Hub, if it is not started automatically.
6161

62-
- From your **local notebook** within the kernel that contains all the dependencies of your model
63-
- From **Google Colab** within the kernel that contains all the dependencies of your model
64-
- Or from **your terminal** within the Python environment that contains all the dependencies of your model
65-
66-
:::{note}
67-
If you plan to use LLM-assisted tests or transformations, don’t forget to set the ``OPENAI_API_KEY`` environment
68-
variable before starting the Giskard worker.
69-
:::
70-
71-
:::::::{tab-set}
72-
::::::{tab-item} From your local notebook
73-
74-
To start the ML worker from your notebook, run the following code in your notebook:
75-
76-
```
77-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
78-
```
79-
80-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
81-
82-
83-
> ### ⚠️ Warning
84-
> To see the available commands of the worker, you can execute:
85-
>```
86-
>!giskard worker --help
87-
>```
88-
89-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
90-
91-
::::::
92-
::::::{tab-item} From Colab notebook
93-
94-
To start the ML worker from your Colab notebook, run in your Colab cell:
95-
96-
```
97-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
98-
```
99-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
100-
101-
> ### ⚠️ Warning
102-
> To see the available commands of the worker, you can execute:
103-
>```
104-
>!giskard worker --help
105-
>```
106-
107-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
108-
109-
::::::
110-
::::::{tab-item} From your terminal
111-
112-
* Run the following command **within the Python environment that contains all the dependencies of your model**:
113-
114-
```
115-
giskard worker start -k YOUR_KEY -u http://<your IP address>:19000/
116-
```
117-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
118-
119-
> ### ⚠️ Warning
120-
> To see the available commands of the worker, you can execute:
121-
>```
122-
>!giskard worker --help
123-
>```
62+
For advanced and flexible usages, please check [our doc for ML worker](../../mlworker/index.md).
12463

12564
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
126-
127-
::::::
128-
:::::::

docs/giskard_hub/installation_hub/install_cloud/install_gcp/index.md

Lines changed: 2 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -62,76 +62,10 @@ You can stop the instance and restart it when you need to save your GCP compute
6262
&#x20;`giskard hub start`
6363
:::
6464

65-
66-
6765
## 4. Start the ML worker
6866

69-
Giskard executes your model using a worker that runs the model directly in **your Python environment**, with all the dependencies required by your model. You can either execute the ML worker:
70-
71-
- From your **local notebook** within the kernel that contains all the dependencies of your model
72-
- From **Google Colab** within the kernel that contains all the dependencies of your model
73-
- Or from **your terminal** within the Python environment that contains all the dependencies of your model
74-
75-
:::{note}
76-
If you plan to use LLM-assisted tests or transformations, don’t forget to set the ``OPENAI_API_KEY`` environment
77-
variable before starting the Giskard worker.
78-
:::
79-
80-
:::::::{tab-set}
81-
::::::{tab-item} From your local notebook
82-
83-
To start the ML worker from your notebook, run the following code in your notebook:
84-
85-
```
86-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
87-
```
88-
89-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
90-
91-
92-
> ### ⚠️ Warning
93-
> To see the available commands of the worker, you can execute:
94-
>```
95-
>!giskard worker --help
96-
>```
97-
98-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
99-
100-
::::::
101-
::::::{tab-item} From Colab notebook
102-
103-
To start the ML worker from your Colab notebook, run in your Colab cell:
104-
105-
```
106-
!giskard worker start -d -k YOUR_KEY -u http://<your IP address>:19000/
107-
```
108-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
67+
Giskard executes your model using an ML worker that runs the model. The worker is created along with your project, using the dependencies in your current environment. You can start the worker on Giskard Hub, if it is not started automatically.
10968

110-
> ### ⚠️ Warning
111-
> To see the available commands of the worker, you can execute:
112-
>```
113-
>!giskard worker --help
114-
>```
69+
For advanced and flexible usages, please check [our doc for ML worker](../../mlworker/index.md).
11570

11671
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
117-
118-
::::::
119-
::::::{tab-item} From your terminal
120-
121-
* Run the following command **within the Python environment that contains all the dependencies of your model**:
122-
123-
```
124-
giskard worker start -k YOUR_KEY -u http://<your IP address>:19000/
125-
```
126-
The API Access Key (`YOUR_KEY`) can be found in the Settings tab of the Giskard Hub.
127-
128-
> ### ⚠️ Warning
129-
> To see the available commands of the worker, you can execute:
130-
>```
131-
>!giskard worker --help
132-
>```
133-
134-
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
135-
136-
::::::
137-
:::::::

docs/giskard_hub/installation_hub/install_hfs/index.md

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -66,71 +66,11 @@ Alternatively, provide your HF access token through the Giskard Settings.
6666

6767
### 4. Start the ML worker
6868

69-
Giskard executes your model using a worker that runs the model directly in **your Python environment**, with all the dependencies required by your model. You can either execute the ML worker:
69+
Giskard executes your model using an ML worker that runs the model. The worker is created along with your project, using the dependencies in your current environment. You can start the worker on Giskard Hub, if it is not started automatically.
7070

71-
- From your **local notebook** within the kernel that contains all the dependencies of your model
72-
- From **Google Colab** within the kernel that contains all the dependencies of your model
73-
- Or from **your terminal** within the Python environment that contains all the dependencies of your model
71+
For advanced and flexible usages, please check [our doc for ML worker](../mlworker/index.md).
7472

75-
:::{note}
76-
If you plan to use LLM-assisted tests or transformations, don’t forget to set the ``OPENAI_API_KEY`` environment
77-
variable before starting the Giskard worker.
78-
:::
79-
80-
:::::::{tab-set}
81-
::::::{tab-item} From your local notebook
82-
83-
To start the ML worker from your notebook, run the following code in your notebook:
84-
85-
```
86-
!giskard worker start -d -k YOUR_KEY -u https://XXX.hf.space -t HF-TOKEN
87-
```
88-
89-
To find the **exact** command with the right API Access Key (`YOUR_KEY`) and HuggingFace token (`HF-TOKEN`), go to the "Ml Worker" section in the Settings tab in the Giskard Hub that you install in HF Space.
90-
91-
92-
> ### ⚠️ Warning
93-
> To see the available commands of the worker, you can execute:
94-
>```
95-
>!giskard worker --help
96-
>```
97-
98-
::::::
99-
::::::{tab-item} From Colab notebook
100-
101-
To start the ML worker from your Colab notebook, run in your Colab cell:
102-
103-
```
104-
!giskard worker start -d -k YOUR_KEY -u https://XXX.hf.space -t HF-TOKEN
105-
```
106-
107-
To find the **exact** command with the right API Access Key (`YOUR_KEY`) and HuggingFace token (`HF-TOKEN`), go to the "Ml Worker" section in the Settings tab in the Giskard Hub that you install in HF Space.
108-
109-
> ### ⚠️ Warning
110-
> To see the available commands of the worker, you can execute:
111-
>```
112-
>!giskard worker --help
113-
>```
114-
115-
::::::
116-
::::::{tab-item} From your terminal
117-
118-
* Run the following command **within the Python environment that contains all the dependencies of your model**:
119-
120-
```
121-
giskard worker start -d -k YOUR_KEY -u https://XXX.hf.space -t HF-TOKEN
122-
```
123-
124-
To find the **exact** command with the right API Access Key (`YOUR_KEY`) and HuggingFace token (`HF-TOKEN`), go to the "Ml Worker" section in the Settings tab in the Giskard Hub that you install in HF Space.
125-
126-
> ### ⚠️ Warning
127-
> To see the available commands of the worker, you can execute:
128-
>```
129-
>!giskard worker --help
130-
>```
131-
132-
::::::
133-
:::::::
73+
You're all set to try Giskard in action. Upload your first model, dataset or test suite by following the [upload an object](../../../upload/index.md) page.
13474

13575
### 5. Upload your test suite by creating a Giskard Client for your HF Space
13676

0 commit comments

Comments
 (0)