Skip to content

Commit

Permalink
remove temp file
Browse files Browse the repository at this point in the history
  • Loading branch information
glemaitre committed Jan 22, 2025
1 parent 2d67184 commit a9ab8bc
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions examples/use_cases/plot_employee_salaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,9 @@

# %%
#
# Creating and loading the skore project
# --------------------------------------
#
# We start by creating a temporary directory to store our project so that we can easily
# clean it after executing this example. In addition, we set some environment variables
# to avoid some spurious warnings related to parallelism.
# We set some environment variables to avoid some spurious warnings related to
# parallelism.
import os
import tempfile
from pathlib import Path

temp_dir = tempfile.TemporaryDirectory(prefix="skore_example_")
temp_dir_path = Path(temp_dir.name)

os.environ["POLARS_ALLOW_FORKING_THREAD"] = "1"
os.environ["TOKENIZERS_PARALLELISM"] = "true"
Expand All @@ -31,7 +22,7 @@
# experiments.
import skore

project = skore.open(temp_dir_path / "my_project")
project = skore.open("my_project", create=True)

# %%
#
Expand Down Expand Up @@ -296,4 +287,4 @@ def periodic_spline_transformer(period, n_splines=None, degree=3):
# %%
#
# Finally, we clean up the project by removing the temporary directory.
temp_dir.cleanup()
project.clear()

0 comments on commit a9ab8bc

Please sign in to comment.