generated from thoth-station/template-project
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Introduce ps-stacks prescription for ps-cv-pytorch #17213
Merged
fridex
merged 4 commits into
thoth-station:master
from
pacospace:introduce-ps-stack-prescription
Sep 22, 2021
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
units: | ||
boots: | ||
- name: ThothPSCVTorchBaseImageBoot | ||
type: boot | ||
should_include: | ||
adviser_pipeline: true | ||
runtime_environments: | ||
base_images: [null] # Only if no base image is used. | ||
match: | ||
- package_name: opencv-python | ||
- package_name: torch | ||
run: | ||
log: | ||
type: INFO | ||
message: Found predictive stack image that can be used with these dependencies | ||
stack_info: | ||
- type: INFO | ||
message: Consider using predictive stack for computer vision with Pytorch | ||
link: https://quay.io/repository/thoth-station/ps-cv-pytorch |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Based on the match part, this message will be shown also when
tensorboard
,jupyter-tensorboard
orpillow
will be resolved. Is it expected?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.
Maybe not, maybe only when any of those are combined with the main packages, Pytorch and opencv. I will remove them then. Thanks @fridex !
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.
What about adjusting it to make it more generic - not specific to Pytorch, but to a computer vision stack?
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.
Actually thinking a little bit more on this, if their software stacks is a subset of the list of packages stated in the prescription, we could recommend a base image (or more in the future maybe, sorted by?), so it might make sense to keep also the others because if they have have more packages that those ones in the prescription (direct one) we won't recommend it right?, wdyt?
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.
The packages can be kept in the prescription as the recommender system can provide suggestions on which base image to use. The justification message can be adjusted to be more generic, not specific to Pytorch. Users can use the container image if it provides used packages.
We can still advertise the base images and users can build on top of them. If the intention is to ecommend the base image based on the direct dependencies, you can provide
boot
prescription unit that can act on direct dependencies used in the application - see https://thoth-station.ninja/docs/developers/adviser/prescription/boots.html#boot-matchThere 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 this a different prescription to be prepared? Isn't the
type: wrap
doing that purpose?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.
The same way as Kubernetes provides different objects, such as Job or Deployment, the same way the resolver provides types of pipeline units as an abstraction to configure the resolution process.
wrap
is executed at the end of the resolution process on a fully resolved set of packages whereasboot
is executed at the beginning of the resolution process on direct dependencies (just for completeness: there are other inputs that they can act on, but that is not relevant for this case).Now, the difference in
wrap.match
part - this configuration will add the justification mentioned whenjupyter-tensorboard
ORtorch
is present:Whereas this configuration will add the justification when
jupyter-tensorboard
ANDtorch
are present in the resolved set of packages at the same time:Additional version ranges and index configuration can be applied.
To recommend the base image, it might be good to pick "representatives" that describe the container image the best. This way, we can recommend a container image for computer vision with
pytorch
ifpytorch
is present. On the other hand,jupyter-tensorboard
might not be a good package to justify recommending pytorch specific computer vision container images.This might be a good start, then we can perform a more complicated things as discussed in AICoE/recommend-base-image-tutorial#1
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 for the detailed explanation @fridex, now I understand :) and I think we can start with the
boot
then and when we will do something more complex later we can make it awarp
(maybe when we analyze ps- images and learn specific versions per tags, so we can recommend more precise image tag), wdyt?I agree with you on the use of "representatives"! I will modify the PR, thanks!!