How skypilot-org/skypilot works
Identifying the Main Components and Their Roles
• Client/CLI Layer: This includes components like sky/cli.py and sky/client/sdk.py that parse the YAML (or Python API) job definition and allow users to launch tasks.
• API Server / Job Management:
– The API server logic is primarily found across directories such as sky/jobs/server/ (e.g., server.py in sky/jobs/server) and parts of sky/server/. This layer is responsible for handling incoming requests, managing job states, and providing endpoints for status queries.
• Scheduler and Orchestrator:
– The orchestrator handles the task scheduling and resource allocation logic, which interacts with both the provisioning subsystems and the backends.
• Provisioners:
• Backends – Highlighting CloudVMRayBackend:
– The CloudVMRayBackend (located in sky/backends/cloud_vm_ray_backend.py) is a specialized backend that integrates with the Ray framework. It’s used to manage distributed compute clusters (Ray clusters) and tie into the general job orchestration flow. Illustrate its role as a module that receives job submissions from the API server/scheduler and handles task distribution through Ray.
• Data Management and Synchronization:
– Modules like sky/data, which manage code and data synchronization between local work directories and remote cloud instances, are essential for moving job artifacts.
• Logging, Exception Handling, and Utility Layers:
– These support all core functionalities, ensuring that job provisioning, execution, and recovery are robust.
Relationships and Interactions
• For tasks that require distributed computing, the API server/scheduler will choose a backend – most notably, the CloudVMRayBackend. This should be clearly shown as a dedicated component receiving jobs from the scheduler and interfacing with the Ray cluster infrastructure.