Skip to content

Conversation

@felipenv
Copy link
Collaborator

No description provided.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

print("Building image for the demo:")
image_builder = project.set_function(
"project_setup.py",
name="image-builder",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You can replace this implementation by using project.build_image that creates an image without creating a function in MLRun
  2. You can check if there is a default-image parameter for the project or check if the project has a default image in the spec .spec.default_image that will make sure the image gets built only once, instead of building every time you load the project

Except for this change, LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreeing with @GiladShapira94. You can also look at this demo for a reference.

Copy link
Contributor

@yonishelach yonishelach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a couple of comments.

print("Building image for the demo:")
image_builder = project.set_function(
"project_setup.py",
name="image-builder",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreeing with @GiladShapira94. You can also look at this demo for a reference.

project.set_default_image(project.get_param("default_image"))
project.set_default_image(default_image)
else:
project.set_default_image(project.get_param("default_image"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code in the if statement is executed only if there is no default image as a parameter, so the else statement is redundant.

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.

3 participants