Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 0eeca64

Browse files
committed
handle script name is first arg to run func
1 parent ae19dd3 commit 0eeca64

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

paperspace/jobs.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,16 @@ def run(params={}, no_logging=False):
338338
if 'PS_JOB_RUNNER' in os.environ:
339339
return
340340

341+
# handle script is first arg, params is second
342+
if isinstance(params, str):
343+
script = params
344+
if isinstance(no_logging, dict):
345+
params = no_logging
346+
no_logging = False
347+
else:
348+
params = {}
349+
params['script'] = script
350+
341351
params = params.copy()
342352
run_this = False
343353
if 'script' not in params:

0 commit comments

Comments
 (0)