sparknlp_jsl.transpiler.converter
#
Module Contents#
Functions#
|
Run the Python to Scala code conversion and building process. |
- run_converter(py_code, build_py_code, build_sc_code, spark=None)#
Run the Python to Scala code conversion and building process.
- Parameters:
py_code (str) – The Python code to be converted to Scala.
build_py_code (bool) – Flag to indicate whether to build the Python code.
build_sc_code (bool) – Flag to indicate whether to build the generated Scala code.
spark (SparkSession, optional) – The SparkSession to use for building the Python code. Defaults to None.
- Returns:
- A dictionary containing the results of the conversion and building process.
”python_code_failed” (int): Number of times Python code failed to build.
”scala_generated” (int): Number of times Scala code was successfully generated.
”generated_code_works” (int): Number of times the generated Scala code worked.
”generated_code_failed” (int): Number of times the generated Scala code failed to build.
- Return type:
dict