Sky
Sky is a framework to run any workload seamlessly across different cloud providers through a unified interface. No knowledge of cloud offerings is required or expected – you simply define the workload and its resource requirements, and Sky will automatically execute it on AWS, Google Cloud Platform or Microsoft Azure.
Getting Started
Please refer to our documentation.
Developer Guide
Setup
Use editable mode (-e) when installing:
# Sky requires python >= 3.6 and < 3.10.
# You can just install the dependencies for
# certain clouds, e.g., ".[aws,azure,gcp]"
pip install -e ".[all]"
pip install -r requirements-dev.txt
Submitting pull requests
- After you commit, format your code with
format.sh. - In the PR description, write a
Tested:section to describe relevant tests performed. - For changes that touch the core system, run the smoke tests and ensure they pass.
- Follow the Google style guide.
Environment Variable Options
export SKY_DEV=1to show debugging logs (logging.DEBUG).export SKY_DISABLE_USAGE_COLLECTION=1to disable usage logging.export SKY_MINIMIZE_LOGGING=1to minimize the sky outputs for demo purpose.
Dump timeline
Timeline is useful for performance analysis and debugging in Sky.
Here are the APIs:
from utils import timeline
# record a function in the timeline with the function path name
@timeline.Event.decorator
def f(): ...
# record a function in the timeline using name='my_name'
@timeline.Event.decorator(name='event_name')
def f(): ...
# record an event over a code block in the timeline:
with timeline.Event(name='event_name'):
...
# use a file lock with event:
with timeline.FileLockEvent(lockpath):
pass
To dump the timeline, set environment variable SKY_TIMELINE_FILE_PATH to a file path.
View the dumped timeline file using Chrome (chrome://tracing) or Perfetto.
Updating the sky docker image
-
Authenticate with sky ECR repository. Contact romil.bhardwaj@berkeley.edu for access:
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws/a9w6z7w5 -
Build and tag the docker image:
docker build -t public.ecr.aws/a9w6z7w5/sky:latest . -
Push the image to ECR:
docker push public.ecr.aws/a9w6z7w5/sky:latest
Some general engineering practice suggestions
These are suggestions, not strict rules to follow. When in doubt, follow the style guide.
- Use
TODO(author_name)/FIXME(author_name)instead of blankTODO/FIXME. This is critical for tracking down issues. You can write TODOs with your name and assign it to others (on github) if it is someone else's issue. - Delete your branch after merging it. This keeps the repo clean and faster to sync.
- Use an exception if this is an error. Only use
assertfor debugging or proof-checking purpose. This is because exception messages usually contain more information. - Use modern python features and styles that increases code quality.
- Use f-string instead of
.format()for short expressions to increase readability. - Use
class MyClass:instead ofclass MyClass(object):. The later one was a workaround for python2.x. - Use
abcmodule for abstract classes to ensure all abstract methods are implemented. - Use python typing. But you should not import external objects just for typing. Instead, import typing-only external objects under
if typing.TYPE_CHECKING:.
- Use f-string instead of
Testing
To run smoke tests:
bash tests/run_smoke_tests.sh
# Run one of the smoke tests
bash tests/run_smoke_tests.sh test_minimal
For profiling code, use:
pip install tuna # Tuna for viz
python3 -m cProfile -o sky.prof -m sky.cli status # Or some other command
tuna sky.prof
Metadata
Release files for michaelvll-skypilot 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| michaelvll_skypilot-0.0.2.tar.gz | 10.0 kB | Without provenance | Details for michaelvll_skypilot-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| michaelvll_skypilot-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for michaelvll_skypilot-0.0.2-py3-none-any.whl |
Total release size: 22.4 kB
Release files / michaelvll_skypilot-0.0.2.tar.gz
| Download URL | michaelvll_skypilot-0.0.2.tar.gz |
|---|---|
| Size | 10.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed0d90904dc28430313a04b08ae960aedeb7f4a88d792339489e7a059326a439
|
|
BLAKE2b-256 checksum How to use checksums |
260b2a6288bb0eb5eac172a748260eca15239fc645a86302bbebad875152dce1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / michaelvll_skypilot-0.0.2-py3-none-any.whl
| Download URL | michaelvll_skypilot-0.0.2-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cae1ca4551b51dc1147acc4960d329f6ecba611e8cca3d7792967c4e4dd585fb
|
|
BLAKE2b-256 checksum How to use checksums |
f16cf24b2c5e74fe855243b8ddcbd60854e7dd4e993c26d1102fffc35b84ffc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for michaelvll-skypilot 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.