The page you navigated to  does not exist, so we brought you to the closest page to it.
          
        
    
    flytekitplugins.flyteinteractive.jupyter_lib.decorator
  
      
          | Class | Description | 
  
  
      
          | jupyter | Abstract class for class decorators. | 
  
  
      
          | Property | Type | Description | 
  
  
      
          | EXAMPLE_JUPYTER_NOTEBOOK_NAME | str |  | 
      
          | JUPYTER_TYPE_VALUE | str |  | 
      
          | MAX_IDLE_SECONDS | int |  | 
  
    
        
    
    def exit_handler(
    child_process: multiprocessing.context.Process,
    task_function,
    args,
    kwargs,
    post_execute: typing.Optional[typing.Callable],
)
 
- Wait for the child process to finish. This happens when the user clicks “Shut Down” in Jupyter
- Execute post function, if given.
- Executes the task function, when the Jupyter Notebook Server is terminated.
  
      
          | Parameter | Type | 
  
  
      
          | child_process | multiprocessing.context.Process | 
      
          | task_function |  | 
      
          | args | *args | 
      
          | kwargs | **kwargs | 
      
          | post_execute | typing.Optional[typing.Callable] | 
  
    
        
    
    def write_example_notebook(
    task_function: typing.Optional[typing.Callable],
    notebook_dir: str,
)
 
Create an example notebook with markdown and code cells that show instructions to resume task & jupyter task code.
  
      
          | Parameter | Type | 
  
  
      
          | task_function | typing.Optional[typing.Callable] | 
      
          | notebook_dir | str | 
  
Abstract class for class decorators.
We can attach config on the decorator class and use it in the upper level.
    
        
    
    class jupyter(
    task_function: typing.Optional[typing.Callable],
    max_idle_seconds: typing.Optional[int],
    port: int,
    enable: bool,
    run_task_first: bool,
    notebook_dir: typing.Optional[str],
    pre_execute: typing.Optional[typing.Callable],
    post_execute: typing.Optional[typing.Callable],
)
 
jupyter decorator modifies a container to run a Jupyter Notebook server:
- Launches and monitors the Jupyter Notebook server.
- Write Example Jupyter Notebook.
- Terminates if the server is idle for a set duration or user shuts down manually.
  
      
          | Parameter | Type | 
  
  
      
          | task_function | typing.Optional[typing.Callable] | 
      
          | max_idle_seconds | typing.Optional[int] | 
      
          | port | int | 
      
          | enable | bool | 
      
          | run_task_first | bool | 
      
          | notebook_dir | typing.Optional[str] | 
      
          | pre_execute | typing.Optional[typing.Callable] | 
      
          | post_execute | typing.Optional[typing.Callable] | 
  
  
      
          | Method | Description | 
  
  
      
          | execute() | This method will be called when the decorated function is called. | 
      
          | get_extra_config() | Get the config of the decorator. | 
  
    
        
    
    def execute(
    args,
    kwargs,
)
 
This method will be called when the decorated function is called.
  
      
          | Parameter | Type | 
  
  
      
          | args | *args | 
      
          | kwargs | **kwargs | 
  
Get the config of the decorator.