Skip to content

Clean up utils and fw_utils #1466

@laurenyu

Description

@laurenyu

We have two files that are just collections of somewhat-unrelated functions. I think there’s some notion of the functions in fw_utils being used only for frameworks, but utils also contains some functions that are used only for frameworks. It's also generally accepted that a generic name such as "util" makes it easy to keeping adding more unrelated functions into a file/module, causing it to become increasingly harder to maintain.

I’d like to move most of these functions to the following locations:

In addition, I’d like to deprecate the following functions:

  • get_unsupported_framework_version_error: this function is used only by XGBoost, and goes against the original rationale of not wanting to require a Python SDK upgrade just to use a newer framework version. The alternative would be to have all frameworks follow XGBoost's logic.
  • to_str: this function was written specifically for Python 2 compatibility, so we won’t need it anymore after Drop Python 2 support #1461
  • empty_framework_version_warning: this function is used when customers don’t set framework_version, which will become a required parameter with Require framework_version for framework estimators, models, etc. #1465
  • debug: unused as far as I can tell
  • generate_tensorboard_url: unused as far as I can tell
  • extract_name_from_job_arn: this function’s usage was removed in an earlier PR
  • parse_s3_url: this function already has a replacement in s3.py
  • unique_name_from_base: this function can go to the test files

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions