-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add support for configuring allowed licenses for models/datasets #200
base: main
Are you sure you want to change the base?
Conversation
plugins/brain/__init__.py
Outdated
|
||
def _get_zoo_models_with_embeddings(ctx, inputs): | ||
# @todo can remove this if we require `fiftyone>=1.4.0` | ||
if Version(fo.__version__) >= Version("1.4.0"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue here if the Brain plugin is installed in Teams? fo.__version__
can then match/exceed 1.4.0 without desired code updates, eg fozm._list_zoo_models(license=None) would error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good call, I used the wrong thing. Updated to use fiftyone.constants.VERSION
def _get_zoo_datasets(ctx, inputs): | ||
# @todo can remove this if we require `fiftyone>=1.4.0` | ||
if Version(fo.__version__) >= Version("1.4.0"): | ||
licenses = _get_allowed_dataset_licenses(ctx, inputs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment re Version numbers in Teams
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Change log
Uses the zoo model/dataset license information introduced in voxel51/fiftyone#5438 in a backwards-compatible way to add support for optionally configuring which license(s) models and datasets must be distributed under in order to be used via core plugin's operators.
All core operators that make use of the zoo have been updated:
@voxel51/zoo/apply_zoo_model
@voxel51/zoo/load_zoo_dataset
@voxel51/brain/compute_visualization
@voxel51/brain/compute_similarity
@voxel51/brain/compute_uniqueness
The allowed licenses are configured by setting the following plugin secrets:
Example usage
Limiting to valid licenses
Behavior when no models/datasets match the required licenses
Note in the case below: there is no error message because the
model
field is optional for this workflow (FO has a default model that is used internally)