Vizier allows users to export python code for use outside of the current cell with the vizierdb.export_module method. A key feature of exported modules is that they're accessible in other modalities. For example, exported functions are available in SQL cells.
Unfortunately, for them to be useful with SQL cells, we need type information for the method's arguments and return value. Right now, we're following PySpark's lead in using PySpark type annotations (See the pyspark_types module). However, this is one of the major reasons that we have an dependency on pyspark (#220) that duplicates most of the imports of scala spark.
The goal of this project is to use python type annotations (e.g., PEP 484 instead of pyspark type annotations. e.g., as follows:
It looks like we can't get rid of the pyspark dependency entirely :( However, we can still try to infer the corresponding spark type from the return type annotation on the python function.
Vizier allows users to export python code for use outside of the current cell with the vizierdb.export_module method. A key feature of exported modules is that they're accessible in other modalities. For example, exported functions are available in SQL cells.
Unfortunately, for them to be useful with SQL cells, we need type information for the method's arguments and return value. Right now, we're following PySpark's lead in using PySpark type annotations (See the
pyspark_types
module). However, this is one of the major reasons that we have an dependency on pyspark (#220) that duplicates most of the imports of scala spark.The goal of this project is to use python type annotations (e.g., PEP 484 instead of pyspark type annotations. e.g., as follows: