Kernel Functions¶
-
class
ai.backend.client.kernel.
Kernel
(kernel_id, owner_access_key=None)[source]¶ Provides various interactions with compute sessions in Backend.AI.
The term ‘kernel’ is now deprecated and we prefer ‘compute sessions’. However, for historical reasons and to avoid confusion with client sessions, we keep the backward compatibility with the naming of this API function class.
For multi-container sessions, all methods take effects to the master container only, except
destroy()
andrestart()
methods. So it is the user’s responsibility to distribute uploaded files to multiple containers using explicit copies or virtual folders which are commonly mounted to all containers belonging to the same compute session.-
session
= None¶ The client session instance that this function class is bound to.
-
-
class
ai.backend.client.kernel.
StreamPty
(session, underlying_ws)[source]¶ A derivative class of
WebSocketResponse
which provides additional functions to control the terminal.