Github user mateiz commented on a diff in the pull request:
https://github.com/apache/spark/pull/802#discussion_r12723513
--- Diff: examples/src/main/python/als.py ---
@@ -46,15 +46,15 @@ def update(i, vec, mat, ratings):
return np.linalg.solve(XtX, Xty)
if __name__ == "__main__":
- if len(sys.argv) < 2:
- print >> sys.stderr, "Usage: als <master> <M> <U> <F> <iters>
<slices>"
- exit(-1)
- sc = SparkContext(sys.argv[1], "PythonALS",
pyFiles=[realpath(__file__)])
- M = int(sys.argv[2]) if len(sys.argv) > 2 else 100
- U = int(sys.argv[3]) if len(sys.argv) > 3 else 500
- F = int(sys.argv[4]) if len(sys.argv) > 4 else 10
- ITERATIONS = int(sys.argv[5]) if len(sys.argv) > 5 else 5
- slices = int(sys.argv[6]) if len(sys.argv) > 6 else 2
+ """
+ Usage: als [M] [U] [F] [iterations] [slices]"
+ """
+ sc = SparkContext(appName="PythonALS", pyFiles=[realpath(__file__)])
--- End diff --
Do we need to pass the path through pyFiles if the user launches this with
spark-submit?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---