Skip to content

实用工具 case_analyzer.py 出现错误 SyntaxError: f-string: unmatched '[' #13

@xiaxiuli

Description

@xiaxiuli

复现过程如下

1.Lawbench正常
python run.py
--datasets lawbench_one_shot_gen_002588 lawbench_zero_shot_gen_002588
--hf-path /home/xlabs/zoo/LLaMA-Factory/models/qwen2_lora_sft
--tokenizer-path /home/xlabs/zoo/LLaMA-Factory/models/qwen2_lora_sft
--tokenizer-kwargs padding_side='left' truncation='left' trust_remote_code=True
--model-kwargs device_map='auto' torch_dtype='torch.float' trust_remote_code=True
--max-seq-len 2048
--max-out-len 2048
--batch-size 8
--hf-num-gpus 1
--work-dir outputs/Qwen2-1.5B-Instruct_Lora
--debug

2.Prompt Viewer正常
python tools/prompt_viewer.py configs/datasets/lawbench/lawbench_zero_shot_gen_002588.py -a

3.Case Analyzer错误
python tools/case_analyzer.py configs/datasets/lawbench/lawbench_zero_shot_gen_002588.py -w ./outputs/Qwen2-1.5B-Instruct_Lora/20240724_142030/

提示如下:
File "/home/xlabs/zoo/opencompass-0.2.5/tools/case_analyzer.py", line 102
print(f"ds_0: {dataset["1-1"]}")
^
SyntaxError: f-string: unmatched '['

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions