Skip to content

Commit

Permalink
Partition data dir by route id
Browse files Browse the repository at this point in the history
Closes Have replicate partition data-dirs by dongle id #48
  • Loading branch information
nelsonjchen committed Oct 29, 2023
1 parent e235d87 commit 284eb0e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ def predict(
# Print the notes
print(notes)

# Get the full absolute path of `./shared/data_dir`
data_dir = "./shared/data_dir"
# Get the dongle ID from the route. It's everything before the first pipe.
dongleID = route.split("|")[0]

# Partition the data dir by the dongle ID from the route
data_dir = os.path.join("./shared/data_dir", dongleID)

if renderType == "ui":
# Download the route data
Expand Down

0 comments on commit 284eb0e

Please sign in to comment.