[hotfix] Fix ResourceDemandScheduler (#11996)

* [hotfix] Fix ResourceDemandScheduler

* fix test_autoscaler
This commit is contained in:
Ian Rodney 2020-11-13 00:42:16 -08:00 committed by GitHub
parent f6f9b15299
commit f936ea35fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View file

@ -1526,9 +1526,10 @@ MemTotal: 16396056 kB
MemFree: 12869528 kB
MemAvailable: 33000000 kB
"""
runner.respond_to_call("cat /proc/meminfo", [proc_meminfo])
runner.respond_to_call(".Runtimes", ["nvidia-container-runtime"])
runner.respond_to_call("nvidia-smi", ["works"])
runner.respond_to_call("cat /proc/meminfo", 2 * [proc_meminfo])
runner.respond_to_call(".Runtimes", 2 * ["nvidia-container-runtime"])
runner.respond_to_call("nvidia-smi", 2 * ["works"])
runner.respond_to_call("json .Config.Env", 2 * ["[]"])
lm = LoadMetrics()
autoscaler = StandardAutoscaler(
config_path,

View file

@ -1033,6 +1033,7 @@ class AutoscalingTest(unittest.TestCase):
config_path = self.write_config(config)
self.provider = MockProvider()
runner = MockProcessRunner()
runner.respond_to_call("json .Config.Env", ["[]"])
get_or_create_head_node(
config,
printable_config_file=config_path,