mosaicml / composer

Supercharge Your Model Training
http://docs.mosaicml.com
Apache License 2.0
5.16k stars 419 forks source link

`pip install composer==0.13.1` leads to no metadata for composer env. #2048

Closed samuelstevens closed 1 year ago

samuelstevens commented 1 year ago

Environment

I can't run composer_collect_env because there is no package data found for mosaicml. This causes bugs when checkpointing as well.

To reproduce

Steps to reproduce the behavior:

  1. Make a new virtual env.
  2. pip install composer==0.13.1
  3. composer_collect_env

Expected behavior

It works.

Additional context

def get_composer_commit_hash() -> Optional[str]:
    # Use PEP-610 to get the commit hash                                                          
    # See https://packaging.python.org/en/latest/specifications/direct-url/
    files = importlib_metadata.files('mosaicml') # <= change this to 'composer'
    if files is None:
        return
    files = [f for f in files if str(f).endswith('direct_url.json')]
    if len(files) == 0:
        return
    f = files[0]
    direct_url = json.loads(f.read_text())
    vcs_info = direct_url.get('vcs_info', {})                                                     
    commit_id = vcs_info.get('commit_id')
    return commit_i

I can open a PR if you like.

dakinggg commented 1 year ago

Hey @samuelstevens thanks for the report, and sorry about that! We'll get this fixed ASAP. In the meantime, you should still be able to use pip install mosaicml.

bandish-shah commented 1 year ago

The composer==0.13.1 PyPi package has been yanked, thanks for reporting this!

mvpatel2000 commented 1 year ago

Closing this issue since it was resolved in 0.13.2. Please feel free to reopen if you encounter further issues!