aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJason Lee <cjlee@us.ibm.com>2016-04-25 15:32:11 +0200
committerNick Pentreath <nickp@za.ibm.com>2016-04-25 15:32:11 +0200
commitbfda09991398ce44be91997252cf8e5ddd361737 (patch)
treeba9dc6c6c6c40a43401483502285e884fe062d9a /python
parente66afd5c66a6d8f33c90ce08c35c3823735bde83 (diff)
downloadspark-bfda09991398ce44be91997252cf8e5ddd361737.tar.gz
spark-bfda09991398ce44be91997252cf8e5ddd361737.tar.bz2
spark-bfda09991398ce44be91997252cf8e5ddd361737.zip
[SPARK-14768][ML][PYSPARK] removed expectedType from Param __init__()
## What changes were proposed in this pull request? Removed expectedType arg from PySpark Param __init__, as suggested by the JIRA. ## How was this patch tested? Manually looked through all places that use Param. Compiled and ran all ML PySpark test cases before and after the fix. Author: Jason Lee <cjlee@us.ibm.com> Closes #12581 from jasoncl/SPARK-14768.
Diffstat (limited to 'python')
-rw-r--r--python/pyspark/ml/param/__init__.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/python/pyspark/ml/param/__init__.py b/python/pyspark/ml/param/__init__.py
index 40d8300625..d9513ca5b2 100644
--- a/python/pyspark/ml/param/__init__.py
+++ b/python/pyspark/ml/param/__init__.py
@@ -40,22 +40,15 @@ class Param(object):
"""
A param with self-contained documentation.
- Note: `expectedType` is deprecated and will be removed in 2.1. Use typeConverter instead,
- as a keyword argument.
-
.. versionadded:: 1.3.0
"""
- def __init__(self, parent, name, doc, expectedType=None, typeConverter=None):
+ def __init__(self, parent, name, doc, typeConverter=None):
if not isinstance(parent, Identifiable):
raise TypeError("Parent must be an Identifiable but got type %s." % type(parent))
self.parent = parent.uid
self.name = str(name)
self.doc = str(doc)
- self.expectedType = expectedType
- if expectedType is not None:
- warnings.warn("expectedType is deprecated and will be removed in 2.1. " +
- "Use typeConverter instead, as a keyword argument.")
self.typeConverter = TypeConverters.identity if typeConverter is None else typeConverter
def _copy_new_parent(self, parent):