Skip to content

Commit

Permalink
raise exception if model_cfg[N_FRAMES_PER_CLIP] is not a factor of nu…
Browse files Browse the repository at this point in the history
…mber of frames
  • Loading branch information
charles-zhng committed Sep 5, 2024
1 parent 0b5ce97 commit 069d5bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stac_mjx/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ def run_stac(
if stac_cfg.skip_transform == 1:
logging.info("skipping transform()")
return fit_path, None

elif kp_data.shape[0] % model_cfg["N_FRAMES_PER_CLIP"] != 0:
raise ValueError(f"N_FRAMES_PER_CLIP ({model_cfg["N_FRAMES_PER_CLIP"]}) must be a factor of the number of mocap frames ({kp_data.shape[0]})")

logging.info("Running transform()")
with open(fit_path, "rb") as file:
fit_data = pickle.load(file)
Expand Down

0 comments on commit 069d5bd

Please sign in to comment.