Conversation
There was a problem hiding this comment.
Code Review
This pull request updates numerous project dependencies and introduces the PL_DOCKER_REGISTRY_PUSH_TO environment variable to the build and test configurations. In the workflow template, memory allocation for UMAP processing was made dynamic based on input arguments. However, the review identified a critical runtime error in the Tengo script where math.max was used instead of the required capitalized math.Max. Additionally, it is recommended to store the calculated memory string in a variable to improve maintainability and prevent redundant calculations across the script.
| baseMemGiB := 64 | ||
| if !is_undefined(args.mem) { | ||
| baseMemGiB = args.mem | ||
| } |
There was a problem hiding this comment.
The Tengo math module uses capitalized function names (e.g., math.Max). Using math.max will result in a runtime error. Additionally, since this memory calculation is used in multiple places, it is better to calculate it once and store it in a variable to improve maintainability and ensure consistency.
baseMemGiB := 64
if !is_undefined(args.mem) {
baseMemGiB = args.mem
}
umapMem := string(int(math.Max(16, baseMemGiB / 4))) + "GiB"
| } | ||
|
|
||
| umapTable.mem("16GiB") | ||
| umapTable.mem(string(int(math.max(16, baseMemGiB / 4))) + "GiB") |
| splitDataAndSpec: true, | ||
| cpu: 1, | ||
| mem: "16GiB" // TODO: make this dynamic on input size | ||
| mem: string(int(math.max(16, baseMemGiB / 4))) + "GiB" |
No description provided.