Gettin strange syntax error while executing below command on quiklab

strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy()
task_type = strategy.cluster_resolver.task_type
task_id = strategy.cluster_resolver.task_id
global_batch_size = per_worker_batch * strategy.num_replicas_in_sync
-bash: syntax error near unexpected token `('
-bash: task_type: command not found
-bash: task_id: command not found
-bash: global_batch_size: command not found

What does it mean to invoke a TF function from the bash command line? I’m not completely sure what’s going on here but my guess is that it’s the very first strategy line that is “throwing”. That’s the only place we see an open paren …

So maybe you think you’re in the quiklab UI, but you’re not really … Mind you I’ve never used quiklab, so I have no experience with how it works.

bash is the linux shell, so it only makes sense to invoke linux shell commands from there, of course. The error messages are all from “bash” saying that it basically doesn’t recognize any of the entries as linux commands. The first rule of debugging is “believe the error message”. If you don’t understand what it is saying, that’s the first problem you have to solve. :smile: