Fix a env check bug for ondemand ci (#770)
Summary:
In OnDemand CI, the script may load `torchbenchmark` module without pytorch installed (at the first time of running the bisection script).
This PR fixes a bug when it fails because `torch` package is not found.
Pull Request resolved: https://github.com/pytorch/benchmark/pull/770
Reviewed By: erichan1
Differential Revision: D34481528
Pulled By: xuzhao9
fbshipit-source-id: 53068747565b33e3d7c4615aa8ad0b3562e0c46d