While fine-tuning the Qwen model, I encountered an error in the finetune.py script: ImportError : cannot import name 'deepspeed' from 'transformers.deepspeed' After some investigation, I discovered the issue stems from a recent update in the Transformers library. The transformers.deepspeed module has been deprecated and replaced by transformers.integrations . To fix this, you need to update the import statement in your script. The Fix Replace this: from transformers.deepspeed import deepspeed With this: from transformers.integrations import deepspeed This small change resolved the error, allowing the fine-tuning process to proceed smoothly. Additional Resources For more details, refer to the discussion in the official Transformers GitHub repository: Issue #34582 Remember to keep your library versions up-to-date to avoid similar issues in the future!
Amazon Linux 2023 (AL2023) introduces a new node initialization process nodeadm that uses a YAML configuration schema. If you’re using self-managed node groups or an AMI with a launch template, you’ll now need to provide additional cluster metadata explicitly when creating a new node group MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="//" --// Content-Type: application/node.eks.aws --- apiVersion: node.eks.aws/v1alpha1 kind: NodeConfig spec: cluster: name: my-cluster-name-prd apiServerEndpoint: https://D59F.xyz.ap-northest-2.eks.amazonaws.com certificateAuthority: Y2VydGlmaWNhdGVBdXRob3JpdHk= cidr: 172.10.0.0/16 kubelet: config: clusterDNS: - 172.10.0.10 flags: - --node-labels=app=my-app,environment=production --// Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash set -o errexit set -o pipefail set -o nounset # Install additional packages yum install -y htop jq iptables-services --//--
TOTP (Time-based One-Time Password) is commonly used for two-factor authentication. This implementation demonstrates how to generate TOTP using the HMAC algorithm with SHA1, SHA256, or SHA512. Key Concepts: HMAC (Hash-based Message Authentication Code) : A cryptographic algorithm that uses a secret key and a hash function to ensure data integrity. TOTP : A method for generating one-time passwords based on the current time, making it time-sensitive. Code Breakdown: HMAC Calculation : hmac_sha() : Computes HMAC using the given algorithm ( HmacSHA1 , HmacSHA256 , or HmacSHA512 ). Example : byte [] hmacResult = hmac_sha( "HmacSHA1" , key, message); 2. Hex to Byte Conversion : hexStr2Bytes() : Converts a hexadecimal string to a byte array for processing. Example : byte [] bytes = hexStr2Bytes( "1234567890ABCDEF" ); 3. TOTP Generation : generateTOTP() : Generates a TOTP based on the key, time, and the desired length of the OTP. Example : String otp = g...
Comments
Post a Comment