microsoft/LoRA

Layers.py not being executed

Aradhye2002 opened this issue · 1 comments

Hi,

I made some changes to the layers.py, however on running the mrpc task on roberta_base, it seems that init() and forward() of the linear layers is not being called at all. I added some print statements inside the forward function to verify this.

In fact, the modeling_roberta.py file is not imported at all which is responsible for importing loralib.

When I ran the model the first time there was some progess bar with "Map" written beside it which was not there in the subsequent runs. Maybe the loralib was read the first time and the model was stored. In all subsequent runs the stored model was run.

Kindly provide guidance.

Hi @Aradhye2002,

It seems like your changes in Layers.py might not be taking effect due to potential caching or import issues. Here's a quick solution:

  • Clear Cache: Ensure there's no cached version causing the issue. You can try cleaning your project's build or cache directories.

  • Check Imports: Confirm that you're importing the correct version of Layers.py in your MRPC task script.

  • Dynamic Import: Instead of relying on a static import, you can use importlib to dynamically import Layers.py in your script. This ensures fresh imports in each run.

  • Verify Initialization: Double-check the initialization process of your model to ensure that the init() and forward() functions are
    called.

Give this a try, and let me know if it resolves the issue. Otherwise please provide code snippets of the changes you made :)