Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxr committed May 12, 2015
1 parent 1042e80 commit a163413
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/pyspark/ml/param/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,6 @@ def _copyValues(self, to, extra={}):
"""
paramMap = self.extractParamMap(extra)
for p in self.params:
if paramMap.has_key(p) and to.hasParam(p.name):
if p in paramMap and to.hasParam(p.name):
to._set((p.name, paramMap[p]))
return to
3 changes: 2 additions & 1 deletion python/pyspark/ml/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def _fit(self, dataset):
return model


class MockModel(MockTransformer, Model, HasFake): pass
class MockModel(MockTransformer, Model, HasFake):
pass


class PipelineTests(PySparkTestCase):
Expand Down
3 changes: 1 addition & 2 deletions python/pyspark/ml/tuning.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,7 @@ def copy(self, extra={}):
newCV = Params.copy(self, extra)
if self.isSet(self.estimator):
newCV.setEstimator(self.getEstimator().copy(extra))
if self.isSet(self.estimatorParamMaps):
newCV.setEstimatorParamMaps(self.getEstimatorParamMaps().MAGIC_COPY_TO_BE_IMPLEMENTED(extra)) # TODO
# estimatorParamMaps remain the same
if self.isSet(self.evaluator):
newCV.setEvaluator(self.getEvaluator().copy(extra))
return newCV
Expand Down

0 comments on commit a163413

Please sign in to comment.