LeapAnalysisConfiguration

code_loader.contract.responsedataclasses.LeapAnalysisConfiguration

LeapAnalysisConfiguration controls optional engine behaviors for a Tensorleap analysis run. It is set on the leap_binder object in your integration script, outside of any decorated function.

@dataclass
class LeapAnalysisConfiguration:
    domain_gap_metadata: Optional[List[str]] = None
    feature_flags: Optional[List[str]] = None
    deterministic_results: Optional[bool] = None
Field

domain_gap_metadata

(Optional[List[str]]) Names of metadata fields to use for domain gap analysis. Each name must match a registered @tensorleap_metadata field.

feature_flags

(Optional[List[str]]) List of engine feature flags to enable. See Feature Flags below.

deterministic_results

(Optional[bool]) When True, analysis results are fully deterministic across runs. This increases memory usage and runtime.

Basic Usage

from code_loader import leap_binder
from code_loader.contract.responsedataclasses import LeapAnalysisConfiguration

leap_binder.leap_analysis_configuration = LeapAnalysisConfiguration(
    deterministic_results=True,
    feature_flags=['FEATURE_FLAG_MISLABELED_ON_ALL_CATEGORICAL_METADATA'],
)

Feature Flags

Feature flags are passed as strings in the feature_flags list. The following flags are supported:

Flag

FEATURE_FLAG_MISLABELED_ON_ALL_CATEGORICAL_METADATA

Run mislabeled sample detection across all categorical metadata fields, not just the primary label.

FEATURE_FLAG_USE_PCA_IN_PRUNNING

Use a PCA-unified latent space when computing dataset pruning (similarity-based deduplication).

FEATURE_FLAG_TRAINING_RELEVANCE_SCORES

Compute relevance scores using the training set.

FEATURE_FLAG_TRAINING_DENSITY_WEIGHTS

Compute density weights using the training set.

FEATURE_FLAG_COMPUTE_PREDICTED_LOSS

Compute predicted loss scores per sample.

circle-info

All feature flags are disabled by default unless listed here.

Last updated

Was this helpful?