Skip to content

Starter Task 2: Adding return type annotation to the _attribute_progress_setup method #1576

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

Closed
wants to merge 2 commits into from

Conversation

ArjunR2404
Copy link
Contributor

Summary: The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 4, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 5, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 5, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 5, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 5, 2025
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
Summary:
Pull Request resolved: pytorch#1575

My task was to remove the redundant progress bar code now that tqdm is a dependency. The problem was that since tqdm is now a dependency, we don't need to make checks for whether or not tqdm is being used, and thus we can remove the simple progress print code in the progress function (as well as the import error try-except code at the very top of the file). I also removed the SimpleProgress class definition, as well as the use_tqdm parameter in the progress function. Since we are no longer using the SimpleProgress object anywhere, I removed it from wherever it was used in the codebase (feature_ablation.py). In the test_progress.py, I removed the tests corresponding to SimpleProgress.

Differential Revision: D75814260

Reviewed By: cyrjano
ArjunR2404 added a commit to ArjunR2404/captum that referenced this pull request Jun 5, 2025
…ess_setup method (pytorch#1576)

Summary:

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
…ess_setup method (pytorch#1576)

Summary:
Pull Request resolved: pytorch#1576

The problem was that the _attribute_progress_setup method in feature_ablation.py didn't have a return type annotation. After making the relevant changes in the task 1 diff to only have the progress function return a tqdm object, I added a tqdm return type annotation to the _attribute_progress_setup function.

Reviewed By: sarahtranfb

Differential Revision: D75972827
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D75972827

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3d6765a.

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.

2 participants