globals
            GlobalState
¶
    
              Bases: BaseModel
A base Pydantic model for global states.
            get_instance()
  
      classmethod
  
¶
    Get the global instance of the specific subclass.
Returns:
| Type | Description | 
|---|---|
                  GlobalState
             | 
            
               The global instance of the subclass.  | 
          
Source code in langroid/utils/globals.py
              
            set_values(**kwargs)
  
      classmethod
  
¶
    Set values on the global instance of the specific subclass.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                **kwargs
             | 
            
                  Dict[str, Any]
             | 
            
               The fields and their values to set.  | 
            
                  {}
             | 
          
Source code in langroid/utils/globals.py
              
            get_value(name)
  
      classmethod
  
¶
    Retrieve the value of a specific field from the global instance.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                name
             | 
            
                  str
             | 
            
               The name of the field to retrieve.  | 
            required | 
Returns:
| Name | Type | Description | 
|---|---|---|
str |             
                  Any
             | 
            
               The value of the specified field.  |