-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add support for Sagemaker endpoint #326
Conversation
Hey, added support for sagemaker endpoint. In .env.local, if host argument (in model endpoints) is set to "aws", user must provide the url to his sagemaker endpoint along with the access_key, secret_access_key and region (in the .env.local file just like HF_token), if not host is provided code behaves the same as before. |
Hi, thank you for your contribution! I think supporting multiple endpoints is a super valuable feature and I appreciate that you tackled it! I just want to make sure we do it in a way that's modular so we can scale to supporting even more endpoints in the future, so I'll try to have a look at how we can do this and then we can merge your work into that framework. |
Perhaps, instead of loading an entire library just for formatting UTC, you could consider using: function getFormattedDate(format) {
const now = new Date();
const year = now.getUTCFullYear();
const month = String(now.getUTCMonth() + 1).padStart(2, '0');
const day = String(now.getUTCDate()).padStart(2, '0');
const hours = String(now.getUTCHours()).padStart(2, '0');
const minutes = String(now.getUTCMinutes()).padStart(2, '0');
const seconds = String(now.getUTCSeconds()).padStart(2, '0');
let formattedDate = format
.replace("yyyy", year)
.replace("MM", month)
.replace("DD", day)
.replace("HH", hours)
.replace("mm", minutes)
.replace("ss", seconds);
return formattedDate;
}
const customFormat = "yyyyMMDD";
const formattedDate = getFormattedDate(customFormat);
console.log(formattedDate); I hope it could help |
@nsarrazin any timeline on when this would be available? |
Hi! Thanks for the contribution. We ended up adding support with #401 because there were a few extra steps needed to get AWS working right. I'm gonna close this PR therefore, but feel free to let me know if we missed something in the other PR |
No description provided.