xinference.client.Client#
- class xinference.client.Client(base_url, api_key: str | None = None)[source]#
-
Methods
__init__(base_url[, api_key])abort_request(model_uid, request_id[, ...])Abort a request.
add_model_replica(model_uid[, ...])Add one or more replicas to a running model (scale-up).
cancel_launch_model(model_uid)Cancel launching model.
check_component_update(component[, ...])Check the package source on the selected component's machine.
close()Close the session.
confirm_and_remove_model(model_version[, ...])Remove the cached models with the model name cached on the server.
describe_model(model_uid)Get model information via RESTful APIs.
get_api_relaunch(operation_id)get_autostart_config()get_autostart_model_summary()get_instance_info(model_name, model_uid)get_launch_model_progress(model_uid)Get progress of the specific model.
get_model(model_uid)Launch the model based on the parameters on the server via RESTful APIs.
get_model_registration(model_type, model_name)Get the model with the model type and model name registered on the server.
get_model_reload_config(model_uid)Return editable parameters, their types and current explicit values.
get_model_reload_status(model_uid)Return the latest reload operation, including its stage and error.
get_model_runtime_info(model_uid)Return runtime_context_length (tokens, or None) and per-replica limits.
get_progress(request_id)get_supervisor_relaunch(operation_id)get_worker_relaunch(operation_id)launch_model(model_name[, model_type, ...])Launch the model based on the parameters on the server via RESTful APIs.
list_api_relaunches()list_cached_models([model_name, worker_ip])Get a list of cached models.
list_deletable_models(model_version[, worker_ip])Get the cached models with the model path cached on the server.
list_model_registrations(model_type[, detailed])List models registered on the server.
Retrieve the model specifications from the Server.
list_supervisor_relaunches()list_worker_relaunches()login(username, password)query_engine_by_model_name(model_name[, ...])Get the engine parameters with the model name registered on the server.
register_model(model_type, model, persist[, ...])Register a custom model.
relaunch_api([python_executable, ...])Replace the distributed API process while existing requests drain.
relaunch_supervisor([python_executable, ...])Replace the distributed Supervisor process while models remain running.
relaunch_worker(worker_address[, ...])Relaunch a Worker and return its asynchronous operation status.
reload_model(model_uid, model_config[, ...])Start an asynchronous parameter reload with the same model UID.
remove_autostart_model(model_uid)terminate_model(model_uid)Terminate the specific model running on the server.
terminate_model_replica(model_uid, replica_id)Terminate a specific replica of a running model.
unregister_model(model_type, model_name)Unregister a custom model.
upsert_autostart_model(entry)