Skip to content

ML-9958 remove private image #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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 0 additions & 131 deletions project.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions project_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup(
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
Collaborator

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.

handler="assert_build",
kind="job",
image="mlrun/ml-models-gpu",
image="mlrun/mlrun-gpu",
requirements=[
"torch",
"transformers[deepspeed]",
Expand All @@ -45,7 +45,9 @@ def setup(
)
assert image_builder.deploy()
default_image = image_builder.spec.image
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
Collaborator

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.


# Set the project git source:

Expand Down
18 changes: 14 additions & 4 deletions tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "d771e4ba-43a4-4bcf-8ae0-d35c0f80d259",
"metadata": {},
"outputs": [
Expand All @@ -229,7 +229,6 @@
" user_project=True,\n",
" parameters={\n",
" \"source\": \"git://github.com/mlrun/demo-llm-tuning.git#main\",\n",
" \"default_image\": \"yonishelach/mlrun-llm\",\n",
" })"
]
},
Expand All @@ -250,7 +249,18 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "d92854a4",
"metadata": {},
"outputs": [],
"source": [
"# the absolute path to the file as it is in the local file system\n",
"html_links = \"/User/demo-llm-tuning/data/html_urls.txt\""
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b1ea5ec6-cb78-44db-aac7-97e52ce591db",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -400,7 +410,7 @@
"workflow_run = project.run(\n",
" name=\"training_workflow\",\n",
" arguments={\n",
" \"html_links\": \"/User/demo-llm-tuning/data/html_urls.txt\",\n",
" \"html_links\": html_links,\n",
" \"model_name\": \"falcon-7b-mlrun\",\n",
" \"pretrained_tokenizer\": model_name,\n",
" \"pretrained_model\": model_name,\n",
Expand Down