Skip to content

chore: dissolve dimos/memory/#2319

Open
leshy wants to merge 4 commits into
mainfrom
chore/dissolve-memory-dir
Open

chore: dissolve dimos/memory/#2319
leshy wants to merge 4 commits into
mainfrom
chore/dissolve-memory-dir

Conversation

@leshy
Copy link
Copy Markdown
Member

@leshy leshy commented Jun 1, 2026

removes old memory dir

leshy added 2 commits June 2, 2026 01:45
dimos/memory/ was a misnamed util library plus dead code, colliding with
the live memory2/. Relocate the two live pieces and delete the rest:

- timeseries base + InMemoryStore -> dimos/utils/timeseries/
- LegacyPickleStore -> dimos/utils/testing/legacy_pickle.py (beside the
  replay/moment fixtures that wrap it)
- delete embedding.py (dead POC superseded by memory2; orphaned blueprint),
  the unused pickledir/sqlite/postgres timeseries backends, and the
  orphaned detect.py / fake_zed_module.py modules
- regenerate all_blueprints.py (drops the embedding-memory entry)
- rewrite all import sites + mock.patch targets; trim test_base.py to the
  InMemoryStore case

memory2/ untouched.
After trimming to the InMemoryStore-only case, temp_dir was unused. Remove
the fixture + tempfile import, make the factory no-arg, and drop the param
from the parametrized test signatures.
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 1, 2026

Greptile Summary

This PR dissolves the dimos/memory/ package by reorganizing its contents into more appropriate locations across the codebase, and removing several modules that were superseded by memory2.

  • Renames/moves the timeseries base, in-memory, and legacy-pickle backends from dimos/memory/timeseries/ to dimos/utils/timeseries/ (for production stores) and dimos/utils/testing/ (for testing/replay utilities); all import sites across ~15 files are updated accordingly.
  • Deletes pickledir.py, postgres.py, sqlite.py, embedding.py, fake_zed_module.py, and detect.py — modules that were superseded by memory2 equivalents or were dead code — and removes the corresponding "embedding-memory" entry from all_blueprints.py.

Confidence Score: 5/5

Safe to merge — this is a pure structural reorganization with no logic changes.

Every dimos.memory.timeseries.* import site was migrated to the new paths and confirmed clean via grep. The deleted files (pickledir.py, postgres.py, sqlite.py, embedding.py, fake_zed_module.py, detect.py) have no remaining callers. The renamed files (base.py, inmemory.py, legacy.py) are functionally identical at their new locations, and the backward-compat shim in replay.py preserves the TimedSensorReplay/SensorReplay/SensorStorage aliases for existing call sites.

No files require special attention.

Important Files Changed

Filename Overview
dimos/utils/testing/legacy_pickle.py Renamed from dimos/memory/timeseries/legacy.py; class renamed to LegacyPickleStore; adds backward-compat iterate_ts/stream/files/load_one API on top of the TimeSeriesStore base. No issues found.
dimos/utils/timeseries/base.py Renamed verbatim (R100) from dimos/memory/timeseries/base.py; no content changes.
dimos/utils/timeseries/inmemory.py Renamed from dimos/memory/timeseries/inmemory.py with minor import path updates; logic unchanged.
dimos/utils/testing/replay.py Now exposes TimedSensorReplay as Memory2ReplayAdapter (backed by memory2 SQLite) alongside timed_playback helper; LegacyPickleStore aliases retained for write-side compat.
dimos/utils/timeseries/test_base.py Renamed from dimos/memory/timeseries/test_base.py with updated imports pointing to new utils paths; test logic unchanged.
dimos/types/timestamped.py Import of InMemoryStore updated from dimos.memory.timeseries.inmemory to dimos.utils.timeseries.inmemory; no functional changes.
dimos/protocol/tf/tf.py Import of InMemoryStore migrated to new path; no functional changes.
dimos/robot/all_blueprints.py Removes the "embedding-memory" entry that pointed to the now-deleted dimos.memory.embedding.EmbeddingMemory class.
dimos/hardware/sensors/fake_zed_module.py Deleted entirely; was a testing shim that depended on the old LegacyPickleStore path. No remaining references found in the codebase.
dimos/memory/timeseries/pickledir.py Deleted; functionality superseded by memory2 equivalents. No remaining imports detected.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph OLD["dimos/memory/timeseries/ (dissolved)"]
        A[base.py]
        B[inmemory.py]
        C[legacy.py]
        D[pickledir.py]
        E[postgres.py]
        F[sqlite.py]
        G[test_base.py]
        H[test_legacy.py]
    end

    subgraph NEW_UTILS["dimos/utils/timeseries/ (new home)"]
        A2[base.py]
        B2[inmemory.py]
        G2[test_base.py]
    end

    subgraph NEW_TESTING["dimos/utils/testing/ (new home)"]
        C2[legacy_pickle.py]
        H2[test_legacy.py]
    end

    subgraph DELETED["Deleted (superseded by memory2)"]
        D2[pickledir.py ❌]
        E2[postgres.py ❌]
        F2[sqlite.py ❌]
    end

    subgraph ALSO_DELETED["Also deleted (dead code)"]
        I[memory/embedding.py ❌]
        J[hardware/sensors/fake_zed_module.py ❌]
        K[robot/unitree/modular/detect.py ❌]
    end

    A -->|rename| A2
    B -->|rename| B2
    C -->|rename + class rename| C2
    D -->|deleted| D2
    E -->|deleted| E2
    F -->|deleted| F2
    G -->|rename + updated| G2
    H -->|rename| H2
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into chore/dissolve-..." | Re-trigger Greptile

Comment thread todo.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

❌ Patch coverage is 97.70115% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
dimos/models/vl/test_vlm.py 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@paul-nechifor paul-nechifor enabled auto-merge (squash) June 1, 2026 23:04
@leshy leshy changed the title chore: dissolve dimos/memory/ — relocate timeseries, drop dead code chore: dissolve dimos/memory/ Jun 1, 2026
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.

2 participants