[SPARK-26640][CORE][ML][SQL][STREAMING][PYSPARK] Code cleanup from lgtm.com analysis#23571
[SPARK-26640][CORE][ML][SQL][STREAMING][PYSPARK] Code cleanup from lgtm.com analysis#23571srowen wants to merge 4 commits intoapache:masterfrom
Conversation
|
|
||
| var endPoint = createRESTEndPointForExecutorsPage(appId); | ||
| $.getJSON(endPoint, function (response, status, jqXHR) { | ||
| var summary = []; |
| { | ||
| data: function (row, type) { | ||
| return type === 'display' ? (formatDuration(row.allTotalDuration, type) + ' (' + formatDuration(row.allTotalGCTime, type) + ')') : row.allTotalDuration | ||
| return type === 'display' ? (formatDuration(row.allTotalDuration) + ' (' + formatDuration(row.allTotalGCTime) + ')') : row.allTotalDuration |
| historySummary = $("#history-summary"); | ||
| searchString = historySummary["context"]["location"]["search"]; | ||
| requestedIncomplete = getParameterByName("showIncomplete", searchString); | ||
| var historySummary = $("#history-summary"); |
| "hasMultipleAttempts": hasMultipleAttempts, | ||
| "showCompletedColumns": !requestedIncomplete, | ||
| } | ||
| }; |
There was a problem hiding this comment.
Implicit semicolon -> explicit
| from __future__ import print_function | ||
|
|
||
| from pyspark.sql import SparkSession | ||
| from pyspark.ml.param import Params |
| precision = metrics.precision() | ||
| recall = metrics.recall() | ||
| f1Score = metrics.fMeasure() | ||
| precision = metrics.precision(1.0) |
There was a problem hiding this comment.
Missed this when removing deprecated no-arg method
| conf.put(SparkLauncher.DRIVER_EXTRA_CLASSPATH, value); | ||
| break; | ||
| case CONF: | ||
| checkArgument(value != null, "Missing argument to %s", CONF); |
There was a problem hiding this comment.
Flags that this seems like it wants to check for null as it's check elsewhere
| sock = None | ||
| else: | ||
| raise Exception("could not open socket: %s" % errors) | ||
| raise Exception("could not open socket: %s" % errors) |
There was a problem hiding this comment.
else: with for doesn't do anything different if there's no break
| :return: model instance | ||
| """ | ||
| raise NotImplemented | ||
| raise NotImplementedError |
There was a problem hiding this comment.
NotImplemented is not actually an error that can be thrown
| '"field6":[{"field7": "row2"}]}', | ||
| '{"field1" : null, "field2": "row3", ' | ||
| '"field3":{"field4":33, "field5": []}}' | ||
| '{"field1" : 2, "field3":{"field4":22, "field5": [10, 11]},"field6":[{"field7": "row2"}]}', |
There was a problem hiding this comment.
Confusing string concatenation across lines
|
Test build #101336 has finished for PR 23571 at commit
|
|
Test build #101337 has finished for PR 23571 at commit
|
Use `numpy.array` instead of `array` in doctests (PR 23571)
|
Test build #101368 has finished for PR 23571 at commit
|
|
Merged to master |
…tm.com analysis ## What changes were proposed in this pull request? Misc code cleanup from lgtm.com analysis. See comments below for details. ## How was this patch tested? Existing tests. Closes apache#23571 from srowen/SPARK-26640. Lead-authored-by: Sean Owen <sean.owen@databricks.com> Co-authored-by: Hyukjin Kwon <gurwls223@apache.org> Co-authored-by: Sean Owen <srowen@gmail.com> Signed-off-by: Sean Owen <sean.owen@databricks.com>
What changes were proposed in this pull request?
Misc code cleanup from lgtm.com analysis. See comments below for details.
How was this patch tested?
Existing tests.