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:
Option | Type | Default Value | Description |
---|---|---|---|
experiment_path | str | None | Path of the experiment for current session. See, Experiment Path page. |
logging_path | str | None | Root path for the logging system in local machine. See, Logs Management page. |
logging_options | px.types.LoggingOptions | None | Logging options for current session. See, Logs Management page. |
cache_path | str | None | Root path for the cache system in local machine. See, Cache System page. |
cache_options | px.types.CacheOptions | None | Cache options for current session. See, Cache System page. |
proxdash_options | px.types.ProxdashOptions | None | Proxdash options for current session. See, Proxdash page. |
strict_feature_test | bool | False | Enable strict feature test for current session. See, Strict Feature Test page. |
model_test_timeout | int | 25 | Timeout 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_multiprocessing | bool | False | Enable multiprocessing for current session. See, Multiprocessing page. |
suppress_provider_errors | bool | False | If True , provider errors are suppressed. See, Suppress Provider Errors page. |