Releases: arun1729/cog
Releases · arun1729/cog
3.8.2
3.8.1
3.8.0
3.7.5
3.7.4
3.7.3
- Logging Configuration Removal: Removed the
dictConfig()call fromGraph.__init__incog/torque.pyto prevent the library from overwriting the host application's logging setup. - Logging Configuration Data Removal: Eliminated the
logging_configdictionary fromcog/config.py, which previously defined the library's default logging configuration. - Logger Namespacing: Standardized all internal loggers by namespacing them under 'cog.' (e.g.,
cog.torque,cog.database) for better organization and clarity.
3.7.2
New features
- g.vectorize() - Auto-Embedding
Add vector embeddings for your graph with a single call using CogDB's free embedding service.
g.vectorize() # embed all nodes
g.vectorize("europa") # embed a specific word
g.vectorize(["ocean", "ice", "moon"]) # embed a list of words- Auto-Embed on Query
After calling vectorize(), similarity queries automatically embed missing words.
g.vectorize() # set up provider
g.v().k_nearest("new_concept", k=5).all() # auto-embeds "new_concept"
g.v().sim("ocean", ">", 0.7).all() # auto-embeds "ocean"3.7.1
- Added
.graph()terminal function and path tracking for graph visualization (works with D3.js or vis.js)
Example
g = Graph("social")
g.put("alice", "follows", "bob")
g.put("bob", "follows", "charlie")
g.put("bob", "status", "active")
g.v("alice").out("follows").out("follows").graph(){
"nodes": [
{"id": "alice"},
{"id": "bob"},
{"id": "charlie"}
],
"links": [
{"source": "alice", "target": "bob", "label": "follows"},
{"source": "bob", "target": "charlie", "label": "follows"}
]
}3.7.0
- New
delete()method: Introduced adelete(s, p, o)method for precise removal of individual edges (triples) from the graph. - New
truncate()method: Added atruncate()method to clear all data from a graph while preserving its structure and making it reusable. - Refined
drop()method: Thedrop()method has been redefined: it now serves to delete the entire graph (local) or raises deprecation/not-implemented errors (remote), clarifying its destructive nature and separating it from edge removal.
3.6.6
- Bug Fix: Resolved EOFError occurring when RECORD_SEP (0xFD) byte appeared within marshalled payloads, particularly affecting embeddings, leading to truncated reads on reopen.
- Length-Aware Record Reading: Replaced the sentinel-scanning __read_until() method with a new __read_record() method that parses a header to determine exact payload length, preventing premature record truncation.
- Improved Resource Management: Enhanced the close() method in cog/core.py to ensure proper flushing and closing of mmap and file handles, preventing potential data loss or resource leaks.
- Comprehensive Regression Testing: Introduced two new test files (test/test_eof_error.py and test/test_storage_integration.py) to thoroughly validate the fix and ensure data integrity across various scenarios, including complex data types, large batches, and multiple database reopen cycles.