1111# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
1212# See the License for the specific language governing permissions and 
1313# limitations under the License. 
14- from  typing  import  Any , Dict ,  List ,  Union 
14+ from  typing  import  Any , Union 
1515
1616import  torch 
1717from  lightning_utilities .core .imports  import  RequirementCache 
@@ -38,7 +38,7 @@ def setup_device(self, device: torch.device) -> None:
3838            raise  MisconfigurationException (f"Device should be CPU, got { device }   instead." )
3939
4040    @override  
41-     def  get_device_stats (self , device : _DEVICE ) ->  Dict [str , Any ]:
41+     def  get_device_stats (self , device : _DEVICE ) ->  dict [str , Any ]:
4242        """Get CPU stats from ``psutil`` package.""" 
4343        return  get_cpu_stats ()
4444
@@ -54,7 +54,7 @@ def parse_devices(devices: Union[int, str]) -> int:
5454
5555    @staticmethod  
5656    @override  
57-     def  get_parallel_devices (devices : Union [int , str ]) ->  List [torch .device ]:
57+     def  get_parallel_devices (devices : Union [int , str ]) ->  list [torch .device ]:
5858        """Gets parallel devices for the Accelerator.""" 
5959        devices  =  _parse_cpu_cores (devices )
6060        return  [torch .device ("cpu" )] *  devices 
@@ -89,7 +89,7 @@ def register_accelerators(cls, accelerator_registry: _AcceleratorRegistry) -> No
8989_PSUTIL_AVAILABLE  =  RequirementCache ("psutil" )
9090
9191
92- def  get_cpu_stats () ->  Dict [str , float ]:
92+ def  get_cpu_stats () ->  dict [str , float ]:
9393    if  not  _PSUTIL_AVAILABLE :
9494        raise  ModuleNotFoundError (
9595            f"Fetching CPU device stats requires `psutil` to be installed. { str (_PSUTIL_AVAILABLE )}  " 
0 commit comments