data_juicer.ops.mapper.python_lambda_mapper module¶
- class data_juicer.ops.mapper.python_lambda_mapper.PythonLambdaMapper(lambda_str: str = '', batched: bool = False, **kwargs)[源代码]¶
基类:
Mapper
Mapper for executing Python lambda function on data samples.
- __init__(lambda_str: str = '', batched: bool = False, **kwargs)[源代码]¶
Initialization method.
- 参数:
lambda_str -- A string representation of the lambda function to be executed on data samples. If empty, the identity function is used.
batched -- A boolean indicating whether to process input data in batches.
kwargs -- Additional keyword arguments passed to the parent class.