[tests] remove TF tests (uses of require_tf) (#38944)
* remove uses of require_tf * remove redundant import guards * this class has no tests * nits * del tf rng comment
This commit is contained in:
@@ -445,13 +445,6 @@ CUDA_VISIBLE_DEVICES="1" pytest tests/utils/test_logging.py
|
||||
def test_example_with_multi_gpu():
|
||||
```
|
||||
|
||||
テストに `tensorflow` が必要な場合は、`require_tf` デコレータを使用します。例えば:
|
||||
|
||||
```python no-style
|
||||
@require_tf
|
||||
def test_tf_thing_with_tensorflow():
|
||||
```
|
||||
|
||||
これらのデコレータは積み重ねることができます。たとえば、テストが遅く、pytorch で少なくとも 1 つの GPU が必要な場合は、次のようになります。
|
||||
設定方法:
|
||||
|
||||
@@ -1135,9 +1128,6 @@ if torch.cuda.is_available():
|
||||
import numpy as np
|
||||
|
||||
np.random.seed(seed)
|
||||
|
||||
# tf RNG
|
||||
tf.random.set_seed(seed)
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user