@@ -361,12 +361,27 @@ def _get_cuml_fit_func(self, dataset: DataFrame) -> Callable[ # type: ignore
361361 pass
362362
363363 def write (self ) -> MLWriter :
364+ """Unsupported."""
364365 raise NotImplementedError (
365366 "NearestNeighbors does not support saving/loading, just re-create the estimator."
366367 )
367368
368369 @classmethod
369370 def read (cls ) -> MLReader :
371+ """Unsupported."""
372+ raise NotImplementedError (
373+ "NearestNeighbors does not support saving/loading, just re-create the estimator."
374+ )
375+
376+ def save (self , path : str ) -> None :
377+ """Unsupported."""
378+ raise NotImplementedError (
379+ "NearestNeighbors does not support saving/loading, just re-create the estimator."
380+ )
381+
382+ @classmethod
383+ def load (cls , path : str ) -> MLReader :
384+ """Unsupported."""
370385 raise NotImplementedError (
371386 "NearestNeighbors does not support saving/loading, just re-create the estimator."
372387 )
@@ -442,14 +457,29 @@ def _nearest_neighbors_join(
442457 return knnjoin_df
443458
444459 def write (self ) -> MLWriter :
460+ """Unsupported."""
445461 raise NotImplementedError (
446462 f"{ self .__class__ } does not support saving/loading, just re-fit the estimator to re-create a model."
447463 )
448464
449465 @classmethod
450466 def read (cls ) -> MLReader :
467+ """Unsupported."""
451468 raise NotImplementedError (
452- f"{ cls } does not support loading/loading, just re-fit the estimator to re-create a model."
469+ f"{ cls } does not support saving/loading, just re-fit the estimator to re-create a model."
470+ )
471+
472+ def save (self , path : str ) -> None :
473+ """Unsupported."""
474+ raise NotImplementedError (
475+ f"{ self .__class__ } does not support saving/loading, just re-create the estimator."
476+ )
477+
478+ @classmethod
479+ def load (cls , path : str ) -> MLReader :
480+ """Unsupported."""
481+ raise NotImplementedError (
482+ f"{ cls } does not support saving/loading, just re-create the estimator."
453483 )
454484
455485
@@ -1040,13 +1070,29 @@ def _get_cuml_fit_func(self, dataset: DataFrame) -> Callable[ # type: ignore
10401070 """
10411071 pass
10421072
1073+ # for the following 4 methods leave doc string as below so that they are filtered out from api docs
10431074 def write (self ) -> MLWriter :
1075+ """Unsupported."""
10441076 raise NotImplementedError (
10451077 "ApproximateNearestNeighbors does not support saving/loading, just re-create the estimator."
10461078 )
10471079
10481080 @classmethod
10491081 def read (cls ) -> MLReader :
1082+ """Unsupported."""
1083+ raise NotImplementedError (
1084+ "ApproximateNearestNeighbors does not support saving/loading, just re-create the estimator."
1085+ )
1086+
1087+ @classmethod
1088+ def load (cls , path : str ) -> MLReader :
1089+ """Unsupported."""
1090+ raise NotImplementedError (
1091+ "ApproximateNearestNeighbors does not support saving/loading, just re-create the estimator."
1092+ )
1093+
1094+ def save (self , path : str ) -> None :
1095+ """Unsupported."""
10501096 raise NotImplementedError (
10511097 "ApproximateNearestNeighbors does not support saving/loading, just re-create the estimator."
10521098 )
0 commit comments