Define model-per-vfolder policy for vfolder import
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Motivation
During the development of the vfolder Import feature, a policy decision is required regarding whether to allow multiple models in a single vfolder. While the demo will proceed by creating new vfolders, this policy must be clarified and appropriate server-side validation logic needs to be added before customer deployment.
## Objective
Apply a policy that allows only a single model per vfolder and implement server-side validation logic to enforce this constraint.
## Details
1. **Add server-side validation logic**
- Check if a model already exists in the target vfolder when an import request is made
- Raise an appropriate error if a model already exists (e.g., `VFolderAlreadyHasModelError`)
1. **Error handling**
- Handle the error on the client/UI side to provide clear guidance to users
- Display guide messages such as "Please create a new vfolder"
1. **UX considerations**
- Review ways to minimize user inconvenience since adding models to existing vfolders will not be allowed
- Consider disabling or showing warnings for vfolders that already contain models in the vfolder selection UI before import
## Impact
- **Model Store**: The 1:1 relationship between vfolder and model becomes explicit, simplifying model query/management logic
- **Model Service**: Model serving logic is simplified as only a single model is guaranteed to exist within a vfolder
- **UX/UI**: Constraint conditions need to be displayed during vfolder selection, and a flow to guide users toward creating new vfolders needs to be added
JIRA Issue: BA-3864
Contributor guide
Assessment
This issue has not been assessed yet.