Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M metaseq
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • metaseq
  • Merge requests
  • !391

Fix api model loading for mp=1

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge loadapifix into main Oct 06, 2022
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: ruanslv

Patch Description Fixes part of https://github.com/facebookresearch/metaseq/issues/383. Model configs without MP don't have "inference" attribute, causing model load to fail with omegaconf.errors.ConfigAttributeError: Key 'inference' is not in struct.

"inference" field seems to be used only in MP for the code to track the current status. However, it is always set inside make_generation_fast_() (e.g. https://fburl.com/4gy1ufjv).

So we don't need this line, we can just rely on make_generation_fast_ to set inference to True for us when the model has MP enabled.

Testing steps Loaded a model with and without MP (1.3B and 350M OPT).

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: loadapifix