microsoft / az-deep-batch-score

Batch scoring deep learning models with AML
MIT License
21 stars 8 forks source link

quota check fails in notebook 03 #23

Closed maxkazmsft closed 5 years ago

maxkazmsft commented 5 years ago

There is enough quota in eastus but I get the following error

print("Checking quota for family size DSv2...")

vm_family = "DSv2"

requested_cores = ffmpeg_node_count * vm_dict[vm_family]["cores"]

diff = check_quota(vm_family)

if diff <= requested_cores:

print("Not enough cores of DSv2 in region, asking for {} but have {}".format(requested_cores, diff))

else:

print("There are enough cores, you may continue...")

Checking quota for family size DSv2...

/home/maxkaz/anaconda3/envs/batchscoringdl_aml/lib/python3.6/site-packages/dotenv/main.py:111: UserWarning: key REGION not found in /home/maxkaz/repos/Batch-Scoring-Deep-Learning-Models-With-AML/.env. warnings.warn("key %s not found in %s." % (key, self.dotenv_path))


TypeError Traceback (most recent call last)

in () 3 requested_cores = ffmpeg_node_count * vm_dict[vm_family]["cores"] 4 ----> 5 diff = check_quota(vm_family) 6 if diff <= requested_cores: 7 print("Not enough cores of DSv2 in region, asking for {} but have {}".format(requested_cores, diff)) in check_quota(vm_family) 18 "--location", get_key(env_path, "REGION"), 19 "--query", "[?contains(localName, '%s')].{max:limit, current:currentValue}" % (vm_family) ---> 20 ], stdout=subprocess.PIPE) 21 quota = json.loads(''.join(results.stdout.decode('utf-8'))) 22 return int(quota[0]['max']) - int(quota[0]['current']) ~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/subprocess.py in run(input, timeout, check, *popenargs, **kwargs) 401 kwargs['stdin'] = PIPE 402 --> 403 with Popen(*popenargs, **kwargs) as process: 404 try: 405 stdout, stderr = process.communicate(input, timeout=timeout) ~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/subprocess.py in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors) 707 c2pread, c2pwrite, 708 errread, errwrite, --> 709 restore_signals, start_new_session) 710 except: 711 # Cleanup if the child failed starting. ~/anaconda3/envs/batchscoringdl_aml/lib/python3.6/subprocess.py in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, restore_signals, start_new_session) 1273 errread, errwrite, 1274 errpipe_read, errpipe_write, -> 1275 restore_signals, start_new_session, preexec_fn) 1276 self._child_created = True 1277 finally: TypeError: expected str, bytes or os.PathLike object, not NoneType
jiata commented 5 years ago

3 duplicate, and i believe the issue is because the .env file is malformed