Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An assertion error occurred during model loading #49931

Open
Benjamin-zhangjb opened this issue Jan 18, 2025 · 0 comments
Open

An assertion error occurred during model loading #49931

Benjamin-zhangjb opened this issue Jan 18, 2025 · 0 comments

Comments

@Benjamin-zhangjb
Copy link

I conducted reinforcement learning training using the RLlib framework. After training, I used the saved model for inference, but an assertion error occurred during model loading!
Below is the model file I loaded:
checkpoint_000000.zip

from ray.rllib.algorithms.algorithm import Algorithm 
algo = Algorithm.from_checkpoint(model_path)

The error is as follows:

Traceback (most recent call last):
  File "rl/main.py", line 44, in <module>
    main()
  File "rl/main.py", line 26, in main
    train.main(config)
  File "/code/rl/train.py", line 107, in main
    do_evaluation(confighandler, model_path)
  File "/code/rl/train.py", line 210, in do_evaluation
    evaluation(confighandler, model_path, confighandler.agent_feature_map)
  File "/code/rl/evaluation/eva.py", line 78, in evaluation
    algo = Algorithm.from_checkpoint(model_path)
  File "/usr/local/lib/python3.8/dist-packages/ray/rllib/algorithms/algorithm.py", line 350, in from_checkpoint
    state = Algorithm._checkpoint_info_to_algorithm_state(
  File "/usr/local/lib/python3.8/dist-packages/ray/rllib/algorithms/algorithm.py", line 3048, in _checkpoint_info_to_algorithm_state
    state = pickle.load(f)
  File "/usr/local/lib/python3.8/dist-packages/ray/_private/serialization.py", line 107, in _actor_handle_deserializer
    return ray.actor.ActorHandle._deserialization_helper(serialized_obj, outer_id)
  File "/usr/local/lib/python3.8/dist-packages/ray/actor.py", line 1580, in _deserialization_helper
    return worker.core_worker.deserialize_and_register_actor_handle(
  File "python/ray/_raylet.pyx", line 4364, in ray._raylet.CoreWorker.deserialize_and_register_actor_handle
  File "python/ray/_raylet.pyx", line 4320, in ray._raylet.CoreWorker.make_actor_handle
  File "/usr/local/lib/python3.8/dist-packages/ray/_private/function_manager.py", line 572, in load_actor_class
    actor_class = self._load_actor_class_from_gcs(
  File "/usr/local/lib/python3.8/dist-packages/ray/_private/function_manager.py", line 666, in _load_actor_class_from_gcs
    class_name = ensure_str(class_name)
  File "/usr/local/lib/python3.8/dist-packages/ray/_private/utils.py", line 243, in ensure_str
    assert isinstance(s, bytes)
AssertionError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant