Skip to content

Commit

Permalink
Auto stash before revert of "root_dynamics as an implicit constraint …
Browse files Browse the repository at this point in the history
…available in bioptim"

one more fix on checking if it is biorbd_casadi or biorbd
  • Loading branch information
Ipuch authored and pariterre committed Apr 25, 2022
1 parent 1a65d42 commit 48e5b64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bioptim/optimization/optimal_control_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,9 @@ def load(file_path: str) -> list:
data = pickle.load(file)
ocp = OptimalControlProgram(**data["ocp_initializer"])
for key in data["versions"].keys():
key_module = "biorbd_casadi" if key == "biorbd" else key
try:
check_version(sys.modules[key], data["versions"][key], ocp.version[key], exclude_max=False)
check_version(sys.modules[key_module], data["versions"][key], ocp.version[key], exclude_max=False)
except ImportError:
raise ImportError(
f"Version of {key} from file ({data['versions'][key]}) is not the same as the "
Expand Down

0 comments on commit 48e5b64

Please sign in to comment.