CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-xorbits

Scalable Python data science, in an API compatible & lightning fast way.

Overview
Eval results
Files

configuration.mddocs/

Configuration

Configuration management through the options system, providing control over execution behavior and runtime settings. The configuration system is inherited from Mars and provides similar functionality to pandas configuration.

Capabilities

Options Object

Global configuration object that holds various Xorbits settings.

options: object
    """
    Global configuration options object.
    
    Provides access to various Xorbits configuration settings including:
    - Execution behavior settings
    - Display options
    - Performance tuning parameters
    - Runtime configuration
    """

Option Context Manager

Context manager for temporarily changing configuration options. Changes are automatically reverted when exiting the context.

def option_context(*args, **kwargs):
    """
    Context manager for temporarily changing configuration options.
    
    Parameters:
    - *args: Option names and values as alternating arguments
    - **kwargs: Option names and values as keyword arguments
    
    Returns:
    - Context manager that temporarily modifies options
    """

Usage Examples:

import xorbits

# Using with keyword arguments
with xorbits.option_context(display_max_rows=100):
    # Within this context, display_max_rows is set to 100
    # Perform operations that use this setting
    pass
# Outside the context, display_max_rows reverts to previous value

# Using with positional arguments
with xorbits.option_context('display.max_rows', 50, 'display.max_columns', 20):
    # Both display.max_rows and display.max_columns are temporarily changed
    pass

Configuration Access Patterns

While the specific configuration options are inherited from Mars, common patterns for accessing and modifying options include:

# Access current option value
current_value = xorbits.options.some_option

# Temporarily change options using context manager
with xorbits.option_context(some_option=new_value):
    # Code using the temporary setting
    pass

# The options system typically includes settings for:
# - Display formatting and limits
# - Execution and performance tuning
# - Memory management
# - Distributed computing behavior

Integration with Pandas Configuration

Xorbits pandas module also provides its own configuration system that mirrors pandas configuration:

import xorbits.pandas as pd

# Access pandas-style configuration
pd.get_option('display.max_rows')
pd.set_option('display.max_rows', 100)

with pd.option_context('display.max_rows', 50):
    # Temporarily change pandas display options
    pass

Install with Tessl CLI

npx tessl i tessl/pypi-xorbits

docs

configuration.md

datasets.md

index.md

machine-learning.md

numpy-integration.md

pandas-integration.md

remote-computing.md

runtime-management.md

tile.json