gpuai-sdk 0.4.1__tar.gz → 0.4.2__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.
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/PKG-INFO +7 -2
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/README.md +6 -1
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/__init__.py +9 -1
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/instances_api.py +272 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api_client.py +1 -1
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/configuration.py +1 -1
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/__init__.py +4 -0
- gpuai_sdk-0.4.2/gpuai_sdk/models/gpu_suggestion.py +131 -0
- gpuai_sdk-0.4.2/gpuai_sdk/models/gpu_suggestion_cheaper.py +99 -0
- gpuai_sdk-0.4.2/gpuai_sdk/models/gpu_suggestion_gpu.py +95 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/instance.py +7 -1
- gpuai_sdk-0.4.2/gpuai_sdk/models/instance_gpu_memory.py +96 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk.egg-info/PKG-INFO +7 -2
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk.egg-info/SOURCES.txt +8 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/pyproject.toml +1 -1
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/setup.py +1 -1
- gpuai_sdk-0.4.2/test/test_gpu_suggestion.py +85 -0
- gpuai_sdk-0.4.2/test/test_gpu_suggestion_cheaper.py +63 -0
- gpuai_sdk-0.4.2/test/test_gpu_suggestion_gpu.py +59 -0
- gpuai_sdk-0.4.2/test/test_instance_gpu_memory.py +59 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/LICENSE +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/__init__.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/autolaunch_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/billing_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/community_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/environments_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/fine_tuning_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/functions_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/gpu_types_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/inference_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/market_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/meta_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/operations_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/pricing_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/registry_credentials_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/ssh_keys_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/templates_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/usage_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/watch_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api/webhooks_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/api_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/exceptions.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/functions/__init__.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/functions/_client.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/functions/_function.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/functions/errors.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/autolaunch_rule.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/autolaunch_rule_create.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/autolaunch_rule_disarm.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/autolaunch_rule_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/balance.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/billing_details.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/chat_choice.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/chat_completion_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/chat_completion_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/chat_message.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_earnings.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_earnings_entry.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_machine.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_machine_delist_result.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_machine_registration.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/community_supplier.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_crypto_deposit_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_fine_tuning_job_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_fine_tuning_job_request_gpuai.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_fine_tuning_job_request_method.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_fine_tuning_job_request_method_lora.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_function_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_function_run_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_function_version_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_instance_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_instance_request_ports_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_registry_credential_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_ssh_key_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/create_webhook_endpoint_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/crypto_deposit.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/embedding.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/embeddings_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/embeddings_request_input.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/embeddings_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/embeddings_usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/environments.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/file_object.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job_event.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job_event_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/fine_tuning_job_method.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/framework_version.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_replica_counts.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_run.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_run_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_run_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_run_log_chunk.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_run_logs.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_upload.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/function_version.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/get_health200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/gpu_type.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/gpu_type_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/images_generations_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/images_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/images_response_data_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/images_response_usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/include_item.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/instance_connection.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/instance_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/invoice.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/invoice_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/list_community_machines200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/list_deposits200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/list_registry_credentials200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/market_history_point.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/market_history_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/model.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/model_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/model_parameters_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/model_pricing.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/model_rate.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/open_ai_error_envelope.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/open_ai_error_envelope_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/operation.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/operation_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/operation_result.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/peak_window.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/pricing.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/pricing_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/problem.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/register_community_machine_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/registry_credential.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/spending_limit.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/ssh_key.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/ssh_key_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/stream_options.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/supplier_machine_view.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/template.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/template_env_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/template_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/template_ports_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/update_billing_details_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/update_community_machine_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/update_instance_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/update_spending_limit_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/usage_bucket.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/usage_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/video_create_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/video_job.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/video_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/vm_image.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/watch_rule.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/watch_rule_create.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/watch_rule_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/watch_rule_update.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/webhook_endpoint.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/models/webhook_endpoint_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/py.typed +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk/rest.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk.egg-info/dependency_links.txt +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk.egg-info/requires.txt +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/gpuai_sdk.egg-info/top_level.txt +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/setup.cfg +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_autolaunch_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_autolaunch_rule.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_autolaunch_rule_create.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_autolaunch_rule_disarm.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_autolaunch_rule_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_balance.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_billing_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_billing_details.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_chat_choice.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_chat_completion_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_chat_completion_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_chat_message.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_earnings.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_earnings_entry.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_machine.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_machine_delist_result.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_machine_registration.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_community_supplier.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_crypto_deposit_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_fine_tuning_job_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_fine_tuning_job_request_gpuai.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_fine_tuning_job_request_method.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_fine_tuning_job_request_method_lora.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_function_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_function_run_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_function_version_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_instance_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_instance_request_ports_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_registry_credential_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_ssh_key_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_create_webhook_endpoint_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_crypto_deposit.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_embedding.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_embeddings_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_embeddings_request_input.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_embeddings_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_embeddings_usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_environments.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_environments_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_file_object.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job_event.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job_event_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_fine_tuning_job_method.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_framework_version.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_replica_counts.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_run.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_run_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_run_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_run_log_chunk.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_run_logs.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_upload.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_function_version.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_functions_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_get_health200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_gpu_type.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_gpu_type_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_gpu_types_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_images_generations_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_images_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_images_response_data_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_images_response_usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_include_item.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_inference_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_instance.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_instance_connection.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_instance_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_instances_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_invoice.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_invoice_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_list_community_machines200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_list_deposits200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_list_registry_credentials200_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_market_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_market_history_point.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_market_history_response.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_meta_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_model.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_model_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_model_parameters_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_model_pricing.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_model_rate.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_open_ai_error_envelope.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_open_ai_error_envelope_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_operation.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_operation_error.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_operation_result.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_operations_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_peak_window.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_pricing.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_pricing_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_pricing_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_problem.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_register_community_machine_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_registry_credential.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_registry_credentials_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_spending_limit.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_ssh_key.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_ssh_key_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_ssh_keys_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_stream_options.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_supplier_machine_view.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_template.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_template_env_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_template_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_template_ports_inner.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_templates_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_update_billing_details_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_update_community_machine_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_update_instance_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_update_spending_limit_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_usage.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_usage_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_usage_bucket.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_usage_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_video_create_request.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_video_job.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_video_list.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_vm_image.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_watch_api.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_watch_rule.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_watch_rule_create.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_watch_rule_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_watch_rule_update.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_webhook_endpoint.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_webhook_endpoint_page.py +0 -0
- {gpuai_sdk-0.4.1 → gpuai_sdk-0.4.2}/test/test_webhooks_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gpuai-sdk
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: GPU.ai Public Developer API
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: GPU.ai Support
|
|
@@ -27,7 +27,7 @@ the dashboard. See https://gpu.ai/docs for details.
|
|
|
27
27
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
28
28
|
|
|
29
29
|
- API version: 1.0.0
|
|
30
|
-
- Package version: 0.4.
|
|
30
|
+
- Package version: 0.4.2
|
|
31
31
|
- Generator version: 7.24.0
|
|
32
32
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
33
33
|
|
|
@@ -191,6 +191,7 @@ Class | Method | HTTP request | Description
|
|
|
191
191
|
*InstancesApi* | [**create_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#create_instance) | **POST** /instances | Create an instance (async — returns 202 + Operation-Id header)
|
|
192
192
|
*InstancesApi* | [**delete_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#delete_instance) | **DELETE** /instances/{id} | Terminate an instance (idempotent)
|
|
193
193
|
*InstancesApi* | [**get_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#get_instance) | **GET** /instances/{id} | Get an instance
|
|
194
|
+
*InstancesApi* | [**get_instance_gpu_suggestion**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#get_instance_gpu_suggestion) | **GET** /instances/{id}/gpu-suggestion | Suggest a lower-priced GPU for an instance
|
|
194
195
|
*InstancesApi* | [**list_instances**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#list_instances) | **GET** /instances | List instances
|
|
195
196
|
*InstancesApi* | [**update_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#update_instance) | **PATCH** /instances/{id} | Update an instance (rename only in v1)
|
|
196
197
|
*MarketApi* | [**get_market_history**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/MarketApi.md#get_market_history) | **GET** /market-history | Get a GPU's price and availability over time
|
|
@@ -276,6 +277,9 @@ Class | Method | HTTP request | Description
|
|
|
276
277
|
- [GPUType](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUType.md)
|
|
277
278
|
- [GPUTypePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUTypePage.md)
|
|
278
279
|
- [GetHealth200Response](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GetHealth200Response.md)
|
|
280
|
+
- [GpuSuggestion](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestion.md)
|
|
281
|
+
- [GpuSuggestionCheaper](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestionCheaper.md)
|
|
282
|
+
- [GpuSuggestionGpu](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestionGpu.md)
|
|
279
283
|
- [ImagesGenerationsRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesGenerationsRequest.md)
|
|
280
284
|
- [ImagesResponse](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponse.md)
|
|
281
285
|
- [ImagesResponseDataInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponseDataInner.md)
|
|
@@ -283,6 +287,7 @@ Class | Method | HTTP request | Description
|
|
|
283
287
|
- [IncludeItem](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/IncludeItem.md)
|
|
284
288
|
- [Instance](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Instance.md)
|
|
285
289
|
- [InstanceConnection](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstanceConnection.md)
|
|
290
|
+
- [InstanceGpuMemory](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstanceGpuMemory.md)
|
|
286
291
|
- [InstancePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancePage.md)
|
|
287
292
|
- [Invoice](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Invoice.md)
|
|
288
293
|
- [InvoiceList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InvoiceList.md)
|
|
@@ -6,7 +6,7 @@ the dashboard. See https://gpu.ai/docs for details.
|
|
|
6
6
|
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
7
7
|
|
|
8
8
|
- API version: 1.0.0
|
|
9
|
-
- Package version: 0.4.
|
|
9
|
+
- Package version: 0.4.2
|
|
10
10
|
- Generator version: 7.24.0
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
|
|
12
12
|
|
|
@@ -170,6 +170,7 @@ Class | Method | HTTP request | Description
|
|
|
170
170
|
*InstancesApi* | [**create_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#create_instance) | **POST** /instances | Create an instance (async — returns 202 + Operation-Id header)
|
|
171
171
|
*InstancesApi* | [**delete_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#delete_instance) | **DELETE** /instances/{id} | Terminate an instance (idempotent)
|
|
172
172
|
*InstancesApi* | [**get_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#get_instance) | **GET** /instances/{id} | Get an instance
|
|
173
|
+
*InstancesApi* | [**get_instance_gpu_suggestion**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#get_instance_gpu_suggestion) | **GET** /instances/{id}/gpu-suggestion | Suggest a lower-priced GPU for an instance
|
|
173
174
|
*InstancesApi* | [**list_instances**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#list_instances) | **GET** /instances | List instances
|
|
174
175
|
*InstancesApi* | [**update_instance**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancesApi.md#update_instance) | **PATCH** /instances/{id} | Update an instance (rename only in v1)
|
|
175
176
|
*MarketApi* | [**get_market_history**](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/MarketApi.md#get_market_history) | **GET** /market-history | Get a GPU's price and availability over time
|
|
@@ -255,6 +256,9 @@ Class | Method | HTTP request | Description
|
|
|
255
256
|
- [GPUType](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUType.md)
|
|
256
257
|
- [GPUTypePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GPUTypePage.md)
|
|
257
258
|
- [GetHealth200Response](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GetHealth200Response.md)
|
|
259
|
+
- [GpuSuggestion](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestion.md)
|
|
260
|
+
- [GpuSuggestionCheaper](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestionCheaper.md)
|
|
261
|
+
- [GpuSuggestionGpu](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/GpuSuggestionGpu.md)
|
|
258
262
|
- [ImagesGenerationsRequest](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesGenerationsRequest.md)
|
|
259
263
|
- [ImagesResponse](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponse.md)
|
|
260
264
|
- [ImagesResponseDataInner](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/ImagesResponseDataInner.md)
|
|
@@ -262,6 +266,7 @@ Class | Method | HTTP request | Description
|
|
|
262
266
|
- [IncludeItem](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/IncludeItem.md)
|
|
263
267
|
- [Instance](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Instance.md)
|
|
264
268
|
- [InstanceConnection](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstanceConnection.md)
|
|
269
|
+
- [InstanceGpuMemory](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstanceGpuMemory.md)
|
|
265
270
|
- [InstancePage](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InstancePage.md)
|
|
266
271
|
- [Invoice](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/Invoice.md)
|
|
267
272
|
- [InvoiceList](https://github.com/gpuai-dev/gpuai-python-sdk/blob/main/docs/InvoiceList.md)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
""" # noqa: E501
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
__version__ = "0.4.
|
|
18
|
+
__version__ = "0.4.2"
|
|
19
19
|
|
|
20
20
|
# Define package exports
|
|
21
21
|
__all__ = [
|
|
@@ -102,6 +102,9 @@ __all__ = [
|
|
|
102
102
|
"GPUType",
|
|
103
103
|
"GPUTypePage",
|
|
104
104
|
"GetHealth200Response",
|
|
105
|
+
"GpuSuggestion",
|
|
106
|
+
"GpuSuggestionCheaper",
|
|
107
|
+
"GpuSuggestionGpu",
|
|
105
108
|
"ImagesGenerationsRequest",
|
|
106
109
|
"ImagesResponse",
|
|
107
110
|
"ImagesResponseDataInner",
|
|
@@ -109,6 +112,7 @@ __all__ = [
|
|
|
109
112
|
"IncludeItem",
|
|
110
113
|
"Instance",
|
|
111
114
|
"InstanceConnection",
|
|
115
|
+
"InstanceGpuMemory",
|
|
112
116
|
"InstancePage",
|
|
113
117
|
"Invoice",
|
|
114
118
|
"InvoiceList",
|
|
@@ -248,6 +252,9 @@ from gpuai_sdk.models.function_version import FunctionVersion as FunctionVersion
|
|
|
248
252
|
from gpuai_sdk.models.gpu_type import GPUType as GPUType
|
|
249
253
|
from gpuai_sdk.models.gpu_type_page import GPUTypePage as GPUTypePage
|
|
250
254
|
from gpuai_sdk.models.get_health200_response import GetHealth200Response as GetHealth200Response
|
|
255
|
+
from gpuai_sdk.models.gpu_suggestion import GpuSuggestion as GpuSuggestion
|
|
256
|
+
from gpuai_sdk.models.gpu_suggestion_cheaper import GpuSuggestionCheaper as GpuSuggestionCheaper
|
|
257
|
+
from gpuai_sdk.models.gpu_suggestion_gpu import GpuSuggestionGpu as GpuSuggestionGpu
|
|
251
258
|
from gpuai_sdk.models.images_generations_request import ImagesGenerationsRequest as ImagesGenerationsRequest
|
|
252
259
|
from gpuai_sdk.models.images_response import ImagesResponse as ImagesResponse
|
|
253
260
|
from gpuai_sdk.models.images_response_data_inner import ImagesResponseDataInner as ImagesResponseDataInner
|
|
@@ -255,6 +262,7 @@ from gpuai_sdk.models.images_response_usage import ImagesResponseUsage as Images
|
|
|
255
262
|
from gpuai_sdk.models.include_item import IncludeItem as IncludeItem
|
|
256
263
|
from gpuai_sdk.models.instance import Instance as Instance
|
|
257
264
|
from gpuai_sdk.models.instance_connection import InstanceConnection as InstanceConnection
|
|
265
|
+
from gpuai_sdk.models.instance_gpu_memory import InstanceGpuMemory as InstanceGpuMemory
|
|
258
266
|
from gpuai_sdk.models.instance_page import InstancePage as InstancePage
|
|
259
267
|
from gpuai_sdk.models.invoice import Invoice as Invoice
|
|
260
268
|
from gpuai_sdk.models.invoice_list import InvoiceList as InvoiceList
|
|
@@ -20,6 +20,7 @@ from pydantic import Field, StrictStr, field_validator
|
|
|
20
20
|
from typing import Optional
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from gpuai_sdk.models.create_instance_request import CreateInstanceRequest
|
|
23
|
+
from gpuai_sdk.models.gpu_suggestion import GpuSuggestion
|
|
23
24
|
from gpuai_sdk.models.instance import Instance
|
|
24
25
|
from gpuai_sdk.models.instance_page import InstancePage
|
|
25
26
|
from gpuai_sdk.models.operation import Operation
|
|
@@ -907,6 +908,277 @@ class InstancesApi:
|
|
|
907
908
|
|
|
908
909
|
|
|
909
910
|
|
|
911
|
+
@validate_call
|
|
912
|
+
def get_instance_gpu_suggestion(
|
|
913
|
+
self,
|
|
914
|
+
id: StrictStr,
|
|
915
|
+
_request_timeout: Union[
|
|
916
|
+
None,
|
|
917
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
918
|
+
Tuple[
|
|
919
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
920
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
921
|
+
]
|
|
922
|
+
] = None,
|
|
923
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
924
|
+
_content_type: Optional[StrictStr] = None,
|
|
925
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
926
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
927
|
+
) -> GpuSuggestion:
|
|
928
|
+
"""Suggest a lower-priced GPU for an instance
|
|
929
|
+
|
|
930
|
+
Compares the highest GPU memory this instance has used (its `gpu_memory` peak, plus headroom) with the GPU models currently listed, and names the cheapest model that would have fit when the saving is worth a look. It never changes anything: it reports what the telemetry shows. Memory use can grow later, so treat it as a starting point. `status` is `insufficient_data` until the instance has about an hour of telemetry, `no_cheaper_fit` when no cheaper listed model covers the peak, and `suggestion` when one does. Requires the `instances:read` scope. An instance owned by another organization returns 404.
|
|
931
|
+
|
|
932
|
+
:param id: (required)
|
|
933
|
+
:type id: str
|
|
934
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
935
|
+
number provided, it will be total request
|
|
936
|
+
timeout. It can also be a pair (tuple) of
|
|
937
|
+
(connection, read) timeouts.
|
|
938
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
939
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
940
|
+
request; this effectively ignores the
|
|
941
|
+
authentication in the spec for a single request.
|
|
942
|
+
:type _request_auth: dict, optional
|
|
943
|
+
:param _content_type: force content-type for the request.
|
|
944
|
+
:type _content_type: str, Optional
|
|
945
|
+
:param _headers: set to override the headers for a single
|
|
946
|
+
request; this effectively ignores the headers
|
|
947
|
+
in the spec for a single request.
|
|
948
|
+
:type _headers: dict, optional
|
|
949
|
+
:param _host_index: set to override the host_index for a single
|
|
950
|
+
request; this effectively ignores the host_index
|
|
951
|
+
in the spec for a single request.
|
|
952
|
+
:type _host_index: int, optional
|
|
953
|
+
:return: Returns the result object.
|
|
954
|
+
""" # noqa: E501
|
|
955
|
+
|
|
956
|
+
_param = self._get_instance_gpu_suggestion_serialize(
|
|
957
|
+
id=id,
|
|
958
|
+
_request_auth=_request_auth,
|
|
959
|
+
_content_type=_content_type,
|
|
960
|
+
_headers=_headers,
|
|
961
|
+
_host_index=_host_index
|
|
962
|
+
)
|
|
963
|
+
|
|
964
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
965
|
+
'200': "GpuSuggestion",
|
|
966
|
+
'404': "Problem",
|
|
967
|
+
'429': "Problem",
|
|
968
|
+
'default': "Problem",
|
|
969
|
+
}
|
|
970
|
+
response_data = self.api_client.call_api(
|
|
971
|
+
*_param,
|
|
972
|
+
_request_timeout=_request_timeout
|
|
973
|
+
)
|
|
974
|
+
response_data.read()
|
|
975
|
+
return self.api_client.response_deserialize(
|
|
976
|
+
response_data=response_data,
|
|
977
|
+
response_types_map=_response_types_map,
|
|
978
|
+
).data
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
@validate_call
|
|
982
|
+
def get_instance_gpu_suggestion_with_http_info(
|
|
983
|
+
self,
|
|
984
|
+
id: StrictStr,
|
|
985
|
+
_request_timeout: Union[
|
|
986
|
+
None,
|
|
987
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
988
|
+
Tuple[
|
|
989
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
990
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
991
|
+
]
|
|
992
|
+
] = None,
|
|
993
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
994
|
+
_content_type: Optional[StrictStr] = None,
|
|
995
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
996
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
997
|
+
) -> ApiResponse[GpuSuggestion]:
|
|
998
|
+
"""Suggest a lower-priced GPU for an instance
|
|
999
|
+
|
|
1000
|
+
Compares the highest GPU memory this instance has used (its `gpu_memory` peak, plus headroom) with the GPU models currently listed, and names the cheapest model that would have fit when the saving is worth a look. It never changes anything: it reports what the telemetry shows. Memory use can grow later, so treat it as a starting point. `status` is `insufficient_data` until the instance has about an hour of telemetry, `no_cheaper_fit` when no cheaper listed model covers the peak, and `suggestion` when one does. Requires the `instances:read` scope. An instance owned by another organization returns 404.
|
|
1001
|
+
|
|
1002
|
+
:param id: (required)
|
|
1003
|
+
:type id: str
|
|
1004
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1005
|
+
number provided, it will be total request
|
|
1006
|
+
timeout. It can also be a pair (tuple) of
|
|
1007
|
+
(connection, read) timeouts.
|
|
1008
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1009
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1010
|
+
request; this effectively ignores the
|
|
1011
|
+
authentication in the spec for a single request.
|
|
1012
|
+
:type _request_auth: dict, optional
|
|
1013
|
+
:param _content_type: force content-type for the request.
|
|
1014
|
+
:type _content_type: str, Optional
|
|
1015
|
+
:param _headers: set to override the headers for a single
|
|
1016
|
+
request; this effectively ignores the headers
|
|
1017
|
+
in the spec for a single request.
|
|
1018
|
+
:type _headers: dict, optional
|
|
1019
|
+
:param _host_index: set to override the host_index for a single
|
|
1020
|
+
request; this effectively ignores the host_index
|
|
1021
|
+
in the spec for a single request.
|
|
1022
|
+
:type _host_index: int, optional
|
|
1023
|
+
:return: Returns the result object.
|
|
1024
|
+
""" # noqa: E501
|
|
1025
|
+
|
|
1026
|
+
_param = self._get_instance_gpu_suggestion_serialize(
|
|
1027
|
+
id=id,
|
|
1028
|
+
_request_auth=_request_auth,
|
|
1029
|
+
_content_type=_content_type,
|
|
1030
|
+
_headers=_headers,
|
|
1031
|
+
_host_index=_host_index
|
|
1032
|
+
)
|
|
1033
|
+
|
|
1034
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1035
|
+
'200': "GpuSuggestion",
|
|
1036
|
+
'404': "Problem",
|
|
1037
|
+
'429': "Problem",
|
|
1038
|
+
'default': "Problem",
|
|
1039
|
+
}
|
|
1040
|
+
response_data = self.api_client.call_api(
|
|
1041
|
+
*_param,
|
|
1042
|
+
_request_timeout=_request_timeout
|
|
1043
|
+
)
|
|
1044
|
+
response_data.read()
|
|
1045
|
+
return self.api_client.response_deserialize(
|
|
1046
|
+
response_data=response_data,
|
|
1047
|
+
response_types_map=_response_types_map,
|
|
1048
|
+
)
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
@validate_call
|
|
1052
|
+
def get_instance_gpu_suggestion_without_preload_content(
|
|
1053
|
+
self,
|
|
1054
|
+
id: StrictStr,
|
|
1055
|
+
_request_timeout: Union[
|
|
1056
|
+
None,
|
|
1057
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1058
|
+
Tuple[
|
|
1059
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
1060
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
1061
|
+
]
|
|
1062
|
+
] = None,
|
|
1063
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
1064
|
+
_content_type: Optional[StrictStr] = None,
|
|
1065
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1066
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1067
|
+
) -> RESTResponseType:
|
|
1068
|
+
"""Suggest a lower-priced GPU for an instance
|
|
1069
|
+
|
|
1070
|
+
Compares the highest GPU memory this instance has used (its `gpu_memory` peak, plus headroom) with the GPU models currently listed, and names the cheapest model that would have fit when the saving is worth a look. It never changes anything: it reports what the telemetry shows. Memory use can grow later, so treat it as a starting point. `status` is `insufficient_data` until the instance has about an hour of telemetry, `no_cheaper_fit` when no cheaper listed model covers the peak, and `suggestion` when one does. Requires the `instances:read` scope. An instance owned by another organization returns 404.
|
|
1071
|
+
|
|
1072
|
+
:param id: (required)
|
|
1073
|
+
:type id: str
|
|
1074
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
1075
|
+
number provided, it will be total request
|
|
1076
|
+
timeout. It can also be a pair (tuple) of
|
|
1077
|
+
(connection, read) timeouts.
|
|
1078
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
1079
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
1080
|
+
request; this effectively ignores the
|
|
1081
|
+
authentication in the spec for a single request.
|
|
1082
|
+
:type _request_auth: dict, optional
|
|
1083
|
+
:param _content_type: force content-type for the request.
|
|
1084
|
+
:type _content_type: str, Optional
|
|
1085
|
+
:param _headers: set to override the headers for a single
|
|
1086
|
+
request; this effectively ignores the headers
|
|
1087
|
+
in the spec for a single request.
|
|
1088
|
+
:type _headers: dict, optional
|
|
1089
|
+
:param _host_index: set to override the host_index for a single
|
|
1090
|
+
request; this effectively ignores the host_index
|
|
1091
|
+
in the spec for a single request.
|
|
1092
|
+
:type _host_index: int, optional
|
|
1093
|
+
:return: Returns the result object.
|
|
1094
|
+
""" # noqa: E501
|
|
1095
|
+
|
|
1096
|
+
_param = self._get_instance_gpu_suggestion_serialize(
|
|
1097
|
+
id=id,
|
|
1098
|
+
_request_auth=_request_auth,
|
|
1099
|
+
_content_type=_content_type,
|
|
1100
|
+
_headers=_headers,
|
|
1101
|
+
_host_index=_host_index
|
|
1102
|
+
)
|
|
1103
|
+
|
|
1104
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
1105
|
+
'200': "GpuSuggestion",
|
|
1106
|
+
'404': "Problem",
|
|
1107
|
+
'429': "Problem",
|
|
1108
|
+
'default': "Problem",
|
|
1109
|
+
}
|
|
1110
|
+
response_data = self.api_client.call_api(
|
|
1111
|
+
*_param,
|
|
1112
|
+
_request_timeout=_request_timeout
|
|
1113
|
+
)
|
|
1114
|
+
return response_data.response
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
def _get_instance_gpu_suggestion_serialize(
|
|
1118
|
+
self,
|
|
1119
|
+
id,
|
|
1120
|
+
_request_auth,
|
|
1121
|
+
_content_type,
|
|
1122
|
+
_headers,
|
|
1123
|
+
_host_index,
|
|
1124
|
+
) -> RequestSerialized:
|
|
1125
|
+
|
|
1126
|
+
_host = None
|
|
1127
|
+
|
|
1128
|
+
_collection_formats: Dict[str, str] = {
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
_path_params: Dict[str, str] = {}
|
|
1132
|
+
_query_params: List[Tuple[str, str]] = []
|
|
1133
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
1134
|
+
_form_params: List[Tuple[str, str]] = []
|
|
1135
|
+
_files: Dict[
|
|
1136
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
1137
|
+
] = {}
|
|
1138
|
+
_body_params: Optional[bytes] = None
|
|
1139
|
+
|
|
1140
|
+
# process the path parameters
|
|
1141
|
+
if id is not None:
|
|
1142
|
+
_path_params['id'] = id
|
|
1143
|
+
# process the query parameters
|
|
1144
|
+
# process the header parameters
|
|
1145
|
+
# process the form parameters
|
|
1146
|
+
# process the body parameter
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
# set the HTTP header `Accept`
|
|
1150
|
+
if 'Accept' not in _header_params:
|
|
1151
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
1152
|
+
[
|
|
1153
|
+
'application/json',
|
|
1154
|
+
'application/problem+json'
|
|
1155
|
+
]
|
|
1156
|
+
)
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
# authentication setting
|
|
1160
|
+
_auth_settings: List[str] = [
|
|
1161
|
+
'bearerAuth'
|
|
1162
|
+
]
|
|
1163
|
+
|
|
1164
|
+
return self.api_client.param_serialize(
|
|
1165
|
+
method='GET',
|
|
1166
|
+
resource_path='/instances/{id}/gpu-suggestion',
|
|
1167
|
+
path_params=_path_params,
|
|
1168
|
+
query_params=_query_params,
|
|
1169
|
+
header_params=_header_params,
|
|
1170
|
+
body=_body_params,
|
|
1171
|
+
post_params=_form_params,
|
|
1172
|
+
files=_files,
|
|
1173
|
+
auth_settings=_auth_settings,
|
|
1174
|
+
collection_formats=_collection_formats,
|
|
1175
|
+
_host=_host,
|
|
1176
|
+
_request_auth=_request_auth
|
|
1177
|
+
)
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
|
|
1181
|
+
|
|
910
1182
|
@validate_call
|
|
911
1183
|
def list_instances(
|
|
912
1184
|
self,
|
|
@@ -92,7 +92,7 @@ class ApiClient:
|
|
|
92
92
|
self.default_headers[header_name] = header_value
|
|
93
93
|
self.cookie = cookie
|
|
94
94
|
# Set default User-Agent.
|
|
95
|
-
self.user_agent = 'gpuai-sdk-python/0.4.
|
|
95
|
+
self.user_agent = 'gpuai-sdk-python/0.4.2'
|
|
96
96
|
self.client_side_validation = configuration.client_side_validation
|
|
97
97
|
|
|
98
98
|
def __enter__(self):
|
|
@@ -552,7 +552,7 @@ class Configuration:
|
|
|
552
552
|
"OS: {env}\n"\
|
|
553
553
|
"Python Version: {pyversion}\n"\
|
|
554
554
|
"Version of the API: 1.0.0\n"\
|
|
555
|
-
"SDK Package Version: 0.4.
|
|
555
|
+
"SDK Package Version: 0.4.2".\
|
|
556
556
|
format(env=sys.platform, pyversion=sys.version)
|
|
557
557
|
|
|
558
558
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -69,6 +69,9 @@ from gpuai_sdk.models.function_version import FunctionVersion
|
|
|
69
69
|
from gpuai_sdk.models.gpu_type import GPUType
|
|
70
70
|
from gpuai_sdk.models.gpu_type_page import GPUTypePage
|
|
71
71
|
from gpuai_sdk.models.get_health200_response import GetHealth200Response
|
|
72
|
+
from gpuai_sdk.models.gpu_suggestion import GpuSuggestion
|
|
73
|
+
from gpuai_sdk.models.gpu_suggestion_cheaper import GpuSuggestionCheaper
|
|
74
|
+
from gpuai_sdk.models.gpu_suggestion_gpu import GpuSuggestionGpu
|
|
72
75
|
from gpuai_sdk.models.images_generations_request import ImagesGenerationsRequest
|
|
73
76
|
from gpuai_sdk.models.images_response import ImagesResponse
|
|
74
77
|
from gpuai_sdk.models.images_response_data_inner import ImagesResponseDataInner
|
|
@@ -76,6 +79,7 @@ from gpuai_sdk.models.images_response_usage import ImagesResponseUsage
|
|
|
76
79
|
from gpuai_sdk.models.include_item import IncludeItem
|
|
77
80
|
from gpuai_sdk.models.instance import Instance
|
|
78
81
|
from gpuai_sdk.models.instance_connection import InstanceConnection
|
|
82
|
+
from gpuai_sdk.models.instance_gpu_memory import InstanceGpuMemory
|
|
79
83
|
from gpuai_sdk.models.instance_page import InstancePage
|
|
80
84
|
from gpuai_sdk.models.invoice import Invoice
|
|
81
85
|
from gpuai_sdk.models.invoice_list import InvoiceList
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
GPU.ai Public Developer API
|
|
5
|
+
|
|
6
|
+
Programmatic API for GPU.ai. Authenticate with API keys minted from the dashboard. See https://gpu.ai/docs for details.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: support@gpu.ai
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from gpuai_sdk.models.gpu_suggestion_cheaper import GpuSuggestionCheaper
|
|
24
|
+
from gpuai_sdk.models.gpu_suggestion_gpu import GpuSuggestionGpu
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
from pydantic_core import to_jsonable_python
|
|
28
|
+
|
|
29
|
+
class GpuSuggestion(BaseModel):
|
|
30
|
+
"""
|
|
31
|
+
Whether a lower-priced GPU model would have fit an instance's observed peak GPU memory. It names GPU models and prices only.
|
|
32
|
+
""" # noqa: E501
|
|
33
|
+
status: StrictStr = Field(description="`suggestion` when a cheaper model fits and the saving is at least 10% and $0.05 per hour. `insufficient_data` until the instance has at least 30 samples over at least an hour. `no_cheaper_fit` otherwise. ")
|
|
34
|
+
peak_used_mb: Optional[StrictInt] = Field(description="Highest GPU memory seen, in MiB. Null with no telemetry.")
|
|
35
|
+
required_mb: Optional[StrictInt] = Field(description="The peak plus headroom (25% and 1024 MiB), in MiB: the memory a suggested model must have. Null until there is enough telemetry. ")
|
|
36
|
+
samples: StrictInt
|
|
37
|
+
observed_minutes: StrictInt = Field(description="Minutes between the first and the latest telemetry sample.")
|
|
38
|
+
current: GpuSuggestionGpu
|
|
39
|
+
suggestion: Optional[GpuSuggestionCheaper] = Field(description="Set only when status is `suggestion`.")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["status", "peak_used_mb", "required_mb", "samples", "observed_minutes", "current", "suggestion"]
|
|
41
|
+
|
|
42
|
+
@field_validator('status')
|
|
43
|
+
def status_validate_enum(cls, value):
|
|
44
|
+
"""Validates the enum"""
|
|
45
|
+
if value not in set(['suggestion', 'insufficient_data', 'no_cheaper_fit']):
|
|
46
|
+
raise ValueError("must be one of enum values ('suggestion', 'insufficient_data', 'no_cheaper_fit')")
|
|
47
|
+
return value
|
|
48
|
+
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
validate_by_name=True,
|
|
51
|
+
validate_by_alias=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
return json.dumps(to_jsonable_python(self.to_dict()))
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
67
|
+
"""Create an instance of GpuSuggestion from a JSON string"""
|
|
68
|
+
return cls.from_dict(json.loads(json_str))
|
|
69
|
+
|
|
70
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
71
|
+
"""Return the dictionary representation of the model using alias.
|
|
72
|
+
|
|
73
|
+
This has the following differences from calling pydantic's
|
|
74
|
+
`self.model_dump(by_alias=True)`:
|
|
75
|
+
|
|
76
|
+
* `None` is only added to the output dict for nullable fields that
|
|
77
|
+
were set at model initialization. Other fields with value `None`
|
|
78
|
+
are ignored.
|
|
79
|
+
"""
|
|
80
|
+
excluded_fields: Set[str] = set([
|
|
81
|
+
])
|
|
82
|
+
|
|
83
|
+
_dict = self.model_dump(
|
|
84
|
+
by_alias=True,
|
|
85
|
+
exclude=excluded_fields,
|
|
86
|
+
exclude_none=True,
|
|
87
|
+
)
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of current
|
|
89
|
+
if self.current:
|
|
90
|
+
_dict['current'] = self.current.to_dict()
|
|
91
|
+
# override the default output from pydantic by calling `to_dict()` of suggestion
|
|
92
|
+
if self.suggestion:
|
|
93
|
+
_dict['suggestion'] = self.suggestion.to_dict()
|
|
94
|
+
# set to None if peak_used_mb (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.peak_used_mb is None and "peak_used_mb" in self.model_fields_set:
|
|
97
|
+
_dict['peak_used_mb'] = None
|
|
98
|
+
|
|
99
|
+
# set to None if required_mb (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.required_mb is None and "required_mb" in self.model_fields_set:
|
|
102
|
+
_dict['required_mb'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if suggestion (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.suggestion is None and "suggestion" in self.model_fields_set:
|
|
107
|
+
_dict['suggestion'] = None
|
|
108
|
+
|
|
109
|
+
return _dict
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
113
|
+
"""Create an instance of GpuSuggestion from a dict"""
|
|
114
|
+
if obj is None:
|
|
115
|
+
return None
|
|
116
|
+
|
|
117
|
+
if not isinstance(obj, dict):
|
|
118
|
+
return cls.model_validate(obj)
|
|
119
|
+
|
|
120
|
+
_obj = cls.model_validate({
|
|
121
|
+
"status": obj.get("status"),
|
|
122
|
+
"peak_used_mb": obj.get("peak_used_mb"),
|
|
123
|
+
"required_mb": obj.get("required_mb"),
|
|
124
|
+
"samples": obj.get("samples"),
|
|
125
|
+
"observed_minutes": obj.get("observed_minutes"),
|
|
126
|
+
"current": GpuSuggestionGpu.from_dict(obj["current"]) if obj.get("current") is not None else None,
|
|
127
|
+
"suggestion": GpuSuggestionCheaper.from_dict(obj["suggestion"]) if obj.get("suggestion") is not None else None
|
|
128
|
+
})
|
|
129
|
+
return _obj
|
|
130
|
+
|
|
131
|
+
|