Skip to content

Updated Fabric trainer example to not call self.trainer.model during validation #28613

Updated Fabric trainer example to not call self.trainer.model during validation

Updated Fabric trainer example to not call self.trainer.model during validation #28613

Triggered via pull request June 21, 2024 14:42
Status Success
Total duration 18s
Artifacts

probot-auto-cc.yml

on: pull_request
auto-cc
9s
auto-cc
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 1 warning
auto-cc
Resource not accessible by integration { name: 'HttpError', id: '9615451108', status: 403, response: { url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/19993', status: 403, headers: { 'access-control-allow-origin': '*', 'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset', connection: 'close', 'content-encoding': 'gzip', 'content-security-policy': "default-src 'none'", 'content-type': 'application/json; charset=utf-8', date: 'Fri, 21 Jun 2024 14:42:38 GMT', 'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin', server: 'istio-envoy', 'strict-transport-security': 'max-age=31536000; includeSubdomains; preload', 'transfer-encoding': 'chunked', vary: 'Accept-Encoding, Accept, X-Requested-With', 'x-accepted-github-permissions': 'pull_requests=write', 'x-content-type-options': 'nosniff', 'x-envoy-decorator-operation': 'unicorn-api.github-production.svc.cluster.local:80/*', 'x-envoy-upstream-service-time': '88', 'x-frame-options': 'deny', 'x-github-api-version-selected': '2022-11-28', 'x-github-media-type': 'github.v3; format=json', 'x-github-request-id': 'EFC2:83843:17BA179:2C9809F:6675915E', 'x-ratelimit-limit': '15000', 'x-ratelimit-remaining': '14957', 'x-ratelimit-reset': '1718983817', 'x-ratelimit-resource': 'core', 'x-ratelimit-used': '43', 'x-xss-protection': '0' }, data: { message: 'Resource not accessible by integration', documentation_url: 'https://docs.github.com/rest/pulls/pulls#update-a-pull-request', status: '403' } }, request: { method: 'PATCH', url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/19993', headers: { accept: 'application/vnd.github.v3+json', 'user-agent': 'probot/12.2.5 octokit-core.js/3.6.0 Node.js/16.20.2 (linux; x64)', authorization: 'token [REDACTED]', 'content-type': 'application/json; charset=utf-8' }, body: '{"body":"Before, using the trainer would result in:\\r\\n\\r\\nAttributeError: Your LightningModule code tried to access `self.trainer.model` but this attribute is not available when using Fabric with a LightningModule.\\r\\n\\r\\nWhich would occur during validation when \'on_validation_model_eval\' and \'on_validation_model_train\' were called, as they do not work with fabric. This change allows the model to be switched between train and eval mode (which the original behavior intends) without relying on calling \'self.trainer.model\'. A check is added for overridden methods to not change a user\'s code.\\r\\n\\r\\nFixes #19992\\r\\n\\r\\n\\r\\n<!-- readthedocs-preview pytorch-lightning start -->\\r\\n----\\n📚 Documentation preview 📚: https://pytorch-lightning--19993.org.readthedocs.build/en/19993/\\n\\r\\n<!-- readthedocs-preview pytorch-lightning end -->\\n\\ncc @carmocca @justusschock @awaelchli"}', request: {} }, event: { id: '9615451108', name: 'pull_request', payload: { action: 'labeled', label: { color: '6bbc34', default: false, description: '', id: 1475966033, name: 'example', node_id: 'MDU6TGFiZWwxNDc1OTY2MDMz', url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/labels/example' }, number: 19993, organization: { avatar_url: 'https://avatars.githubusercontent.com/u/58386951?v=4', description: 'Turn ideas into AI, Lightning fast. Creators of PyTorch Lightning, Lightning AI Studio, TorchMetrics, Fabric, Lit-GPT, Lit-LLaMA', events_url: 'https://api.github.com/orgs/Lightning-AI/events', hooks_url: 'https://api.github.com/orgs/Lightning-AI/hooks',
auto-cc
HttpError: Resource not accessible by integration at /home/runner/work/_actions/Lightning-AI/probot/v1/node_modules/@octokit/core/node_modules/@octokit/request/dist-node/index.js:86:21 at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Job.doExecute (/home/runner/work/_actions/Lightning-AI/probot/v1/node_modules/bottleneck/light.js:405:18) { name: 'AggregateError', event: { id: '9615451108', name: 'pull_request', payload: { action: 'labeled', label: { color: '6bbc34', default: false, description: '', id: 1475966033, name: 'example', node_id: 'MDU6TGFiZWwxNDc1OTY2MDMz', url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/labels/example' }, number: 19993, organization: { avatar_url: 'https://avatars.githubusercontent.com/u/58386951?v=4', description: 'Turn ideas into AI, Lightning fast. Creators of PyTorch Lightning, Lightning AI Studio, TorchMetrics, Fabric, Lit-GPT, Lit-LLaMA', events_url: 'https://api.github.com/orgs/Lightning-AI/events', hooks_url: 'https://api.github.com/orgs/Lightning-AI/hooks', id: 58386951, issues_url: 'https://api.github.com/orgs/Lightning-AI/issues', login: 'Lightning-AI', members_url: 'https://api.github.com/orgs/Lightning-AI/members{/member}', node_id: 'MDEyOk9yZ2FuaXphdGlvbjU4Mzg2OTUx', public_members_url: 'https://api.github.com/orgs/Lightning-AI/public_members{/member}', repos_url: 'https://api.github.com/orgs/Lightning-AI/repos', url: 'https://api.github.com/orgs/Lightning-AI' }, pull_request: { _links: { comments: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/issues/19993/comments' }, commits: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/19993/commits' }, html: { href: 'https://github.com/Lightning-AI/pytorch-lightning/pull/19993' }, issue: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/issues/19993' }, review_comment: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/comments{/number}' }, review_comments: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/19993/comments' }, self: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/pulls/19993' }, statuses: { href: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/statuses/ebd278877b65e8305526956e569991e9754bb226' } }, active_lock_reason: null, additions: 9, assignee: null, assignees: [], author_association: 'CONTRIBUTOR', auto_merge: null, base: { label: 'Lightning-AI:master', ref: 'master', repo: { allow_auto_merge: false, allow_forking: true, allow_merge_commit: false, allow_rebase_merge: true, allow_squash_merge: true, allow_update_branch: true, archive_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/{archive_format}{/ref}', archived: false, assignees_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/assignees{/user}', blobs_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/git/blobs{/sha}', branches_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/branches{/branch}', clone_url: 'https://github.com/Lightning-AI/pytorch-lightning.git', collaborators_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/collaborators{/collaborator}', comments_url: 'https://api.github.com/repos/Lightning-AI/pytorch-lightning/comments{/number}
auto-cc
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: Lightning-AI/probot@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.