Skip to content

Commit

Permalink
[Project] Don't sync functions if running workflows in remote (#5472)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomerShor committed Apr 30, 2024
1 parent 03aecff commit e9fdfdd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions mlrun/projects/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -2861,12 +2861,14 @@ def run(
"Remote repo is not defined, use .create_remote() + push()"
)

self.sync_functions(always=sync)
if not self.spec._function_objects:
raise ValueError(
"There are no functions in the project."
" Make sure you've set your functions with project.set_function()."
)
if engine not in ["remote"]:
# for remote runs we don't require the functions to be synced as they can be loaded dynamically during run
self.sync_functions(always=sync)
if not self.spec._function_objects:
raise ValueError(
"There are no functions in the project."
" Make sure you've set your functions with project.set_function()."
)

if not name and not workflow_path and not workflow_handler:
raise ValueError("Workflow name, path, or handler must be specified")
Expand Down

0 comments on commit e9fdfdd

Please sign in to comment.