Skip to content

Conversation

@nghuiqin
Copy link
Contributor

Summary:
Add support to handle function with decorators that hit validation errors.

Root cause: If the function contains decorators, the getabsfile will return the decorator function filepath.

Fix: Add an unwrap before we getabsfile, this could lead to right filepath.

Differential Revision: D82132556

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 10, 2025
@facebook-github-bot
Copy link
Contributor

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

@nghuiqin nghuiqin removed the request for review from daniel-ohayon September 10, 2025 19:36
@facebook-github-bot
Copy link
Contributor

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

nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 10, 2025
Summary:
Pull Request resolved: meta-pytorch#1111

Add support to handle function with decorators that hit validation errors.

**Root cause:** If the function contains decorators, the getabsfile will return the decorator function filepath.

**Fix**: Add an unwrap before we getabsfile, this could lead to right filepath.

Reviewed By: kiukchung

Differential Revision: D82132556
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 10, 2025
Summary:

Add support to handle function with decorators that hit validation errors.

**Root cause:** If the function contains decorators, the getabsfile will return the decorator function filepath.

**Fix**: Add an unwrap before we getabsfile, this could lead to right filepath.

Reviewed By: kiukchung

Differential Revision: D82132556
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 10, 2025
Summary:

Add support to handle function with decorators that hit validation errors.

**Root cause:** If the function contains decorators, the getabsfile will return the decorator function filepath.

**Fix**: Add an unwrap before we getabsfile, this could lead to right filepath.

Reviewed By: kiukchung

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

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

nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 10, 2025
Summary:
Pull Request resolved: meta-pytorch#1111

Add support to handle function with decorators that hit validation errors.

**Root cause:** If the function contains decorators, the getabsfile will return the decorator function filepath.

**Fix**: Add an unwrap before we getabsfile, this could lead to right filepath.

Reviewed By: kiukchung

Differential Revision: D82132556
Summary:
Pull Request resolved: meta-pytorch#1111

Add support to handle function with decorators that hit validation errors.

**Root cause:** If the function contains decorators, the getabsfile will return the decorator function filepath.

**Fix**: Add an unwrap before we getabsfile, this could lead to right filepath.

Reviewed By: kiukchung

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

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

@facebook-github-bot facebook-github-bot merged commit 7f4eeba into meta-pytorch:main Sep 11, 2025
23 of 24 checks passed
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
Summary:
We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Reviewed By: ethanbwaite

Differential Revision: D82346696
nghuiqin added a commit to nghuiqin/torchx that referenced this pull request Sep 15, 2025
…ass (meta-pytorch#1116)

Summary:

We added file decorator support in meta-pytorch#1111

**Problem:** This will fail when the function wrapper with dataclass object
**Fix:** Determine if decorators found in function before unwrap.

Add two test cases to cover:
* comp_f  using dataclass in g.py => should return __init__.py
* comp_g using decorator in h.py => should return g.py

Reviewed By: ethanbwaite

Differential Revision: D82346696
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants