Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RankingTrainer usage and Remove BLAS #300

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

OctoberChang
Copy link
Contributor

@OctoberChang OctoberChang commented Oct 11, 2024

Issue #, if available:

Description of changes:

  • Slight adjustment of RankingTrainer class to support custom loss functions for its child-class
  • Remove dependency of BLAS, so the package is more lightweight
  • Bump minimal support Python version from 3.8 to 3.9 (Py3.8 is end-of-life as of 2024/10/07)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@OctoberChang OctoberChang self-assigned this Oct 11, 2024
echo "$PLAT not supported."
exit 1
fi
$PIP install 'setuptools' wheel twine auditwheel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need the single quotes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch. Removed the single quotes in the latest commit.

template<> inline float scal(ptrdiff_t *len, float *a, float *x, ptrdiff_t *xinc) { return sscal_(len, a, x, xinc); }
template<typename val_type> val_type scal(ptrdiff_t *len, val_type *a, val_type *x, ptrdiff_t *xinc) {
for (ptrdiff_t idx = 0; idx < *len; idx++) {
*x = (*x) * (*a);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation space vs tab?

Copy link
Contributor Author

@OctoberChang OctoberChang Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the catch. Fixed the indentation issue in the latest commit.

setup.py Outdated
extra_compile_args=["-fopenmp", "-O3", "-std=c++17"] + manual_compile_args,
extra_link_args=['-Wl,--no-as-needed', f"-Wl,-rpath,{':'.join(blas_dir)}"]
extra_link_args=['-Wl,--no-as-needed', f"-Wl,-rpath"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we might be able to remove the rpath path.

Copy link
Contributor Author

@OctoberChang OctoberChang Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. We removed the extra_link_args in the latest commit.

@OctoberChang OctoberChang force-pushed the reranker-dev branch 2 times, most recently from 035874f to 017cd97 Compare October 11, 2024 18:29
@OctoberChang OctoberChang force-pushed the reranker-dev branch 4 times, most recently from 32727d4 to 018a3dc Compare October 15, 2024 23:12
@OctoberChang OctoberChang merged commit cfeb1d8 into amzn:mainline Oct 16, 2024
25 checks passed
@OctoberChang OctoberChang deleted the reranker-dev branch October 16, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants