Skip to content

Commit

Permalink
fix: improve windows compat
Browse files Browse the repository at this point in the history
  • Loading branch information
percevalw committed May 21, 2024
1 parent b6cf1da commit a549bc9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion edsnlp/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -1213,7 +1213,7 @@ def load_from_huggingface(
if should_install or not any(
p.startswith(module_name) and p.endswith(".dist-info") for p in os.listdir(path)
):
pip = sys.executable.rsplit("/", 1)[0] + "/pip"
pip = os.path.join(*os.path.split(sys.executable)[:-1], "pip")
subprocess.run(
[pip, "install", path, "--target", path, "--no-deps", "--upgrade"]
)
Expand Down
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
os.environ["EDSNLP_MAX_CPU_WORKERS"] = "2"
os.environ["TZ"] = "Europe/Paris"

time.tzset()
try:
time.tzset()
except AttributeError:
pass
logging.basicConfig(level=logging.INFO)


Expand Down

0 comments on commit a549bc9

Please sign in to comment.