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

Added distil_whisper. #2074

Closed
wants to merge 2 commits into from
Closed

Conversation

MaanavD
Copy link
Contributor

@MaanavD MaanavD commented Dec 4, 2023

Should work! Added distil whisper to torchbench. Local time is within normal CI requirements.
image

@xuzhao9
Copy link
Contributor

xuzhao9 commented Dec 5, 2023

Could you please address the following test error?

======================================================================
ERROR: test_hf_distil_whisper_train_cpu (__main__.TestBenchmark.test_hf_distil_whisper_train_cpu)
----------------------------------------------------------------------
components._impl.workers.subprocess_rpc.ChildTraceException: Traceback (most recent call last):
  File "/runner/_work/benchmark/benchmark/components/_impl/workers/subprocess_rpc.py", line 482, in _run_block
    exec(  # noqa: P204
  File "<subprocess-worker>", line 2, in <module>
  File "/runner/_work/benchmark/benchmark/torchbenchmark/util/model.py", line 309, in invoke
    return self._invoke_staged_train_test(num_batch=self.num_batch)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/runner/_work/benchmark/benchmark/torchbenchmark/util/model.py", line 299, in _invoke_staged_train_test
    losses = self.forward()
             ^^^^^^^^^^^^^^
  File "/runner/_work/benchmark/benchmark/torchbenchmark/util/framework/huggingface/model_factory.py", line 153, in forward
    outputs = self.model(**self.example_inputs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/pr-ci-a100/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/miniconda3/envs/pr-ci-a100/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: WhisperForAudioClassification.forward() got an unexpected keyword argument 'input_ids'

    working_dir: /tmp/tmpmzqebwgh
    stdout:
        [2023-12-05] 03:15:45.738260: TIMER_SUBPROCESS_BEGIN_EXEC
        [2023-12-05] 03:15:45.740672: TIMER_SUBPROCESS_FAILED
        [2023-12-05] 03:15:45.740737: TIMER_SUBPROCESS_FINISHED
        [2023-12-05] 03:15:45.740759: TIMER_SUBPROCESS_BEGIN_READ

    stderr:


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/runner/_work/benchmark/benchmark/test.py", line 78, in train_fn
    task.invoke()
  File "/runner/_work/benchmark/benchmark/torchbenchmark/__init__.py", line 399, in invoke
    self.worker.run("""
  File "/runner/_work/benchmark/benchmark/components/_impl/workers/subprocess_worker.py", line 158, in run
    self._run(snippet)
  File "/runner/_work/benchmark/benchmark/components/_impl/workers/subprocess_worker.py", line 323, in _run
    subprocess_rpc.SerializedException.raise_from(
  File "/runner/_work/benchmark/benchmark/components/_impl/workers/subprocess_rpc.py", line 458, in raise_from
    raise e from ChildTraceException(traceback_str)
TypeError: WhisperForAudioClassification.forward() got an unexpected keyword argument 'input_ids'

Copy link
Contributor

@xuzhao9 xuzhao9 left a comment

Choose a reason for hiding this comment

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

The CI error are pre-existing errors from the trunk, should be safe to land this.

@facebook-github-bot
Copy link
Contributor

@xuzhao9 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@xuzhao9 merged this pull request in d61b74a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants