Khiops Drivers
This repository contains cloud storage drivers for the Khiops AutoML suite. There are drivers for:
- Microsoft Azure Cloud Storage;
- Google Cloud Storage (also known as GCS);
- Amazon S3 Cloud Storage.
Each driver is implemented as a cross-platform C++ library. Each driver is a layer above the corresponding C++ cloud storage library, exposing the storage access functions as a shared library conforming to the Khiops storage driver interface.
Features
Some functions exposed by the driver libraries mimics functions of C's standard library. Other mimics common shell commands.
| Feature | Azure driver | GCS driver | S3 driver |
|---|---|---|---|
| Read/write access to remote blobs | ✔ | ✔ | ✔ |
| Read/write access to remote files | ✔ | ||
| Log to file or standard streams | ✔ | ✔ | ✔ |
In addition, the Azure driver supports the Azurite storage emulator, which is limited to blob storage.
Repository layout
azure/: Azure driver sources, tests, scripts, and its dedicatedvcpkgcheckoutgcs/: GCS driver sources, tests, scripts, and its dedicatedvcpkgcheckouts3/: S3 driver sources, tests, scripts, and its dedicatedvcpkgcheckoutsrc/: code that is common to all driverstest/: tests that all drivers must pass
Installing the drivers
The Releases page allows you to download the drivers in various package formats for various operating systems.
On this page, you can look for the drivers' section of the Khiops documentation for detailed installation instructions.
If Khiops is installed, the command khiops -s lists the installed drivers.
Using the drivers
To use the drivers you need to authenticate to the cloud storage services you want to access; see the authentication section for instructions.
The drivers can log to files or standard streams. This can be useful if you encounter difficulties using them. See the logging section for instructions.
Authenticating to cloud storage services
This section explains how to authenticate to the cloud storage services supported by the drivers. You will have to authenticate before using Khiops and its drivers, otherwise errors will arise, telling you that you do not have access to the remote data objects.
Authenticating to Microsoft Azure cloud storage services
The table below shows the supported methods of authentication.
| Authentication method | Azurite storage emulator | Azure cloud storage |
|---|---|---|
| Connection string | ✔ | ✔ |
| Environment credentials * | ✔ | |
| Workload identity credentials | ✔ | |
| Managed identity credentials | ✔ | |
| Azure CLI credentials | ✔ |
* Client ID + client secret or certificate environment variables
The documentation of the Azure CLI is here.
Its most basic authentication usage is a simple shell command: az login.
Authenticating to Google Cloud Storage services
In order to access the data stored on a GCS bucket, in most cases a valid authentication is required. The Khiops GCS driver by default uses the standard Application Default Credentials authentication. This means that once you have valid credentials setup in your environment, Khiops will be using these exactly like your Python script or Google provided tools like gcloud or gsutil.
In order to setup your local environment with these credentials (assuming you have installed the gcloud CLI), you will have to do the following:
gcloud init
gcloud auth application-default login
Voilà! You now have access to your data in GCS buckets! The exact same authentication mechanism will allow a containerized Khiops script to run on the Google infrastructure.
Authenticating to Amazon S3 cloud storage services
In order to access the data stored on a S3 bucket, in most cases a valid authentication is required. Generally speaking, the Khiops S3 driver supports the same configuration options as the AWS CLI. More specifically, the Khiops S3 driver supports credentials and configuration options provided either via configuration files or environment variables - please refer to the Amazon documentation for the detailed explanations. This means that once you have valid credentials setup in your environment, Khiops will be using these exactly like your Python script or Amazon provided tools.
A typical file-based configuration is composed by the pair of config and credentials files located in the $HOME/.aws folder.
config
[default]
region=us-east-1
endpoint_url = https://my-server.cloudprovider.com
credentials
[default]
aws_access_key_id = AKIAIOSFODNN7EXAMPLE
aws_secret_access_key = wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Alternatively you can use pass the configuration options and credentials via environment variables:
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE
export AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
export AWS_DEFAULT_REGION=us-east-1
export AWS_ENDPOINT_URL=https://my-server.cloudprovider.com
Voilà! You now have access to your data in S3 buckets!
Logging to files or standard streams
You can log information, warnings, errors and debug traces to a file using the following environment variables (they must both be defined to log anything):
<driver name>_DRIVER_LOGFILE: path to the log file (which does not have to already exist);<driver name>_DRIVER_LOGLEVEL: available values areoff,critical,error,warning,info,debug,trace(they are actually the values of the spdlog logging library). Replace<driver name>with the correct value depending on the driver from which you want the logs:
| Driver | <driver name>_DRIVER_LOGFILE |
<driver name>_DRIVER_LOGLEVEL |
|---|---|---|
| Azure driver | AZURE_DRIVER_LOGFILE | AZURE_DRIVER_LOGLEVEL |
| GCS driver | GCS_DRIVER_LOGFILE | GCS_DRIVER_LOGLEVEL |
| S3 driver | S3_DRIVER_LOGFILE | S3_DRIVER_LOGLEVEL |
You can define <driver name>_DRIVER_LOGFILE to be /dev/stderr or /dev/stdout if you want to log to standard error or standard output, respectively.
For example, if we want the Azure driver to log warnings and more critical information to stderr, we have to set two environment variables before using Khiops:
export AZURE_DRIVER_LOGFILE=/dev/stderr
export AZURE_DRIVER_LOGLEVEL=warning
Advanced usage
This section explains advanced usage such as building, packaging or working on the drivers.
Minimal C++ versions needed to compile each driver:
| Driver | Minimal C++ version |
|---|---|
| Azure driver | C++14 |
| GCS driver | C++14 |
| S3 driver | C++11 |
Testing library: GoogleTest.
CMake is used to generate the build systems for each driver. CMake presets are available, using Ninja as the default generator. Each driver must have its own build system because they have different vcpkg toolchains. The reason for this is that they depend on different versions of vcpkg. Thus, this repository contains three Git submodules, each referencing a different revision of vcpkg.
Building the drivers in debug mode on GNU/Linux enables sanitizers. This may be useful, for example, to detect memory leaks.
Building the drivers
The repository exposes a single top-level CMakeLists.txt and a single top-level CMakePresets.json.
The azure-ninja-*, gcs-ninja-*, and s3-ninja-* presets configure one driver at a time. This keeps the three dedicated vcpkg versions isolated for day-to-day development.
The all-ninja-rel preset enables the unified build and packaging flow for the three drivers.
Available configure presets:
azure-ninja-dbgazure-ninja-relgcs-ninja-dbggcs-ninja-rels3-ninja-dbgs3-ninja-relall-ninja-rel
See the section Working on the drivers for detailed instructions on how to build and test the drivers.
Packaging the drivers
The root CMake project supports three build modes:
- developer builds with a single driver selected via
KHIOPS_DRIVER - pip packaging through
scikit-build-core - unified DEB and RPM packaging through
KHIOPS_PACKAGE_ALL=ON
Working on the drivers
Convenience shell aliases
On GNU/Linux, you can run source ./dev_aliases.sh to load handy aliases into your current shell session.
The file dev_aliases.sh contains aliases to:
- generate the build system with CMake
- build the drivers with CMake
- execute tests with CTest.
It will save you from typing CMake/CTest command-line arguments.
Building and testing the drivers
It is convenient to use the CMake presets defined in the CMakePresets.json file to build and test the drivers. The presets will ease your work a lot by setting:
- the generator (Ninja);
- an output path that will avoid conflicts between drivers;
- the path to the toolchain file of the vcpkg revision that is specific to each driver;
- the path to the directory containing the vcpkg manifest file;
- the driver-specific URL prefix of the URLs used in tests;
- and more...
The all-ninja-rel preset is only intended for packaging purposes so you would normally not use it unless you are working on the packaging of the drivers.
If you are working on the packaging of the drivers, this is the only preset you should use.
This is an example workflow for the Azure driver:
- Generate the build system with tests enabled (so that building will compile the tests too, not just the driver):
cmake --preset azure-ninja-dbg -DBUILD_TESTS=ON
- Build the driver and the (previously enabled) tests, with parallelization enabled:
cmake --build --preset azure-ninja-dbg -j
- Launch the tests, stopping on first failure, using the test blob storage service.
ctest --preset azure-ninja-dbg-blob --stop-on-failure
And now, the same with the help of the aliases:
- Generate the build system with tests enabled (so that building will compile the tests too, not just the driver):
gen-azure-dbg
- Build the driver and the (previously enabled) tests, with parallelization enabled:
build-azure-dbg
- Launch the tests, stopping on first failure, using the test blob storage service.
test-azure-blob-dbg
Using the Azure driver with the Azurite storage emulator
If you wish to run the tests of the Azure driver using the local Azurite storage emulator, which does support blob storage but not file share storage, you will have to define the following environment variables:
AZURE_EMULATED_STORAGE=true
AZURE_STORAGE_CONNECTION_STRING='DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://localhost:10000/devstoreaccount1;'
STORAGE_DRIVER_TEST_URL_PREFIX=http://localhost:10000/devstoreaccount1/data-test-khiops-driver-azure
You may have to adapt the BlobEndpoint part of the AZURE_STORAGE_CONNECTION_STRING environment variable and also the STORAGE_DRIVER_TEST_URL_PREFIX environment variable if you configured Azurite with different values than its default configuration.
Instead of the azure-ninja-dbg-blob and azure-ninja-rel-blob presets (not mentioning the file storage service presets because this kind of storage is not supported by the emulator), you can use azure-ninja-dbg and azure-ninja-rel because you will not need the predefined STORAGE_DRIVER_TEST_URL_PREFIX that points to the real Azure cloud storage.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file khiops_drivers-0.0.31.tar.gz.
File metadata
- Download URL: khiops_drivers-0.0.31.tar.gz
- Upload date:
- Size: 17.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c599b16c0321318cd58ca0a365fe052031a62bc59de3085410f406d086c2c5e2
|
|
| MD5 |
0a117d27d81c9ca6e7e0a4f01c596535
|
|
| BLAKE2b-256 |
bf175ffdf2a9903a061edf97eb8222485aa22f09787ad4b85490f1c3088d9740
|
Provenance
The following attestation bundles were made for khiops_drivers-0.0.31.tar.gz:
Publisher:
packaging.yml on KhiopsML/khiops-drivers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_drivers-0.0.31.tar.gz -
Subject digest:
c599b16c0321318cd58ca0a365fe052031a62bc59de3085410f406d086c2c5e2 - Sigstore transparency entry: 2617481390
- Sigstore integration time:
-
Permalink:
KhiopsML/khiops-drivers@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
packaging.yml@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_drivers-0.0.31-py3-none-win_amd64.whl.
File metadata
- Download URL: khiops_drivers-0.0.31-py3-none-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b150032f1b50cf4c21ee4b31571107192a7b340fb9d2c16462c0e9e488dbb663
|
|
| MD5 |
2333f5465b50d51efea84e6cc69aa461
|
|
| BLAKE2b-256 |
0a980c2bed9c5dceda2ec8b010f6d7101df84119c150f29c5482435aa8f3fbfd
|
Provenance
The following attestation bundles were made for khiops_drivers-0.0.31-py3-none-win_amd64.whl:
Publisher:
packaging.yml on KhiopsML/khiops-drivers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_drivers-0.0.31-py3-none-win_amd64.whl -
Subject digest:
b150032f1b50cf4c21ee4b31571107192a7b340fb9d2c16462c0e9e488dbb663 - Sigstore transparency entry: 2617483032
- Sigstore integration time:
-
Permalink:
KhiopsML/khiops-drivers@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
packaging.yml@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_drivers-0.0.31-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: khiops_drivers-0.0.31-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 16.1 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f30d836c870c4338376c795567181b926a72cc154e967ce95bf69688518ca32
|
|
| MD5 |
5a3c6dff5eec5ad91e71c403343e68c8
|
|
| BLAKE2b-256 |
27b13a0bfd965c482056b130ca8c66329807ea4cd09649fc36a5b7c54ac8b2cd
|
Provenance
The following attestation bundles were made for khiops_drivers-0.0.31-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
packaging.yml on KhiopsML/khiops-drivers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_drivers-0.0.31-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
8f30d836c870c4338376c795567181b926a72cc154e967ce95bf69688518ca32 - Sigstore transparency entry: 2617482840
- Sigstore integration time:
-
Permalink:
KhiopsML/khiops-drivers@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
packaging.yml@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_drivers-0.0.31-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: khiops_drivers-0.0.31-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 16.1 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e1335aba1c6cff5ae1554bd555261b8c2c4d96355992654a4efa61b889706a4
|
|
| MD5 |
75826e05e0b604caff7b82b6fda35b9e
|
|
| BLAKE2b-256 |
8cdc6e67c4e337ace9e62d4720533947aa8650001505645c5dadd3441577b82a
|
Provenance
The following attestation bundles were made for khiops_drivers-0.0.31-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
packaging.yml on KhiopsML/khiops-drivers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_drivers-0.0.31-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
3e1335aba1c6cff5ae1554bd555261b8c2c4d96355992654a4efa61b889706a4 - Sigstore transparency entry: 2617481992
- Sigstore integration time:
-
Permalink:
KhiopsML/khiops-drivers@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
packaging.yml@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_drivers-0.0.31-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: khiops_drivers-0.0.31-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 13.0 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
961e6aedd97b253c1b152dcc535cb9e3524c0eb74a4b0890c72d3fd5b0dcefee
|
|
| MD5 |
de1ad8b69200c2e9eca4481963b083c5
|
|
| BLAKE2b-256 |
7f2516757e5618e07e123c2087070d7e3789481696a704aa3495524bd098aba8
|
Provenance
The following attestation bundles were made for khiops_drivers-0.0.31-py3-none-macosx_11_0_arm64.whl:
Publisher:
packaging.yml on KhiopsML/khiops-drivers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_drivers-0.0.31-py3-none-macosx_11_0_arm64.whl -
Subject digest:
961e6aedd97b253c1b152dcc535cb9e3524c0eb74a4b0890c72d3fd5b0dcefee - Sigstore transparency entry: 2617482307
- Sigstore integration time:
-
Permalink:
KhiopsML/khiops-drivers@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Branch / Tag:
refs/tags/0.0.31 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
packaging.yml@076b5525d3e8460c4527a2210c64b5d9d9d3630d -
Trigger Event:
workflow_dispatch
-
Statement type: