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

Remove inheritance from object #38

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
2 changes: 1 addition & 1 deletion examples/fairseq/tasks/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def close(self):
pass


class WeightIterator(object):
class WeightIterator:
def __init__(self, weights, seed):
self.weights = weights
self.seed = seed
Expand Down
6 changes: 3 additions & 3 deletions torchscale/architecture/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under The MIT License [see LICENSE for details]


class EncoderConfig(object):
class EncoderConfig:
def __init__(self, **kwargs):
self.encoder_embed_dim = kwargs.pop("encoder_embed_dim", 768)
self.encoder_attention_heads = kwargs.pop("encoder_attention_heads", 12)
Expand Down Expand Up @@ -71,7 +71,7 @@ def override(self, args):
self.__dict__[hp] = getattr(args, hp, None)


class DecoderConfig(object):
class DecoderConfig:
def __init__(self, **kwargs):
self.decoder_embed_dim = kwargs.pop("decoder_embed_dim", 768)
self.decoder_attention_heads = kwargs.pop("decoder_attention_heads", 12)
Expand Down Expand Up @@ -135,7 +135,7 @@ def override(self, args):
self.__dict__[hp] = getattr(args, hp, None)


class EncoderDecoderConfig(object):
class EncoderDecoderConfig:
def __init__(self, **kwargs):
self.encoder_embed_dim = kwargs.pop("encoder_embed_dim", 768)
self.encoder_attention_heads = kwargs.pop("encoder_attention_heads", 12)
Expand Down
2 changes: 1 addition & 1 deletion torchscale/component/feedforward_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from .xmoe.global_groups import get_moe_group


class set_torch_seed(object):
class set_torch_seed:
def __init__(self, seed):
assert isinstance(seed, int)
self.rng_state = self.get_rng_state()
Expand Down