Skip to content

Commit

Permalink
patch getargspec error (#440)
Browse files Browse the repository at this point in the history
  • Loading branch information
cpacker authored Nov 14, 2023
1 parent 05ffceb commit 3c7baab
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion memgpt/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,11 @@ def load(cls, name: str):
agent_config = json.load(f)

# allow compatibility accross versions
class_args = inspect.getargspec(cls.__init__).args
try:
class_args = inspect.getargspec(cls.__init__).args
except AttributeError:
# https://github.com/pytorch/pytorch/issues/15344
class_args = inspect.getfullargspec(cls.__init__).args
agent_fields = list(agent_config.keys())
for key in agent_fields:
if key not in class_args:
Expand Down

0 comments on commit 3c7baab

Please sign in to comment.