================
Project sessions
================

In Data Science & AI Workbench, sessions provide you with Integrated Development Environments (IDEs) for project development, enabling you to write code, explore and visualize data, develop and evaluate models, and apply project configurations in a centralized and collaborative environment. 

Once you have created or cloned a project, you can immediately begin working with it by "Opening" a session. 

Opening a project session
=========================

There are multiple ways to open a session for a project:

.. tab-set:: 

    .. tab-item:: Project grid view
      
        #. From the **Projects** page, click |code| **Open session** within any project tile in the grid to open a session for that project.
        #. Once the session has been successfully created, click |file-code| **Return to session** to open an editor session for your project.
   
    .. tab-item:: Project list view

        #. From the **Projects** page, open the project's |ellipsis-vertical| actions menu and select *Open session*. 
        #. Click |circle-small| **Active session**, or open the project's |ellipsis-vertical| actions menu and select *Return to session*.

    .. tab-item:: Within a project

        #. From the **Projects** page, click on the title of any project. The project's settings page will open.
        #. Select |code| **Session** from the left-hand navigation.
        #. Click **Open a session**.

.. tip:: 

   You can :ref:`change the default editor <proj_settings>` for your project from the settings menu.

By default, projects in Workbench are created with their own internal Git repository, enabling you to leverage standard Git workflows to manage your project versions and collaborate on projects with others in the platform. For more information, see :doc:`Branching and merging <branching>`.

.. tip::
   
   * Click **Open session in new tab** |up-right-from-square| to open your project session editor without the Workbench interface showing.
   * For help managing environments, packages, environment variables, and commands for your project, see :doc:`Project Configurations <project-config>`.
   * Sessions are not shared. Each user creates a unique session for working with a given project.

.. note:: 

   If your session opens before your environment has finished preparing, your environment tile displays the text ``Preparing...``. Allow the environment time to complete before attempting to work in a notebook. 
   
      .. thumbnail:: ../../images/session_env_preparing.png
         :align: center 

Stopping project sessions
=========================

Anaconda recommends stopping project sessions when not actively working in them as a best practice to maintain system performance and reduce costs.  
          
#. From a project session, click |stop| **Stop session** at the top of the page. 
#. Click **Stop**. 

.. |code| raw:: html

   <i class="fa-light fa-code"></i>

.. |file-code| raw:: html

   <svg class="inline" height="1.2em" width="1.2em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M64 496c-26.5 0-48-21.5-48-48V64c0-26.5 21.5-48 48-48H204.1c1.3 0 2.6 .1 3.9 .2V136c0 22.1 17.9 40 40 40H367.8c.2 1.3 .2 2.6 .2 3.9V448c0 26.5-21.5 48-48 48H64zM358.6 157.3c.9 .9 1.7 1.8 2.4 2.7H248c-13.3 0-24-10.7-24-24V22.9c1 .8 1.9 1.6 2.7 2.4L358.6 157.3zM64 0C28.7 0 0 28.7 0 64V448c0 35.3 28.7 64 64 64H320c35.3 0 64-28.7 64-64V179.9c0-12.7-5.1-24.9-14.1-33.9L238.1 14.1c-9-9-21.2-14.1-33.9-14.1H64zm85.7 269.7c3.1-3.1 3.1-8.2 0-11.3s-8.2-3.1-11.3 0l-56 56c-3.1 3.1-3.1 8.2 0 11.3l56 56c3.1 3.1 8.2 3.1 11.3 0s3.1-8.2 0-11.3L99.3 320l50.3-50.3zm96-11.3c-3.1-3.1-8.2-3.1-11.3 0s-3.1 8.2 0 11.3L284.7 320l-50.3 50.3c-3.1 3.1-3.1 8.2 0 11.3s8.2 3.1 11.3 0l56-56c3.1-3.1 3.1-8.2 0-11.3l-56-56z"/></svg>

.. |ellipsis-vertical| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><path d="M64 384a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-160a32 32 0 1 0 0 64 32 32 0 1 0 0-64zM96 96A32 32 0 1 0 32 96a32 32 0 1 0 64 0z"/></svg>

.. |circle-small| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path fill="#42b029" d="M0 256a160 160 0 1 1 320 0A160 160 0 1 1 0 256z"/></svg>

.. |stop| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path d="M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"/></svg>

.. |up-right-from-square| raw:: html

   <svg class="inline" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M320 33c0-18.2 14.8-33 33-33H480c17.7 0 32 14.3 32 32V159c0 18.2-14.8 33-33 33c-8.7 0-17.1-3.5-23.3-9.7L404 130.6 235.3 299.3c-6.2 6.2-16.4 6.2-22.6 0s-6.2-16.4 0-22.6L381.4 108 329.7 56.3C323.5 50.1 320 41.7 320 33zm33-1c-.5 0-1 .4-1 1c0 .3 .1 .5 .3 .7L478.3 159.7c.2 .2 .4 .3 .7 .3c.5 0 1-.4 1-1V32H353zM0 96C0 60.7 28.7 32 64 32H208c8.8 0 16 7.2 16 16s-7.2 16-16 16H64C46.3 64 32 78.3 32 96V448c0 17.7 14.3 32 32 32H416c17.7 0 32-14.3 32-32V304c0-8.8 7.2-16 16-16s16 7.2 16 16V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96z"/></svg>