Skip to content

Bugs in utils/utils.py #3

@zkghost

Description

@zkghost

Running the benchmark twice I've gotten failures:

utils/utils.py", line 685, in remove_punc
    exclude = set(string.punctuation)
                  ^^^^^^
NameError: name 'string' is not defined

and here:

    def evaluate_step(self, model_output, example_indices):
        for i, example_index in enumerate(example_indices[0]):
            if not self.args.synthetic_data:
                eval_features = self.data.preprocessed_data.eval_features[example_index.item()]
                unique_id = torch.tensor(eval_features.unique_id).to(args.device)
            else:
                unique_id = torch.randint(low=0, high=self.args.num_synth_data, size=[1], dtype=torch.long).to(args.device)

both references to args.device should be prefixed with self.

am I doing something wrong? How were these ever run successfully?

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