From b86d3e8f968ce134d0ad557e6fda4292b6dfe4fe Mon Sep 17 00:00:00 2001 From: Charles Packer Date: Mon, 13 Nov 2023 17:49:01 -0800 Subject: [PATCH] patch getargspec error (#440) --- memgpt/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/memgpt/config.py b/memgpt/config.py index 4ca22a74..feb4bbea 100644 --- a/memgpt/config.py +++ b/memgpt/config.py @@ -344,7 +344,11 @@ class AgentConfig: 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: