tsi-org/tango
0
1#!/usr/bin/env python32 3# coding=utf-84# Copyright 2023 The HuggingFace Inc. team.5#6# Licensed under the Apache License, Version 2.0 (the "License");7# you may not use this file except in compliance with the License.8# You may obtain a copy of the License at9#10# http://www.apache.org/licenses/LICENSE-2.011#12# Unless required by applicable law or agreed to in writing, software13# distributed under the License is distributed on an "AS IS" BASIS,14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15# See the License for the specific language governing permissions and16# limitations under the License.17 18# this script dumps information about the environment19 20import os21import platform22import sys23 24 25os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3"26 27print("Python version:", sys.version)28 29print("OS platform:", platform.platform())30print("OS architecture:", platform.machine())31 32try:33 import torch34 35 print("Torch version:", torch.__version__)36 print("Cuda available:", torch.cuda.is_available())37 print("Cuda version:", torch.version.cuda)38 print("CuDNN version:", torch.backends.cudnn.version())39 print("Number of GPUs available:", torch.cuda.device_count())40except ImportError:41 print("Torch version:", None)42 43try:44 import transformers45 46 print("transformers version:", transformers.__version__)47except ImportError:48 print("transformers version:", None)49 