An intercloud broker above the cloud
Project description
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=1
to show debugging logs (logging.DEBUG).export SKY_DISABLE_USAGE_COLLECTION=1
to disable usage logging.export SKY_MINIMIZE_LOGGING=1
to 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
assert
for 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
abc
module 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
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
Built Distribution
File details
Details for the file michaelvll_skypilot-0.0.2.tar.gz
.
File metadata
- Download URL: michaelvll_skypilot-0.0.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed0d90904dc28430313a04b08ae960aedeb7f4a88d792339489e7a059326a439 |
|
MD5 | 8ca6bec401bfabe1181af407ec9ed6a6 |
|
BLAKE2b-256 | 260b2a6288bb0eb5eac172a748260eca15239fc645a86302bbebad875152dce1 |
File details
Details for the file michaelvll_skypilot-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: michaelvll_skypilot-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cae1ca4551b51dc1147acc4960d329f6ecba611e8cca3d7792967c4e4dd585fb |
|
MD5 | 67690292431623b70ba20557637f2aae |
|
BLAKE2b-256 | f16cf24b2c5e74fe855243b8ddcbd60854e7dd4e993c26d1102fffc35b84ffc7 |