Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Non-deterministic Results Despite Fixing Random Seeds in video summarization #7

Description

@Doran-fans

Hi, thank you for sharing the code for VideoSAGE — really appreciate your contribution!

I noticed that the results vary across different runs, even when I fix all random seeds. I added the following function to control randomness:

def seed_torch(seed=1029):
import os, random, numpy as np
import torch

random.seed(seed)
os.environ['PYTHONHASHSEED'] = str(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed(seed)
torch.cuda.manual_seed_all(seed)

torch.backends.cudnn.benchmark = False
torch.backends.cudnn.deterministic = True
torch.use_deterministic_algorithms(True)

Still, the results are not deterministic.
Just wondering — is this expected behavior? Or are there any additional steps needed to fully control randomness in your code?
Thanks again for your great work!

Best regards,
ruifanzhao

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions