Skip to content
Open
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
8 changes: 8 additions & 0 deletions mindone/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@
)
from .models.align import AlignModel, AlignPreTrainedModel, AlignTextModel, AlignVisionModel
from .models.altclip import AltCLIPModel, AltCLIPPreTrainedModel, AltCLIPTextModel, AltCLIPVisionModel
from .models.arcee import (
ArceeForCausalLM,
ArceeForQuestionAnswering,
ArceeForSequenceClassification,
ArceeForTokenClassification,
ArceeModel,
ArceePreTrainedModel,
)
from .models.aria import (
AriaForConditionalGeneration,
AriaPreTrainedModel,
Expand Down
1 change: 1 addition & 0 deletions mindone/transformers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

from . import (
albert,
arcee,
aria,
audio_spectrogram_transformer,
auto,
Expand Down
17 changes: 17 additions & 0 deletions mindone/transformers/models/arcee/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2025 Arcee AI and the HuggingFace Inc. team. All rights reserved.
#
# This code is adapted from https://github.com/huggingface/transformers
# with modifications to run transformers on mindspore.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from .modeling_arcee import *
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For better code clarity and to avoid polluting the namespace, it's recommended to use explicit imports instead of a wildcard import. This makes it clear which names are being imported from the module.

Suggested change
from .modeling_arcee import *
from .modeling_arcee import (
ArceeForCausalLM,
ArceeForQuestionAnswering,
ArceeForSequenceClassification,
ArceeForTokenClassification,
ArceeModel,
ArceePreTrainedModel,
)

Loading
Loading