@@ -318,15 +318,13 @@ def artifactsGet(params, no_logging=False):
318318
319319
320320# TO DO:
321- # deal with timeouts/server unreachable
322- # deal with returned errors
323321# deal with invalid directories, e.g. root for workspace
324322# detect running interactively
325323# stream file uploads/downloads
326324
327325
328326def runas_job (params = {}, no_logging = False ):
329- if 'PAPERSPACE_JOB_RUNNER ' in os .environ :
327+ if 'PS_JOB_RUNNER ' in os .environ :
330328 return
331329
332330 stack = inspect .stack ()
@@ -335,7 +333,6 @@ def runas_job(params={}, no_logging=False):
335333 src_file = os .path .basename (inspect .getsourcefile (obj ))
336334
337335 # TO DO: remove these replacements once we are auto importing paperspace on the job runner
338- # and have defined the PAPERSPACE_JOB_RUNNER env var and passed it into the container
339336 src = src .replace ('import paperspace' , '# import paperspace' )
340337 src = src .replace ('from paperspace' , '# from paperspace' )
341338 src = src .replace ('paperspace.config.PAPERSPACE_API_KEY' , '_paperspace_config_PAPERSPACE_API_KEY' )
@@ -370,6 +367,3 @@ def runas_job(params={}, no_logging=False):
370367# prevent interactive use
371368# combine local workspace with source
372369# detect/use python environment
373- # set PAPERSPACE_JOB_RUNNER within job runner
374- # allow specification of apiKey within runas_job call
375- # allow artibitrary command with args
0 commit comments