Skip to content
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

[Projects] Adding allow_cross_project flag for creating project from template #5453

Merged
merged 15 commits into from
Apr 30, 2024

Conversation

roei3000b
Copy link
Member

@roei3000b roei3000b commented Apr 21, 2024

Breaking change in this PR
We change the way the following functions behave:

  1. get_or_create_project
  2. load_project

From now, if the loaded project name(from yaml file) != provided name we will raise Exception and the regular flow of the code will break.

For example, following snippet that worked until this change:

import mlrun
project = mlrun.get_or_create_project(
            "run-with-source-and-auto-build"
        )

# do stuff with project

After this change, if the project name from the context != "run-with-source-and-auto-build" it will break this code.
There are 3 ways for fixing it:

  1. Set the allow_cross_project=True when loading the project.
  2. Delete the existing project yaml, or ensure its name is equal to the provided name(run-with-source-and-auto-build)
  3. Use different project context dir.

https://iguazio.atlassian.net/browse/ML-6300

Copy link
Member

@liranbg liranbg left a comment

Choose a reason for hiding this comment

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

some wordings and consistency

mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
mlrun/projects/project.py Outdated Show resolved Hide resolved
@liranbg liranbg merged commit 64a306a into mlrun:development Apr 30, 2024
10 checks passed
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.

None yet

3 participants