Guild AI and cookiecutter structure

I am trying to use the cookiecutter project structure together with guild. The only changes I am making to the cookiecutter project structure is to change the Makefile to a guild.yml file.

If anyone has any experience with this, I would love to understand if there are other changes to the structure or other ways to structure your projects that, in your experience, is better than the cookiecutter when combined with guild.

Hi @copah - welcome!

I would encourage you to look elsewhere for a standard Python project layout. The example they provide is non-standard and does some things are bizarre.

They would have you use the API like this:

from src import data

No :slight_smile:

Unfortunately there’s no official Python project structure. However, there are strong conventions that most projects will adhere to.

This SO thread captures the gist:

I just used cookiecutter to create a project this way:


This creates a normal looking project. I would use this as my starting point rather than the data science template. (The only caveat is that for some reason it creates a module with the same name under the package: <project>/python_boilerplate/ This is odd and I’d delete this module.)

To your question, Guild will work with a variety of project layout. To my knowledge, there’s no layout that Guild can’t work with (Python projects are notoriously varied, especially in data science). The workhorse in Guild is the main operation attribute and the sourcecode spec. With the right spelling, Guild will run your project no matter the layout.