runpod 2.1.0__tar.gz → 2.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {runpod-2.1.0 → runpod-2.2.1}/CHANGELOG.md +43 -0
- {runpod-2.1.0/runpod.egg-info → runpod-2.2.1}/PKG-INFO +14 -3
- {runpod-2.1.0 → runpod-2.2.1}/README.md +13 -1
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/references/command_line_interface.md +40 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/start_here.md +2 -0
- runpod-2.2.1/docs/getting_started.md +34 -0
- runpod-2.2.1/examples/README.md +63 -0
- runpod-2.2.1/examples/api/create_container_registry_auth.py +24 -0
- runpod-2.2.1/examples/api/create_endpoint.py +44 -0
- runpod-2.2.1/examples/api/create_template.py +27 -0
- runpod-2.2.1/examples/api/get_endpoints.py +13 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/endpoints/asyncio_job_request.py +7 -7
- {runpod-2.1.0 → runpod-2.2.1}/examples/endpoints/health.py +2 -2
- runpod-2.2.1/examples/endpoints/run.py +23 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/endpoints/run_sync.py +7 -3
- runpod-2.2.1/examples/endpoints/streaming.py +24 -0
- runpod-2.2.1/examples/rest_wrapper.py +47 -0
- runpod-2.2.1/examples/serverless/concurrent_handler.py +41 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/serverless/logger.py +17 -7
- {runpod-2.1.0 → runpod-2.2.1}/requirements.txt +0 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/__init__.py +15 -2
- runpod-2.2.1/runpod/_hosts.py +54 -0
- runpod-2.2.1/runpod/_serialization.py +21 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_version.py +3 -3
- runpod-2.2.1/runpod/_volume_transfer_utils.py +171 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/graphql.py +2 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/mutations/apps.py +6 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/queries/apps.py +2 -2
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/__init__.py +2 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/api.py +42 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/app.py +11 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/auth.py +84 -20
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/build.py +86 -2
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/context.py +22 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/datacenter.py +16 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/deploy.py +164 -33
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/handles.py +27 -5
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/images.py +3 -5
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/placement.py +8 -4
- runpod-2.2.1/runpod/apps/protocol.py +86 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/serialization.py +28 -35
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/spec.py +32 -4
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/stubs.py +31 -2
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/targets.py +121 -59
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/tasks.py +130 -82
- runpod-2.2.1/runpod/apps/utils/network.py +65 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/volume.py +96 -2
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/config/functions.py +46 -18
- {runpod-2.1.0 → runpod-2.2.1}/runpod/endpoint/asyncio/asyncio_runner.py +12 -3
- {runpod-2.1.0 → runpod-2.2.1}/runpod/endpoint/helpers.py +10 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/endpoint/runner.py +25 -4
- {runpod-2.1.0 → runpod-2.2.1}/runpod/error.py +15 -0
- runpod-2.2.1/runpod/network_volume_transfer.py +981 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/console.py +9 -9
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/endpoint.py +2 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/main.py +69 -34
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/pod.py +2 -1
- runpod-2.2.1/runpod/rp_cli/volume.py +610 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_fastapi.py +13 -4
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_http.py +15 -2
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_job.py +10 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_scale.py +7 -2
- runpod-2.2.1/runpod/version.py +33 -0
- {runpod-2.1.0 → runpod-2.2.1/runpod.egg-info}/PKG-INFO +14 -3
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/SOURCES.txt +17 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/requires.txt +0 -1
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/scm_file_list.json +17 -1
- runpod-2.2.1/runpod.egg-info/scm_version.json +8 -0
- runpod-2.2.1/tests/e2e/test_network_volume_transfer_live.py +74 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_agent_auth.py +103 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_auth.py +5 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_build.py +60 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_config_params.py +54 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_deploy.py +116 -4
- runpod-2.2.1/tests/test_apps/test_deployed_tasks.py +471 -0
- runpod-2.2.1/tests/test_apps/test_deployment_validation.py +345 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_dispatch.py +25 -9
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_gpu_catalog.py +17 -7
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_placement.py +44 -0
- runpod-2.2.1/tests/test_apps/test_runtime_call_validation.py +172 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_tasks.py +15 -13
- runpod-2.2.1/tests/test_apps/test_transport_parity.py +170 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_volume.py +16 -0
- runpod-2.2.1/tests/test_cli/test_agent_login.py +396 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_console.py +7 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_deploy_command.py +28 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_endpoint_command.py +18 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_management_commands.py +29 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_pod_command.py +8 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_endpoint/test_asyncio_runner.py +36 -0
- runpod-2.2.1/tests/test_endpoint/test_failed_jobs.py +89 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_endpoint/test_runner.py +14 -0
- runpod-2.2.1/tests/test_hosts.py +67 -0
- runpod-2.2.1/tests/test_network_volume_transfer.py +2004 -0
- runpod-2.2.1/tests/test_profile.py +79 -0
- runpod-2.2.1/tests/test_serialization.py +231 -0
- runpod-2.2.1/tests/test_serverless/test_refresh_worker.py +640 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_rp_volume_cache.py +3 -0
- runpod-2.2.1/tests/test_version.py +132 -0
- runpod-2.1.0/docs/getting_Started.md +0 -21
- runpod-2.1.0/examples/api/create_container_registry_auth.py +0 -19
- runpod-2.1.0/examples/api/create_endpoint.py +0 -29
- runpod-2.1.0/examples/api/create_template.py +0 -16
- runpod-2.1.0/examples/api/get_endpoints.py +0 -7
- runpod-2.1.0/examples/endpoints/run.py +0 -24
- runpod-2.1.0/examples/endpoints/streaming.py +0 -20
- runpod-2.1.0/examples/rest_wrapper.py +0 -37
- runpod-2.1.0/examples/serverless/concurrent_handler.py +0 -28
- runpod-2.1.0/runpod/apps/protocol.py +0 -60
- runpod-2.1.0/runpod/apps/utils/network.py +0 -33
- runpod-2.1.0/runpod/rp_cli/volume.py +0 -298
- runpod-2.1.0/runpod/version.py +0 -14
- runpod-2.1.0/runpod.egg-info/scm_version.json +0 -8
- runpod-2.1.0/tests/test_cli/test_agent_login.py +0 -185
- runpod-2.1.0/tests/test_version.py +0 -22
- {runpod-2.1.0 → runpod-2.2.1}/.dockerignore +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/dependabot.yml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/tape_collection/cli_config.tape +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/tape_collection/cli_help.tape +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/tape_collection/cli_ssh.tape +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/tests.json +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/workflows/cd.yml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/workflows/ci.yml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.github/workflows/vhs.yml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/.gitignore +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/ARCHITECTURE.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/CONTRIBUTING.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/LICENSE +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/MANIFEST.in +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/Makefile +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/SECURITY.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/build_tools/compile_gpu_test.sh +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/build_tools/gpu_test.c +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/api/handling_errors.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/api/queries.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/demos/config.gif +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/demos/help.gif +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/demos/ssh.gif +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/references/projects.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/cli/references/runpod.toml.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/images/env_var_location.png +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/functions/error_handling.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/functions/logging.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/gpu_binary_compilation.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/local_testing.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/utils/rp_cleanup.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/utils/rp_debugger.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/utils/rp_download.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/utils/rp_upload.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/utils/rp_validator.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/volume_cache.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/worker.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/worker_fitness_checks.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/docs/serverless/worker_realtime.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/README.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/gpu_inference.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/hello_world.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/streaming.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/train_and_eval.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/apps/web_service.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/serverless/simple_handler.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/examples/serverless/volume_cache_handler.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/pyproject.toml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/pytest.ini +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_binary_helpers.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_health/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_health/cuda.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_health/fitness.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_health/gpu.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_health/system.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_logger.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/_startup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/agent.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/_rate_limit.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/ctl_commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/mutations/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/mutations/container_register_auth.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/queries/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/queries/user.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/api/rest.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/dev.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/discovery.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/discovery_state.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/entrypoint.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/errors.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/gpu.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/invoker.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/job.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/logs.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/manage.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/markers.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/model.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/monitor.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/registry.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/schedule.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/secret.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/shim.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/utils/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/utils/client.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/utils/events.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/utils/lookup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/utils/names.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/apps/watch.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/entry.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/config/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/pod/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/pod/commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/ssh/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/ssh/commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/groups/ssh/functions.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/utils/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/utils/rp_info.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/utils/rp_runpodignore.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/utils/rp_userspace.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/cli/utils/ssh_cmd.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/endpoint/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/endpoint/asyncio/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/http_client.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/api.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/catalog.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/compute.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/endpoint_config.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/logs.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/options.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/output.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/rp_cli/update.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/binaries/README.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/binaries/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/binaries/gpu_test +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_capture.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_fitness.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_gpu_fitness.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_handler.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_local.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_logger.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_ping.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_prestart.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_progress.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_system_fitness.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/rp_tips.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/modules/worker_state.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_cleanup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_cuda.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_debugger.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_download.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_model_cache.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_ssrf.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_upload.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_validator.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/utils/rp_volume_cache.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/serverless/worker.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod/user_agent.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/dependency_links.txt +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/entry_points.txt +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/runpod.egg-info/top_level.txt +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/scripts/README.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/scripts/benchmark_cold_start.sh +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/scripts/compare_benchmarks.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/setup.cfg +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/setup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/apps_live_smoke.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/conftest.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/e2e_provisioner.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/01_hello_world.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/02_invocation_styles.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/03_gpu.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/04_dependencies.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/05_api_service.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/06_tasks.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/07_pipelines.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/08_volumes.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/09_secrets.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/10_cached_models.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/11_train_eval.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/12_custom_image.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/13_streaming.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/README.md +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/examples/run_all.sh +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/fixtures/cold_start/handler.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/fixtures/cold_start/pyproject.toml +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/matrix/main.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/matrix/run.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/task_pod_smoke.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/test_cold_start.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/test_mock_worker.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/e2e/tests.json +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/fixtures/mock_gpu_test +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_agent.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_api/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_api/test_ctl_commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_api/test_rate_limit.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_api/test_rest.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/conftest.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_api_client.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_app.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_compat_lock.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_dev.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_discovery.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_images.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_job.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_logs.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_manage.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_markers.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_model.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_monitor.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_registry.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_retry.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_secret.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_shim.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_targets.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_apps/test_watch.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_catalog_command.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_api.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/test_config_functions.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/test_pod_commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/test_ssh_commands.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/test_ssh_dispatch.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_groups/test_ssh_functions.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_logs.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_options.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_output.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_utils/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_utils/test_info.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_utils/test_runpodignore.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_utils/test_ssh_cmd.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_cli_utils/test_userspace.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_compute.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_init_command.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_update_command.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_cli/test_volume_command.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_endpoint/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_endpoint/test_asyncio_init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_endpoint/test_init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_error.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_performance/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_performance/test_cold_start.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/local_sim/.env_example +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/local_sim/Makefile +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/local_sim/localhost.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/local_sim/worker.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_capture.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_integration_worker_state.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fastapi.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/conftest.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_force_kill.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_gpu_checks.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_gpu_integration.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_registration.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_safe_startup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_startup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_fitness/test_system_checks.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_handler.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_http.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_job.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_local.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_logger.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_ping.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_progress.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_scale.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_state.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_modules/test_tips.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_prestart.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_prestart_lifecycle.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_rp_scale.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_scale_mirror.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_cleanup.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_cuda.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_debugger.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_download.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_model_cache.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_ssrf.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_upload.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils/test_validate.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_utils_init.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_serverless/test_worker.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_shared/__init__.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_shared/test_auth.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_user_agent.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/test_whatever.py +0 -0
- {runpod-2.1.0 → runpod-2.2.1}/tests/whatever.py +0 -0
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
7
7
|
* Apps expose `NetworkVolume` and `GlobalVolume` resources with explicit path-keyed mounts, lazy create-if-missing provisioning, and execution-bound filesystem access. Global volumes use GraphQL for lookup and creation.
|
|
8
|
+
* Deployed Flash calls use endpoint or pod runtime credentials. Release requires deployed support from [RunPod#6686](https://github.com/runpod/RunPod/pull/6686), [ai-api#1176](https://github.com/runpod/ai-api/pull/1176), and [sdk-runtime#4](https://github.com/runpod-workers/sdk-runtime/pull/4).
|
|
9
|
+
|
|
10
|
+
### Breaking Changes
|
|
11
|
+
|
|
12
|
+
* Production endpoint environment variables reserve `RUNPOD_API_KEY` and runtime identity fields. Workers authenticate Flash calls with platform-issued runtime credentials; application credentials must use non-reserved environment names.
|
|
13
|
+
* Deployed workers can invoke Flash resources only within their own app and environment, including through `Queue`, `Api`, and `Task` stubs. Local clients use account credentials subject to their permissions.
|
|
14
|
+
* Remote queues, tasks, and JSON API calls require finite JSON-compatible arguments and results in local, dev, and deployed execution. Dev workers receive source separately from the JSON argument contract. Explicit `.local()` calls run Python directly.
|
|
8
15
|
|
|
9
16
|
### Bug Fixes
|
|
10
17
|
|
|
@@ -15,6 +22,42 @@
|
|
|
15
22
|
* Deployment artifacts apply project ignore rules and mandatory secret-file exclusions while preserving vendored dependency assets.
|
|
16
23
|
* Synchronous calls wait across polling timeouts on Python 3.10 and propagate operation timeouts.
|
|
17
24
|
|
|
25
|
+
## [2.2.1](https://github.com/runpod/runpod-python/compare/v2.2.0...v2.2.1) (2026-11-10)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
* **apps:** a `runpod` pin in `dependencies=[...]` silently produces a mixed install on workers ([#700](https://github.com/runpod/runpod-python/issues/700)) ([16a0280](https://github.com/runpod/runpod-python/commit/16a0280085f7d3fee2f75ba1aa946a50d34ac854))
|
|
31
|
+
* **apps:** give new deployed endpoints unique template names ([#696](https://github.com/runpod/runpod-python/issues/696)) ([c930098](https://github.com/runpod/runpod-python/commit/c930098a02540e327a695a855b49026c73508c14))
|
|
32
|
+
* **cli:** make agent login a two-step flow ([#711](https://github.com/runpod/runpod-python/issues/711)) ([cbf681b](https://github.com/runpod/runpod-python/commit/cbf681b3c5cd4b3a42964472fe19aa1c5f100221))
|
|
33
|
+
* **endpoint:** Endpoint.run_sync drops the error of a FAILED job ([#699](https://github.com/runpod/runpod-python/issues/699)) ([05a77b3](https://github.com/runpod/runpod-python/commit/05a77b3370fec18f6ba2f6201dbd8b585ee22260))
|
|
34
|
+
* **version:** report the imported tree's version ([#708](https://github.com/runpod/runpod-python/issues/708)) ([13dfbe5](https://github.com/runpod/runpod-python/commit/13dfbe57ad36fbe8cb53a2d788cab88951f437e9))
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Documentation
|
|
38
|
+
|
|
39
|
+
* **examples:** fix broken and stale examples under examples/ ([#694](https://github.com/runpod/runpod-python/issues/694)) ([18d5fee](https://github.com/runpod/runpod-python/commit/18d5fee7a0612f800decb00d57d05fe439ca2f2c))
|
|
40
|
+
|
|
41
|
+
## [2.2.0](https://github.com/runpod/runpod-python/compare/v2.1.0...v2.2.0) (2026-11-09)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* invoke deployed flash tasks with runtime credentials (SEC-375 CON-1833) ([#644](https://github.com/runpod/runpod-python/issues/644)) ([367f174](https://github.com/runpod/runpod-python/commit/367f174ef14cc7fcf909a3b26413c3f2d38cbd9b))
|
|
47
|
+
* make console, proxy, and endpoint hosts configurable ([#684](https://github.com/runpod/runpod-python/issues/684)) ([b9583f7](https://github.com/runpod/runpod-python/commit/b9583f7c0a02e6c0cbb9598538393fc239d88852))
|
|
48
|
+
* resumable network volume upload and download ([#655](https://github.com/runpod/runpod-python/issues/655)) ([a677ee9](https://github.com/runpod/runpod-python/commit/a677ee9f08f21da5a29cc126ed63032fc1063365))
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
### Bug Fixes
|
|
52
|
+
|
|
53
|
+
* **apps:** accept datacenter ids outside the built-in list ([#690](https://github.com/runpod/runpod-python/issues/690)) ([dbc251a](https://github.com/runpod/runpod-python/commit/dbc251ac8ba87ed4cc53f71010bc8c87dba1c77d))
|
|
54
|
+
* **serverless:** stop taking jobs after a per-job refresh_worker (SLS-900) ([#663](https://github.com/runpod/runpod-python/issues/663)) ([8ca9d9b](https://github.com/runpod/runpod-python/commit/8ca9d9bcfdc0ad1792e899cdef49a4fd172fbb13))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Documentation
|
|
58
|
+
|
|
59
|
+
* rename getting_Started.md to getting_started.md ([#697](https://github.com/runpod/runpod-python/issues/697)) ([fbcabcd](https://github.com/runpod/runpod-python/commit/fbcabcd73889783d8e03b6261154891f13b0d9d6))
|
|
60
|
+
|
|
18
61
|
## [2.1.0](https://github.com/runpod/runpod-python/compare/v2.0.0...v2.1.0) (2026-11-03)
|
|
19
62
|
|
|
20
63
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: runpod
|
|
3
|
-
Version: 2.1
|
|
3
|
+
Version: 2.2.1
|
|
4
4
|
Summary: 🐍 | Python library for Runpod API and serverless worker SDK.
|
|
5
5
|
Home-page: https://runpod.io
|
|
6
6
|
Author: Runpod
|
|
@@ -34,7 +34,6 @@ Requires-Dist: backoff>=2.2.1
|
|
|
34
34
|
Requires-Dist: boto3>=1.43.118
|
|
35
35
|
Requires-Dist: certifi>=2026.10.19
|
|
36
36
|
Requires-Dist: click>=8.5.0
|
|
37
|
-
Requires-Dist: cloudpickle>=3.1.2
|
|
38
37
|
Requires-Dist: colorama<0.4.7,>=0.4.6
|
|
39
38
|
Requires-Dist: cryptography>=50.0.2
|
|
40
39
|
Requires-Dist: fastapi[all]>=0.162.0
|
|
@@ -68,7 +67,7 @@ Dynamic: requires-python
|
|
|
68
67
|
[](https://github.com/runpod/runpod-python/actions/workflows/CI-pytests.yml)
|
|
69
68
|
[](LICENSE)
|
|
70
69
|
|
|
71
|
-
[Documentation](https://docs.runpod.io) • [Examples](examples
|
|
70
|
+
[Documentation](https://docs.runpod.io) • [Examples](examples) • [Discord](https://discord.gg/pJ3P2DbUUq)
|
|
72
71
|
|
|
73
72
|
</div>
|
|
74
73
|
|
|
@@ -143,6 +142,18 @@ make setup
|
|
|
143
142
|
make test
|
|
144
143
|
```
|
|
145
144
|
|
|
145
|
+
## Remote values
|
|
146
|
+
|
|
147
|
+
Queue and task calls use finite JSON-compatible arguments, return values,
|
|
148
|
+
and stream chunks. JSON conversion turns tuples into lists and supported
|
|
149
|
+
dictionary keys into strings, including in same-worker remote calls.
|
|
150
|
+
Bytes, custom objects, circular references, and non-finite numbers produce
|
|
151
|
+
explicit errors. `.local()` remains a direct Python call.
|
|
152
|
+
|
|
153
|
+
Successful function responses contain `json_result`, including for a null
|
|
154
|
+
return value. SDK and worker runtimes share the JSON protocol validators;
|
|
155
|
+
use compatible package releases when building worker images.
|
|
156
|
+
|
|
146
157
|
## ⚡ | Serverless Worker (SDK)
|
|
147
158
|
|
|
148
159
|
This python package can also be used to create a serverless worker that can be deployed to Runpod as a custom endpoint API.
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
[](https://github.com/runpod/runpod-python/actions/workflows/CI-pytests.yml)
|
|
10
10
|
[](LICENSE)
|
|
11
11
|
|
|
12
|
-
[Documentation](https://docs.runpod.io) • [Examples](examples
|
|
12
|
+
[Documentation](https://docs.runpod.io) • [Examples](examples) • [Discord](https://discord.gg/pJ3P2DbUUq)
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
@@ -84,6 +84,18 @@ make setup
|
|
|
84
84
|
make test
|
|
85
85
|
```
|
|
86
86
|
|
|
87
|
+
## Remote values
|
|
88
|
+
|
|
89
|
+
Queue and task calls use finite JSON-compatible arguments, return values,
|
|
90
|
+
and stream chunks. JSON conversion turns tuples into lists and supported
|
|
91
|
+
dictionary keys into strings, including in same-worker remote calls.
|
|
92
|
+
Bytes, custom objects, circular references, and non-finite numbers produce
|
|
93
|
+
explicit errors. `.local()` remains a direct Python call.
|
|
94
|
+
|
|
95
|
+
Successful function responses contain `json_result`, including for a null
|
|
96
|
+
return value. SDK and worker runtimes share the JSON protocol validators;
|
|
97
|
+
use compatible package releases when building worker images.
|
|
98
|
+
|
|
87
99
|
## ⚡ | Serverless Worker (SDK)
|
|
88
100
|
|
|
89
101
|
This python package can also be used to create a serverless worker that can be deployed to Runpod as a custom endpoint API.
|
|
@@ -23,6 +23,10 @@ rp ssh POD_ID # open a terminal on a pod
|
|
|
23
23
|
rp pod list
|
|
24
24
|
rp pod create
|
|
25
25
|
rp pod connect POD_ID
|
|
26
|
+
|
|
27
|
+
# Network volume files
|
|
28
|
+
rp volume upload VOLUME ./dataset datasets/dataset
|
|
29
|
+
rp volume download VOLUME outputs/ ./outputs
|
|
26
30
|
```
|
|
27
31
|
|
|
28
32
|
## Overview
|
|
@@ -44,6 +48,7 @@ rp login --profile staging # save browser credentials in a named profile
|
|
|
44
48
|
|
|
45
49
|
Credentials are stored in `~/.runpod/config.toml`.
|
|
46
50
|
Use `--profile NAME` with either login method to update only that profile; the default is `default`.
|
|
51
|
+
Set `RUNPOD_PROFILE=NAME` to select the profile for all commands and for `runpod` in Python; `--profile` overrides it, and `RUNPOD_API_KEY` overrides any stored profile.
|
|
47
52
|
|
|
48
53
|
### Flash apps
|
|
49
54
|
|
|
@@ -62,3 +67,38 @@ entrypoint or a resource function; interrupt discovery if an import blocks.
|
|
|
62
67
|
On Ctrl-C, a dev session waits for its running local entrypoint to finish before
|
|
63
68
|
deleting endpoints. Blocking entrypoint code can delay shutdown. Cleanup failures
|
|
64
69
|
exit with an error and report the endpoint IDs that still need deletion.
|
|
70
|
+
|
|
71
|
+
### Network volume files
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
rp volume upload VOLUME ./model.safetensors models/
|
|
75
|
+
rp volume upload VOLUME ./dataset datasets/dataset
|
|
76
|
+
rp volume download VOLUME models/model.safetensors
|
|
77
|
+
rp volume download VOLUME outputs/ ./outputs
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Transfers use the volume's S3-compatible API, so they need S3 API keys
|
|
81
|
+
(separate from the API key): set `RUNPOD_S3_ACCESS_KEY` and
|
|
82
|
+
`RUNPOD_S3_SECRET_KEY`, pass `--s3-access-key` / `--s3-secret-key`, or save
|
|
83
|
+
`s3_access_key` / `s3_secret_key` in `~/.runpod/config.toml`. The CLI prompts
|
|
84
|
+
for missing keys and offers to save them. You can omit `VOLUME` in an
|
|
85
|
+
interactive session to pick a volume from a list. The
|
|
86
|
+
volume must be in a [datacenter with the S3 API](https://docs.runpod.io/storage/s3-api).
|
|
87
|
+
`VOLUME` is the volume's ID or name, looked up with your API key.
|
|
88
|
+
|
|
89
|
+
To resume an interrupted transfer, run the same command again. Files that
|
|
90
|
+
are unchanged (same size, destination not older) are skipped, a large upload
|
|
91
|
+
reuses the parts it already sent, and a large download keeps its finished
|
|
92
|
+
chunks in `<name>.rpdownload`. `--force` transfers every file. Parts of an
|
|
93
|
+
upload that is never resumed stay in the volume's hidden `.s3compat_uploads`
|
|
94
|
+
folder and count toward its size.
|
|
95
|
+
|
|
96
|
+
The same transfers are available from Python:
|
|
97
|
+
|
|
98
|
+
```python
|
|
99
|
+
from runpod import NetworkVolume
|
|
100
|
+
|
|
101
|
+
volume = NetworkVolume("my-volume")
|
|
102
|
+
volume.upload("./dataset", "datasets/dataset")
|
|
103
|
+
volume.download("outputs/", "./outputs")
|
|
104
|
+
```
|
|
@@ -12,6 +12,8 @@ Store your Runpod API key by running `rp login` (approve in the browser, then pa
|
|
|
12
12
|
|
|
13
13
|
Pass `--profile staging` with either login method to update a named credential profile without changing the others. The default profile is `default`.
|
|
14
14
|
|
|
15
|
+
Set `RUNPOD_PROFILE=staging` to use that profile for every command, including `rp login`. `--profile` takes precedence over `RUNPOD_PROFILE`, and `RUNPOD_API_KEY` takes precedence over any stored profile.
|
|
16
|
+
|
|
15
17
|
### SSH
|
|
16
18
|
|
|
17
19
|
Add an SSH key to your account by running `rp ssh add`. To use an existing key pass `--key` or `--key-file`. Keys are stored in `~/.runpod/ssh/`. If no key is specified a new one is generated and stored.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Getting Started
|
|
2
|
+
|
|
3
|
+
The Runpod python library is a powerful library providing SDK functions, API access, and CLI commands for interacting with the Runpod platform.
|
|
4
|
+
|
|
5
|
+
## Credentials File
|
|
6
|
+
|
|
7
|
+
`rp login` stores your API key in `~/.runpod/config.toml`, one table per profile:
|
|
8
|
+
|
|
9
|
+
```toml
|
|
10
|
+
[default]
|
|
11
|
+
api_key = "YOUR_RUNPOD_API_KEY"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Profile
|
|
15
|
+
|
|
16
|
+
By default, credentials are stored under and read from the `default` profile. To store a key under another profile, pass `--profile` to `rp login`:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
rp login --profile my_profile
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
To use that profile, set the `RUNPOD_PROFILE` environment variable before importing `runpod`. The library reads the profile and its API key once, at import time.
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
export RUNPOD_PROFILE=my_profile
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
`RUNPOD_API_KEY`, when set, takes precedence over any stored profile. Inside a script, you can also set the key directly:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import runpod
|
|
32
|
+
|
|
33
|
+
runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
34
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
## Before you start
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install runpod
|
|
7
|
+
rp login
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
`rp login` stores your API key, and every example picks it up from there. If
|
|
11
|
+
`RUNPOD_API_KEY` is set in your environment, the examples use that key
|
|
12
|
+
instead.
|
|
13
|
+
|
|
14
|
+
## Which folder to start with
|
|
15
|
+
|
|
16
|
+
| Folder | What it shows | Needs |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| [`apps/`](apps) | Python functions that run on cloud GPUs and CPUs, started with `rp flash dev` | An account. Start here if you are new. |
|
|
19
|
+
| [`serverless/`](serverless) | Handlers for your own serverless worker image | Nothing. They run locally. |
|
|
20
|
+
| [`endpoints/`](endpoints) | Sending jobs to an existing serverless endpoint | An endpoint id |
|
|
21
|
+
| [`api/`](api) | Creating templates, endpoints, and registry credentials | An account |
|
|
22
|
+
| [`rest_wrapper.py`](rest_wrapper.py) | Pod lifecycle: create, stop, resume, terminate | An account. Creates a billable GPU pod. |
|
|
23
|
+
|
|
24
|
+
## Running the serverless handlers locally
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cd examples/serverless
|
|
28
|
+
python simple_handler.py --test_input '{"input": {"name": "world"}}'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or start a local API server and call it:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python simple_handler.py --rp_serve_api
|
|
35
|
+
curl -X POST http://localhost:8000/runsync \
|
|
36
|
+
-H "Content-Type: application/json" \
|
|
37
|
+
-d '{"input": {"name": "world"}}'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Run with no arguments, a handler looks for a `test_input.json` file in the
|
|
41
|
+
current directory.
|
|
42
|
+
|
|
43
|
+
## Getting an endpoint id for `endpoints/`
|
|
44
|
+
|
|
45
|
+
Each `endpoints/` example has a `YOUR_ENDPOINT_ID` placeholder. To use an
|
|
46
|
+
endpoint you already have, list them with `rp endpoint list`. To create one
|
|
47
|
+
for trying the examples, run [`api/create_endpoint.py`](api/create_endpoint.py),
|
|
48
|
+
which deploys `runpod/mock-worker` and prints the new id.
|
|
49
|
+
|
|
50
|
+
`endpoints/streaming.py` needs a worker that streams: a generator handler, or
|
|
51
|
+
`runpod/mock-worker` started with `--generator`.
|
|
52
|
+
|
|
53
|
+
## Cost and cleanup
|
|
54
|
+
|
|
55
|
+
- Endpoints with `workers_min=0` cost nothing while idle. Delete them with
|
|
56
|
+
`rp endpoint delete ENDPOINT_ID`.
|
|
57
|
+
- Templates stay on your account. Delete them from the Templates page in the
|
|
58
|
+
console.
|
|
59
|
+
- `rest_wrapper.py` terminates its pod at the end, including when a step
|
|
60
|
+
fails.
|
|
61
|
+
- `rp flash dev` deletes the endpoints it created when the session ends.
|
|
62
|
+
Network volumes created by `apps/` examples are not deleted; list them with
|
|
63
|
+
`rp volume list` and remove them with `rp volume delete`.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"""Example of creating a container registry auth with the Runpod API.
|
|
2
|
+
|
|
3
|
+
Registry credentials let templates pull images from a private registry. The
|
|
4
|
+
credential stays on your account after the script exits; delete it with
|
|
5
|
+
`rp registry delete NAME`.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import runpod
|
|
9
|
+
|
|
10
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
11
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
12
|
+
|
|
13
|
+
try:
|
|
14
|
+
new_container_registry_auth = runpod.create_container_registry_auth(
|
|
15
|
+
name="example-registry-auth",
|
|
16
|
+
username="YOUR_REGISTRY_USERNAME",
|
|
17
|
+
password="YOUR_REGISTRY_PASSWORD",
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
print(new_container_registry_auth)
|
|
21
|
+
|
|
22
|
+
except runpod.error.QueryError as err:
|
|
23
|
+
print(err)
|
|
24
|
+
print(err.query)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"""Example of creating an endpoint with the Runpod API.
|
|
2
|
+
|
|
3
|
+
The endpoint scales to zero workers when idle, so it costs nothing until it
|
|
4
|
+
receives requests. It stays on your account after the script exits; delete it
|
|
5
|
+
with `rp endpoint delete ENDPOINT_ID`, then delete its template from the
|
|
6
|
+
Templates page in the console.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import uuid
|
|
10
|
+
|
|
11
|
+
import runpod
|
|
12
|
+
|
|
13
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
14
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
15
|
+
|
|
16
|
+
# Template and endpoint names must be unique on your account.
|
|
17
|
+
NAME = f"example-endpoint-{uuid.uuid4().hex[:8]}"
|
|
18
|
+
|
|
19
|
+
try:
|
|
20
|
+
|
|
21
|
+
# runpod/mock-worker echoes its input back, which is enough to try the
|
|
22
|
+
# examples in examples/endpoints/.
|
|
23
|
+
new_template = runpod.create_template(
|
|
24
|
+
name=NAME, image_name="runpod/mock-worker:latest", is_serverless=True
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
print(new_template)
|
|
28
|
+
|
|
29
|
+
new_endpoint = runpod.create_endpoint(
|
|
30
|
+
name=NAME,
|
|
31
|
+
template_id=new_template["id"],
|
|
32
|
+
gpu_ids="AMPERE_16",
|
|
33
|
+
workers_min=0,
|
|
34
|
+
workers_max=1,
|
|
35
|
+
flashboot=True,
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
print(new_endpoint)
|
|
39
|
+
print(f"Endpoint id: {new_endpoint['id']}")
|
|
40
|
+
print(f"Delete it with: rp endpoint delete {new_endpoint['id']}")
|
|
41
|
+
|
|
42
|
+
except runpod.error.QueryError as err:
|
|
43
|
+
print(err)
|
|
44
|
+
print(err.query)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Example of creating a template with the Runpod API.
|
|
2
|
+
|
|
3
|
+
The template stays on your account after the script exits. Delete it from
|
|
4
|
+
the Templates page in the console when you no longer need it.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import uuid
|
|
8
|
+
|
|
9
|
+
import runpod
|
|
10
|
+
|
|
11
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
12
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
13
|
+
|
|
14
|
+
# Template names must be unique on your account.
|
|
15
|
+
TEMPLATE_NAME = f"example-template-{uuid.uuid4().hex[:8]}"
|
|
16
|
+
|
|
17
|
+
try:
|
|
18
|
+
|
|
19
|
+
new_template = runpod.create_template(
|
|
20
|
+
name=TEMPLATE_NAME, image_name="runpod/base:2.0.0-ubuntu2404"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
print(new_template)
|
|
24
|
+
|
|
25
|
+
except runpod.error.QueryError as err:
|
|
26
|
+
print(err)
|
|
27
|
+
print(err.query)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""Example of listing your serverless endpoints with the Runpod API."""
|
|
2
|
+
|
|
3
|
+
import runpod
|
|
4
|
+
|
|
5
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
6
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
7
|
+
|
|
8
|
+
endpoints = runpod.get_endpoints()
|
|
9
|
+
|
|
10
|
+
# Each entry is the endpoint's full configuration, including its environment
|
|
11
|
+
# variables, so print only the id and name here.
|
|
12
|
+
for endpoint in endpoints:
|
|
13
|
+
print(endpoint["id"], endpoint.get("name"))
|
|
@@ -7,11 +7,10 @@ import asyncio
|
|
|
7
7
|
import runpod
|
|
8
8
|
from runpod import AsyncioEndpoint, AsyncioJob, http_client
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
) # For Windows Users
|
|
10
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
11
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
JOB_TIMEOUT = 120 # seconds
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
async def main():
|
|
@@ -21,7 +20,7 @@ async def main():
|
|
|
21
20
|
async with http_client.AsyncClientSession() as session:
|
|
22
21
|
# Invoke API
|
|
23
22
|
payload = {}
|
|
24
|
-
endpoint = AsyncioEndpoint("
|
|
23
|
+
endpoint = AsyncioEndpoint("YOUR_ENDPOINT_ID", session)
|
|
25
24
|
job: AsyncioJob = await endpoint.run(payload)
|
|
26
25
|
|
|
27
26
|
# Get current job status
|
|
@@ -30,8 +29,9 @@ async def main():
|
|
|
30
29
|
# Print status
|
|
31
30
|
print(status)
|
|
32
31
|
|
|
33
|
-
# Wait until job
|
|
34
|
-
|
|
32
|
+
# Wait until the job completes or fails, up to JOB_TIMEOUT seconds.
|
|
33
|
+
# Raises TimeoutError if the job is still running after that.
|
|
34
|
+
output = await job.output(timeout=JOB_TIMEOUT)
|
|
35
35
|
|
|
36
36
|
# Print output
|
|
37
37
|
print(output)
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import runpod
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
6
6
|
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
7
7
|
|
|
8
|
-
endpoint = runpod.Endpoint("
|
|
8
|
+
endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID")
|
|
9
9
|
|
|
10
10
|
endpoint_health = endpoint.health()
|
|
11
11
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Example of calling an endpoint using the Runpod Python Language Library.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import runpod
|
|
6
|
+
|
|
7
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
8
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
9
|
+
|
|
10
|
+
endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID")
|
|
11
|
+
|
|
12
|
+
run_request = endpoint.run(
|
|
13
|
+
{"input": {"prompt": "a photo of a horse the size of a Boeing 787"}}
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
# Check the status of the run request, for example IN_QUEUE or IN_PROGRESS.
|
|
17
|
+
print(run_request.status())
|
|
18
|
+
|
|
19
|
+
# Wait up to 60 seconds for the job to finish, then print its output.
|
|
20
|
+
# Raises TimeoutError if the job is still running after that.
|
|
21
|
+
# Without a timeout, output() returns immediately, and returns None if the
|
|
22
|
+
# job has not finished yet.
|
|
23
|
+
print(run_request.output(timeout=60))
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
Example of calling an endpoint using the Runpod Python Language Library.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
import requests
|
|
6
|
+
|
|
5
7
|
import runpod
|
|
6
8
|
|
|
7
|
-
#
|
|
9
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
8
10
|
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
9
11
|
|
|
10
|
-
endpoint = runpod.Endpoint("
|
|
12
|
+
endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID")
|
|
11
13
|
|
|
12
14
|
try:
|
|
13
15
|
# Run the endpoint synchronously, blocking until the endpoint run is complete.
|
|
@@ -17,5 +19,7 @@ try:
|
|
|
17
19
|
)
|
|
18
20
|
|
|
19
21
|
print(run_request)
|
|
20
|
-
except TimeoutError:
|
|
22
|
+
except (TimeoutError, requests.exceptions.Timeout):
|
|
23
|
+
# TimeoutError: the job was still running when the timeout expired.
|
|
24
|
+
# requests.exceptions.Timeout: the HTTP request itself timed out.
|
|
21
25
|
print("Job timed out.")
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
""" Example of streaming data from an endpoint. """
|
|
2
|
+
|
|
3
|
+
import runpod
|
|
4
|
+
|
|
5
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
6
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
7
|
+
|
|
8
|
+
# This input targets an endpoint running the runpod/mock-worker image started
|
|
9
|
+
# with --generator, which yields each item of mock_return with mock_delay
|
|
10
|
+
# seconds between them. Replace it with the input your own streaming
|
|
11
|
+
# handler expects.
|
|
12
|
+
endpoint = runpod.Endpoint("YOUR_ENDPOINT_ID")
|
|
13
|
+
|
|
14
|
+
run_request = endpoint.run(
|
|
15
|
+
{
|
|
16
|
+
"input": {
|
|
17
|
+
"mock_return": ["a", "b", "c", "d", "e", "f", "g"],
|
|
18
|
+
"mock_delay": 1,
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
for output in run_request.stream():
|
|
24
|
+
print(output)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"""Create, stop, resume, and terminate a pod with the Runpod API.
|
|
2
|
+
|
|
3
|
+
This creates a billable GPU pod. The pod is terminated at the end, including
|
|
4
|
+
when a step fails.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import time
|
|
8
|
+
|
|
9
|
+
import runpod
|
|
10
|
+
|
|
11
|
+
# Run `rp login` once to store your API key, or uncomment the line below:
|
|
12
|
+
# runpod.api_key = "YOUR_RUNPOD_API_KEY"
|
|
13
|
+
|
|
14
|
+
GPU_TYPE = "NVIDIA GeForce RTX 4090" # see `rp catalog` for other GPU types
|
|
15
|
+
WAIT_SECONDS = 10
|
|
16
|
+
|
|
17
|
+
gpus = runpod.get_gpus()
|
|
18
|
+
print(gpus)
|
|
19
|
+
|
|
20
|
+
gpu = runpod.get_gpu(GPU_TYPE)
|
|
21
|
+
print(gpu)
|
|
22
|
+
|
|
23
|
+
pod = runpod.create_pod(
|
|
24
|
+
"example-pod",
|
|
25
|
+
"runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404",
|
|
26
|
+
GPU_TYPE,
|
|
27
|
+
)
|
|
28
|
+
print(pod)
|
|
29
|
+
pod_id = pod["id"]
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
print("Waiting for pod to be created...")
|
|
33
|
+
time.sleep(WAIT_SECONDS)
|
|
34
|
+
|
|
35
|
+
print(runpod.stop_pod(pod_id))
|
|
36
|
+
|
|
37
|
+
print("Waiting for pod to be stopped...")
|
|
38
|
+
time.sleep(WAIT_SECONDS)
|
|
39
|
+
|
|
40
|
+
# Resuming can fail if no GPU of this type is free on the pod's machine.
|
|
41
|
+
print(runpod.resume_pod(pod_id))
|
|
42
|
+
|
|
43
|
+
print("Waiting for pod to be resumed...")
|
|
44
|
+
time.sleep(WAIT_SECONDS)
|
|
45
|
+
finally:
|
|
46
|
+
runpod.terminate_pod(pod_id)
|
|
47
|
+
print(f"Terminated pod {pod_id}")
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"""Concurrency Modifier Example
|
|
2
|
+
|
|
3
|
+
An async handler lets one worker run several jobs at once. The worker calls
|
|
4
|
+
the concurrency modifier with its current concurrency and resizes to the value
|
|
5
|
+
it returns, waiting until no jobs are in flight before resizing.
|
|
6
|
+
|
|
7
|
+
To test locally, run:
|
|
8
|
+
python concurrent_handler.py --test_input '{"input": {"seconds": 1}}'
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import asyncio
|
|
12
|
+
|
|
13
|
+
import runpod
|
|
14
|
+
|
|
15
|
+
MAX_CONCURRENCY = 4
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# ---------------------------------- Handler --------------------------------- #
|
|
19
|
+
async def async_handler(job):
|
|
20
|
+
"""
|
|
21
|
+
Async handler. While it awaits, the worker can start other jobs.
|
|
22
|
+
"""
|
|
23
|
+
seconds = job["input"].get("seconds", 1)
|
|
24
|
+
await asyncio.sleep(seconds)
|
|
25
|
+
return {"slept": seconds}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
# --------------------------- Concurrency Modifier --------------------------- #
|
|
29
|
+
def concurrency_modifier(current_concurrency: int) -> int:
|
|
30
|
+
"""
|
|
31
|
+
Return the number of jobs this worker should run at once.
|
|
32
|
+
|
|
33
|
+
Replace the fixed value with your own logic, for example based on free
|
|
34
|
+
GPU memory or queue depth.
|
|
35
|
+
"""
|
|
36
|
+
return MAX_CONCURRENCY
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
runpod.serverless.start(
|
|
40
|
+
{"handler": async_handler, "concurrency_modifier": concurrency_modifier}
|
|
41
|
+
)
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Example of using the RunPodLogger class.
|
|
2
|
+
|
|
3
|
+
Running locally, the logger prints plain text. On a deployed worker, where
|
|
4
|
+
RUNPOD_ENDPOINT_ID is set, it prints one JSON object per line instead.
|
|
5
|
+
"""
|
|
2
6
|
|
|
3
7
|
import runpod
|
|
4
8
|
|
|
@@ -11,11 +15,11 @@ log.info("An info message")
|
|
|
11
15
|
log.warn("A warning message")
|
|
12
16
|
log.error("An error message")
|
|
13
17
|
|
|
14
|
-
#
|
|
15
|
-
# DEBUG
|
|
16
|
-
# INFO
|
|
17
|
-
# WARN
|
|
18
|
-
# ERROR
|
|
18
|
+
# Local output:
|
|
19
|
+
# DEBUG | A debug message
|
|
20
|
+
# INFO | An info message
|
|
21
|
+
# WARN | A warning message
|
|
22
|
+
# ERROR | An error message
|
|
19
23
|
|
|
20
24
|
|
|
21
25
|
log.debug("A debug message", request_id=JOB_ID)
|
|
@@ -23,7 +27,13 @@ log.info("An info message", request_id=JOB_ID)
|
|
|
23
27
|
log.warn("A warning message", request_id=JOB_ID)
|
|
24
28
|
log.error("An error message", request_id=JOB_ID)
|
|
25
29
|
|
|
26
|
-
#
|
|
30
|
+
# Local output:
|
|
31
|
+
# DEBUG | 1234567890 | A debug message
|
|
32
|
+
# INFO | 1234567890 | An info message
|
|
33
|
+
# WARN | 1234567890 | A warning message
|
|
34
|
+
# ERROR | 1234567890 | An error message
|
|
35
|
+
|
|
36
|
+
# Output on a deployed worker:
|
|
27
37
|
# {"requestId": "1234567890", "message": "A debug message", "level": "DEBUG"}
|
|
28
38
|
# {"requestId": "1234567890", "message": "An info message", "level": "INFO"}
|
|
29
39
|
# {"requestId": "1234567890", "message": "A warning message", "level": "WARN"}
|