Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Arguments in CDSW Experiments not passed properly

Highlighted

Arguments in CDSW Experiments not passed properly

New Contributor

I am trying to run sklearn models via CDSW Experiments. My python code should be accepting arguments using sys.argv[1] snippet. However, when I run the script via CDSW Experiments and put arguments in the UI, it seems like there are no arguments being read by the script.

 

This is what's in sys.argv 

print(sys.argv)
['/var/lib/cdsw/python3-engine-deps/bin/ipython3']

 

Error

inParam = sys.argv[1]
IndexError: list index out of range
2 REPLIES 2

Re: Arguments in CDSW Experiments not passed properly

Rising Star

Are you putting arguments in the arguments field of the UI or after your script name?  I don't see an immediate issue with what you're trying to do.

Re: Arguments in CDSW Experiments not passed properly

New Contributor

I am putting the arguments in the "Arguments" field in the "Run Experiment" UI