mw@klab:~/OFA-Chinese-master$ CUDA_VISIBLE_DEVICES=0 python train.py --train_args_file train_ofa,json
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /opt/conda/lib/python3.9/site-packages/transformers/utils/import_utils.py:1126 in _get_module │
│ │
│ 1123 │ │
│ 1124 │ def _get_module(self, module_name: str): │
│ 1125 │ │ try: │
│ ❱ 1126 │ │ │ return importlib.import_module("." + module_name, self.name) │
│ 1127 │ │ except Exception as e: │
│ 1128 │ │ │ raise RuntimeError( │
│ 1129 │ │ │ │ f"Failed to import {self.name}.{module_name} because of the followin │
│ │
│ /opt/conda/lib/python3.9/importlib/init.py:127 in import_module │
│ │
│ 124 │ │ │ if character != '.': │
│ 125 │ │ │ │ break │
│ 126 │ │ │ level += 1 │
│ ❱ 127 │ return _bootstrap._gcd_import(name[level:], package, level) │
│ 128 │
│ 129 │
│ 130 _RELOADING = {} │
│ :1030 in _gcd_import │
│ :1007 in _find_and_load │
│ :986 in _find_and_load_unlocked │
│ :680 in _load_unlocked │
│ :850 in exec_module │
│ :228 in _call_with_frames_removed │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/trainer.py:69 in │
│ │
│ 66 │
│ 67 from . import version │
│ 68 from .configuration_utils import PretrainedConfig │
│ ❱ 69 from .data.data_collator import DataCollator, DataCollatorWithPadding, default_data_coll │
│ 70 from .debug_utils import DebugOption, DebugUnderflowOverflow │
│ 71 from .deepspeed import deepspeed_init, is_deepspeed_zero3_enabled │
│ 72 from .dependency_versions_check import dep_version_check │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/data/init.py:26 in │
│ │
│ 23 │ DefaultDataCollator, │
│ 24 │ default_data_collator, │
│ 25 ) │
│ ❱ 26 from .metrics import glue_compute_metrics, xnli_compute_metrics │
│ 27 from .processors import ( │
│ 28 │ DataProcessor, │
│ 29 │ InputExample, │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/data/metrics/init.py:18 in │
│ │
│ 15 from ...utils import is_sklearn_available, requires_backends │
│ 16 │
│ 17 │
│ ❱ 18 if is_sklearn_available(): │
│ 19 │ from scipy.stats import pearsonr, spearmanr │
│ 20 │ from sklearn.metrics import f1_score, matthews_corrcoef │
│ 21 │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/utils/import_utils.py:565 in │
│ is_sklearn_available │
│ │
│ 562 def is_sklearn_available(): │
│ 563 │ if importlib.util.find_spec("sklearn") is None: │
│ 564 │ │ return False │
│ ❱ 565 │ return is_scipy_available() and importlib.util.find_spec("sklearn.metrics") │
│ 566 │
│ 567 │
│ 568 def is_sentencepiece_available(): │
│ │
│ /opt/conda/lib/python3.9/importlib/util.py:94 in find_spec │
│ │
│ 91 │ if fullname not in sys.modules: │
│ 92 │ │ parent_name = fullname.rpartition('.')[0] │
│ 93 │ │ if parent_name: │
│ ❱ 94 │ │ │ parent = import(parent_name, fromlist=['path']) │
│ 95 │ │ │ try: │
│ 96 │ │ │ │ parent_path = parent.path │
│ 97 │ │ │ except AttributeError as e: │
│ │
│ /opt/conda/lib/python3.9/site-packages/sklearn/init.py:82 in │
│ │
│ 79 │ # it and importing it first would fail if the OpenMP dll cannot be found. │
│ 80 │ from . import _distributor_init # noqa: F401 │
│ 81 │ from . import __check_build # noqa: F401 │
│ ❱ 82 │ from .base import clone │
│ 83 │ from .utils._show_versions import show_versions │
│ 84 │ │
│ 85 │ all = [ │
│ │
│ /opt/conda/lib/python3.9/site-packages/sklearn/base.py:17 in │
│ │
│ 14 │
│ 15 from . import version │
│ 16 from ._config import get_config │
│ ❱ 17 from .utils import _IS_32BIT │
│ 18 from .utils._tags import ( │
│ 19 │ _DEFAULT_TAGS, │
│ 20 ) │
│ │
│ /opt/conda/lib/python3.9/site-packages/sklearn/utils/init.py:29 in │
│ │
│ 26 from . import _joblib │
│ 27 from ..exceptions import DataConversionWarning │
│ 28 from .deprecation import deprecated │
│ ❱ 29 from .fixes import parse_version, threadpool_info │
│ 30 from ._estimator_html_repr import estimator_html_repr │
│ 31 from .validation import ( │
│ 32 │ as_float_array, │
│ │
│ /opt/conda/lib/python3.9/site-packages/sklearn/utils/fixes.py:19 in │
│ │
│ 16 import sklearn │
│ 17 import numpy as np │
│ 18 import scipy │
│ ❱ 19 import scipy.stats │
│ 20 import threadpoolctl │
│ 21 from .._config import config_context, get_config │
│ 22 from ..externals._packaging.version import parse as parse_version │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/stats/init.py:467 in │
│ │
│ 464 │
│ 465 from ._warnings_errors import (ConstantInputWarning, NearConstantInputWarning, │
│ 466 │ │ │ │ │ │ │ DegenerateDataWarning, FitError) │
│ ❱ 467 from ._stats_py import * │
│ 468 from ._variation import variation │
│ 469 from .distributions import * │
│ 470 from ._morestats import * │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/stats/_stats_py.py:46 in │
│ │
│ 43 │
│ 44 import scipy.special as special │
│ 45 from scipy import linalg │
│ ❱ 46 from . import distributions │
│ 47 from . import _mstats_basic as mstats_basic │
│ 48 from ._stats_mstats_common import (_find_repeats, linregress, theilslopes, │
│ 49 │ │ │ │ │ │ │ │ siegelslopes) │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/stats/distributions.py:8 in │
│ │
│ 5 # NOTE: To look at history using git blame
, use git blame -M -C -C
│
│ 6 # instead of git blame -Lxxx,+x
. │
│ 7 # │
│ ❱ 8 from ._distn_infrastructure import (rv_discrete, rv_continuous, rv_frozen) │
│ 9 │
│ 10 from . import _continuous_distns │
│ 11 from . import _discrete_distns │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/stats/_distn_infrastructure.py:24 in │
│ │
│ 21 │
│ 22 # for root finding for continuous distribution ppf, and max likelihood │
│ 23 # estimation │
│ ❱ 24 from scipy import optimize │
│ 25 │
│ 26 # for functions of continuous distributions (e.g. moments, entropy, cdf) │
│ 27 from scipy import integrate │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/init.py:211 in getattr │
│ │
│ 208 │ │
│ 209 │ def getattr(name): │
│ 210 │ │ if name in submodules: │
│ ❱ 211 │ │ │ return _importlib.import_module(f'scipy.{name}') │
│ 212 │ │ else: │
│ 213 │ │ │ try: │
│ 214 │ │ │ │ return globals()[name] │
│ │
│ /opt/conda/lib/python3.9/importlib/init.py:127 in import_module │
│ │
│ 124 │ │ │ if character != '.': │
│ 125 │ │ │ │ break │
│ 126 │ │ │ level += 1 │
│ ❱ 127 │ return _bootstrap._gcd_import(name[level:], package, level) │
│ 128 │
│ 129 │
│ 130 _RELOADING = {} │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/optimize/init.py:413 in │
│ │
│ 410 from ._slsqp_py import fmin_slsqp │
│ 411 from ._nnls import nnls │
│ 412 from ._basinhopping import basinhopping │
│ ❱ 413 from ._linprog import linprog, linprog_verbose_callback │
│ 414 from ._lsap import linear_sum_assignment │
│ 415 from ._differentialevolution import differential_evolution │
│ 416 from ._lsq import least_squares, lsq_linear │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/optimize/_linprog.py:21 in │
│ │
│ 18 │
│ 19 from ._optimize import OptimizeResult, OptimizeWarning │
│ 20 from warnings import warn │
│ ❱ 21 from ._linprog_highs import _linprog_highs │
│ 22 from ._linprog_ip import _linprog_ip │
│ 23 from ._linprog_simplex import _linprog_simplex │
│ 24 from ._linprog_rs import _linprog_rs │
│ │
│ /opt/conda/lib/python3.9/site-packages/scipy/optimize/_linprog_highs.py:20 in │
│ │
│ 17 import numpy as np │
│ 18 from ._optimize import _check_unknown_options, OptimizeWarning, OptimizeResult │
│ 19 from warnings import warn │
│ ❱ 20 from ._highs._highs_wrapper import _highs_wrapper │
│ 21 from ._highs._highs_constants import ( │
│ 22 │ CONST_I_INF, │
│ 23 │ CONST_INF, │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by
/opt/conda/lib/python3.9/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-39-x86_64-linux-gnu.so)
The above exception was the direct cause of the following exception:
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/mw/OFA-Chinese-master/train.py:2 in │
│ │
│ 1 from component.ofa.modeling_ofa import OFAModelForCaption │
│ ❱ 2 from transformers import ( │
│ 3 │ HfArgumentParser, │
│ 4 │ TrainingArguments, │
│ 5 │ set_seed, │
│ :1055 in _handle_fromlist │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/utils/import_utils.py:1116 in getattr │
│ │
│ 1113 │ │ if name in self._modules: │
│ 1114 │ │ │ value = self._get_module(name) │
│ 1115 │ │ elif name in self._class_to_module.keys(): │
│ ❱ 1116 │ │ │ module = self._get_module(self._class_to_module[name]) │
│ 1117 │ │ │ value = getattr(module, name) │
│ 1118 │ │ else: │
│ 1119 │ │ │ raise AttributeError(f"module {self.name} has no attribute {name}") │
│ │
│ /opt/conda/lib/python3.9/site-packages/transformers/utils/import_utils.py:1128 in _get_module │
│ │
│ 1125 │ │ try: │
│ 1126 │ │ │ return importlib.import_module("." + module_name, self.name) │
│ 1127 │ │ except Exception as e: │
│ ❱ 1128 │ │ │ raise RuntimeError( │
│ 1129 │ │ │ │ f"Failed to import {self.name}.{module_name} because of the followin │
│ 1130 │ │ │ │ f" traceback):\n{e}" │
│ 1131 │ │ │ ) from e │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Failed to import transformers.trainer because of the following error (look up to see its traceback):
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by
/opt/conda/lib/python3.9/site-packages/scipy/optimize/_highs/_highs_wrapper.cpython-39-x86_64-linux-gnu.so)
这是什么原因啊 大佬们