Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Python Value Error at Transfer Task : MR #88

@yuenherny

Description

@yuenherny

I got the following error at Transfer Task : MR when running bow.py. It was fine when at Transfer Task : STS12, STS13, STS14, STS15, STS16.

  • Python: 3.10.5
  • Torch: 1.12.0+cu113
2022-07-14 09:23:16,630 : ***** Transfer task : MR *****


2022-07-14 09:23:23,417 : Found 18472 words with word vectors, out of         20328 words
2022-07-14 09:23:23,428 : Generating sentence embeddings
2022-07-14 09:23:23,891 : Generated sentence embeddings
2022-07-14 09:23:23,892 : Training pytorch-MLP-nhid0-rmsprop-bs128 with (inner) 5-fold cross-validation
Traceback (most recent call last):
  File "D:\XpressAI-Repos\SentEval\examples\bow.py", line 111, in <module>
    results = se.eval(transfer_tasks)
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\engine.py", line 59, in eval
    self.results = {x: self.eval(x) for x in name}
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\engine.py", line 59, in <dictcomp>
    self.results = {x: self.eval(x) for x in name}
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\engine.py", line 121, in eval
    self.results = self.evaluation.run(self.params, self.batcher)
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\binary.py", line 57, in run
    devacc, testacc = clf.run()
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\tools\validation.py", line 78, in run
    clf = MLP(self.classifier_config, inputdim=self.featdim,
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\tools\classifier.py", line 200, in __init__
    optim_fn, optim_params = utils.get_optimizer(self.optim)
  File "D:\XpressAI-Repos\SentEval\examples\..\senteval\utils.py", line 89, in get_optimizer
    expected_args = inspect.getargspec(optim_fn.__init__)[0]
  File "C:\Users\YuenHern.Yu\AppData\Local\Programs\Python\Python310\lib\inspect.py", line 1245, in getargspec
    raise ValueError("Function has keyword-only parameters or annotations"
ValueError: Function has keyword-only parameters or annotations, use inspect.signature() API which can support them

Is it a Python issue or SentEval issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions