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

Conversation

Aaron-Zhao123
Copy link
Collaborator

@Aaron-Zhao123 Aaron-Zhao123 commented Feb 3, 2025

  • removes versioning constraint on coco-tb
  • end of support for setencepiece
  • adapt loading with pytorch==2.6

testing script

print("This is a save and load test")
import chop.passes as passes

from pathlib import Path
from transformers import AutoModelForSequenceClassification
from chop import MaseGraph

model = AutoModelForSequenceClassification.from_pretrained("prajjwal1/bert-tiny")
model.config.problem_type = "single_label_classification"
mg = MaseGraph(model, hf_input_names=["input_ids", "attention_mask", "labels"])

mg, _ = passes.init_metadata_analysis_pass(mg)
mg, _ = passes.add_common_metadata_analysis_pass(mg)
# test export and load
mg.export(f"{Path.home()}/tutorial_1")
new_mg = MaseGraph.from_checkpoint(f"{Path.home()}/tutorial_1")

Huggingface is also a bit problematic, because it seems in the new version, their model.config.problem_type is changed in their upstream, this would cause transforming to fx fail on some old models, for instance, this bert-tiny, the workaround is to reassign that problem type on the fly.

@Aaron-Zhao123
Copy link
Collaborator Author

@firemountain154B Can you do a quick test on the hardware side to make sure Cocotb works? I had a slight worry here -- I thought we locked cocotb to 1.8 for a reason...

@Aaron-Zhao123 Aaron-Zhao123 self-assigned this Feb 3, 2025
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.

1 participant