S3 driver for the Khiops tool
Project description
Khiops driver for AWS S3
This repository hosts the source code for the Khiops filesystem driver enabling transparent manipulation for data stored in AWS S3 buckets.
Quickstart
If you just want to start using Khiops with your data located on S3, simply install the driver package next to Khiops. If you installed Khiops the standard way, the driver package can be installed via conda like so:
conda install -c conda-forge khiops-driver-s3
Or, if you have used your system package manager, you will have to install the driver by the same method. For debian/ubuntu, you will do this:
CODENAME=$(lsb_release -cs) && \
TEMP_DEB="$(mktemp)" && \
wget -O "$TEMP_DEB" "https://github.com/KhiopsML/khiopsdriver-s3/releases/download/0.0.14/khiops-driver-s3_0.0.14-1-${CODENAME}.amd64.deb" && \
sudo dpkg -i "$TEMP_DEB && \
rm -f $TEMP_DEB
or if using Rocky linux, do this:
sudo yum update -y && sudo yum install wget -y && \
CENTOS_VERSION=$(rpm -E %{rhel}) && \
TEMP_RPM="$(mktemp).rpm" && \
wget -O "$TEMP_RPM" "https://github.com/KhiopsML/khiopsdriver-s3/releases/download/0.0.14/khiops-driver-s3_0.0.14-1.el${CENTOS_VERSION}.x86_64.rpm" && \
sudo yum install "$TEMP_RPM" -y && \
rm -f $TEMP_RPM
You can check that the driver is installed propery by running
khiops -s
You should see an output similar to this:
Khiops 10.3.2
Drivers:
'S3 driver' for URI scheme 's3'
Environment variables:
None
Internal environment variables:
None
which indicates that the driver was loaded properly and will be used for datafiles following the s3:// pattern.
Authentication
In order to access the data stored on a S3 bucket, in most cases a valid authentication in required. Generally speaking, the Khiops S3 driver supports the same configuration options as the AWS CLI. More specifically, the Khiops S3 driver supports accepts 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
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):
S3_DRIVER_LOGLEVEL: available values areoff,critical,error,warning,info,debug,trace(they are actually the values of the spdlog logging library)S3_DRIVER_LOGFILE: path to the log file (which does not need to already exist).
Tip: you can define
S3_DRIVER_LOGFILEto be/dev/stderror/dev/stdoutif you want to log to standard error or standard output, respectively.
Example usage
Khiops usage (low level)
khiops -b -i s3://mydatabucket/khiops_samples/scenario.kh
Python sample
# Imports
import os
from khiops import core as kh
# Set the file paths
dictionary_file_path = "s3://mydatabucket/khiops_samples/Adult/Adult.kdic"
data_table_path = "s3://mydatabucket/khiops_samples/Adult/Adult.txt"
results_dir = "khiops_output"
# Train the predictor
kh.train_predictor(
dictionary_file_path,
"Adult",
data_table_path,
"class",
results_dir,
max_trees=0,
)
Project details
Release history Release notifications | RSS feed
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_driver_s3-0.0.25.tar.gz.
File metadata
- Download URL: khiops_driver_s3-0.0.25.tar.gz
- Upload date:
- Size: 4.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfe345ae0ff53fcd1783f130470dad8ef9d9855dbc4f2781d495d5ceb0795524
|
|
| MD5 |
a51db3d2abd1bd69a8b8c38ac0eb999b
|
|
| BLAKE2b-256 |
5b91213942b0c570dc30908730b06d9fe655f66ab9982e38e292b8c0d2b4d22f
|
Provenance
The following attestation bundles were made for khiops_driver_s3-0.0.25.tar.gz:
Publisher:
pack-pip.yml on KhiopsML/khiopsdriver-s3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_driver_s3-0.0.25.tar.gz -
Subject digest:
cfe345ae0ff53fcd1783f130470dad8ef9d9855dbc4f2781d495d5ceb0795524 - Sigstore transparency entry: 2058752902
- Sigstore integration time:
-
Permalink:
KhiopsML/khiopsdriver-s3@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yml@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_driver_s3-0.0.25-py3-none-win_amd64.whl.
File metadata
- Download URL: khiops_driver_s3-0.0.25-py3-none-win_amd64.whl
- Upload date:
- Size: 2.4 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9c7a5e36fe744df88e90599e3d5bed776c62215e30ed87195902edf0711c997
|
|
| MD5 |
2e0eb721644b41380db0cdc0033fbddf
|
|
| BLAKE2b-256 |
1cdffbf7a07d848cc07276c771be2805830a0c132394656128b0e1cd01d7d846
|
Provenance
The following attestation bundles were made for khiops_driver_s3-0.0.25-py3-none-win_amd64.whl:
Publisher:
pack-pip.yml on KhiopsML/khiopsdriver-s3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_driver_s3-0.0.25-py3-none-win_amd64.whl -
Subject digest:
b9c7a5e36fe744df88e90599e3d5bed776c62215e30ed87195902edf0711c997 - Sigstore transparency entry: 2058753165
- Sigstore integration time:
-
Permalink:
KhiopsML/khiopsdriver-s3@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yml@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.5 MB
- Tags: Python 3, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b772a93b176f051c915656e6d92e1a13510ca496585d9d8875be854d12920a1
|
|
| MD5 |
de85c2e597f5346f101540a3faa8df36
|
|
| BLAKE2b-256 |
728f5c683aa36bc173557b34c3a780958562837c62cdd544187aa0d6a0b1d448
|
Provenance
The following attestation bundles were made for khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_x86_64.whl:
Publisher:
pack-pip.yml on KhiopsML/khiopsdriver-s3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_x86_64.whl -
Subject digest:
6b772a93b176f051c915656e6d92e1a13510ca496585d9d8875be854d12920a1 - Sigstore transparency entry: 2058754932
- Sigstore integration time:
-
Permalink:
KhiopsML/khiopsdriver-s3@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yml@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 5.5 MB
- Tags: Python 3, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b34f74443ac71463b49978617d3ed982d038f30192418d1f60298cae2128fca7
|
|
| MD5 |
15babef484df88f953d8f0187dc20cec
|
|
| BLAKE2b-256 |
ed804e94bf0e4b2011b9171587b5753b3ad4eea3c001bcaeb48263bfb6cb1e79
|
Provenance
The following attestation bundles were made for khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_aarch64.whl:
Publisher:
pack-pip.yml on KhiopsML/khiopsdriver-s3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_driver_s3-0.0.25-py3-none-manylinux_2_28_aarch64.whl -
Subject digest:
b34f74443ac71463b49978617d3ed982d038f30192418d1f60298cae2128fca7 - Sigstore transparency entry: 2058754133
- Sigstore integration time:
-
Permalink:
KhiopsML/khiopsdriver-s3@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yml@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file khiops_driver_s3-0.0.25-py3-none-macosx_11_0_arm64.whl.
File metadata
- Download URL: khiops_driver_s3-0.0.25-py3-none-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.5 MB
- Tags: Python 3, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c8b95cdfb8bda7fa10f92e529ec28f0365d9e2b2b2c6cef8ea9e46e090c5df6
|
|
| MD5 |
04fec6f6af9660c29232cf4177a9b193
|
|
| BLAKE2b-256 |
c655e7e79eca00e0ff7f018f33905e7b7b898767e3d836162c9b4bd9effbb5a8
|
Provenance
The following attestation bundles were made for khiops_driver_s3-0.0.25-py3-none-macosx_11_0_arm64.whl:
Publisher:
pack-pip.yml on KhiopsML/khiopsdriver-s3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
khiops_driver_s3-0.0.25-py3-none-macosx_11_0_arm64.whl -
Subject digest:
6c8b95cdfb8bda7fa10f92e529ec28f0365d9e2b2b2c6cef8ea9e46e090c5df6 - Sigstore transparency entry: 2058754015
- Sigstore integration time:
-
Permalink:
KhiopsML/khiopsdriver-s3@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Branch / Tag:
refs/tags/0.0.25 - Owner: https://github.com/KhiopsML
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pack-pip.yml@0c8c8b08bbdebc36bb5872b0593393b52e672278 -
Trigger Event:
workflow_dispatch
-
Statement type: