Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SYSTEMML-1451][Phase 2] Decouple Scripts and HDFS support #575

Closed

Conversation

krishnakalyan3
Copy link
Member

@krishnakalyan3 krishnakalyan3 commented Jul 14, 2017

Please refer to https://issues.apache.org/jira/browse/SYSTEMML-1451 for more details.

  • Decouple systemml-spark-submit.py
  • Decouple systemml-standalone.py
  • Refractor perf test suit to accept args like debug, stats, config etc...
  • Add HDFS support
  • Google Docs support
  • Compare SystemML with previous versions
  • Pylint, Comment
  • Extra arguments configuration Test
  • Windows Test
  • Doc update
  • systemml standalone comments
  • systemml spark submit comments

@krishnakalyan3
Copy link
Member Author

krishnakalyan3 commented Jul 14, 2017

@nakul02 could you please share your thoughts on this initial approach.

Also what do you think of the following points below:
a) Createing common utils files that can be shared by systemml-spark-submit.py and systemml-standalone.py. (Common functions like get_env, default_jars, find_script_file etc...)
b) Change systemml-standalone.py to point jars instead of classes.

I have tested systemml-spark-submit.py and it works on my local system with the commands below.

./systemml-spark-submit.py -f genRandData4Kmeans.dml -nvargs nr=10000 nf=1000 nc=50 dc=10.0 dr=1.0 fbf=100.0 cbf=100.0 X=data/X.data C=data/C.data Y=data/Y.data YbyC=data/YbyC.data fmt=csv
./systemml-spark-submit.py -f ~/open-source/matmul.dml

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1757/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1762/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1763/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1765/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1774/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1777/

@j143-zz
Copy link
Contributor

j143-zz commented Jul 20, 2017

@akchinSTC can you test this once again. Thanks.

@nakul02
Copy link
Member

nakul02 commented Jul 20, 2017

@j143 - @akchinSTC is a bot. It will run the CI tests again when the author of this PR pushes another commit.

These scripts don't add integration tests, so running the CI will not tell you more than running the tests on the master branch.

Any reason you wanted this tested again?

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1782/

@j143-zz
Copy link
Contributor

j143-zz commented Jul 20, 2017

yes! @nakul02 There was a fix by another PR before this, which is otherwise responsible for previous build failure https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1777/ . Now, that test is passing in that particular test.

@mboehm7
Copy link
Contributor

mboehm7 commented Jul 20, 2017

FullReblockTest is one of our flaky tests which unfortunately fails once in a while.

@deroneriksson
Copy link
Member

@j143 @nakul02 Note that it is possible to manually trigger a Jenkins PR test (if ever needed). See https://gist.github.com/deroneriksson/e0d6d0634f3388f0df5e#pull-request-magic for the command.

@nakul02
Copy link
Member

nakul02 commented Jul 20, 2017

@deroneriksson - is there a way to disable it?

This PR introduces a set of python scripts which are never invoked directly or indirectly in anything that Jenkins does. Running the tests over and over again for each commit seems wasteful. It would be good to be able to disable the automatic running of the jenkins for every commit.

@deroneriksson
Copy link
Member

I don't know if there's a way to disable it. There are situations where that would be very nice.

@deroneriksson
Copy link
Member

I asked around and "skip ci" may do it.

skip ci

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1789/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1793/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1795/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1799/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1807/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1822/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1823/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1825/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1828/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1829/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1831/

@akchinSTC
Copy link
Contributor

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1834/

conf = default_conf
def spark_submit_entry(master, driver_memory, num_executors, executor_memory,
executor_cores, conf,
nvargs, args, config, explain, debug, stats, gpu, f):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a little comment about this function.

bin/utils.py Outdated


def get_env():
"""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please give this function a more descriptive name. get_env() is too generic and doesn't convey that only SPARK_HOME and SYSTEMML_HOME variables are being returned.
I would suggest you break this function up into two functions - one to get the environment variable for SYSTEMML_HOME and one for SPARK_HOME. You can then name them get_env_systemml_home and get_env_spark_home or something better.


cparser = argparse.ArgumentParser(description='System-ML Spark Submit Script')
# SPARK-SUBMIT Options
cparser.add_argument('--master', default='local[*]', help='local, yarn-client, yarn-cluster', metavar='')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also print out the defaults for each of the options in the help message?

if len(sys.argv) < 2:
print('Wrong usage')
print_usage_and_exit()
def standalone_entry(nvargs, args, config, explain, debug, stats, gpu, f):

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add documentation for this function.
Also, do you think standalone_execution_entry or standalone_mode_entry is a better name?

bin/utils.py Outdated

def find_file(name, path):
"""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please complete this documentation?

return return_data


def get_std_out(process):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is somewhat misleading, since you return both - stdout and stderr. Maybe you could rename it to something more appropriate?

return out_arr, error_arr


def parse_dir(std_outs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about the function name parse_hdfs_paths instead of parse_dir?

os.makedirs(directory)


def write_success(time, cwd):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought cwd is mostly to specify the current working directory.
How about naming this variable to something else, like directory or dir or something similar?

open(full_path, 'w').close()


def get_existence(path):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the name could be check_SUCCESS_file_exists

# This file contains all misc utility functions required by performance test module


def sup_args(config_dict, spark_dict, exec_type):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what this name means. Could you please think of a more descriptive name?

@krishnakalyan3
Copy link
Member Author

Thanks for the review @nakul02.

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1837/

@akchinSTC
Copy link
Contributor

Refer to this link for build results (access rights to CI server needed):
https://sparktc.ibmcloud.com/jenkins/job/SystemML-PullRequestBuilder/1843/

@nakul02
Copy link
Member

nakul02 commented Aug 1, 2017

LGTM, i shall merge.

@asfgit asfgit closed this in e94374a Aug 1, 2017
asfgit pushed a commit that referenced this pull request Aug 3, 2017
Completed these tasks as part for Phase 2 for Google Summer of Code '17
- Decouple systemml-spark-submit.py
- Decouple systemml-standalone.py
- Refractor perf test suit to accept args like debug, stats, config etc...
- Add HDFS support
- Google Docs support
- Compare SystemML with previous versions
- Pylint, Comment
- Extra arguments configuration Test
- Windows Test
- Doc update
- systemml standalone comments
- systemml spark submit comments

Closes #575
j143-zz pushed a commit to j143-zz/systemml that referenced this pull request Nov 4, 2017
Completed these tasks as part for Phase 2 for Google Summer of Code '17
- Decouple systemml-spark-submit.py
- Decouple systemml-standalone.py
- Refractor perf test suit to accept args like debug, stats, config etc...
- Add HDFS support
- Google Docs support
- Compare SystemML with previous versions
- Pylint, Comment
- Extra arguments configuration Test
- Windows Test
- Doc update
- systemml standalone comments
- systemml spark submit comments

Closes apache#575
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants