Error when running run_summarization.py
Hi,I am trying to run this simple run_summarization.py following this page:github.com//github.com/huggingface/optimum-intel/tree/main/examples/neural_compressor/summarizationBelow are the error messages that I obtained:(base) smgailab@upfspr:~/Intel/optimum-intel/examples/neural_compressor/summarization$ python run_summarization.py–model_name_or_path t5-small–dataset_name=cnn_dailymail–dataset_config “3.0.0”–source_prefix "summarize: "–apply_quantization–apply_pruning–target_sparsity 0.1–num_train_epochs 4–max_train_samples 100–do_train–do_eval–verify_loading–predict_with_generate–per_device_train_batch_size=4–per_device_eval_batch_size=4–output_dir /tmp/test_summarizationrun_summarization.py: error: the following arguments are required: --model_name_or_path, --output_dir–model_name_or_path: command not found–dataset_name=cnn_dailymail: command not found–source_prefix: command not foundSystem info:Distributor ID: UbuntuDescription:    Ubuntu 22.04 LTSRelease:        22.04Python 3.11.4Model name:            Intel(R) Xeon(R) Platinum 8480+
2023-08-24T15:48:52Z
darkhorse82:–Command arguments need two dashes (--) not one like you are using (-)Also in the future, please try and use back-ticks for code blocks and commands, it makes things easier for the rest of us! (the (`) char)
2023-08-24T15:54:50Z
Hi there,I am using double dashes… i think something went wrong when i copy and paste from the terminal.python run_summarization.py \–model_name_or_path t5-small–dataset_name=cnn_dailymail–dataset_config “3.0.0”–source_prefix "summarize: "–apply_quantization–apply_pruning–target_sparsity 0.1–num_train_epochs 4–max_train_samples 100–do_train–do_eval–verify_loading–predict_with_generate–per_device_train_batch_size=4–per_device_eval_batch_size=4–output_dir /tmp/test_summarizationimage952×259 7.95 KB
2023-08-24T15:55:25Z
image1624×681 64.2 KB
2023-08-24T16:16:53Z
eventually i think something wrong with torch.quantization?(base) smgailab@upfspr:~/Intel/optimum-intel/examples/neural_compressor/summarization$ ./run_summarization.shTraceback (most recent call last):File “/home/smgailab/Intel/optimum-intel/examples/neural_compressor/summarization/run_summarization.py”, line 53, infrom optimum.intel.neural_compressor import INCModelForSeq2SeqLM, INCSeq2SeqTrainerFile “/home/smgailab/miniconda3/lib/python3.11/site-packages/optimum/intel/neural_compressor/init.py”, line 16, infrom .quantization import (File “/home/smgailab/miniconda3/lib/python3.11/site-packages/optimum/intel/neural_compressor/quantization.py”, line 29, infrom torch.quantization import add_observer_, convertImportError: cannot import name ‘add_observer_’ from ‘torch.quantization’ (/home/smgailab/miniconda3/lib/python3.11/site-packages/torch/quantization/init.py)./run_summarization.sh: line 2: --model_name_or_path: command not found./run_summarization.sh: line 5: --source_prefix: command not foundThis is my run_summarization.sh file
2023-08-24T16:44:21Z
darkhorse82:ImportError: cannot import name ‘add_observer_’ from ‘torch.quantization’ (/home/smgailab/miniconda3/lib/python3.11/site-packages/torch/quantization/init.py)You may want to update your torch version then perhaps.