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

Upgrading to python3.13? [testing needed] #252

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
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def get_system():
"toml",
"GitPython",
"colorlog",
"cocotb[bus]==1.8.0",
"cocotb[bus]",
"pytest",
"pytorch-lightning",
"transformers",
Expand All @@ -37,7 +37,6 @@ def get_system():
"evaluate",
"ipython",
"ipdb",
"sentencepiece",
"einops",
"pybind11",
"tabulate",
Expand Down
2 changes: 1 addition & 1 deletion src/chop/distributed/tensor/ops/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def wrapper(impl):


def as_list(
x: Union[List[object], object]
x: Union[List[object], object],
# pyre-fixme[11]: Annotation `immutable_list` is not defined as a type.
) -> Union[List[object], torch.fx.immutable_collections.immutable_list]: # type: ignore[valid-type]
# During tracing, `aten.sum.dim_IntList` uses `immutable_list` for its args,
Expand Down
2 changes: 1 addition & 1 deletion src/chop/ir/graph/mase_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def from_checkpoint(
MaseGraph: Loaded MaseGraph.
"""
with open(f"{checkpoint}.pt", "rb") as f:
loaded_model = torch.load(f)
loaded_model = torch.load(f, weights_only=False)

assert isinstance(
loaded_model, fx.GraphModule
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/bert/configuration_bert.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 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.
""" BERT model configuration"""
"""BERT model configuration"""
from collections import OrderedDict
from typing import Mapping

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/bert/configuration_bert_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# 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.
""" BERT model configuration"""
"""BERT model configuration"""
from collections import OrderedDict
from typing import Mapping

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/configuration_llama_llora.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 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.
""" LLaMA model configuration"""
"""LLaMA model configuration"""

from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/configuration_llama_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 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.
""" LLaMA model configuration"""
"""LLaMA model configuration"""

from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/configuration_llama_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# 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.
""" LLaMA model configuration"""
"""LLaMA model configuration"""

from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/modeling_llama_llora.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 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.
""" PyTorch LLaMA model."""
"""PyTorch LLaMA model."""

import math
from typing import List, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/modeling_llama_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 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.
""" PyTorch LLaMA model."""
"""PyTorch LLaMA model."""

import math
from typing import List, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/llama/modeling_llama_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# 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.
""" PyTorch LLaMA model."""
"""PyTorch LLaMA model."""

import math
from typing import List, Optional, Tuple, Union
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/configuration_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 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.
""" OPT model configuration"""
"""OPT model configuration"""
from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/configuration_opt_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 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.
""" OPT model configuration"""
"""OPT model configuration"""
from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
from .lora_config_opt import parse_opt_lora_config
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/configuration_opt_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 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.
""" OPT model configuration"""
"""OPT model configuration"""
from transformers.configuration_utils import PretrainedConfig
from .quant_config_opt import parse_opt_quantized_config

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/configuration_opt_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# 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.
""" OPT model configuration"""
"""OPT model configuration"""
from transformers.configuration_utils import PretrainedConfig
from transformers.utils import logging
from .sparse_config_opt import parse_opt_sparse_config
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/modeling_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 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.
""" PyTorch OPT model."""
"""PyTorch OPT model."""
from typing import List, Optional, Tuple, Union

import torch
Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/modeling_opt_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 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.
""" PyTorch OPT model."""
"""PyTorch OPT model."""
import random
from typing import Optional, Tuple, Union

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/modeling_opt_quantized.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# 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.
""" PyTorch OPT model."""
"""PyTorch OPT model."""
import random
from typing import List, Optional, Tuple, Union

Expand Down
2 changes: 1 addition & 1 deletion src/chop/models/opt/modeling_opt_sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# 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.
""" PyTorch OPT model."""
"""PyTorch OPT model."""
import random
from typing import Optional, Tuple, Union

Expand Down