facebookresearch / InferSent

InferSent sentence embeddings
Other
2.28k stars 471 forks source link

extract features Infersent error #154

Open elidabiri628 opened 1 year ago

elidabiri628 commented 1 year ago

why that code doesn't work? I receive this message: all of arguments are required after this step in the last line

I was busy with it for 2 months and now I don't know how to fix it I will be very appreciate if you answer me thanks a lot

parser.add_argument('-g', '--w2v_path', type=str, required=True,
                    help='Path to word vector file')
parser.add_argument('-v', '--version', type=int, required=True,
                    help='Version of InferSent (GloVe-V1 or fastText-V2)')
parser.add_argument('-f', '--model_path', type=str, required=True,
                    help='Path to pretrained .pkl model file')
parser.add_argument('-t', '--tokenize', action='store_true',
                    help='Passes tokenize=True to build_vocab()')
parser.add_argument('-o', '--out-dir', type=str, required=True,
                    help='Output folder to save feature files')
parser.add_argument('-c', '--cpu', action='store_true',
                    help='Use CPU instead of GPU.')
parser.add_argument('-b', '--batch-size', type=int, default=64,
                    help='Batch size (default: 64)')
parser.add_argument('files', nargs='+',
                    help='List of files to extract sentence embeddings')

args = parser.parse_args()
elidabiri628 commented 1 year ago

usage: extract-features [-h] -g W2V_PATH -v VERSION -f MODEL_PATH [-t] -o OUT_DIR [-c] [-b BATCH_SIZE] files [files ...] extract-features: error: the following arguments are required: -g/--w2v_path, -v/--version, -o/--out-dir, files An exception has occurred, use %tb to see the full traceback.

this is the error message