Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion runpod/api/ctl_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def create_pod(
cloud_type:str="ALL", support_public_ip:bool=True,
start_ssh:bool=True,
data_center_id : Optional[str]=None, country_code:Optional[str]=None,
gpu_count:int=1, volume_in_gb:int=0, container_disk_in_gb:int=5,
gpu_count:int=1, volume_in_gb:int=0, container_disk_in_gb:Optional[int]=None,
min_vcpu_count:int=1, min_memory_in_gb:int=1, docker_args:str="",
ports:Optional[str]=None, volume_mount_path:str="/runpod-volume",
env:Optional[dict]=None, template_id:Optional[str]=None,
Expand Down Expand Up @@ -117,6 +117,9 @@ def create_pod(
data_center_id = network_volume["dataCenterId"]
break

if container_disk_in_gb is None and template_id is None:
container_disk_in_gb = 10

raw_response = run_graphql_query(
pod_mutations.generate_pod_deployment_mutation(
name, image_name, gpu_type_id,
Expand Down
6 changes: 3 additions & 3 deletions runpod/serverless/modules/rp_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ async def run_job(handler: Callable, job: Dict[str, Any]) -> Dict[str, Any]:
run_result = {"error": "No output from handler."}

try:
job_output = await handler(job) if inspect.isawaitable(handler(job)) else handler(job)
handler_return = handler(job)
job_output = await handler_return if inspect.isawaitable(handler_return) else handler_return

log.debug(f'{job["id"]} | Handler output: {job_output}')

if isinstance(job_output, dict):
Expand All @@ -132,8 +134,6 @@ async def run_job(handler: Callable, job: Dict[str, Any]) -> Dict[str, Any]:
else:
run_result = {"output": job_output}



if run_result.get("output") == {}:
run_result.pop("output")

Expand Down