Skip to main content

crunch-cli - CLI of the CrunchDAO Platform

Project description

Crunch CLI

PyTest

This Python library is designed for the Crunch Hub, offering convenient access to competition's data and enabling effortless submission. When utilized in the command-line interface (CLI), its goal is to deliver a user experience akin to GitHub, enabling you to seamlessly push the code from your local environment.

Installation

Use pip to install the crunch-cli.

pip install crunch-cli --upgrade

Usage

Setup your environment

Go to any competition's page and click on the 'Submit' section. Then copy and paste the command into your terminal.

Reveal your token (animation)

Write your model

import crunch
crunch_tools = crunch.load_notebook()

# load the data
data = crunch_tools.load_data()

# define your model
def train(): ...
def infer(): ...

# test your model
crunch_tools.test()

[!TIP] We always recommend trying the quickstarter, which already contains a working model to help you get started in minutes!

Detecting the environment

Being able to detect whether you are running inside the Runner allows you to configure your programme more precisely.

import crunch

if crunch.is_inside_runner:
  print("running inside the runner")
else:
  print("running elsewhere")

  model.enable_debug()
  logger.set_level("TRACE")

Submit with Crunch CLI

Usage: crunch push [OPTIONS]

  Send the new submission of your code.

Options:
  -m, --message TEXT      Specify the change of your code. (like a commit message, limited to 1000 characters)
  --main-file TEXT        Entrypoint of your code.  [default: main.py]       
  --model-directory TEXT  Directory where your model is stored.  [default: resources]
  --export TEXT           Copy the `.tar` to the specified file.
  --no-pip-freeze         Do not do a `pip freeze` to know preferred packages version.
  --dry                   Prepare file but do not really create the submission.

Contributing

Pull requests are always welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue in the GitHub repository.

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

crunch_cli-11.1.1.tar.gz (77.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crunch_cli-11.1.1-py3-none-any.whl (104.5 kB view details)

Uploaded Python 3

File details

Details for the file crunch_cli-11.1.1.tar.gz.

File metadata

  • Download URL: crunch_cli-11.1.1.tar.gz
  • Upload date:
  • Size: 77.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crunch_cli-11.1.1.tar.gz
Algorithm Hash digest
SHA256 4cea7fe156185c39b532f21766f1b33e2f6538c7b1dacd8e47756a2d21f7bde9
MD5 30565596e48d6d7b1f20ae3e00f7f9bf
BLAKE2b-256 659f9a02affd062ca37d28013559aeff16666b4f3b4a7fc534d8ad7633a6861c

See more details on using hashes here.

File details

Details for the file crunch_cli-11.1.1-py3-none-any.whl.

File metadata

  • Download URL: crunch_cli-11.1.1-py3-none-any.whl
  • Upload date:
  • Size: 104.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for crunch_cli-11.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6708588b27a8e74dd75a8aa65f219032a3d9c2a62c7d575aa414ab2f6d0daa99
MD5 08ff4f38c1d2cf618f7006d30ef09892
BLAKE2b-256 8f0938e7a6b49f0fe33def00e7bde8220dca0115e3c0f46da9c5b57ec6fa62f7

See more details on using hashes here.

Supported by

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