Skip to content
Snippets Groups Projects
Commit 5d328548 authored by Martin's avatar Martin
Browse files

add username to default cache path to avoid conflicts with other user caches

parent 32de35af
No related branches found
No related tags found
No related merge requests found
Pipeline #74324 passed
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import argparse import argparse
import getpass
import os import os
import random import random
from collections import Counter from collections import Counter
...@@ -620,6 +621,8 @@ class KaldiPartitionSplitter: ...@@ -620,6 +621,8 @@ class KaldiPartitionSplitter:
def create_parser(): def create_parser():
user_name = getpass.getuser()
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description="Script to generate Kaldi or kraken training data from annotations from Arkindex", description="Script to generate Kaldi or kraken training data from annotations from Arkindex",
formatter_class=argparse.ArgumentDefaultsHelpFormatter, formatter_class=argparse.ArgumentDefaultsHelpFormatter,
...@@ -802,7 +805,7 @@ def create_parser(): ...@@ -802,7 +805,7 @@ def create_parser():
parser.add_argument( parser.add_argument(
"--cache_dir", "--cache_dir",
type=Path, type=Path,
default=Path("/tmp/kaldi_data_generator/cache/"), default=Path(f"/tmp/kaldi_data_generator_{user_name}/cache/"),
help="Cache dir where to save the full size downloaded images. Change it to force redownload.", help="Cache dir where to save the full size downloaded images. Change it to force redownload.",
) )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment