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

chore: Changed tableName to memoryType as it is mapping to memories table in database #1539

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

asicarbon
Copy link

…the type field in the memories table in the DB. This improves code clarity as there were many places where a MemoryManager is created and took tableName and the code said this would act on a different database table, but in fact all of those lead to the memories table in the database, and tableName was just being mapped to type there, so memoryType is more appropriate name

Relates to:

No issue

Risks

Low

Background

What does this PR do?

This improves code clarity and understandability. Previously the code strongly implied that the MemoryManager would act on different tables in the underlying DB, whereas all instantiations of the MemoryManager actually write to the same table in the DB but write a string to the 'type' field to distinguish (and namespace) different types of memories. This PR renames 'tableName' as 'memoryType'

What kind of change is this?

Code improvement

Why are we doing this? Any context or related work?

As the code is evolving quickly, changes to improve understandability and semantically clear naming of variables and parameters will help us scale and improve overall developer productivity.

Documentation changes needed?

documentation changes are included

Testing

Tested changes.

Where should a reviewer start?

Discord username

ASI Carbon

…the type field in the memories table in the DB. This improves code clarity as there were many places where a MemoryManager is created and took tableName and the code said this would act on a different database table, but in fact all of those lead to the memories table in the database, and tableName was just being mapped to type there, so memoryType is more appropriate name
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @asicarbon! Welcome to the ai16z community. Thanks for submitting your first pull request; your efforts are helping us accelerate towards AGI. We'll review it shortly. You are now a ai16z contributor!

@odilitime odilitime changed the title Changed tableName to memoryType as it is mapping to memories table in database chore: Changed tableName to memoryType as it is mapping to memories table in database Dec 28, 2024
@odilitime odilitime changed the base branch from main to develop December 28, 2024 18:23
@odilitime
Copy link
Collaborator

odilitime commented Dec 28, 2024

This is going cause problems for the 70 or so PRs we have open. I'm not sure it's value is worth the cost. Though if we're going to do it, we better do it sooner than later.

@asicarbon
Copy link
Author

always a trade off yes... a bit luckily i just did a quick search through the open PRs and looked at in the "files changed" for those containing "tableName"... was a manual check but only seemed to affect about 4-5 PRs out of all of them. I suspect this is because with many of the PRs their changes are well isolated in the code base.

On the value side of this change, I would say that this caused me quite a bit of confusion until I finally dug into the code and found that tableName was not in fact a reference to a table name at all. When I asked in the forum unfortunately nobody was able to answer me. Given the project is still so early... and more developer coming... the value of more rapidly understanding the system multiplied by all those developers reaching productivity a bit faster is real value. I know there is alot of interest in the memory system as well so as part of the core it should be as clear as possible IMHO.

@HashWarlock
Copy link
Collaborator

This is going cause problems for the 70 or so PRs we have open. I'm not sure it's value is worth the cost. Though if we're going to do it, we better do it sooner than later.

How do you think this will affect the v1 agents in production? Those agents that get an upgrade can be a headache to find out if their is not a public announcement on this type of change when it gets merged.

@odilitime
Copy link
Collaborator

I’m just looking for some additional input from Eliza devs before we make a decision. Thanks for the analysis asicarbon, it is helpful.

@asicarbon
Copy link
Author

I’m just looking for some additional input from Eliza devs before we make a decision. Thanks for the analysis asicarbon, it is helpful.

sure thing!

@lalalune
Copy link
Member

lalalune commented Jan 1, 2025

@odilitime I think this is correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants