walidsobhie-code Claude Opus 4.6 commited on
Commit
8c5fec7
·
1 Parent(s): 12c2955

fix: add nested directory detection and auto-fix

Browse files

- Detect and fix stack-2.9/stack-2.9 nested directory issue
- Auto-correct working directory if nested

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. colab_train_stack29.ipynb +1 -9
colab_train_stack29.ipynb CHANGED
@@ -79,15 +79,7 @@
79
  "execution_count": null,
80
  "metadata": {},
81
  "outputs": [],
82
- "source": [
83
- "# Clone into Drive if not already there\n",
84
- "if not os.path.exists('stack-2.9'):\n",
85
- " !git clone https://github.com/my-ai-stack/stack-2.9.git\n",
86
- "\n",
87
- "os.chdir('stack-2.9')\n",
88
- "print(f\"Now in: {os.getcwd()}\")\n",
89
- "!ls -la"
90
- ]
91
  },
92
  {
93
  "cell_type": "markdown",
 
79
  "execution_count": null,
80
  "metadata": {},
81
  "outputs": [],
82
+ "source": "# Clone into Drive if not already there\nif not os.path.exists('stack-2.9'):\n !git clone https://github.com/my-ai-stack/stack-2.9.git\n\nos.chdir('stack-2.9')\n\n# Fix nested directory issue - if we're in stack-2.9/stack-2.9, go up\nif os.path.basename(os.getcwd()) == 'stack-2.9' and os.path.basename(os.path.dirname(os.getcwd())) == 'stack-2.9':\n os.chdir('..')\n print(f\"⚠️ Fixed nested directory. Now in: {os.getcwd()}\")\n\nprint(f\"Now in: {os.getcwd()}\")\n!ls -la"
 
 
 
 
 
 
 
 
83
  },
84
  {
85
  "cell_type": "markdown",