Resource links are a convenient way to refer to specific files or directories within your Spell resources. They are very similar to file system symbolic links. For example, if you frequently find yourself referring to a deeply nested file, such as runs/2493/checkpoints/models/face-detection/weights, you can create a link:

$spell link face-weights runs/2493/checkpoints/models/face-detection/weights Successfully created symlink: face-weights ---> runs/2493/checkpoints/models/face-detection/weights Mar 11 10:58  The link alias can then be used in other Spell commands. For example, to mount the file in a new run you can use the face-weights alias: $ spell run -m face-weights:model/weights python train.py


Note

In an organization, resource links are shared across the entire organization. This means that once you create a resource link, anyone in your organization can see or use the link. However, only the original creator or an admin for your organization is allowed to delete the link.

To create a link use the spell link command, pass the desired link alias as the first argument and the resource path as the second argument. The resource path must be an existing file or directory within a Spell resource (i.e., a run output, upload, or public dataset). For example:

$spell link coco-train public/image/coco2014/train2014/ Successfully created symlink: coco-train ---> public/image/coco2014/train2014 Mar 11 11:07  There are three ways to view all of your links: • Run the spell link command with no arguments $ spell link
face-weights ---> runs/2493/checkpoints/models/face-detection/weights    Mar 11 10:58
coco-train ---> public/image/coco2014/train2014                          Mar 11 11:07

• Run the spell ls command with no arguments. Links will show up in the format ALIAS -> RESOURCE PATH
$spell ls - - public - - runs - - uploads - - face-weights -> runs/2493/checkpoints/models/face-detection/weights - - coco-train -> public/image/coco2014/train2014  You can delete a link using the spell unlink command: $ spell unlink face-weights
Successfully removed link with alias face-weights.


You can use a link alias in lieu of the full resource path anywhere you would normally use the resource path, including:

• specifying attached resources (i.e., the -m/--mount option to the spell run and spell hyper commands)
• as an argument to the spell ls command
• as an argument to the spell cp command