Connect

Most of the advanced features are enabled/disabled via px.connect() parameters. Example usage is shown below.

  • It is up to the user to enable the features they need.
  • Most of these features are independent of each other and can be used together or separately.
  • It is recommended to call px.connect() at the beginning of your session to start using the advanced features.

Simple Config

Following is the simple config with experiment path, logging path and cache path. See, corresponding pages for more details.

import proxai as px
 
px.connect(
    experiment_path='translation/en-to-fr/experiment_1',
    logging_path='~/proxai-logs',
    cache_path='~/proxai-cache')

More Customized Config

Following example shows the more customized possible config. Each option has its own page with more details.

import proxai as px
 
px.connect(
    experiment_path='translation/en-to-fr/experiment_1',
    logging_options=px.LoggingOptions(
        logging_path='~/proxai-logs',
        stdout=True,
        hide_sensitive_content=True),
    cache_options=px.CacheOptions(
        cache_path='~/proxai-cache',
        unique_response_limit=3
        retry_if_error_cached=True,
        clear_query_cache_on_connect=True,
        clear_model_cache_on_connect=True,
        model_cache_duration=1200),
    proxdash_options=px.ProxDashOptions(
        stdout=True,
        hide_sensitive_content=True,
        api_key='your-proxdash-api-key'),
    strict_feature_test=True,
    model_test_timeout=60,
    allow_multiprocessing=False,
    suppress_provider_errors=True)

Parameters

px.connect() parameters:

OptionTypeDefault ValueDescription
experiment_pathstrNonePath of the experiment for current session.
See, Experiment Path page.
logging_pathstrNoneRoot path for the logging system in local machine.
See, Logs Management page.
logging_optionspx.types.LoggingOptionsNoneLogging options for current session.
See, Logs Management page.
cache_pathstrNoneRoot path for the cache system in local machine.
See, Cache System page.
cache_optionspx.types.CacheOptionsNoneCache options for current session.
See, Cache System page.
proxdash_optionspx.types.ProxdashOptionsNoneProxdash options for current session.
See, Proxdash page.
strict_feature_testboolFalseEnable strict feature test for current session.
See, Strict Feature Test page.
model_test_timeoutint25Timeout for the model test in seconds. If the model test takes longer than this, it will be killed and marked as failed model. See, Model Test Timeout page
allow_multiprocessingboolFalseEnable multiprocessing for current session.
See, Multiprocessing page.
suppress_provider_errorsboolFalseIf True, provider errors are suppressed.
See, Suppress Provider Errors page.