Skip to content

Commit ff760e3

Browse files
authored
Merge branch 'master' into runner-faster-termination
2 parents e1e1c09 + 0252975 commit ff760e3

File tree

1 file changed

+30
-35
lines changed

1 file changed

+30
-35
lines changed

Diff for: bin/cml/runner.js

+30-35
Original file line numberDiff line numberDiff line change
@@ -125,47 +125,42 @@ const runCloud = async (opts) => {
125125
cloudStartupScript: startupScript,
126126
cloudAwsSecurityGroup: awsSecurityGroup,
127127
cloudAwsSubnet: awsSubnet,
128-
tfFile,
129128
workdir
130129
} = opts;
131130

131+
if (gpu === 'tesla')
132+
winston.warn(
133+
'GPU model "tesla" has been deprecated; please use "v100" instead.'
134+
);
135+
132136
const tfPath = workdir;
133137
const tfMainPath = join(tfPath, 'main.tf');
134138

135-
let tpl;
136-
if (tfFile) {
137-
tpl = await fs.writeFile(tfMainPath, await fs.readFile(tfFile));
138-
} else {
139-
if (gpu === 'tesla')
140-
winston.warn(
141-
'GPU model "tesla" has been deprecated; please use "v100" instead.'
142-
);
143-
tpl = tf.iterativeCmlRunnerTpl({
144-
tpiVersion,
145-
repo,
146-
token,
147-
driver,
148-
labels,
149-
cmlVersion,
150-
idleTimeout,
151-
name,
152-
single,
153-
cloud,
154-
region,
155-
type,
156-
permissionSet,
157-
metadata,
158-
gpu: gpu === 'tesla' ? 'v100' : gpu,
159-
hddSize,
160-
sshPrivate,
161-
spot,
162-
spotPrice,
163-
startupScript,
164-
awsSecurityGroup,
165-
awsSubnet,
166-
dockerVolumes
167-
});
168-
}
139+
const tpl = tf.iterativeCmlRunnerTpl({
140+
tpiVersion,
141+
repo,
142+
token,
143+
driver,
144+
labels,
145+
cmlVersion,
146+
idleTimeout,
147+
name,
148+
single,
149+
cloud,
150+
region,
151+
type,
152+
permissionSet,
153+
metadata,
154+
gpu: gpu === 'tesla' ? 'v100' : gpu,
155+
hddSize,
156+
sshPrivate,
157+
spot,
158+
spotPrice,
159+
startupScript,
160+
awsSecurityGroup,
161+
awsSubnet,
162+
dockerVolumes
163+
});
169164

170165
await fs.writeFile(tfMainPath, tpl);
171166
await tf.init({ dir: tfPath });

0 commit comments

Comments
 (0)