Skip to content
Snippets Groups Projects
backend_defs.py 1.56 KiB
Newer Older
backend_options = {
    "pandas": {
        "imports": {
            "package": ["pandas"],
            "alias": ["pd"]
        },
        "guidance_message": None,
        "example_usage": "df = pd.read_parquet('dataset')"
    },
    "cudf": {
        "imports": {
            "package": ["cudf.pandas","pandas"],
            "alias": [None,"pd"]
        },
        "pre_import_hooks": {
            "pandas": "cudf.pandas.install()"
        },
        "guidance_message": (
            "cuDF and pandas have been loaded into your current environment. All applicable pandas functions will use silently use cuDF when able and will default to pandas otherwise. Use standard pandas functions for processing"
        ),
        "example_usage": "df = pd.read_parquet('dataset')"
    },
    "dask": {
        "imports": {
            "package": ["dask.dataframe"],
            "alias": ["dd"]
        },
        "guidance_message": "Only dask.dataframe has been loaded automatically. All other dask modules must be loaded manually in order to use them.",
        "example_usage": "df = dd.read_parquet('dataset')"
    },
    "dask_cuda": {
        "imports": {
            "package": ["dask_cuda","dask.dataframe"],
            "alias": [None,"dd"]
        },
        "post_import_hooks": {
            "dask.dataframe": "dask.config.set({'dataframe.backend': 'cudf'})"
        },
        "guidance_message": "Only dask.dataframe has been loaded automatically. All other dask modules must be loaded manually in order to use them.",
        "example_usage": "df = dd.read_parquet('dataset')"
    }
}