Skip to main content

No project description provided

Project description

AutoCog

PyPI version

Generate predict.py and cog.yaml automatically using GPT4

Install

pip install autocog

Usage

First, set your OpenAI API key in an environment variable

OPENAI_API_KEY=sk-...

In the repo you want to cog-ify, run

autocog

This will generate a cog.yaml and predict.py based on the files in the current directory. It will then run the model and if it fails to run, it will attempt to fix the error and run it again. By default it has 5 attempts to fix it, which can be changed with the --attempts flag.

If your model needs a GPU to run, you need to run AutoCog on a GPU machine.

Human in the loop

Sometimes AutoCog fails to create a working Cog configuration. In those cases you, the human, have to step in and edit the cog.yaml and predict.py files.

Once you have edited them, let AutoCog continue by running autocog again. If you'd like to recreate predict.py and cog.yaml from scratch, run autocog --initialize.

By default, AutoCog will guess a cog predict command to run the model. If you want to specify your own predict command, use the --predict-command flag.

If you want AutoCog to take the generation of cog.yaml and predict.py in a specific direction, you can use the --tell flag to prompt GPT4:

autocog --tell="Add inputs to allow for inpainting"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autocog-0.0.5.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

autocog-0.0.5-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file autocog-0.0.5.tar.gz.

File metadata

  • Download URL: autocog-0.0.5.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for autocog-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ec942d9c9af12f857a53c258489509a9b7187f1c579a507d2b3dc0afbf124a19
MD5 87ad0a2f7770a4bbf497c570ca9b0f4c
BLAKE2b-256 fa60d34e9e4d694ba25aff5279ae88d6d9793a8e56b741df5dfb9f34d81dad37

See more details on using hashes here.

File details

Details for the file autocog-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: autocog-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for autocog-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7b36a34189f913a475de84386454dc6bbe7a9e24388115b8b122f779b87c4e48
MD5 753cbc4730990a4448bb3421f3146e4e
BLAKE2b-256 40012e09d96451874d158a68196cf3c2f2a34fa9c61dc023420d2c230be645e5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page