From e8c9c6ea0eea9d3f1af4ee431bf3d0aa87731987 Mon Sep 17 00:00:00 2001 From: Alberto Cattaneo Date: Thu, 28 Sep 2023 15:06:12 +0000 Subject: [PATCH] docs fix --- besskge/dataset.py | 4 ++-- docs/source/conf.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/besskge/dataset.py b/besskge/dataset.py index 17a12d1..a142238 100644 --- a/besskge/dataset.py +++ b/besskge/dataset.py @@ -137,7 +137,7 @@ def from_dataframe( head_column: Union[int, str], relation_column: Union[int, str], tail_column: Union[int, str], - entity_types: Optional[Union["pd.Series[str]", Dict[str, str]]] = None, + entity_types: Optional[Union[pd.Series, Dict[str, str]]] = None, # type: ignore split: Tuple[float, float, float] = (0.7, 0.15, 0.15), seed: int = 1234, ) -> "KGDataset": @@ -157,7 +157,7 @@ def from_dataframe( Name of the DataFrame column storing tail entities :param entity_types: If entities have types, dictionary or pandas Series of mappings - entity label -> entity type. + entity label -> entity type (as strings). :param split: Tuple to set the train/validation/test split. Only used if no pre-defined dataset split is specified, diff --git a/docs/source/conf.py b/docs/source/conf.py index e77438b..6369378 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -62,6 +62,7 @@ intersphinx_mapping = { "python": ("https://docs.python.org/3", None), "numpy": ("https://numpy.org/doc/stable", None), + "pandas": ("http://pandas.pydata.org/pandas-docs/dev", None), "torch": ("https://pytorch.org/docs/stable", None), "rtd": ("https://docs.readthedocs.io/en/stable/", None), "sphinx": ("https://www.sphinx-doc.org/en/master/", None),