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

Implement model versioning #113

Merged
merged 20 commits into from
Dec 6, 2024
Merged

Conversation

alanocallaghan
Copy link
Collaborator

@alanocallaghan alanocallaghan commented Nov 20, 2024

  • Add a "local" model directory for local models.
  • Replace GitHub parsing with an index hosted within the extension
  • Add a version field for the InstanSegModel class.
    • For remote models, this is set to be the release name
    • For downloaded and local models, this is set to be the version in the rdf yaml (nullable).
  • Download models to model_name (from the rdf yaml), and versions in a subdirectory (eg 0.0.1)
  • Change the model "toString" so that it displays the model parent directory and name, followed by the version (if present)
    • For local models, this is local/my_model-0.1.0. Can mismatch for local models but that's fine.
    • For remote models, this will be eg my_model-0.0.1.

Downloading works as before, where we download zips on request and hopefully don't do anything twice, but still check for validity etc. This would work without needing to remove previous model versions, although you would get a weird structure where brightfield_nuclei/ contains 0.0.1 and 0.0.2 model directories, but also the files from the original 0.0.1 download.

Currently, this is implemented with the releases on my fork. There is a minor mismatch in that the rdf version is "0.0.1" while the release name is "v0.0.1", but this is easily fixable.

Also, log some more errors.

Resolves #67.

@alanocallaghan
Copy link
Collaborator Author

Suggest that the delim for name and version should be either another / or :

@alanocallaghan alanocallaghan marked this pull request as ready for review December 5, 2024 13:05
@alanocallaghan alanocallaghan marked this pull request as draft December 5, 2024 16:03
@alanocallaghan alanocallaghan marked this pull request as ready for review December 6, 2024 11:04
@alanocallaghan
Copy link
Collaborator Author

Noting to myself that the download links are currently still on my fork, which should change.

@alanocallaghan alanocallaghan merged commit 7b444ce into qupath:main Dec 6, 2024
1 check passed
@alanocallaghan alanocallaghan deleted the versioning branch December 6, 2024 12:28
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.

Local and downloaded models
1 participant