ml-auto-build-segments
Introduction
This Python Library allows you to automatically add attributes to Parent Segment in Treasure Data and Auto-build Folders and Segments in Audience Studio.
Inputs
config/auto_build.yml: This is the.yamlconfig file that defines the params for the Python functions that add new tables to Parent Segment via API, and use the column_name wheremain_attr: yesparam flags which attribute will be used for the segment creation rules. Exampleconfig/auto_build.ymlfile with notes on each param below:
#####################################################################
########################## GLOBAL PARAMS ############################
#####################################################################
sink_database: ml_db #database where all model output tables will be saved
unique_user_id: td_canonical_id #the main join key that will be used to join behaviors tables to customers table
api_endpoint: 'https://api.treasuredata.com'
ps_name: 'ENTER PS NAME' #name of Parent Segment where ML Folders & Audiences will be built
v5_flag: 1 #indicate if you want to build Segments in V5 or V4
folder_depth: 10 #determines how deeply into nested folders in Audience Studio the code will scan to find the Segments you want
ps_stats_table: 'ps_stats' #stores list of all PS, Folders, and Segments in given
######### Params for new attributes to add to PS #####
src_table: #params for ML Model output table to be added to PS and used for Audience Creation
name: next_best_product_final
join_key: td_canonical_id
cols: #list of columns from src_table to be added to PS as attributes
- name: nbp_helmets
type: number
build_segments: yes #if = 'yes', this column is used as the attribute value for building auto segments
- name: next_best_product
type: string
build_segments: yes #if = 'yes', this column is used as the attribute value for building auto segments
########## Auto Build Segment Params ############
rerun_ps: yes #if = 'yes', ps will be re-run after the ML model table is added to PS
ml_folder: '[ML] Base Audiences' #name of Base Folder where all ML Model Audiences will be created
sub_folder: 'Auto-Segmentation' #name of Sub-Folder where specific Audiences to current WF ML Model will be added
attr_group: 'ML Models' #name of Attribute Group where attributes added to Parent Segment will be grouped in Audience Studio
Copyright © 2022 Treasure Data, Inc. (or its affiliates). All rights reserved
Metadata
Release files for td-ml-auto-build-segments 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| td_ml_auto_build_segments-0.1.2.tar.gz | 5.2 kB | Without provenance | Details for td_ml_auto_build_segments-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| td_ml_auto_build_segments-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for td_ml_auto_build_segments-0.1.2-py3-none-any.whl |
Total release size: 10.9 kB
Release files / td_ml_auto_build_segments-0.1.2.tar.gz
| Download URL | td_ml_auto_build_segments-0.1.2.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
28ff8e72c74c5257bfb8c2fd29b171636c9c5d958a7d5fdcc094534f59654477
|
|
BLAKE2b-256 checksum How to use checksums |
fc3cbf81f97c1e083fccb439991f6f87e86a926be78724b0b3c0431d49046cb5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Release files / td_ml_auto_build_segments-0.1.2-py3-none-any.whl
| Download URL | td_ml_auto_build_segments-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77c26a585def0f6d19effa4a789e6a02729a1207d62782478834e2e49f674604
|
|
BLAKE2b-256 checksum How to use checksums |
9fb6dafa14ae117bc44b66aa400337fd0b3a75ef1c2b90360533549083f1f5b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.12
|
Security for td-ml-auto-build-segments 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.