🚸 Verify lineage for scripts created by agents using a deterministic function - #3846
Open
sheetalgiri wants to merge 22 commits into
Open
🚸 Verify lineage for scripts created by agents using a deterministic function#3846sheetalgiri wants to merge 22 commits into
sheetalgiri wants to merge 22 commits into
Conversation
…d checks: - lineage tracking calls (ln.track(...) / ln.finish(...) or imported equivalents) - LaminDB input retrieval patterns (e.g. ln.Artifact.get(...), ln.Collection.filter(...), etc.) - LaminDB output persistence patterns (.save() / ln.save(...)) - suspicious non-LaminDB input reads (e.g. pd.read_*, open, np.load, etc.)
… into verify_lineage_when_using_agents
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3846 +/- ##
==========================================
- Coverage 91.55% 87.14% -4.41%
==========================================
Files 88 89 +1
Lines 15747 16036 +289
==========================================
- Hits 14417 13975 -442
- Misses 1330 2061 +731
🚀 New features to boost your workflow:
|
|
Deployment URL: https://305e5521.lamindb.pages.dev |
- Instead of having checks like has_lamindb_inputs and has_lamindb_outputs, use checks has_external_inputs and has_external_outputs. in this case even if there is no input/output a script can be correct - if there are external inputs/outputs printing those function calls, to help guide the agent in what it should fix
lamin-cli: points to main (#254 merged). lamin-skills: points to the latest commit on sheetalgiri-patch-1 (includes the --session-id finish fix on top of verify_lineage).
lamin-cli: points to main (#255 merged). lamin-skills: points to the latest commit on the still-open sheetalgiri-patch-1 branch.
…bs/lamindb into verify_lineage_when_using_agents
- checks for file names in a script like 'x.txt'or 's.npy'or anything and whether or not they are associated with a lamin call or not , regardless of what it is, directly or indirectly, if all file names have this kind of association the function passes the script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added verify_lineage() function that parses a Python script with
astand checks:Updated skills.md so that for every python script that the agent creates/plans to run, it verifies the lineage by calling the function and doing assertions on the verification results, make sure everything passes. If there is a failure, it goes back and makes modifications to the script and runs the function again.
Why:
Limitations: