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:

autocog --continue

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.

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.4.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

autocog-0.0.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autocog-0.0.4.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for autocog-0.0.4.tar.gz
Algorithm Hash digest
SHA256 aa5822e2d5903edd2f6ff97c73df07b28118cf85056ef15fd5e8f1d6dd57b2e1
MD5 92e62c767582048aaccf6da4810b123b
BLAKE2b-256 8932526846ca953f16b793c4402491bbfd90da57c578c6ed187783272ff76211

See more details on using hashes here.

File details

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

File metadata

  • Download URL: autocog-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/1.5.0 colorama/0.4.4 CPython/3.9.2

File hashes

Hashes for autocog-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d06aace6eb17dda56c05e58173432bed4a238bb68abaa64b5c8179756e341c00
MD5 1a937219f42dffc3718a4ca21ef73f04
BLAKE2b-256 2e30e693d446988fea9264f558f15bb800f4ace27188b08469fc68bfe8fdb4d5

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