# Start your Data Science Experiment with DS Lab

### [<mark style="color:blue;">Create your project</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/project/creating-a-project) &#x20;

{% hint style="success" %}
*Check out the walk-through on how to create a DSL Project.*
{% endhint %}

![Creating a new DSL Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fi72GwqlMhlynOcbFIG0F%2Fcreate_project.gif?alt=media\&token=da026ea1-47a8-4b37-b312-399dd83887fe)

* Navigate to the Projects Page of the Data Science Lab plugin.
* Click the ***Create Project*** option to create a new project.

![The Create Project option](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FbloS2p11gvNqM5g6DfaX%2Fimage.png?alt=media\&token=a00ded62-dac3-470a-936f-302935d30779)

* A form opens to provide the Project-related information.
* The next screen opens asking for the following details for a new project:
  * Project Name: Give a name to the new project.
  * Project Description: Describe the project.
  * Select Algorithms: Select Algorithms using the drop-down menu.
  * Environment: Allows users to select the environment they want to work in. Currently, the supported Python frameworks are ***TensorFlow*** and ***PyTorch**.*

    * If the users select the TensorFlow environment, they do not need to install packages like the ***TensorFlow*** and ***Keras*** explicitly in the notebook. These packages can simply be imported inside the notebook.
    * If the users select the PyTorch environment, they do not need to install packages like the ***Torch*** and ***Torchvision*** explicitly in the notebook. These packages can simply be imported inside the notebook.

    The user can select an option out of the given choices: 1. Python Tensor Flow, 2. Python PyTorch
  * Resource Allocation: This allows the users to allocate CPU/ GPU and memory to be used by the Notebook container inside a given project. The currently supported Resource Allocation options are Low, Medium, and High.
  * Idle Shutdown: Idle Shutdown: It allows the users to specify the idle time limit after which the notebook session will get disconnected, and the project will be deactivated. To use the notebook again, the project should be activated. The supported Idle Shutdown options are 30m, 1h, and 2h.
  * External Libraries: Provide the external libraries’ links required for the project.  &#x20;

![Mandatory fields for creating a Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FalOsUuwDy0FslljCmSS2%2Fimage.png?alt=media\&token=f4ae34da-550c-401e-ad4c-1bdd7ce88e1e)

* Based on the selection of the Resource Allocation field the following fields appear with pre-selected values:
  * Image Name
  * Image Version
  * Limit
  * Memory
  * Request (CPU)
  * Memory
* Select ***nvidia*** from the ***GPU Type*** field to improve the performance of the project. you select the nvidia as the GPU Type then&#x20;

![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fjy184RT6fhs3BbtDhQqw%2Fimage.png?alt=media\&token=2772cda9-b243-42f9-8166-14f5559da791)

* Click the ***Save*** option.

![Saving the Project details ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FUPes9OS13eF2FR8xZZ81%2Fimage.png?alt=media\&token=e0f62eb9-a0c5-4ecc-9b26-851cfc160803)

* The newly created project gets saved, and it appears on the screen.
* The success of project creation is informed by a notification message.&#x20;

![Project gets created and listed under the Projects page](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FdCPIFHhtWC8NjeyqDY8F%2Fimage.png?alt=media\&token=dd511ade-94ca-4e3b-bf94-ebc559ebdb3c)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark>

* *The user can also open the Project list by clicking the **View Project** option.*
* *Click the **View Project** optio&#x6E;**.***
  {% endhint %}

![View Project option](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fn7UT5heg3k9qbE9ADS6i%2Fimage.png?alt=media\&token=fa7b08c7-eecb-4011-9066-f6eee0531092)

* The user gets redirected to the Project list.&#x20;

![Project List](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fa3ePThtL2Fd9AFFVe8pl%2Fimage.png?alt=media\&token=aa6aea11-48df-4a51-ba94-f728ba9ca3e7)

{% hint style="info" %} <mark style="color:green;">Please Note:</mark> *A project gets the **Share**, **Edit**, **Delete**, **Activate**/**Deactivate** actions to be applied on it after getting listed under the Project list.*&#x20;
{% endhint %}

![Various Actions provided to a DSL Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FjO4giKzky5LZ2CgsqQTF%2Fimage.png?alt=media\&token=e3bdced6-d8e1-4002-b2a5-881cabbfab20)

{% hint style="success" %}
*<mark style="color:green;">Pre-requisite:</mark> The DSL projects also get **Push to VCS** and **Pull from VCS** functionalities, but they only get enabled for the activated DSL projects.*         &#x20;
{% endhint %}

### [<mark style="color:blue;">Activate your Project</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/project/activating-a-project)&#x20;

{% hint style="success" %}
*Look at the given walk-through to understand how a DSL Project gets activated.*
{% endhint %}

![Activating a DSL Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FrXEy5QgzPljcOigMAWpw%2Factivate_project.gif?alt=media\&token=50ea1b79-c865-4f59-bf36-185f7ee22ed5)

* Navigate to the ***Projects*** page.
* Select a project from the list.
* Click the ***Activate*** option.

![Use the Activate option for a Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FGw8so40EeXIH5Eu75xBJ%2Fimage.png?alt=media\&token=67ab187a-3a6b-4702-a322-f11c3729ff33)

* A dialog window appears to confirm the Activation.
* Click the ***Yes*** option.

&#x20;     ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FrmpFSu9S3BOJOiuXFIbZ%2Fimage.png?alt=media\&token=c7a95a59-2840-4210-8de4-cf6497ca354d)

* The project gets activated and a notification message appears to communicate the completion of the action.
* The ***Activation*** option gets changed into the ***Deactivation*** option for the concerned project.

![The Project gets activated](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FNcHAg8MlTkv4NQR8jLDd%2Fimage.png?alt=media\&token=1d45e402-5fda-4a0f-ba68-fbb3abf7e168)

### [<mark style="color:blue;">Create your first Notebook</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/ways-to-access-notebook/creating-a-notebook)&#x20;

{% hint style="success" %}
*Have a look at the walk-through to create a new Notebook.*
{% endhint %}

![Creating a new Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FGsGxfnmSlRSb7OYvhIdG%2Fcreate_notebook.gif?alt=media\&token=75fe998c-4d8c-406f-a163-ccc083d58fe6)

* Click the **Create Notebook** option from the Notebook tab.        &#x20;

![The Create Notebook option.](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FeVyLdgSG507FNCVogmYP%2Fimage.png?alt=media\&token=32fc3482-ad0d-4aaf-a097-8c4a662c47e6)

* A new Notebook gets created; the user gets a notification message informing the same.
* Click the **Back** icon.

![The Notebook landing page](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FvjDavBP1Zak4JWBK8F3k%2Fimage.png?alt=media\&token=ae2ee788-3220-45c8-ad11-79020252e24e)

* The Notebook gets saved under the Notebook list.  &#x20;

![The List of created Notebooks     ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F66E78Pqlh15PvRdgKJu5%2Fimage.png?alt=media\&token=8d6c7474-dc6c-4b49-828c-2b80fcbfebfc)

{% hint style="info" %}
*<mark style="color:green;">Note:</mark>*

1. *Edit the Notebook name by using the ‘**Edit Notebook Name**’ icon.*
2. *The accessible datasets, models, and artifacts will list down under the **Datasets**, **Models**, and **Artifacts** menus (In this case, there are no datasets added to the concerned Notebook.).*
3. ***Find/Replace** menu facilitates the user to find and replace a specific text in the notebook code.*
4. *Add a description for the created Notebook by using the same page.*  &#x20;
   {% endhint %}

![Notebook Landing page](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FbNpXA0npRJTCesmxVh4j%2Fimage.png?alt=media\&token=133f3655-1d23-41c3-bf05-7f17a4da19bb)

### [<mark style="color:blue;">Upload your Notebook to DS Lab</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/ways-to-access-notebook/uploading-a-notebook)

{% hint style="success" %}
*Check out the given walk-through on how to upload a Notebook.*
{% endhint %}

![Uploading a Notebook to DS Lab Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fy9JaowHI5qAxE0TL1H5z%2Fupload_notebook.gif?alt=media\&token=1781e6d9-5e1f-413e-9676-433ad5f0509f)

The users can seamlessly upload Notebooks created using other tools and saved in their systems.

* Navigate to the landing page of an activated Project.
* Click the ***Upload Notebook*** option.&#x20;

![Upload Notebook option](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F0e9AwFSjXkVqMYjGqfvy%2Fimage.png?alt=media\&token=4f51e55c-3862-4ddb-a530-ad1e0fc0f16e)

* Specify a Notebook from the system.
* Click the ***Open*** option to upload the Notebook.  &#x20;

&#x20;      ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FXLsHVFXnh5MwyXhpSBK6%2Fimage.png?alt=media\&token=f9a48990-7e19-4f0e-9cda-44a1cb3fb016)

* The selected Notebook gets uploaded under the Project.
* The same gets confirmed by a notification message.
* Another notification message appears to inform the status of the Notebook (it gets saved by default). &#x20;
* Click the ***Back*** icon.&#x20;

![Notification messages after a Notebook gets uploaded](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F3iEvaRzoKM8vkHJAUQT5%2Fimage.png?alt=media\&token=3cc72581-b17d-4ebf-add6-9ebdaf277b04)

* The uploaded Notebook gets listed on the landing page of the Project. &#x20;

![The uploaded Notebook gets listed under the Notebook list](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FA7Gl6EJSRw7BKZ908Ka9%2Fimage.png?alt=media\&token=72479a9a-3502-4b1c-8b4e-692ce5f53760)

### [<mark style="color:blue;">Create your first DSL Model</mark> ](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-page/notebook-operations/turn-your-script-into-a-model)

{% hint style="success" %}
*Check-out the walk-through on how to save and load a DSL Model.*
{% endhint %}

![Saving and Loading a DSL Model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FvjhlHVmwg0lHPbdlrQsP%2Fload_save_a_dsl_model.gif?alt=media\&token=9457880c-710e-4aa1-86dc-1401cc21f90f)

Once the Notebook script is executed successfully, the users can save them as a model. The saved model can be loaded into the Notebook.

### Save your DSL Model

* Navigate to a Notebook.
* Write code using the following sequence:
  * ***Read DataFrame***
  * ***Define test and train data***
  * ***Create a model***
* Execute the script.

&#x20;    &#x20;

![Sample Script for a Data Science Model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FaxBZJjkgIN2GOOPtgo6f%2Fimage.png?alt=media\&token=9b205619-a4ee-43f3-aeca-f005d3d439dd)

* Get a new cell.
* Give a model name to specify the model.
* Execute the cell.
* After the code gets executed, click the ***Save Model*** notebook in a new cell.
* The saved model gets listed under the ***Models*** list.

![Specify a DSL Model by giving a name](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FFTJhZDkH4IC5pORn2Gnt%2Fimage.png?alt=media\&token=4c5bf7f4-6aa3-445e-a1a3-52afd3fc5e55)

### Load your DSL Model

* Click on a new cell and select the model by using the given checkbox to load it.
* The model gets loaded into a new cell.

![Loading a saved DSL Mod](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FMZHuwJnbJnnEygWwSSv8%2Fimage.png?alt=media\&token=330e9517-d0eb-4f47-a0ba-c1674ad34a30)

### [<mark style="color:blue;">Predict the model output</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-page/notebook-operations/predict)&#x20;

{% hint style="success" %}
*Check out the walk-through on the **Predict** option for a DSL Notebook.*
{% endhint %}

![Predicting the output of a loaded model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FLinC0NtdwdstMVEMlxXX%2Fmake_predictions.gif?alt=media\&token=70a5f48b-ce75-423c-8c2e-ba9215fd0753)

You can get the predicted array from a loaded DSL model that contains a definite dataframe.

* Add a new cell.
* Click the ***Predict*** option.
* Execute the code.
* Provide the model and dataframe.
* The predicted output of the given dataframe appears as an array.
* The default comments on how to define the predicted output for a DS Lab model appears as well.

![Predicting the Output of a DSL model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FhEtBR92G7bmqtCW6bbKs%2Fimage.png?alt=media\&token=2ecd267a-6bd3-4966-9506-8f068d35cf00)

### [<mark style="color:blue;">Save Artifacts of your model</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-page/notebook-operations/save-artifacts)

{% hint style="success" %}
*Check out the walk-through on how to Save Artifacts.*
{% endhint %}

![Saving Artifacts in a Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F55iptLx34Z04KZVfqLXQ%2Fsave_artifacts.gif?alt=media\&token=ddbc4f93-5520-4ef1-867d-50f0a1b8b0d9)

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> The user can save the artifacts of a predicted model using this option.*
{% endhint %}

* Add a new cell.
* Click the ***Save Artifacts***.
* Give proper dataframe name and Name of Artifacts (with extensions - .csv/.txt/.json).
* Execute the cell.
* The Artifacts get saved.

![Saved Artifacts inside a Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Ffp2eiF5VaOso79oMYtQd%2Fimage.png?alt=media\&token=5b25a2cf-3e62-4655-b7b3-89f501d986e9)

{% hint style="info" %}
*Please Note: The saved **Artifacts** can be downloaded as well.*
{% endhint %}

### [<mark style="color:blue;">Deploy your DS Model to Pipeline</mark> ](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/model/register-a-model)

{% hint style="success" %}
*Check out the walk-through to deploy a DSL model to the Data Pipeline (Publish the Model from the Model tab).*
{% endhint %}

![Deploying a DSL Model to Data Pipeline/ Publishing a DSL Model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FB0OjvYlUDDCrdas3icIT%2Fdeploy_to_pipeline.gif?alt=media\&token=b13f3f53-0df5-4728-b341-daa4f88b4046)

You can deploy a saved DSL model to the Data Pipeline plugin by using the ***Model*** tab.

* Navigate to the ***Model*** tab.
* Select a model from the list.
* Click the ***Deploy to Pipeline*** icon for the model.

![Accessing the  Deploy to Pipeline option for a saved DS model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FFXEQ4NJ54Bpa2WBJtxKl%2Fimage.png?alt=media\&token=842d2b5c-8a4b-4ea3-b555-169cb9989242)

* The ***Deploy to Pipeline*** dialog box appears to confirm the action.
* Click the ***Yes*** option.

&#x20;     ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FUJfHexgaS1IW0sik0l2O%2Fimage.png?alt=media\&token=6e8fbdfd-e458-4e8c-b383-c78d9b27e2d2)

* The selected model gets published and deployed to the Data Pipeline (It disappears from the ***Unpublished*** model list).
* A notification message appears to inform the same.&#x20;

![Notification message after the model gets deployed to the Data Pipeline plugin.](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FICXry1LLfnFtM44fQgxz%2Fimage.png?alt=media\&token=99e99eb9-f997-4e8c-88b1-108189278d5a)

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark>*

1. *The published/deployed model gets listed under the **Published** filter.*&#x20;
2. *The **Publish** option provided under the **Notebook tab** and the **Deploy to Pipeline** option provided under the **Model tab** perform the same task.*

{% endhint %}

![Filtering the model list by using the 'Published' filter option.](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fx1P2TydpRas1lfUQrxGZ%2Fimage.png?alt=media\&token=e38a09b4-3504-42ea-9a9d-b4760b3a50b9)

&#x20;             &#x20;

### [<mark style="color:blue;">Publish your DS model as an API</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/model/register-model-as-an-api-service)&#x20;

This function gets completed in three steps:

1\.       Publish a Model as an API

2\.       Register an API Client

3\.       Pass the Model values in the Postman

{% hint style="success" %}
*Check-out the below given video to understand the **Publish Model as an API Service** functionality.*
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=wyjYWdJVQwQ>" %}

#### [<mark style="color:blue;">Publish a Model as an API</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/model/register-model-as-an-api-service/register-a-model-as-an-api)

You can publish a DSL model as an API using the Model tab. Only the published models get this option.

* Navigate to the ***Model*** tab.
* Filter the model list by using the ***Published*** filter option.
* Select a model from the list.
* Click the ***Publish as API*** option.

![Accessing the Publish as API option for a saved model](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FVujA5bn7lpOUVIMeYKeI%2Fimage.png?alt=media\&token=0c377723-12dd-4aa2-98ee-7c0d0f3a88be)

* The ***Update model*** page opens.
* Provide Max instance limit.
* Click the ***Save and Publish*** option.

![Updating the model details ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FfyZ3jprAe6kfo8S20xXM%2Fimage.png?alt=media\&token=afd7ba2f-83bf-4d19-acfb-142482f5f9d6)

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> Use the **Save** option to save the data which can be published later.*
{% endhint %}

* The model gets saved and published as an API service. A notification message appears to inform the same.

![Notification message after the Model gets saved and published as an API](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FhGLiFPLv3ka11Ln6uSUM%2Fimage.png?alt=media\&token=94921b6e-3d33-4345-a8aa-0020c8ad3705)

#### [<mark style="color:blue;">Register an API Client</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/model/register-model-as-an-api-service/register-an-api-client)

* Navigate to the **Admin** module.

&#x20;     ![](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FBcFiNbei6UTRw0L2Y9zX%2Fimage.png?alt=media\&token=c3da4ed5-6bb3-4c5b-b881-34048ed0a221)

* Click the ***API Client Registration*** option.
* The API Client Registration page opens.
* Click the ***New*** option.
* Select the Client type as ***internal**.*
* Provide the following client specific information:
  * Client Name
  * Client Email
  * App Name
  * &#x20;Request Per Hour
  * Request Per Day
  * Select API Type- Select the ***Model as API*** option.
  * Select the Services Entitled -Select the published DSL model from the drop-down menu.
* Click the ***Save*** option.

&#x20;    &#x20;

![Required information for an API Client Registration](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2F4MJTfu7np1qoiNVTkrIR%2Fimage.png?alt=media\&token=506151fb-3f26-41cb-8e45-d8f73674ca4d)

* The client details get registered.
* A notification message appears to inform the same.

![The API Client gets registered](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FXSusrRE09vU7vc3Dslzw%2Fimage.png?alt=media\&token=384b9c3c-f78e-48f4-acc9-b58ca709613f)

Note: Once the client gets registered open the registered client details using the ***Edit*** option to get the ***Client id*** and ***Client Secrete key***.

![Get Client Id and Client Secret Key for a registered API Client](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FqI9bOIBEdBpqhp4IDg64%2Fimage.png?alt=media\&token=73d6e2e6-2108-4dbc-866b-7eacb02adb15)

#### [<mark style="color:blue;">Pass the Model values in the Postman</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/model/register-model-as-an-api-service/pass-model-values-in-postman)

* Navigate to the Postman.
* Add a new ***POST*** request.
* Pass the URL with model name (Only the sklearn models are supported at present).

![Passing the Model  in the POST request under the Postman ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FUQNs6dboJP94TDUAPXjO%2Fimage.png?alt=media\&token=5c2be1a4-af08-4e41-9a8f-b697621babd4)

* Provide required parameters under the ***Params*** tab:

  a.     Client Id

  b.     Client Secret Key

  c.     App Name&#x20;

![Providing the required Parameters](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FtMOTKEYOFMPezAsyYxe1%2Fimage.png?alt=media\&token=2a012391-a4a0-4933-9f89-b8675606d782)

* Open the ***Body*** tab.
* Select the ***raw*** option.
* Provide the input dataframe.
* Click the ***Send*** option.
* The response will appear below.
* You can save the response by using the ***Save Response*** option.

![Getting Response based on the Model input](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FL2NYKDIt6Dmwq3Ddw4fz%2Fimage.png?alt=media\&token=810111b4-1e9c-4630-9c4b-a03ba1066b95)

{% hint style="info" %} <mark style="color:green;">Please Note</mark>: *The model published as an API service can be easily consumed under various apps.*
{% endhint %}

### [<mark style="color:blue;">Add data sets to your Project</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/dataset)

The Dataset tab offers a list of uploaded Datasets which can be added to a project. The user can get a list of uploaded Data Sets and Data Sandbox from the Data Center module under this tab.

The ***Add Datasets*** page offers the following Data service options to add as datasets:

1. [**Data Service**](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/dataset/adding-data-sets) – These are the uploaded data sets from the Data Center module.
2. [**Data Sandbox**](https://docs.bdb.ai/bdb-documentation/data-science-lab/broken-reference) – This option lists all the available Data Sandbox from the Data Center module.

![Add Datasets page](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FgftL5ud60MhPaa7HNFK5%2Fimage.png?alt=media\&token=e653189a-d1ee-4dd7-92ae-c559ecea492b)

#### [<mark style="color:blue;">Adding Data Service</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/dataset/adding-data-sets)

{% hint style="success" %}
*Check out the walk-through to on how to add a data service as a dataset.*
{% endhint %}

![Adding a Data service as a Dataset in the DS Lab](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FEFcV7GAzoaUlNzHLcG9Y%2Fadding_data_service.gif?alt=media\&token=c55b5b78-3f64-4087-b61b-3b69c658b7c7)

* Navigate to a Project-specific page and click the ***Datase*****t** tab (E.g., the given image displays the Dataset tab under the ***Sample Project**)*.
* Click the ***Add Datasets*** button.

![Adding Datasets to a Project ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FMN2nnXydvk0ycScdvG5e%2Fimage.png?alt=media\&token=9196d3f5-6446-4258-9f9f-9acc5b474ac0)

* The ***Add Datasets*** page opens offering two options to choose data:
  * Data service (gets selected by default)
  * Data Sandbox
* Use the ***Search space*** to search through the displayed data service list.
* Select the required data service(s) using the checkboxes provided next to it.
* Click the ***Add*** option.                &#x20;

![Selecting Data Sets](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FoumHGWqDHU6g6Ht89ZUo%2Fimage.png?alt=media\&token=5d7a6067-843a-4e7e-8747-14840dfa373c)

* The selected data service(s) gets added to the concerned project.
* A notification message appears to inform the same.&#x20;

![Dataset li](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FsGwPjKKxf0IbOgOTpV5Z%2Fimage.png?alt=media\&token=ee909846-bae6-417f-889e-db3eeafb1563)

#### [<mark style="color:blue;">Adding Data Sandbox</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/broken-reference)

{% hint style="success" %}
Check-out the walk-through to understand how to add dataset using the Data Sandbox.
{% endhint %}

![Adding Dataset using the Data Sandbox option](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FhUqtbP9vm0sXBeZfjRc9%2Fadding_dataset_using_data_sandbox.gif?alt=media\&token=b843c323-c83b-49f2-b497-39d033fbf618)

* Open the ***Dataset*** tab from a specific project.
* Click the ***Add Datasets*** option.     &#x20;

![Adding Dataset to a project ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FZapt0DYVwrRUsJ4xmwnd%2Fimage.png?alt=media\&token=a056d73c-a735-4ede-8628-56d2f45dea2d)

* You get redirected to the ***Add Datasets*** page.
* Select the Data Sandbox option from the Data Service drop-down menu.
* Use the ***Search*** space to search for a specific Data Sandbox.
* Select the required Data Sandbox(es) using the checkboxes provided next to it.
* Click the ***Add*** option.

&#x20;    &#x20;

![Selecting Data Sandbox](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fvk9bDcbZhlbZvfuHcOlf%2Fimage.png?alt=media\&token=08938a75-b361-4853-a421-9e2b409acb07)

* The selected data sandbox(es) gets added to the concerned project.
* A notification message appears to inform the same.

&#x20;    &#x20;

![Dataset list ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FG1BXJuC9qGtcePavd8Ss%2Fimage.png?alt=media\&token=0dfcfc2f-5ab1-400e-8dac-ea6cbf6616b0)

### [<mark style="color:blue;">VCS for Projects</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/project/keep-multiple-versions-of-a-project)&#x20;

{% hint style="warning" %}
*<mark style="color:orange;">Pre-requisite:</mark> Make sure that the Version control settings for the DSL plugin are configured by your administrator before you use this functionality.*
{% endhint %}

{% hint style="success" %}
*Watch the walk-through videos given below to understand the **Push to VCS** and **Pull from*** ***VCS** functionality for a DSL Project.*
{% endhint %}

![Pushing a DSL Project to the VCS](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FtVMSOenog02iPb2xHLd1%2Fpush_vcs_project.gif?alt=media\&token=45686498-dfff-4897-998e-6186e8fff7e1)

![Pulling a DSL Project from the VCS](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2Fp5UhJiDkzP3u2R3X5fXY%2Fpull_vcs_project.gif?alt=media\&token=6355c490-4b12-4d90-b3e2-bac1ceeece02)

#### <mark style="color:blue;">Pushing a Project to the VCS</mark>

* Navigate to the ***Projects*** page of the DS Lab plugin.
* Select an ***activated project*****.**
* Click the ***Push into VCS*** icon for the project.

![Push to VCS option for a DSL Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FDiWNfAchiX4qzM07cydv%2Fimage.png?alt=media\&token=1251f377-040b-435a-a69b-0ea80f2a9a1c)

* The ***Push into Version Controlling System*** dialog box appears.
* Provide a ***Commit*** Message.
* Click the ***Push*** option.

![Push into Version Controlling System dialog box](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FtpLKMdihLoDkKWBqC7EE%2Fimage.png?alt=media\&token=e3c54b41-f589-4eed-ad98-ce8d39475453)

* The DSL Project version gets pushed into the Version Controlling System, a notification message appears to inform the same.

![Notification message after a DSL Project gets pushed into VCS](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FH2dsCyJ9ZTyJWn5PetPx%2Fimage.png?alt=media\&token=ab7f6e36-657c-4516-b19d-bcd8279a13c7)

#### <mark style="color:blue;">Pulling a Project from the VCS</mark>

* Navigate to the ***Projects*** page of the DS Lab plugin.
* Select an ***activated project***.
* Click the ***Pull from VCS*** icon for the project.

![Pull from VCS icon for a DSL Project](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FFvENuFwDVx297HcWpwTc%2Fimage.png?alt=media\&token=a237582b-e8b4-4d19-98aa-b0cafb0616a6)

* The ***Pull from Version Controlling Syst*****em** dialog box opens.
* Select the version that you wish to pull by using the checkbox.
* Click the ***Pull*** option.

![Pull from Version Controlling System dialog box](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FHq5tF4IGcMdz8SUQh0KP%2Fimage.png?alt=media\&token=084b959e-a3c0-4531-b724-f62c368db3e9)

* The pulled version of the selected Project gets updated in the Project list.
* A notification message appears to inform the same.

![Notification message after a version of the DSL Project gets pulled ](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FLsfxFCPpILmgbvIQMKjc%2Fimage.png?alt=media\&token=19d785a5-9611-46d5-aa19-145f45255e92)

{% hint style="warning" %}
*<mark style="color:orange;">The Push to and Pull from VCS functionalities will not be enabled for a deactivated project.</mark>*&#x20;
{% endhint %}

### [<mark style="color:blue;">VCS for Notebooks</mark>](https://docs.bdb.ai/bdb-documentation/data-science-lab/various-tabs-to-work-with/notebook/notebook-list-page/notebook-version-control)

{% hint style="warning" %}
*<mark style="color:orange;">Pre-requisite:</mark> Make sure that the Version control settings for the DSL plugin are configured by your administrator before you use this functionality.*&#x20;
{% endhint %}

{% hint style="success" %}
*Walk-through on the Version Control Functionality for Notebook*
{% endhint %}

![Pushing to and Pulling from VCS functionality for a Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FMAB7AbiaPDfXojCeDAlW%2Fpush_pull_notebook.gif?alt=media\&token=b15c0f66-d786-4553-af9e-c9e79b9e0ee2)

#### <mark style="color:blue;">Pushing a Notebook to the VCS</mark>

* Navigate to the Notebook list of a Project.
* Select a Notebook.
* Click the ***Push into VCS*** icon for the Notebook.​

![Push to VCS icon for Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FlI08IOEd1sSt4OwxOFp6%2Fimage.png?alt=media\&token=f3a99a35-1125-461a-b1db-1178923c8150)

* The Push into Version Controlling System dialog box appears.
* Provide a Commit Message.
* Click the ***Push*** option.​

&#x20;    &#x20;

![Push into Version Controlling System dialog box](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FqcgsmEO6N7IEjJamVIqW%2Fimage.png?alt=media\&token=cf9badab-fbc4-4f18-bf62-1ff1363aeedf)

* The Notebook version gets pushed into the Version Controlling System and the Notebook list gets updated with the latest version.
* &#x20;A notification message appears to inform the success of the action.​

&#x20;    &#x20;

![Notification message after the Notebook version gets updated in the list](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FEaOswHF4cT5KcGYtkp4X%2Fimage.png?alt=media\&token=e375ad24-e15c-4a6e-abbb-079cf1ab5e40)

#### <mark style="color:blue;">Pulling a Notebook from the VCS</mark> <a href="#pulling-a-project-from-the-vcs" id="pulling-a-project-from-the-vcs"></a>

* Navigate to the Notebook list given under a Project.
* Select a Notebook.
* Click the ***Pull from VCS*** icon for the Notebook.

![Pull from VCS icon for a Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FoSN2L7eGzcSfLrK1ifO1%2Fimage.png?alt=media\&token=27955636-ca84-414f-823c-0188de56273b)

* The ***Pull from Version Controlling System*** dialog box opens.
* Select the version that you wish to pull by using the checkbox.
* Click the ***Pull*** option.

&#x20;     &#x20;

![Pull from Version Controlling System dialog box for Notebook](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FbcwXk2FLWi66PVeORVea%2Fimage.png?alt=media\&token=0220b354-d2b7-4618-ad48-91ff081b4aa7)

* The pulled version of the selected Notebook gets updated in the Notebook list.
* A notification message appears to inform the success of the action.

![Notification message after a version of the Notebook gets pulled](https://972575688-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRYq1HgffNfbnIMWPu1D5%2Fuploads%2FgeR8m2hD9Mbig6gpDZHR%2Fimage.png?alt=media\&token=5e13ece8-823a-401b-9fd4-88bfd8aa0e13)
