Add reminder config to issue template and print DS version in env (#35156)
* update env command to log deepspeed version * suppress deepspeed import logging * Add reminder to include configs to repro description in bug report. * make fixup * [WIP] update import utils for deepspeed * Change to using is_deepspeed_available() from integrations. * make fixup
This commit is contained in:
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
1
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
@@ -106,6 +106,7 @@ body:
|
||||
label: Reproduction
|
||||
description: |
|
||||
Please provide a code sample that reproduces the problem you ran into. It can be a Colab link or just a code snippet.
|
||||
Please include relevant config information with your code, for example your Trainers, TRL, Peft, and DeepSpeed configs.
|
||||
If you have code snippets, error messages, stack traces please provide them here as well.
|
||||
Important! Use code tags to correctly format your code. See https://help.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks#syntax-highlighting
|
||||
Do not use screenshots, as they are hard to read and (more importantly) don't allow others to copy-and-paste your code.
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import contextlib
|
||||
import importlib.util
|
||||
import io
|
||||
import os
|
||||
import platform
|
||||
from argparse import ArgumentParser
|
||||
@@ -20,6 +23,7 @@ from argparse import ArgumentParser
|
||||
import huggingface_hub
|
||||
|
||||
from .. import __version__ as version
|
||||
from ..integrations.deepspeed import is_deepspeed_available
|
||||
from ..utils import (
|
||||
is_accelerate_available,
|
||||
is_flax_available,
|
||||
@@ -104,6 +108,13 @@ class EnvironmentCommand(BaseTransformersCLICommand):
|
||||
# returns list of devices, convert to bool
|
||||
tf_cuda_available = bool(tf.config.list_physical_devices("GPU"))
|
||||
|
||||
deepspeed_version = "not installed"
|
||||
if is_deepspeed_available():
|
||||
# Redirect command line output to silence deepspeed import output.
|
||||
with contextlib.redirect_stdout(io.StringIO()):
|
||||
import deepspeed
|
||||
deepspeed_version = deepspeed.__version__
|
||||
|
||||
flax_version = "not installed"
|
||||
jax_version = "not installed"
|
||||
jaxlib_version = "not installed"
|
||||
@@ -126,6 +137,7 @@ class EnvironmentCommand(BaseTransformersCLICommand):
|
||||
"Safetensors version": f"{safetensors_version}",
|
||||
"Accelerate version": f"{accelerate_version}",
|
||||
"Accelerate config": f"{accelerate_config_str}",
|
||||
"DeepSpeed version": f"{deepspeed_version}",
|
||||
"PyTorch version (GPU?)": f"{pt_version} ({pt_cuda_available})",
|
||||
"Tensorflow version (GPU?)": f"{tf_version} ({tf_cuda_available})",
|
||||
"Flax version (CPU?/GPU?/TPU?)": f"{flax_version} ({jax_backend})",
|
||||
|
||||
Reference in New Issue
Block a user