Releases: runpod/runpod-python
1.2.2
Added
- User queries and mutations are now available in the Python API wrapper.
start_ssh
added with the defaultTrue
when creating new pods.network_volume_id
can now be passed in when creating new pods, the correct data center is automatically selected.template_id
can now be passed in when creating new pods.
Changes
- Dependencies updated to the latest versions.
- Reduced circular imports for version reference.
support_public_ip
is not default toTrue
when creating new pods.
Fixed
- Reduce pool_connections for ping requests to 10.
- Double timeout for ping requests.
What's Changed
- Support passing a template ID to createPod (#145) by @tleyden in #146
- Bump setuptools-scm from 7.1.0 to 8.0.3 by @dependabot in #142
- Bump fastapi[all] from 0.103.1 to 0.103.2 by @dependabot in #147
- Ping review by @justinmerrell in #148
- Devex cherry pick by @justinmerrell in #151
- feat: added 1.2.2 changelog by @justinmerrell in #152
New Contributors
Full Changelog: 1.2.1...1.2.2
1.2.1
Added
- Version reported when an error is returned in serverless.
- Log level can be set with
RUNPOD_LOG_LEVEL
environment variable. - SIGTERM handler initialized when starting serverless worker to avoid hung workers.
- Progress update method exposed
runpod.serverless.progress_update
can be called with the job object and string.
Fixed
- Region is included when using S3 storage via rp_upload, automatically filled in for Amazon S3 buckets and Digital Ocean Spaces.
What's Changed
- Error fix by @justinmerrell in #120
- Bump fastapi[all] from 0.103.0 to 0.103.1 by @dependabot in #121
- Bump docker/setup-buildx-action from 2 to 3 by @dependabot in #129
- Bump docker/login-action from 2 to 3 by @dependabot in #128
- Bump docker/setup-qemu-action from 2 to 3 by @dependabot in #127
- Bump actions/checkout from 3 to 4 by @dependabot in #122
- Bump nest-asyncio from 1.5.7 to 1.5.8 by @dependabot in #132
- explicit region_name in boto3 client init by @MartinKlefas in #130
- Sigterm patch by @justinmerrell in #134
- updating branch by @justinmerrell in #135
- Progress updates by @justinmerrell in #136
- Progress fix by @justinmerrell in #137
- Update rp_http.py by @justinmerrell in #138
- Progress patch by @justinmerrell in #139
- fix: checking for status by @justinmerrell in #140
- Update CHANGELOG.md by @justinmerrell in #141
New Contributors
- @MartinKlefas made their first contribution in #130
Full Changelog: 1.2.0...1.2.1
1.2.0
Added
- Command Line Interface (CLI)
- Can generate a credentials file from the CLI to store your API key.
get_gpu
now supportsgpu_quantity
as a parameter.
Changes
- Minimized the use of pytests in favor of unittests.
- Re-named
api_wrapper
toapi
for consistency. aiohttp_retry
packaged replacedrp_retry.py
implementation.
Fixed
- Serverless bug that would not remove task if it failed to submit the results.
- Added missing
get_pod
- Remove extra print statement when making API calls.
What's Changed
- Ping review by @justinmerrell in #100
- fix for runpod.get_pods() and runpod.get_pod(id) by @DoctorHacks in #101
- Expanded api by @justinmerrell in #103
- Skypilot by @justinmerrell in #112
- Bump fastapi[all] from 0.101.1 to 0.103.0 by @dependabot in #109
- Test cleanup by @justinmerrell in #115
- Update rp_http.py by @justinmerrell in #116
- Logging transparency by @justinmerrell in #117
- 400 status by @justinmerrell in #118
- Update CHANGELOG.md by @justinmerrell in #119
New Contributors
- @DoctorHacks made their first contribution in #101
Full Changelog: 1.1.3...1.2.0
1.1.3
What's Changed
- Add get_pod() API method by @alexeevit in #98
- Refresh worker fix by @justinmerrell in #99
Full Changelog: 1.1.2...1.1.3
1.1.2
What's Changed
- feat: e2e test streaming by @justinmerrell in #93
- Update CI-e2e.yml by @justinmerrell in #94
- Add get_pods() API method by @alexeevit in #95
- API Improvements With Error Handling by @justinmerrell in #96
- Connectionpool fix by @justinmerrell in #97
New Contributors
- @alexeevit made their first contribution in #95
Full Changelog: 1.1.1...1.1.2
1.1.1
What's Changed
- Preserve the final job result's post condition in streaming scenario. by @Jorghi12 in #88
- Bump fastapi[all] from 0.101.0 to 0.101.1 by @dependabot in #91
- Create CI-e2e.yml by @justinmerrell in #87
- Update README.md by @justinmerrell in #92
Full Changelog: 1.1.0...1.1.1
1.1.0
Bug Fix
Fixes bug where our ping health monitor would stop if the handler received a blocking function.
What's Changed
- Bump fastapi[all] from 0.100.1 to 0.101.0 by @dependabot in #85
- Heartbeat thread by @justinmerrell in #86
Full Changelog: 1.0.1...1.1.0
1.0.1
1.0.0
We're thrilled to announce the release of RunPod 1.0.0! After refining our CI/CD pipeline and gathering valuable feedback from thousands of users, we are ready to introduce significant enhancements and fixes.
New Features
Multi-Job Concurrency
Workers are now smarter and more efficient. They can fetch and process multiple jobs in parallel, accelerating your workflows and productivity. Here's what's new:
- Flexible job fetching: You can now fine-tune a worker's operations. When starting a worker, pass a function into the
concurrency_controller
. This function determines the number of jobs a worker should fetch in parallel.
Job Streaming
Our platform offers a powerful streaming feature that allows users to receive real-time updates on job outputs. This is particularly useful when dealing with Language Model tasks. We support two types of streaming generator functions: regular generator and async generator.
Regular Generator Function:
def generator_streaming(job):
for i in range(5):
output = f"Generated token output {i}"
yield output
Async Generator Function:
async def async_generator_streaming(job):
for i in range(5):
output = f"Generated async token output {i}"
yield output
await asyncio.sleep(1) # Simulate an asynchronous task (e.g., LLM processing time).
Usage:
To enable streaming, use either a regular or async generator function to yield the output results. The generator will continuously produce token outputs, streamed to the client in real-time.
How to Stream:
To utilize the generator function for streaming, you must use the /stream/{jobid}
endpoint. Clients will receive the streaming token outputs by making an HTTP request to this endpoint. The jobid parameter in the endpoint URL helps the server identify the specific job for which the streaming is requested.
Real-Time Updates:
Once the streaming is initiated, the /stream/{jobid}
endpoint will continuously receive generated token outputs as the generator function yields them. This provides real-time updates to the client or user, ensuring they can access the latest results throughout the job execution.
Using generator-type handlers for streaming, our platform enhances the user experience by delivering dynamic and up-to-date information for tasks involving Language Models and beyond.
Updates & Bug Fixes
We've also made some crucial improvements and squashed a few bugs:
- Improved Initialization: The worker implementation now leverages asyncio, significantly improving initialization times. Your workers are now ready to go faster than ever!
- Cohesive File Naming: We've renamed some files to improve cohesion and understanding. Now it's even easier to understand the purpose of each file in the project.
What's Changed
- build(deps): bump actions/setup-python from 3 to 4 by @dependabot in #46
- Add code coverage by @justinmerrell in #50
- bringing branch up to date by @justinmerrell in #51
- Api wrapper tests by @justinmerrell in #52
- Update refactor branch by @justinmerrell in #53
- Unit tests by @justinmerrell in #54
- Update setup.cfg by @justinmerrell in #55
- 48 heartbeat refactor by @justinmerrell in #49
- More tests by @justinmerrell in #60
- added documentation for Endpoint and create_pod by @therealadityashankar in #61
- Enabling multi-job, single-worker in Runpod-Python. by @Jorghi12 in #63
- Update init.py by @justinmerrell in #65
- rebase by @justinmerrell in #67
- minor worker refactoring by @justinmerrell in #66
- Worker loop cleanup by @Jorghi12 in #68
- status_code > status by @justinmerrell in #69
- Update rp_ping.py by @justinmerrell in #70
- Fixing "timeout context manager should be used inside a task" by @Jorghi12 in #71
- Cleanup by @justinmerrell in #72
- Bump fastapi[all] from 0.99.1 to 0.100.1 by @dependabot in #73
- Bump nest-asyncio from 1.5.6 to 1.5.7 by @dependabot in #74
- Update rp_scale.py by @justinmerrell in #75
- Polish by @justinmerrell in #76
New Contributors
- @dependabot made their first contribution in #46
- @therealadityashankar made their first contribution in #61
- @Jorghi12 made their first contribution in #63
Full Changelog: 0.10.0...1.0.0
0.10.0
New Features
Test API Server
- We introduced the ability to quickly deploy a locally hosted API server with your worker code. This is accomplished by calling your handler file with the
--rp_api_serve
argument. This allows for faster, more flexible testing environments. Check out our blog post for an example.
Log Level
- For better control over logging, we now allow setting the log level by calling your handler with the
--rp_log_level
set to the desired level. If this argument is present, it will override theRUNPOD_DEBUG_LEVEL
.
Updates
Logger
- We've made significant improvements to our logger for better clarity and control:
logger.py
has been refactored and renamed torp_logger.py
for consistency.- Logging level is defaulted to
DEBUG
by default. Note that when your worker runs on RunPod we set it toERROR
unless otherwise set. - Breaking Change:
RUNPOD_DEBUG
no longer controls whether or not logs are printed. To prevent all logs from printing, setRUNPOD_DEBUG_LEVEL
to 0 or call your handler file with the argument--rp_log_level="NOTSET"
RunPod API Python Language Library
- We've added more options for creating Pods:
- You can now specify
data_center_id
andcountry_code
when creating Pods, allowing for more precise control over pod creation.
- You can now specify
What's Changed
- feat: pass data_center_id to create_pod by @shibanovp in #40
- feat: add country_code to create_pod by @shibanovp in #42
- Logger Update by @justinmerrell in #43
- updating branch by @justinmerrell in #44
- API Server For Local Testing by @justinmerrell in #45
New Contributors
- @shibanovp made their first contribution in #40
Full Changelog: 0.9.12...0.10.0