Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delete_adapter(), delete_adapter_fusion() and delete_head() methods #189

Merged
merged 4 commits into from
Jun 29, 2021

Conversation

calpt
Copy link
Member

@calpt calpt commented Jun 21, 2021

  • Adds methods for removing adapters (delete_adapter()), AdapterFusion (delete_adapter_fusion()) and prediction heads (delete_head())
  • Adds option overwrite_ok to add_adapter() to overwrite an existing adapter with the same name.

Resolves #179.

@calpt calpt marked this pull request as ready for review June 21, 2021 11:15
@calpt calpt linked an issue Jun 21, 2021 that may be closed by this pull request
@calpt calpt requested a review from hSterz June 21, 2021 11:40
Copy link
Member

@hSterz hSterz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall just a small comment.

del self.heads[head_name]
if self.active_head == head_name:
self.active_head = None

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When deleting a head that is the active head, the active head is set to None but when deleting an adapter in the active adapters setup the setup remains as it is. Maybe it would be better to handle these two cases similarily

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks!

@calpt calpt requested a review from hSterz June 28, 2021 16:15
@calpt calpt merged commit 006171b into adapter-hub:develop Jun 29, 2021
@calpt calpt deleted the dev/delete branch June 29, 2021 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants