What is the difference between mlrun.code_to_function
and mlrun.new_project
?
For example, we can deploy a function with code_to_function
:
a_fn = mlrun.code_to_function(name='my_function',
handler='handler',
kind='nuclio',
image='mlrun/mlrun')
a_fn.deploy()
or we can deploy a function with mlrun.project.set_function
project = mlrun.new_project(project_name_base,
context=project_path,
user_project=True)
fn = project.set_function("my_function.ipynb",
name='my_function')
In which case I should use code_to_function
or set_function
?