Coding environments
Introduction
Coding environments are self-contained language environments with packages and versions. In Altair AI Cloud, you can create code environments for Python. You can use them in notebooks, workspaces, and Execute Python operators in the workflow designer.
Each coding environment has its own set of packages. You can create different coding environments with different package versions and different Python versions.
To get started, Altair AI Cloud provides a default coding environment called rm-base. The rm-base package defines a set of the most useful packages for the platform.
- rmpy, an Altair AI-specific library for notebooks and workspaces,
- Pandas, a dependency of rmpy,
- PyArrow,
- scikit-learn, and
- HDF5, to support Altair AI Cloud's native data file format.
You are free to use an alternative coding environment, but note the following restriction: the Execute Python operator requires Pandas and PyArrow in its coding environment.
- Only coding environments that include PyArrow will appear in the Coding Environment dropdown list.
- With the exception of the fil port, all of the inputs and outputs of Execute Python convert Altair AI Cloud data tables to Pandas DataFrames, or vice-versa.
If you have multiple Execute Python operators in your workflow, each of them can have its own coding environment. Similarly, each notebook or workspace can have its own coding environment.
- If you create a new coding environment for notebooks, it is recommended that you include rmpy, both because Pandas is a dependency, and because rmpy gives you access to the catalog.
Coding environments tab
The project's coding environment tab lists both global and local environments. The global coding environments are are displayed with a globe icon.
The table displays details of the environment.
- Status: Shows the status of the environment. If it is not healthy, it shows the warning icon.
- Name: The name of the coding environment.
- Version: The current active version of the environment.
- Language: Displays the environment language. Only Python is supported as the language.
- Description: Describes the purpose of the environment.
- Created by: The user who created the environment.
- Created at: Shows the environment version’s creation time.
- Actions: List the actions on the environment. The available actions are Clone, Update, Archive, and Set as default.
Additional details, such as Environment Definition, Console Output, and Versions of the environment, can be viewed by clicking on the project name.
Default coding environment
By default, rm-base is the default coding environment for all the projects in Altair AI Cloud. rm-base can be used as a template to create new environments. But even individual projects can have a default environment: this local environment is selected when starting notebooks or workspaces.
To set an environment as the default for a project, go to the Actions menu of the Coding Environments tab and click Set as default. More actions are discussed in the next section.
Create your own coding environment
Altair AI Cloud provides capabilities to define local project-specific and global tenant-wide coding environments. The local project-specific environments can only be used within the project scope, whereas global tenant-wide coding environments are accessible within all projects.
To create a global coding environment, you must have the admin role.
Go to the desired project to create a new local project-specific coding environment.
-
Click on New > Coding Environments
-
Add the Name and Description of the coding environment.
-
In the Definition field, insert your coding environment using the same format as Conda's environment.yml. It's possible to include pip packages within this same framework.
-
Click Add
Once the environment is created, it will be listed under the project's Coding Environments tab.
Actions
Coding environments can be cloned, updated, and archived. These actions can be performed from the Coding Environments tab or the Details tab for a specific project.
Update
To update the environment, click on the Update button. You can then add packages, update versions or remove packages from the environment. A new version of the environment is stored with the update.
Each update of the coding environment is stored with a new version number.
Clone
Coding environments can be cloned within the project. To clone, select Clone from the Actions menu of the Coding Environments tab or from the Details tab for the individual project.
The cloned environment gets added to the project’s coding environment list.
Archive
Coding environments can be archived if they are no longer needed. Like other actions, the Archive action is available from the Actions menu of the Coding Environments tab and from the Details tab of the individual project. Altair AI Cloud asks for confirmation before archiving the coding environment.
Global coding environments
To create a global coding environment, you must have the admin role.
To see the global coding environments, examine the left-side menu and select Controls > Coding Environments. This page lists all the coding environments for all the projects with a global project scope.
rm-base: the default coding environment
On Altair AI Cloud, the default Python coding environment is called rm-base. A quick description was given at the top of the page; here we provide additional details.
Original environment definition
From the gear menu, select Controls > Coding Environments.
The list of available coding environments appears, and no matter how many user-defined coding environments there are, you will always find that rm-base is included.
Click on rm-base and select Environment Definition to see the Original Environment Definition:
name: rm-base
channels:
- conda-forge
dependencies:
- python==3.11.7
- scikit-learn
- gcc
- pkg-config
- hdf5
- pip
- pyarrow==12.0.1
- pip:
- rmpy==1.0.0
Note that Pandas is included via the dependency on pip and rmpy.
Exported environment definition
The Exported Environment Definition shows the Original Environment Definition plus all of its dependencies. If you're wondering whether a package you need is included, check this list.
name: rm-base
channels:
- conda-forge
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- aws-c-auth=0.7.17=he0b1f16_2
- aws-c-cal=0.6.11=heb1d5e4_0
- aws-c-common=0.9.15=hd590300_0
- aws-c-compression=0.2.18=hce8ee76_3
- aws-c-event-stream=0.4.2=h01f5eca_8
- aws-c-http=0.8.1=hdb68c23_10
- aws-c-io=0.14.7=h76a7424_3
- aws-c-mqtt=0.10.3=h50844eb_4
- aws-c-s3=0.5.7=hb7bd14b_1
- aws-c-sdkutils=0.1.15=hce8ee76_3
- aws-checksums=0.1.18=hce8ee76_3
- aws-crt-cpp=0.26.6=hf567797_4
- aws-sdk-cpp=1.11.267=hbf3e495_6
- binutils_impl_linux-64=2.40=hf600244_0
- bzip2=1.0.8=hd590300_5
- c-ares=1.28.1=hd590300_0
- ca-certificates=2024.2.2=hbcca054_0
- gcc=13.2.0=hd6cf55c_3
- gcc_impl_linux-64=13.2.0=h338b0a0_5
- gflags=2.2.2=he1b5a44_1004
- glog=0.7.0=hed5481d_0
- hdf5=1.14.3=nompi_h4f84152_100
- joblib=1.4.0=pyhd8ed1ab_0
- kernel-headers_linux-64=2.6.32=he073ed8_17
- keyutils=1.6.1=h166bdaf_0
- krb5=1.21.2=h659d440_0
- ld_impl_linux-64=2.40=h41732ed_0
- libabseil=20240116.1=cxx17_h59595ed_2
- libaec=1.1.3=h59595ed_0
- libarrow=12.0.1=hf406b5e_46_cpu
- libblas=3.9.0=22_linux64_openblas
- libbrotlicommon=1.1.0=hd590300_1
- libbrotlidec=1.1.0=hd590300_1
- libbrotlienc=1.1.0=hd590300_1
- libcblas=3.9.0=22_linux64_openblas
- libcrc32c=1.1.2=h9c3ff4c_0
- libcurl=8.7.1=hca28451_0
- libedit=3.1.20191231=he28a2e2_2
- libev=4.33=hd590300_2
- libevent=2.1.12=hf998b51_1
- libexpat=2.6.2=h59595ed_0
- libffi=3.4.2=h7f98852_5
- libgcc-devel_linux-64=13.2.0=ha9c7c90_105
- libgcc-ng=13.2.0=h807b86a_5
- libgfortran-ng=13.2.0=h69a702a_5
- libgfortran5=13.2.0=ha4646dd_5
- libgomp=13.2.0=h807b86a_5
- libgoogle-cloud=2.22.0=h9be4e54_1
- libgoogle-cloud-storage=2.22.0=hc7a4891_1
- libgrpc=1.62.1=h15f2491_0
- liblapack=3.9.0=22_linux64_openblas
- libnghttp2=1.58.0=h47da74e_1
- libnl=3.9.0=hd590300_0
- libnsl=2.0.1=hd590300_0
- libopenblas=0.3.27=pthreads_h413a1c8_0
- libprotobuf=4.25.3=h08a7969_0
- libre2-11=2023.09.01=h5a48ba9_2
- libsanitizer=13.2.0=h7e041cc_5
- libsqlite=3.45.2=h2797004_0
- libssh2=1.11.0=h0841786_0
- libstdcxx-ng=13.2.0=h7e041cc_5
- libthrift=0.19.0=hb90f79a_1
- libutf8proc=2.8.0=h166bdaf_0
- libuuid=2.38.1=h0b41bf4_0
- libxcrypt=4.4.36=hd590300_1
- libzlib=1.2.13=hd590300_5
- lz4-c=1.9.4=hcb278e6_0
- ncurses=6.4.20240210=h59595ed_0
- numpy=1.26.4=py311h64a7726_0
- openssl=3.2.1=hd590300_1
- orc=2.0.0=h17fec99_1
- pip=24.0=pyhd8ed1ab_0
- pkg-config=0.29.2=h36c2ea0_1008
- pyarrow=12.0.1=py311h78dcc79_46_cpu
- python=3.11.7=hab00c5b_1_cpython
- python_abi=3.11=4_cp311
- rdma-core=51.0=hd3aeb46_0
- re2=2023.09.01=h7f4b329_2
- readline=8.2=h8228510_1
- s2n=1.4.9=h06160fa_0
- scikit-learn=1.4.1.post1=py311hc009520_0
- scipy=1.13.0=py311h64a7726_0
- setuptools=69.2.0=pyhd8ed1ab_0
- snappy=1.2.0=hdb0a2a9_1
- sysroot_linux-64=2.12=he073ed8_17
- threadpoolctl=3.4.0=pyhc1e730c_0
- tk=8.6.13=noxft_h4845f30_101
- ucx=1.15.0=ha691c75_8
- wheel=0.43.0=pyhd8ed1ab_1
- xz=5.2.6=h166bdaf_0
- zstd=1.5.5=hfc55251_0
- pip:
- asttokens==2.4.1
- blinker==1.7.0
- certifi==2024.2.2
- cffi==1.16.0
- charset-normalizer==3.3.2
- click==8.1.7
- comm==0.2.2
- cryptography==42.0.5
- debugpy==1.8.1
- decorator==5.1.1
- executing==2.0.1
- flask==3.0.3
- gevent==24.2.1
- greenlet==3.0.3
- h5py==3.9.0
- idna==3.7
- ipykernel==6.29.4
- ipython==8.23.0
- itsdangerous==2.1.2
- jedi==0.19.1
- jinja2==3.1.3
- jupyter-client==8.6.1
- jupyter-core==5.7.2
- markupsafe==2.1.5
- matplotlib-inline==0.1.6
- nest-asyncio==1.6.0
- packaging==24.0
- pandas==2.2.2
- parso==0.8.4
- pexpect==4.9.0
- platformdirs==4.2.0
- prompt-toolkit==3.0.43
- psutil==5.9.8
- ptyprocess==0.7.0
- pure-eval==0.2.2
- pycparser==2.22
- pygments==2.17.2
- pyjwt==2.8.0
- python-dateutil==2.9.0.post0
- pytz==2024.1
- pyzmq==25.1.2
- requests==2.31.0
- rmpy==1.0.0
- six==1.16.0
- stack-data==0.6.3
- tornado==6.4
- traitlets==5.14.2
- typing-extensions==4.11.0
- tzdata==2024.1
- urllib3==2.2.1
- wcwidth==0.2.13
- werkzeug==3.0.2
- zope-event==5.0
- zope-interface==6.2