[Python] Why the bug information is so detailed and long? [closed]

Discussão em 'Python' iniciado por Stack, Abril 21, 2025.

  1. Stack

    Stack Membro Participativo

    The bug information is too detailed and contain some useless information such as array values. How to make it shorter as normal? I mean just make it do not show the value of arrays but only shows which line of code have errors.

    ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
    │ /home/eciel/VLA/GR1-Training/evaluate_calvin.py:283 in <module> │
    │ │
    │ 280 │ │ print('average success rate ', avg_reward) │
    │ 281 │
    │ 282 if __name__ == "__main__": │
    │ ❱ 283 │ main() │
    │ 284 │
    │ │
    │ ╭─────────────────────────────────────────── locals ───────────────────────────────────────────╮ │
    │ │ argparse = <module 'argparse' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/argparse.py'> │ │
    │ │ CALVIN_ROOT = '/home/eciel/datasets/calvin' │ │
    │ │ clip = <module 'clip' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/site-packages/clip/__i… │ │
    │ │ copy = <module 'copy' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/copy.py'> │ │
    │ │ get_sequences = <functools._lru_cache_wrapper object at 0x7f3e29deaae0> │ │
    │ │ hydra = <module 'hydra' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/site-packages/hydra/__… │ │
    │ │ json = <module 'json' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/json/__init__.py'> │ │
    │ │ logger = <Logger __main__ (WARNING)> │ │
    │ │ logging = <module 'logging' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/logging/__init__.py'> │ │
    │ │ np = <module 'numpy' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/site-packages/numpy/__… │ │
    │ │ os = <module 'os' from │ │
    │ │ '/home/eciel/anaconda3/envs/clavin2/lib/python3.10/os.py'> │ │
    │ │ save_generation = [ │ │
    │ │ │ { │ │
    │ │ │ │ 'input': { │ │
    │ │ │ │ │ 'lang_embeddings': tensor([[[[-0.1226, -0.2235, 0.0317, ..., │ │
    │ │ 0.2041, -0.0747, -0.4790]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[-0.7080, -0.2908, 0.0922, ..., 0.3665, 0.0098, -1.0088]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[-0.1272, -0.1329, -0.0187, ..., -0.6304, 0.3926, -1.4688]], │ │
    │ │ │ │ │ │
    │ │ │ │ ..., │ │
    │ │ │ │ │ │
    │ │ │ │ [[-1.0381, -0.7183, 0.7969, ..., -0.5894, 0.6265, -1.2266]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[-1.1318, -0.7739, -0.1584, ..., 0.3645, -0.6938, -1.9873]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[-0.5010, -0.6470, 0.8149, ..., -0.5898, -1.2246, -2.2695]]]], │ │
    │ │ │ dtype=torch.float16), │ │
    │ │ │ │ │ 'state_embeddings': tensor([[[[ -4.1484, 0.9946, 0.3354, │ │
    │ │ ..., -0.0508, -2.5039, 1.8232]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[ 10.6953, -15.8906, 11.0781, ..., -6.4883, 12.3750, │ │
    │ │ -11.5312]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[ 11.2812, -15.7344, 10.9609, ..., -7.4844, 12.7578, │ │
    │ │ -11.9922]], │ │
    │ │ │ │ │ │
    │ │ │ │ ..., │ │
    │ │ │ │ │ │
    │ │ │ │ [[ 10.3672, -16.3281, 11.7812, ..., -7.4453, 12.9922, │ │
    │ │ -11.7500]], │ │
    │ │ │ │ │ │
    │ │ │ │ [[ 10.2734, -16.3750, 10.8281, ..., -6.4922, 11.6719, │ │
    │ │ -12.5078]], │ │
    │ │ │ │ │ │
    │


    The bug information is too detailed and contain some useless information such as array values. How to make it shorter as normal? I mean just make it do not show the value of arrays but only shows which line of code have errors.

    Continue reading...

Compartilhe esta Página