Skip to main content

pc.create_engine

pc.create_engine(name, template_id=1, auto_suspend=600, auto_resume=False)

Create an engine. Returns an engine instance.

Parameters:

   name: str
Name of the engine to be created.
   - Name must not match any existing engines.

   template_id: {1, 2, ...}, default 1
Size of the engine to be created.

   auto_suspend_seconds: int, default 600
How long should the engine idle before shutting down automatically.

   auto_resume: bool, default False
Should the engine automatically resume upon failure.

Returns:

   Engine

Examples:

Create a medium cpu engine with 4 cpu nodes that auto suspends after 30 minutes.

    engine = pc.create_engine('medium_cpu_engine', template_id=3, auto_suspend=1800, auto_resume=True)