Skip to main content

itwinai

GitHub Super-Linter GitHub Super-Linter SQAaaS source code

See the latest version of our docs for a quick overview of this platform for advanced AI/ML workflows in digital twin applications.

Installation

Requirements:

  • Linux environment. Windows and macOS were never tested.

Python virtual environment

Depending on your environment, there are different ways to select a specific python version.

Laptop or GPU node

If you are working on a laptop or on a simple on-prem setup, you could consider using pyenv. See the installation instructions. If you are using pyenv, make sure to read this.

Install itwinai environment

Regardless of how you loaded your environment, you can create the python virtual environments with the following commands. Once the correct Python version is loaded, create the virtual environments using our pre-make Makefile:

make torch-env # or make torch-env-cpu
make tensorflow-env # or make tensorflow-env-cpu

# Juelich supercomputer
make torch-gpu-jsc
make tf-gpu-jsc

Environment setup

Requirements:

  • Linux environment. Windows and macOS were never tested.
  • VS Code, for development.

TensorFlow

Installation:

# Install TensorFlow 2.13
make tensorflow-env

# Activate env
source .venv-tf/bin/activate

A CPU-only version is available at the target tensorflow-env-cpu.

PyTorch (+ Lightning)

Installation:

# Install PyTorch + lightning
make torch-env

# Activate env
source .venv-pytorch/bin/activate

A CPU-only version is available at the target torch-env-cpu.

Development environment

This is for developers only. To have it, update the installed itwinai package adding the dev extra:

pip install -e .[dev]

Test with pytest

Do this only if you are a developer wanting to test your code with pytest.

First, you need to create virtual environments both for torch and tensorflow. For instance, you can use:

make torch-env-cpu
make tensorflow-env-cpu

To select the name of the torch and tf environments you can set the following environment variables, which allow to run the tests in environments with custom names which are different from .venv-pytorch and .venv-tf.

export TORCH_ENV="my_torch_env"
export TF_ENV="my_tf_env"

Functional tests (marked with pytest.mark.functional) will be executed under /tmp/pytest location to guarantee they are run in a clean environment.

To run functional tests use:

pytest -v tests/ -m "functional"

To run all tests on itwinai package:

make test

Run tests in JSC virtual environments:

make test-jsc

Micromamba installation (deprecated)

To manage Conda environments we use micromamba, a light weight version of conda.

It is suggested to refer to the Manual installation guide.

Consider that Micromamba can eat a lot of space when building environments because packages are cached on the local filesystem after being downloaded. To clear cache you can use micromamba clean -a. Micromamba data are kept under the $HOME location. However, in some systems, $HOME has a limited storage space and it would be cleverer to install Micromamba in another location with more storage space. Thus by changing the $MAMBA_ROOT_PREFIX variable. See a complete installation example for Linux below, where the default $MAMBA_ROOT_PREFIX is overridden:

cd $HOME

# Download micromamba (This command is for Linux Intel (x86_64) systems. Find the right one for your system!)
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba

# Install micromamba in a custom directory
MAMBA_ROOT_PREFIX='my-mamba-root'
./bin/micromamba shell init $MAMBA_ROOT_PREFIX

# To invoke micromamba from Makefile, you need to add explicitly to $PATH
echo 'PATH="$(dirname $MAMBA_EXE):$PATH"' >> ~/.bashrc

Reference: Micromamba installation guide.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itwinai-0.0.1.tar.gz (338.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

itwinai-0.0.1-py3-none-any.whl (48.6 kB view details)

Uploaded Python 3

File details

Details for the file itwinai-0.0.1.tar.gz.

File metadata

  • Download URL: itwinai-0.0.1.tar.gz
  • Upload date:
  • Size: 338.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for itwinai-0.0.1.tar.gz
Algorithm Hash digest
SHA256 aaec53a894d77673e3f0ba431f7f9340d95d10f07e1849512fbc86bdb4cdfbf8
MD5 1e64daecdac4b20047607b99251544a5
BLAKE2b-256 fc0961a1d55a5e3138c65c45f2d992d04038ae2eea358a5f769b277f519bb4a8

See more details on using hashes here.

File details

Details for the file itwinai-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: itwinai-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 48.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for itwinai-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe5ca4d7b738afc3befad274e0d8b0e47e327d32a7dcdaa2fdbb1cf09e8fccb
MD5 11be37e6669da5774a5019aff4aa6993
BLAKE2b-256 5b9262a33514b34bff334c88bbad32a16cfebea1e42ad8983a6209b29f9c82f5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.0.2

2 files

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page