Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions optimum/neuron/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ def push_to_hub(
save_directory: str,
repository_id: str,
private: Optional[bool] = None,
revision: Optional[str] = None,
use_auth_token: Union[bool, str] = True,
endpoint: Optional[str] = None,
) -> str:
Expand Down Expand Up @@ -348,6 +349,7 @@ def push_to_hub(
repo_id=repository_id,
path_or_fileobj=os.path.join(os.getcwd(), local_file_path),
path_in_repo=hub_file_path,
revision=revision,
)

def forward(self, *args, **kwargs):
Expand Down
2 changes: 2 additions & 0 deletions optimum/neuron/modeling_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def push_to_hub(
save_directory: str,
repository_id: str,
private: Optional[bool] = None,
revision: Optional[str] = None,
use_auth_token: Union[bool, str] = True,
endpoint: Optional[str] = None,
) -> str:
Expand Down Expand Up @@ -290,4 +291,5 @@ def push_to_hub(
repo_id=repository_id,
path_or_fileobj=os.path.join(os.getcwd(), local_file_path),
path_in_repo=hub_file_path,
revision=revision,
)
5 changes: 0 additions & 5 deletions optimum/neuron/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import torch
from packaging import version
from transformers import PreTrainedModel, Seq2SeqTrainer, Trainer, TrainingArguments
from transformers.dependency_versions_check import dep_version_check
from transformers.integrations import is_fairscale_available
from transformers.modeling_utils import unwrap_model
from transformers.trainer import (
OPTIMIZER_NAME,
Expand Down Expand Up @@ -80,9 +78,6 @@
else:
IS_SAGEMAKER_MP_POST_1_10 = False

if is_fairscale_available():
dep_version_check("fairscale")


logger = logging.get_logger("transformers.trainer")

Expand Down