how do i fix this error: 2023-08-15 23:26:51,167	ERROR tune_controller.py:911 -- Trial task failed for trial train_model_7e943_00000
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/ray/air/execution/_internal/event_manager.py", line 110, in resolve_future
    result = ray.get(future)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 24, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/worker.py", line 2524, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(TypeError): [36mray::ImplicitFunc.train()[39m (pid=150824, ip=172.17.0.2, actor_id=773eff5b2fe093cf0106958701000000, repr=train_model)
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/trainable.py", line 375, in train
    raise skipped from exception_cause(skipped)
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/function_trainable.py", line 349, in entrypoint
    return self._trainable_func(
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/function_trainable.py", line 666, in _trainable_func
    output = fn()
  File "/tmp/ipykernel_113847/1308619005.py", line 321, in train_model
TypeError: 'Checkpoint' object is not subscriptable
[2m[36m(train_model pid=154024)[0m /opt/conda/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet50_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet50_Weights.DEFAULT` to get the most up-to-date weights.
[2m[36m(train_model pid=154024)[0m   warnings.warn(msg)
2023-08-15 23:26:53,198	ERROR tune_controller.py:911 -- Trial task failed for trial train_model_7e943_00001
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/site-packages/ray/air/execution/_internal/event_manager.py", line 110, in resolve_future
    result = ray.get(future)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/auto_init_hook.py", line 24, in auto_init_wrapper
    return fn(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/ray/_private/worker.py", line 2524, in get
    raise value.as_instanceof_cause()
ray.exceptions.RayTaskError(TypeError): [36mray::ImplicitFunc.train()[39m (pid=154024, ip=172.17.0.2, actor_id=a8dee59715321ebee5d4dc4d01000000, repr=train_model)
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/trainable.py", line 375, in train
    raise skipped from exception_cause(skipped)
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/function_trainable.py", line 349, in entrypoint
    return self._trainable_func(
  File "/opt/conda/lib/python3.10/site-packages/ray/tune/trainable/function_trainable.py", line 666, in _trainable_func
    output = fn()
  File "/tmp/ipykernel_113847/1308619005.py", line 321, in train_model
TypeError: 'Checkpoint' object is not subscriptable