Skip to content

Commit 7741fb3

Browse files
committed
remove /nfs from official docs
1 parent a52d1d4 commit 7741fb3

2 files changed

Lines changed: 14 additions & 34 deletions

File tree

scratch/animal-filtering.ipynb

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
{
1212
"cell_type": "code",
13-
"execution_count": 1,
13+
"execution_count": 8,
1414
"id": "brutal-safety",
1515
"metadata": {},
1616
"outputs": [],
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"cell_type": "code",
23-
"execution_count": 2,
23+
"execution_count": 9,
2424
"id": "animated-chrome",
2525
"metadata": {},
2626
"outputs": [],
@@ -30,24 +30,19 @@
3030
},
3131
{
3232
"cell_type": "code",
33-
"execution_count": 3,
33+
"execution_count": 5,
3434
"id": "floppy-melissa",
3535
"metadata": {},
3636
"outputs": [
3737
{
3838
"data": {
3939
"text/plain": [
40-
"(array(['Female', 'Male'], dtype=object),\n",
41-
" array(['Naive', 'Parenting', 'Virgin Parenting', 'Aggression to pup',\n",
42-
" 'Aggression to adult', 'Mating'], dtype=object),\n",
43-
" array(['Astrocyte', 'Inhibitory', 'OD Mature 2', 'Endothelial 1',\n",
44-
" 'Ambiguous', 'Pericytes', 'Endothelial 2', 'OD Mature 1',\n",
45-
" 'OD Immature 1', 'Excitatory', 'Microglia', 'Endothelial 3',\n",
46-
" 'OD Mature 4', 'OD Immature 2', 'OD Mature 3', 'Ependymal'],\n",
47-
" dtype=object))"
40+
"(array(['Male'], dtype=object),\n",
41+
" array(['Naive'], dtype=object),\n",
42+
" array(['Excitatory'], dtype=object))"
4843
]
4944
},
50-
"execution_count": 3,
45+
"execution_count": 5,
5146
"metadata": {},
5247
"output_type": "execute_result"
5348
}

spatial/train_xenium.py

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ def setup_logger(cfg, filepath):
5353
def setup_checkpoint_callback(cfg, logger, filepath):
5454
callbacks = []
5555
if cfg.training.trainer.enable_checkpointing:
56-
checkpoint_dir = os.path.join(
57-
"/nfs/turbo/lsa-regier/scratch/roko/output/lightning_logs/checkpoints",
58-
f"{cfg.model.name}Xenium",
59-
)
56+
checkpoint_dir = f"lightning_logs/checkpoints/{cfg.model.name}Xenium"
6057
# checkpoint_dir = os.path.join(cfg.paths.output, checkpoint_dir)
6158
checkpoint_callback = ModelCheckpoint(
6259
dirpath=checkpoint_dir,
@@ -207,10 +204,8 @@ def train(cfg: DictConfig, data=None, validate_only=False, lightning_integration
207204
num_workers=2,
208205
)
209206
if validate_only:
210-
checkpoint_dir = os.path.join(
211-
"/nfs/turbo/lsa-regier/scratch/roko",
212-
"output/lightning_logs/checkpoints",
213-
f"{cfg.model.name}Xenium",
207+
checkpoint_dir = (
208+
f"lightning_logs/checkpoints/{cfg.model.name}Xenium"
214209
)
215210
ckpt_path_for_validation = os.path.join(
216211
checkpoint_dir, cfg.training.filepath + ".ckpt"
@@ -222,10 +217,8 @@ def train(cfg: DictConfig, data=None, validate_only=False, lightning_integration
222217
trainer.fit(model, datamodule)
223218
else:
224219
if validate_only:
225-
checkpoint_dir = os.path.join(
226-
"/nfs/turbo/lsa-regier/scratch/roko",
227-
"output/lightning_logs/checkpoints",
228-
f"{cfg.model.name}Xenium",
220+
checkpoint_dir = (
221+
f"lightning_logs/checkpoints/{cfg.model.name}Xenium"
229222
)
230223
ckpt_path_for_validation = os.path.join(
231224
checkpoint_dir, cfg.training.filepath + ".ckpt"
@@ -263,11 +256,7 @@ def train(cfg: DictConfig, data=None, validate_only=False, lightning_integration
263256
num_workers=2,
264257
)
265258
if validate_only:
266-
checkpoint_dir = os.path.join(
267-
"/nfs/turbo/lsa-regier/scratch/roko",
268-
"output/lightning_logs/checkpoints",
269-
f"{cfg.model.name}Xenium",
270-
)
259+
checkpoint_dir = f"lightning_logs/checkpoints/{cfg.model.name}Xenium"
271260
# checkpoint_dir = os.path.join(cfg.paths.output, checkpoint_dir)
272261
ckpt_path_for_validation = os.path.join(
273262
checkpoint_dir, cfg.training.filepath + ".ckpt"
@@ -278,11 +267,7 @@ def train(cfg: DictConfig, data=None, validate_only=False, lightning_integration
278267

279268
else:
280269
if validate_only:
281-
checkpoint_dir = os.path.join(
282-
"/nfs/turbo/lsa-regier/scratch/roko",
283-
"output/lightning_logs/checkpoints",
284-
f"{cfg.model.name}Xenium",
285-
)
270+
checkpoint_dir = f"lightning_logs/checkpoints/{cfg.model.name}Xenium"
286271
# checkpoint_dir = os.path.join(cfg.paths.output, checkpoint_dir)
287272
ckpt_path_for_validation = os.path.join(
288273
checkpoint_dir, cfg.training.filepath + ".ckpt"

0 commit comments

Comments
 (0)