Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getargspec Deprecated since Python 3.5, use inspect.getfullargspec() #97

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kaisawind
Copy link

Traceback (most recent call last):
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/train.py", line 1020, in <module>
    main(params)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/train.py", line 872, in main
    trainer = EncDecTrainer(encoder, decoder, data, params)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 1350, in __init__
    super().__init__(data, params, self.MODEL_NAMES)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 111, in __init__
    self.set_optimizers()
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 305, in set_optimizers
    self.optimizers["model"] = get_optimizer(
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/optim.py", line 315, in get_optimizer
    expected_args = inspect.getargspec(optim_fn.__init__)[0]
  File "/usr/lib/python3.10/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

kaisawind added 2 commits May 5, 2023 10:43
valid_java_sa-python_samt_comp_acc_contrib_beam_0
↓
valid_java_sa-python_sa_mt_comp_acc_contrib_beam_0
```bash
Traceback (most recent call last):
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/train.py", line 1020, in <module>
    main(params)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/train.py", line 872, in main
    trainer = EncDecTrainer(encoder, decoder, data, params)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 1350, in __init__
    super().__init__(data, params, self.MODEL_NAMES)
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 111, in __init__
    self.set_optimizers()
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/trainer.py", line 305, in set_optimizers
    self.optimizers["model"] = get_optimizer(
  File "/home/pana/github.com/facebookresearch/CodeGen/codegen_sources/model/src/optim.py", line 315, in get_optimizer
    expected_args = inspect.getargspec(optim_fn.__init__)[0]
  File "/usr/lib/python3.10/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
```
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants