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

Assistant Archival Cleanup #1011

Merged
merged 28 commits into from
Jan 31, 2025

Conversation

stephherbers
Copy link
Contributor

@stephherbers stephherbers commented Dec 19, 2024

Description

990
Followup logic changes for assistant versioning archiving.

Screen.Recording.2025-01-20.at.3.14.50.PM.mov

Now, when a assistant is archived that is a working version, all its versions is also archived and deleted from open AI.

Also from a UI standpoint. When it checks whether is can be archived, if its the working version it checks for all dependencies for all the versions not just the working version and displays everything that needs to be archived first. This way, the version won't be archived with the open AI deleted with something (exp or pipeline) still referencing it). Only the working and published references will be displayed as blocking to the user for the assistant to be archived

User Impact

Demo

Screenshot 2025-01-28 at 2 09 43 PM

loom demo

When a user goes to archive an assistant, there will be 3 uses cases checked:

  1. Are there any published or working experiments that are referencing the assistant?
  2. Are there and working pipelines are thar referencing the assistant
  3. Are there and published experiments that have pipelines that are referencing the assistant.
    For cases 1 & 3, it links to the experiment version that is blocking, and for case 2 it links to the pipeline that is blocking

Docs

being updated now

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2024

Codecov Report

Attention: Patch coverage is 94.48276% with 8 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/assistants/views.py 20.00% 4 Missing ⚠️
apps/experiments/models.py 25.00% 3 Missing ⚠️
apps/assistants/models.py 95.65% 1 Missing ⚠️
Additional details and impacted files

📢 Thoughts on this report? Let us know!

apps/assistants/models.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@snopoke snopoke left a comment

Choose a reason for hiding this comment

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

After reviewing this and testing it locally I think we need to take a step back and look more holistically at how we trace references to objects and make that visible in the UI.

I've started a doc to make it easier to collaborate on the thoughts and ideas: https://docs.google.com/document/d/1Z09GNpO17izoVcRPGSmppNthFruyRJ0033T-RYvapoE/edit?tab=t.0

apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/models.py Show resolved Hide resolved
@stephherbers
Copy link
Contributor Author

noting that we are moving forward with changes from the doc so those commits will be coming in later and I will re-requests reviews

apps/assistants/views.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@SmittieC SmittieC left a comment

Choose a reason for hiding this comment

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

It's coming together nicely. Just two small comments

Copy link
Collaborator

@snopoke snopoke left a comment

Choose a reason for hiding this comment

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

This is very close now. I'm going to check it out and test it locally.

apps/assistants/models.py Outdated Show resolved Hide resolved
apps/assistants/models.py Show resolved Hide resolved
apps/assistants/models.py Show resolved Hide resolved
apps/assistants/models.py Outdated Show resolved Hide resolved
apps/assistants/models.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Show resolved Hide resolved
apps/assistants/views.py Show resolved Hide resolved
@stephherbers
Copy link
Contributor Author

@snopoke @SmittieC updated the screenshot in the description-- and I'll try for rearrqanging the confirmation modals a bit more before calling it quits. I believe this covers everything we discussed, plus updated tests

Copy link
Collaborator

@snopoke snopoke left a comment

Choose a reason for hiding this comment

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

so close!

apps/assistants/models.py Show resolved Hide resolved
apps/assistants/models.py Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
apps/assistants/tests/test_delete.py Outdated Show resolved Hide resolved
snopoke
snopoke previously approved these changes Jan 30, 2025
Copy link
Collaborator

@snopoke snopoke left a comment

Choose a reason for hiding this comment

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

Looks ready to merge once tests are passing:

=========================== short test summary info ============================
FAILED apps/assistants/tests/test_delete.py::TestAssistantArchival::test_archive_assistant_fails_with_working_related_versioned_pipeline_and_working_experiment - assert not True
 +  where True = <bound method OpenAiAssistant.archive of <OpenAiAssistant: >>()
 +    where <bound method OpenAiAssistant.archive of <OpenAiAssistant: >> = <OpenAiAssistant: >.archive
FAILED apps/assistants/tests/test_delete.py::TestAssistantArchival::test_archive_assistant_fails_with_working_related_pipeline - assert not True
 +  where True = <bound method OpenAiAssistant.archive of <OpenAiAssistant: >>()
 +    where <bound method OpenAiAssistant.archive of <OpenAiAssistant: >> = <OpenAiAssistant: >.archive
=========== 2 failed, 878 passed, 448 warnings in 323.87s (0:05:23) ============

@stephherbers stephherbers merged commit c58bb28 into main Jan 31, 2025
7 checks passed
@stephherbers stephherbers deleted the smh/assistent-deletion-and-archiving-cleanup branch January 31, 2025 05:48
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.

4 participants