Skip to content

error when using the pytorch demo #1361

Open
@Chiaquan

Description

@Chiaquan
File "/home/afbio/miniconda3/envs/lit-nlp/lib/python3.10/site-packages/lit_nlp/examples/sst_pytorch_demo.py", line 237, in <module>
    app.run(main)
  File "/home/afbio/miniconda3/envs/lit-nlp/lib/python3.10/site-packages/absl/app.py", line 308, in run
    _run_main(main, args)
  File "/home/afbio/miniconda3/envs/lit-nlp/lib/python3.10/site-packages/absl/app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "/home/afbio/miniconda3/envs/lit-nlp/lib/python3.10/site-packages/lit_nlp/examples/sst_pytorch_demo.py", line 227, in main
    models = {"sst": SimpleSentimentModel(model_path)}
TypeError: Can't instantiate abstract class SimpleSentimentModel with abstract method predict

I encoutered the problems when using both pytorch demo?And dont know how to deal with?

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