Skip to content

[P1] original_code encountered errors #177

@NitayGitHub

Description

@NitayGitHub

Hi, after installing requirements.txt I ran task_steer.py in pyreft/examples/loreft/original_code and encountered three issues:

  1. TypeError: TrainingArguments.init() got an unexpected keyword argument 'evaluation_strategy'
    Which can be solved by replacing
    evaluation_strategy="epoch" if task == "glue" else "no",
    with
    eval_strategy="epoch" if task == "glue" else "no",

  2. TypeError: 'ConditionedSourceLowRankRotatedSpaceIntervention' object is not subscriptable
    File "/kaggle/working/pyreft/examples/loreft/original_code/trainer.py", line 217, in evaluate
    _ = v[0].eval()
    ~^^^
    needed to replace
    _ = v[0].eval()
    with
    _ = v.eval()
    in trainer.py and task_steer.py

  3. unexpected keyword argument 'num_items_in_batch'
    In trainer.py, needed to add **kwargs in ReftTrainerForSequenceClassification compute_loss method for the num_items_in_batch argument to be accepted

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