Thank you for your excellent questions!
Guild saves runs in environments. By default there’s a user-level environment at
~/.guild - so unless you’re otherwise specifying a different location, runs are located in
You can change the directory where runs are stored a few ways:
- Set the
- Specify the
-H option immediate after
guild when running any command
- Activate a virtual environment
By default, Guild saves runs inside a virtual environment directory whenever that virtual environment is activated. This provides isolation within the environment of both software libraries (i.e. installed Python packages) and also Guild runs. You can change this behavior using either
--guild-home options if you create the virtual environment using
guild init. If you create the virtual env another way, just set
GUILD_HOME to whatever you want in the activation script.
You can see where the current environment is located by running
guild check. Look for the
guild_home value in the output.
Now with all that background, to your question.
As a matter of practice, I recommend using a virtual environment for every project. I typically run
guild init within the project root, which creates a local
venv directory containing the virtual environment as well as the
.guild subdirectory, which contains the project runs. From there I run
source guild-env to activate the environment. Run
guild check to confirm that
guild_home is pointing to the expected location under
You’re free however to use
virtualenv or the
venv module or even
conda to create an environment. Just activate it and Guild will start using that location to store runs. If you prefer to keep your runs in a different location, again just make sure the
GUILD_HOME environment variable is set to that path.
Finally, there’s no way to tell Guild to save runs to a specific directory. You can only specify the Guild home path. Runs are always stored in
runs within that path — there’s no way to change that behavior.