byom_install_location | Teradata Package for Python - byom_install_location - Teradata Package for Python

Teradata® Package for Python User Guide

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Teradata Package for Python
Release Number
20.00
Publication Date
March 2025
Content Type
User Guide
Publication ID
B700-4006-200K
ft:locale
en-US
ft:lastEdition
2026-08-13
dita:mapPath
nvi1706202040305.ditamap
dita:ditavalPath
plt1683835213376.ditaval
ft:sourceId
dita
dita:id
rkb1531260709148
Product Category
Teradata Vantage

The byom_install_location configuration option indicates the name of the database where Bring Your Own Model functions are installed. This option is internally used by BYOM functions like H2OPredict() and PMMLPredict().

Example

  • Import all modules.
    >>> from teradataml import *
  • Set the configuration option byom_install_location to "mldb".
    >>> # Set the teradataml Configuration option 'byom_install_location' to "mldb"
    >>> configure.byom_install_location = "mldb"
  • Load example data.
    >>> load_example_data("byom", "iris_test")
  • Load model files.
    >>> # Load model file into Vantage.
    >>> model_file = os.path.join(os.path.dirname(teradataml.__file__), "data", "models", "iris_mojo_glm_h2o_model")
  • Save the model.
    >>> save_byom("iris_mojo_glm_h2o_model", model_file, "byom_models")
  • Retrieve the saved model and directly pass the output as an input to the H2OPredict function.
    >>> modeldata = retrieve_byom("iris_mojo_glm_h2o_model", table_name="byom_models")
    >>> result = H2OPredict(newdata=iris_test,
                            newdata_partition_column='id',
                            newdata_order_column='id',
                            modeldata=modeldata,
                            modeldata_order_column='model_id',
                            model_output_fields=['label', 'classProbabilities'],
                            accumulate=['id', 'sepal_length', 'petal_length'],
                            overwrite_cached_models='*',
                            enable_options='stageProbabilities',
                            model_type='OpenSource'
                           )
  • Print the results of the H2OPredict function.
    >>> # Print the results.
    >>> print(result.result)