TypedValue

Arize class used for logging typed feature or tag values.

Usage

When creating a dictionary of features or tags passed into log(), TypedValue can be used in place of dictionary values.

# Example features; features & tags can be optionally defined with typing
features = {
    'state': 'ca',
    'city': 'berkeley',
    'merchant_name': 'Peets Coffee',
    'pos_approved': TypedValue(value=False, type=ArizeTypes.INT),
    'item_count': 10,
    'merchant_type': 'coffee shop',
    'charge_amount': TypedValue(value=20.11, type=ArizeTypes.FLOAT),
}
    
# example tags
tags = {
    'age': 30,
    'zip_code': '94610',
    'device_os': 'iOS',
    'server_node_id': TypedValue(value=12, type=ArizeTypes.INT),
}

Fields

ArizeTypes Enum

Last updated

Copyright © 2023 Arize AI, Inc