mirror of
https://github.com/deepspeedai/DeepSpeed.git
synced 2025-10-20 15:33:51 +08:00
tests/conftest.py
: automatically add local deepspeed repo when running tests (#7317)
This is a follow up to https://github.com/deepspeedai/DeepSpeed/pull/923 my original code was a copy from transformers, which has a different fs layout and I missed that. So this PR is fixing it to actually do the right thing. Now you can have multiple clones of deepspeed and the tests will use the local repo automatically and not the pre-installed deepspeed.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
import sys
|
||||
import pytest
|
||||
import os
|
||||
from os.path import abspath, dirname, join
|
||||
from os.path import abspath, dirname
|
||||
import torch
|
||||
import warnings
|
||||
|
||||
@ -17,7 +17,7 @@ os.environ['PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION'] = 'python'
|
||||
|
||||
# allow having multiple repository checkouts and not needing to remember to rerun
|
||||
# 'pip install -e .[dev]' when switching between checkouts and running tests.
|
||||
git_repo_path = abspath(join(dirname(dirname(__file__)), "src"))
|
||||
git_repo_path = abspath(dirname(dirname(__file__)))
|
||||
sys.path.insert(1, git_repo_path)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user