Skip to content
Snippets Groups Projects
Commit bfda0999 authored by Jason Lee's avatar Jason Lee Committed by Nick Pentreath
Browse files

[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.
parent e66afd5c
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment