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

feat: use relative path for model info in data folder #1368

Closed
vansangpfiev opened this issue Oct 1, 2024 · 6 comments
Closed

feat: use relative path for model info in data folder #1368

vansangpfiev opened this issue Oct 1, 2024 · 6 comments
Assignees
Milestone

Comments

@vansangpfiev
Copy link
Contributor

vansangpfiev commented Oct 1, 2024

We store absolute path for yaml path in database. When we transfer the Cortex data folder (models) to another computer or move it between disks/folders, it will break.
We have all model data in the data folder, it makes sense to store relative path in the database.
Note: we have an edge case for import model

Motivation / context: https://discordapp.com/channels/1107178041848909847/1204617960615055401/1290493569156776088

@vansangpfiev vansangpfiev self-assigned this Oct 1, 2024
@github-project-automation github-project-automation bot moved this to Investigating in Menlo Oct 3, 2024
@vansangpfiev vansangpfiev moved this from Investigating to In Progress in Menlo Oct 3, 2024
@gabrielle-ong
Copy link
Contributor

@vansangpfiev do we have an issue tracking the edge case for import models?

@vansangpfiev
Copy link
Contributor Author

vansangpfiev commented Oct 16, 2024

@gabrielle-ong Created a ticket for tracking: #1496

@gabrielle-ong
Copy link
Contributor

QA: Mac, Linux, Windows
✅ Successfully transfer models across folders and disks

@gabrielle-ong gabrielle-ong moved this from Review + QA to Completed in Menlo Oct 18, 2024
@gabrielle-ong gabrielle-ong added this to the v1.0.1 milestone Oct 18, 2024
@gabrielle-ong
Copy link
Contributor

@vansangpfiev clarifying so I can understand this better for docs (no changes needed for v1.0.1)

  1. When is the case that users will copy model data folders (is this an edge case or do we want to encourage it?)

  2. My understanding is that generally if users copy a model folder in, they will still have to run cortex pull to load the model into cortex.db, is that correct?

Sample test (this may be entirely wrong, cmiiw)

Image

Image

For this screenshot, I copied a new models folder and renamed the old one archived_models
3. Filed to read file: bad file (this is because it is not yet loaded to db?)
4. pull huggingface with model ID TheBloke - failed - why?
5. pull cortexso tinyllama - exists in the model folder, but retriggers download - why?

@vansangpfiev
Copy link
Contributor Author

@gabrielle-ong This PR is intended for migrating all cortex data folder which includes models engines and cortex.db

@dan-menlo
Copy link
Contributor

@gabrielle-ong I think this PR isn't supposed to cover the "model import" edge case - e.g. copying a model folder in.

@vansangpfiev is just updating Cortex to use relative paths instead of absolute paths. I think we can handle the import scenario in the separate ticket.

@vansangpfiev clarifying so I can understand this better for docs (no changes needed for v1.0.1)

  1. When is the case that users will copy model data folders (is this an edge case or do we want to encourage it?)
  2. My understanding is that generally if users copy a model folder in, they will still have to run cortex pull to load the model into cortex.db, is that correct?

Sample test (this may be entirely wrong, cmiiw)

Image

Image

For this screenshot, I copied a new models folder and renamed the old one archived_models 3. Filed to read file: bad file (this is because it is not yet loaded to db?) 4. pull huggingface with model ID TheBloke - failed - why? 5. pull cortexso tinyllama - exists in the model folder, but retriggers download - why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants