Skip to content

Commit

Permalink
ensure kfp is installed from source
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-mccarthy committed Dec 20, 2023
1 parent f52ba56 commit a227aeb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sdk/python/kfp/local/testing_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from absl.testing import parameterized
from google.protobuf import json_format
from google.protobuf import message
import kfp
from kfp import components
from kfp import dsl
from kfp.local import config as local_config
Expand Down Expand Up @@ -82,6 +83,11 @@ def tearDown(self):
# EXIT: mount KFP dir to enable install from source for docker runner
docker_task_handler.DockerTaskHandler.get_volumes_to_mount = self.original_get_volumes_to_mount

kfp_path = os.path.abspath(kfp.__file__)
assert os.path.exists(
kfp_path
) and 'site-packages' not in kfp_path, "KFP should be installed from source in editable mode to run unit tests. Try 'pip install -e sdk/python'. If you've already done this, it's possible the tests have erroneously changed which KFP source code is under test."

@classmethod
def setUpClass(cls):
# ENTER: use local KFP package path for subprocess runner
Expand Down

0 comments on commit a227aeb

Please sign in to comment.