-
Notifications
You must be signed in to change notification settings - Fork 149
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
One shot user flow tweaks #2195
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -151,8 +151,11 @@ def one_shot(self, stage: Optional[str] = None): | |
""" | ||
_LOGGER.info("*** One Shot ***") | ||
|
||
tokenized_dataset = self.get_dataset_split("calibration") | ||
if "labels" in tokenized_dataset.column_names: | ||
tokenized_dataset = tokenized_dataset.remove_columns("labels") | ||
Comment on lines
+154
to
+156
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the issue here? if this is relatively safe to keep, then leave a comment on why this specific column needs to be removed |
||
calib_data = format_calibration_data( | ||
tokenized_dataset=self.get_dataset_split("calibration"), | ||
tokenized_dataset=tokenized_dataset, | ||
num_calibration_samples=self._data_args.num_calibration_samples, | ||
accelerator=self.trainer.accelerator, | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,10 +144,14 @@ def create_data_loader( | |
source_path = source_path or model.name_or_path | ||
if tokenizer is None: | ||
if sequence_length is None: | ||
raise ValueError( | ||
"Sequence length for the transformer model export missing. " | ||
"Provide it manually using sequence_length argument" | ||
) | ||
if hasattr(model.config, "max_position_embeddings"): | ||
sequence_length = model.config.max_position_embeddings | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a |
||
else: | ||
raise ValueError( | ||
"Sequence length for the transformer model export missing and " | ||
"could not detect using model.config.max_position_embeddings" | ||
"Provide it manually using sequence_length argument" | ||
) | ||
tokenizer = initialize_tokenizer(config.name_or_path, sequence_length, task) | ||
data_args = _parse_data_args(data_args or {}) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this was giving you issue might be a sparsezoo version issue