Command Line Interface for Anyscale
Actively maintained. Last release 7 days ago. A safe choice.
pip install anyscaleAnyscale
This package contains the command line interface and the sdk for the Anyscale platform.
View Anyscale docs here View CLI docs here View SDK docs here
Environment variables
ANYSCALE_LOG_STREAM
Selects the stream used for informational CLI and SDK output — progress messages,
block headings and spinners. Accepts stderr (the default) or stdout;
unrecognized values are treated as stderr. Warnings, errors and
ANYSCALE_DEBUG output always go to stderr, whatever this is set to.
Set ANYSCALE_LOG_STREAM=stdout when a log collector classifies everything on
stderr as an error — the GKE logging agent, for example — so that a normal
deployment stops showing up as a failure.
Commands asked for a machine-readable payload (--json, --yaml, -o json,
-o yaml) ignore this setting and keep informational output on stderr, so the
payload on stdout stays parseable.
One thing to know before turning it on: informational output can contain
sensitive values — tokens the CLI prints on purpose (anyscale service token add, anyscale service-account create) and anything echoed back from a config
you pass in, including a workload's env_vars. Treat stdout as no less
sensitive than stderr wherever the two are collected or retained differently.
ANYSCALE_EXTRA_HEADERS
Adds HTTP headers to every request the CLI and the Python SDK send to the
Anyscale API, for example a token that a corporate reverse proxy in front of
ANYSCALE_HOST requires. The value is a JSON object of header names to string
values:
export ANYSCALE_EXTRA_HEADERS='{"X-Proxy-Token": "abc", "X-Team": "ml"}'
For a single command, pass --header 'Name: Value' before the command name,
repeating it for more than one header:
anyscale --header 'X-Proxy-Token: abc' job list
In the SDK, anyscale.Anyscale(headers={...}) does the same for one client.
When more than one source sets a header of the same name, ignoring letter case,
Anyscale(headers=...) wins over --header, which wins over
. Headers named in only one source are always sent.