Skip to content

Commit

Permalink
feat: change strateifiedkfold save path
Browse files Browse the repository at this point in the history
  • Loading branch information
MalMyeong committed Jan 16, 2024
1 parent d6d3253 commit 70403c0
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tools/stratifiedgroupkfold.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# annotation file\n",
"annotation = '/data/ephemeral/home/relabeled_general_trash_json/train_relabeled_class_20.json'\n",
"\n",
"# data annotation file 저장 경로\n",
"save_annotation_path = '/data/ephemeral/home/dataset'\n",
"save_folder = annotation.split(\"/\")[-1].split(\".\")[0]\n",
"save_annotation_path = f'/data/ephemeral/home/dataset/{save_folder}_k_fold'\n",
"\n",
"# annotation file\n",
"annotation = '/data/ephemeral/home/dataset/train.json'\n",
"# 저장 경로에 폴더가 없으면 생성\n",
"if not os.path.exists(save_annotation_path):\n",
" os.makedirs(save_annotation_path)\n",
"\n",
"with open(annotation) as f:\n",
" data = json.load(f)\n",
Expand All @@ -36,7 +41,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -57,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down

0 comments on commit 70403c0

Please sign in to comment.