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

Test suite pip installs into current environment #265

Open
jatkinson1000 opened this issue Jan 29, 2025 · 1 comment · May be fixed by #266
Open

Test suite pip installs into current environment #265

jatkinson1000 opened this issue Jan 29, 2025 · 1 comment · May be fixed by #266
Assignees
Labels
bug Something isn't working testing Related to FTorch testing

Comments

@jatkinson1000
Copy link
Member

jatkinson1000 commented Jan 29, 2025

The test script installs the dependencies for all integration tests via pip:

FTorch/run_test_suite.sh

Lines 83 to 96 in c21040d

# Run integration tests
if [ "${RUN_INTEGRATION}" = true ]; then
if [ -e "${BUILD_DIR}/test/examples/3_MultiGPU" ]; then
EXAMPLES="1_SimpleNet 2_ResNet18 3_MultiGPU 4_MultiIO 6_Autograd"
else
EXAMPLES="1_SimpleNet 2_ResNet18 4_MultiIO 6_Autograd"
fi
for EXAMPLE in ${EXAMPLES}; do
pip -q install -r examples/"${EXAMPLE}"/requirements.txt
cd "${BUILD_DIR}"/test/examples/"${EXAMPLE}"
ctest "${CTEST_ARGS}"
cd -
done
fi

but they go into the current environment.

This was fine on GitHub workflows where we reactivate a venv, but we should probably suggest users make sure that they are running it from within a venv to avoid environment pollution.

@jatkinson1000 jatkinson1000 changed the title Test suite pip installs into base environment Test suite pip installs into current environment Jan 29, 2025
@jwallwork23
Copy link
Contributor

We could add a check like this?

if [ "${VIRTUAL_ENV}" == "" ]; then
  echo "Please activate your virtual environment before running the test suite."
  exit 1
fi

@jwallwork23 jwallwork23 added testing Related to FTorch testing bug Something isn't working labels Jan 30, 2025
@jatkinson1000 jatkinson1000 self-assigned this Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working testing Related to FTorch testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants