I enjoyed reading your code

I made some minor modifications, would you consider taking a look at them and providing feedback?
#include<stdlib.h> //malloc
#include<stdio.h>  //fgets printf
#include<string.h> //strlen

//typedef void _;
typedef char C,*S;

typedef struct a {
  long long t, r;
  long long d[3];
  long long p[2];
}* Array;
static Array st[26];

#define globalArrayStack st
Array reduce(Array x, Array y);
Array scanArray(Array x, Array y);
Array ex(Array * e);

long long WS = 0;

long long * allocMem(long long size) {
  size *= 8;  // Assuming 8 bytes per long long
  WS += size; // Update Workspace Size
  return (long long *)malloc(size);
}

void copyMem(long long *dest, long long *src, long long count) {
  for (long long i = 0; i < count; i++) {
    dest[i] = src[i];
  }
}

long long calcSize(long long rank, long long *dimensions) {
  long long totalSize = 1;
  for (long long i = 0; i < rank; i++) {
    totalSize *= dimensions[i];
  }
  return totalSize;
}

Array indexOfChar(char targetChar, char* str) {
  for (long long i = 0; str[i] != '\0'; i++) {
    if (str[i] == targetChar) {
      return (Array)(i + 1); // +1 because index is 1-based in this context
    }
  }
  return 0;
}

Array createArray(long long type, long long rank, long long *dimensions) {
  Array newArray = (Array)allocMem(5 + calcSize(rank, dimensions));
  newArray->t = type;
  newArray->r = rank;
  copyMem(newArray->d, dimensions, rank);
  return newArray;
}

Array id(Array x) {
  return x;
}

Array sequence(Array x) {
  long long length = *x->p;
  Array newArray = createArray(0, 1, &length);
  for (long long i = 0; i < length; i++) {
    newArray->p[i] = i;
  }
  return newArray;
}

Array plus(Array x, Array y) {
  long long rank = y->r;
  long long *dimensions = y->d;
  long long totalCount = calcSize(rank, dimensions);
  Array resultArray = createArray(0, rank, dimensions);
  for (long long i = 0; i < totalCount; i++) {
    resultArray->p[i] = ((!x->r) ? *x->p : x->p[i]) + ((!y->r) ? *y->p : y->p[i]);
  }
  return resultArray;
}

Array mul(Array x, Array y) {
  long long rank = y->r;
  long long *dimensions = y->d;
  long long totalCount = calcSize(rank, dimensions);
  Array resultArray = createArray(0, rank, dimensions);
  for (long long i = 0; i < totalCount; i++) {
    resultArray->p[i] = ((!x->r) ? *x->p : x->p[i]) * ((!y->r) ? *y->p : y->p[i]);
  }
  return resultArray;
}

Array extractFromArray(Array indexArray, Array sourceArray) {
    long long reducedRank = sourceArray->r - 1;
    long long *reducedDimensions = sourceArray->d + 1;
    long long totalElements = calcSize(reducedRank, reducedDimensions);

    Array resultArray = createArray(sourceArray->t, reducedRank, reducedDimensions);
    copyMem(resultArray->p, sourceArray->p + (totalElements * *indexArray->p), totalElements);

    return resultArray;
}

Array boxArray(Array inputArray) {
    Array boxedArray = createArray(1, 0, 0);
    *boxedArray->p = (long long) inputArray;

    return boxedArray;
}

Array concatenateArrays(Array firstArray, Array secondArray) {
    long long firstArraySize = calcSize(firstArray->r, firstArray->d);
    long long secondArraySize = calcSize(secondArray->r, secondArray->d);
    long long totalSize = firstArraySize + secondArraySize;

    Array concatenatedArray = createArray(secondArray->t, 1, &totalSize);
    copyMem(concatenatedArray->p, firstArray->p, firstArraySize);
    copyMem(concatenatedArray->p + firstArraySize, secondArray->p, secondArraySize);

    return concatenatedArray;
}

Array findElement(Array x, Array y) {
  printf("nyi\n");
  return (Array) 0;
}

Array reshapeArray(Array shapeArray, Array inputArray) {
    // Determine the rank and total size for the new shape
    long long newRank = shapeArray->r ? *shapeArray->d : 1;
    long long newSize = calcSize(newRank, shapeArray->p);

    // Calculate the total number of elements in the input array
    long long inputSize = calcSize(inputArray->r, inputArray->d);

    // Create a new array with the desired shape and type
    Array reshapedArray = createArray(inputArray->t, newRank, shapeArray->p);

    // Determine the number of elements to copy (the smaller of newSize or inputSize)
    long long elementsToCopy = newSize > inputSize ? inputSize : newSize;

    // Copy elements from the input array to the reshaped array
    copyMem(reshapedArray->p, inputArray->p, elementsToCopy);

    // If the new size is larger, repeat the input array elements to fill the reshaped array
    if (newSize > inputSize) {
        copyMem(reshapedArray->p + inputSize, reshapedArray->p, newSize - inputSize);
    }

    return reshapedArray;
}

Array sha(Array x) {
  Array z = createArray(0, 1, & x -> r);
  copyMem(z -> p, x -> d, x -> r);
  return z;
}
Array size(Array x) {
    // Create an array to store the size result
    Array resultArray = createArray(0, 0, 0);

    // If the array x has a rank (r) greater than 0, use the size of the first dimension.
    // Otherwise, the size is considered as 1 (for rank 0 arrays).
    long long sizeValue = (x->r > 0) ? x->d[0] : 1;

    // Store the calculated size in the result array
    *resultArray->p = sizeValue;

    return resultArray;
}
Array firstElement(Array x) {
  Array z = createArray(0, 0, 0);
  *z -> p = * x -> p;
  return z;
}
Array reverseArray(Array inputArray) {
    long long rank = inputArray->r;
    long long *dimensions = inputArray->d;
    long long totalElements = calcSize(rank, dimensions);
    Array reversedArray = createArray(0, rank, dimensions);

    for (long long index = 0; index < totalElements; index++) {
        reversedArray->p[index] = inputArray->p[totalElements - index - 1];
    }

    return reversedArray;
}

char verbTable[] = "+{!<#,*|", at[] = "\\/";
Array( * verbDispatcher[])(Array, Array) = {
    0,
    plus,
    extractFromArray,
    findElement,
    0,
    reshapeArray,
    concatenateArrays,
    mul,
    0
  },
  ( * vm[])(Array) = {
    0,
    id,
    size,
    sequence,
    boxArray,
    sha,
    0,
    firstElement,
    reverseArray
  },
  ( * va[])(Array, Array) = {
    0,
    scanArray,
    reduce
  };

Array reduce(Array functionArray, Array inputArray) {
    // Check if the input array is empty or has rank 0; return it directly if so
    if (!inputArray->r) {
        return inputArray;
    }

    // Create arrays for the reduction process
    Array resultArray = createArray(0, 0, 0);
    Array tempArray = createArray(0, 0, 0);

    // Initialize the first element of resultArray with the first element of inputArray
    *resultArray->p = *inputArray->p;

    // If inputArray has more than one element, initialize tempArray with the second element
    *tempArray->p = inputArray->r > 1 ? inputArray->p[1] : 0;

    // Perform the reduction
    long long totalIterations = (inputArray->r ? *inputArray->d : 1) - 1;
    for (long long i = 0; i < totalIterations; ++i) {
        *tempArray->p = inputArray->p[i + 1];
        *resultArray->p = *((*verbDispatcher[(long long)functionArray])(resultArray, tempArray))->p;
    }

    return resultArray;
}

Array scanArray(Array functionArray, Array inputArray) {
  // Check if inputArray is empty or has rank 0, in which case return inputArray itself
  if (!inputArray->r) {
    return inputArray;
  }

  // Create an array 'result' with the same shape as inputArray
  Array result = createArray(0, inputArray->r, inputArray->d);

  // Initialize temporary arrays for the scan operation
  Array temp1 = createArray(0, 0, 0);
  Array temp2 = createArray(0, 0, 0);

  // Initialize the first elements of temp1 and result with the first element of inputArray
  *temp1->p = *result->p = *inputArray->p;

  // If inputArray has more than one element, initialize temp2 with the second element
  if (inputArray->r > 1) {
    *temp2->p = inputArray->p[1];
  }

  // Iterate over the elements of the inputArray, applying the functionArray
  long long totalIterations = (inputArray->r ? *inputArray->d : 1) - 1;
  for (long long i = 0; i < totalIterations; ++i) {
    *temp2->p = inputArray->p[i + 1];
    result->p[i + 1] = *temp1->p = *((*verbDispatcher[(long long)functionArray])(temp1, temp2))->p;
  }

  // Return the final result of the scan operation
  return result;
}

long long convertStringToLongLong(char* inputString, long long *numberLength) { // convertStringToLongLong
  char currentChar;
  long long index = 0, result = 0;
  *numberLength = 0;

  while ((currentChar = *inputString++) && (currentChar >= '0' && currentChar <= '9')) {
    index++;
    result = result * 10 + (currentChar - '0');
  }

  *numberLength = index;
  return result;
}

void printInt(long long i) {
  printf("%lld ", i);
}
void newline() {
  printf("\n");
}
void printTab() {
  printf(" ");
}
void printArray(Array arrayToPrint) {
    long long rank = arrayToPrint->r;
    long long *dimensions = arrayToPrint->d;
    long long totalElements = calcSize(rank, dimensions);

    if (arrayToPrint->t) {
        // If the array type is non-zero, handle as a nested (boxed) array
        for (long long i = 0; i < totalElements; i++) {
            printf("< ");
            printArray((Array)arrayToPrint->p[i]);
        }
    } else {
        // Handle as a flat array
        for (long long i = 0; i < totalElements; i++) {
            printInt(arrayToPrint->p[i]);
        }
    }
}

char isLowercase(long long a) {
  return a >= 'a' && a <= 'z';
}
char qv(long long a) {
  return a < 'a';
}
char isUppercase(long long a) { // qv
  return a < 'a';
}
Array getAdverb(char c) {
  return indexOfChar(c, at);
}
Array verb(char c) {
  return indexOfChar(c, verbTable);
}

Array noun(char** inputString) { // createNounFromString
    char firstCharacter = **inputString;
    long long stringLength;

    // Check if the first character is not a digit; return NULL if so
    if (firstCharacter < '0' || firstCharacter > '9') {
        return NULL;
    }

    // Create an array to store the converted number
    Array numberArray = createArray(0, 0, 0);

    // Convert the string to a long long number and store in the array
    *numberArray->p = convertStringToLongLong(*inputString, &stringLength);

    // Move the input string pointer forward by the length of the numeric part
    *inputString += stringLength - 1;

    return numberArray;
}

Array executeExpression(Array *expressionElements) {
  long long firstElement = (long long)*expressionElements;
  long long secondElement = (long long)expressionElements[1];

  if (isLowercase(firstElement)) {
    if (secondElement == ':') {
      return (st[firstElement - 'a'] = executeExpression(expressionElements + 2));
    }
    firstElement = (long long)st[firstElement - 'a'];
  }

  if (isUppercase(firstElement) && getAdverb(secondElement)) {
    Array (*adverbFunction)(Array, Array) = va[(long long)getAdverb(secondElement)];
    return adverbFunction((Array)firstElement, executeExpression(expressionElements + 2));
  }

  if (isUppercase(firstElement)) {
    Array (*monadFunction)(Array) = vm[firstElement];
    return monadFunction(executeExpression(expressionElements + 1));
  }

  if (secondElement) {
    Array (*verbFunction)(Array, Array) = verbDispatcher[secondElement];
    return verbFunction((Array)firstElement, executeExpression(expressionElements + 2));
  }

  return (Array)firstElement;
}

Array * parseInput(char* inputStr) {
  Array parsedElement;
  Array *parsedElements;
  char currentChar;
  long long strLength = strlen(inputStr);

  if (strLength==1) {
    printf("Error: Input string is empty\n");
    exit(1);
  }
  if (!strLength) return (Array *)0;

  inputStr[--strLength] = 0;
  parsedElements = (Array *)allocMem(strLength + 1);

  strLength = 0;
  while ((currentChar = *inputStr)) {
    parsedElement = noun(&inputStr);
    if (!parsedElement) {
      parsedElement = verb(currentChar);
    }
    if (!parsedElement) {
      parsedElement = (Array)(long long)currentChar;
    }
    parsedElements[strLength++] = parsedElement;
    inputStr++;
  }

  parsedElements[strLength] = 0;
  return parsedElements;
}

int main() {
    char inputString[99];

    while (1) {
        //printf("WS: %llu\n", WS); // Print workspace size
        printTab(); // Print a tab or space

        // Read input from stdin. If fgets returns NULL, break the loop
        if (fgets(inputString, 99, stdin) == NULL) {
            break;
        }

        // Process the input and print the result
        printArray(executeExpression(parseInput(inputString)));
        newline(); // Print a newline character
    }

    return 0;
}

// https://codebeautify.org/cpp-formatter-beautifier

@dataf3l thanks for caring to take a look, i'm flattered.
as it follows, the code isn't exactly mine - it is due to a much taller Canadian bear, only he wrote it when his hair weren't completely grey yet :)
i'm short on time to figure out what "codebeautify" exactly is, but the result looks like a job of a fairly well-trained AI model. as it happens, those things still miss out on subtleties, and as it it must be evident from your snippet still have a major difficulty maintaining consistent and confident style - which is the whole idea and the central point of this little piece of history.
impressive, though.
does it compile, if you know?

sorry, i missed your point. you've said you've made minor modifications, which i interpret as modifications to the logic of this software, but i have no means of figuring out what you've done. please point me in the right direction.
as for AI hiccups, the simplest example is pt(), which is not really "printTab() // print a tab or space", it stands for prompt, which is a single 0x20.
would you care to try the same approach on a slightly more production-grade piece of software which is written in the same style? i'm really keen to learn what the results may be:
https://github.com/kparc/bcc/blob/master/ec/e.c

another example of where the model successfully got the wind of what was going on, but completely obliterated the context, terminology and consistency is this:
Array reduce(Array x, Array y);
Array scanArray(Array x, Array y);

since i am responsible for basic implementation of these two staple k adverbs, i have the authority to say that their names are cast in stone as over and scan. although reduce() hits the mark to a degree (i'd also accept fold()), scanArray() lost it completely. but what's worse is that the machine-generated code failed to see and reflect the rhyme between scan and over.

i gave you honest and direct feedback, and i hope you'll find it useful.
in return, i'd like to hear your honest opinion as to what degree the original code benefitted from your modifications.

on a closing note:
char isUppercase(long long a) { // qv
  return a < 'a';
}

on your local terminal, try:
$ ascii -d
you'll hopefully agree that isUppercase() is a fatally misleading interpretation of what arthur actually tests for in qv().

also, AI tends to use Element everywhere where it sees a member of an array. In some contexts, e.g. in parse function, this is just plain wrong - if the model had any clue of what it is "beautifying", it would use "Token" instead, which I'd gladly accept.

i gave you honest and direct feedback, and i hope you'll find it useful.
in return, i'd like to hear your honest opinion as to what degree the original code benefitted from your modifications.

I first approached the code not knowing exactly what it did other than it
was some form of interpreter or compiler:

I used “CPP” which can expand all the macros and an online code  beautifier to
add line breaks.

Later, I removed every comma I could find.

After this, I asked the AI what new names could be given, since this is a SHORT
program, it gave a lot of new names, I haven’t gotten around to renaming
everything the way the AI likes it.

Then, I asked the AI to refactor every single function, and tested the
interpreter along the way, to make sure the functionality was still there, so
this is bug by bug compatible (it segfaults a lot).

But it can read the same expressions the original one could apparently.

I did this so I could kinda understand the code, I can’t say I totally
understand it now, but I think it’s a step on that direction.

After all the work I googled what is K and J and found these wonderful
languages, perhaps with more time I’ll learn how to use them.

“does it compile, if you know?” => yes, it does build.
Try: gcc -o ./temp filename.c

“you've said you've made minor modifications”
Well, I didn’t add any keywords or free() or things like that.
But I guess one could consider them to be not so minor, perhaps this is a
subjective matter

“pt(), which is not really "printTab()" ”
If the AI likes printTab, I call it printTab().  But then again I totally see
what you mean by the AI misinterpreting the original intent, I’m surprised it
even got whatever was right right, which was probably a lot.

“would you care to try the same approach on a slightly more production-grade
piece of software which is written in the same style? i'm really keen to learn
what the results may be:“
That’s a lot of code.  Challenge accepted.

“over and scan”
I guess one could rename it back the way it was before…

To me, the whole question was, can AI make sense of the code Make it
understandable by mere mortals, who don’t know much And can it make the code not
only readable but also enjoyable?

These are questions on my mind, there is a lot of code out there, But not all
the code is readable, so, one wonders, can AI be used To make code better? Can
we learn to understand other people’s code using the AI?

These are the questions I set out to answer.  Can we refactor existing code? Can
the AI make sense of single Letter variables and very terse code somehow?

Sure, we may not Agree with the AI on everything, but surely the work done by it
is perhaps more digestible by the average programmer, than an endless array of
rather mysterious single-letter local variables.

“…isUppercase() is a fatally misleading interpretation...”
I noticed this as well, I didn’t have time to change it to a More meaningful
name, I also don’t think it’s a good interpretation. I have no clear thoughts on
what to call it at this point.

“AI tends to use Element everywhere … this is just plain wrong … it would use
"Token" instead, which I'd gladly accept.”
Ok then I change it I guess… We’ll have to wait and see, for the next version.

“in return, i'd like to hear your honest opinion as to what degree the original
code benefitted from your modifications.“
I did in fact add a single if statement somewhere manually because I didn’t like
the fact that it segfaults on some edge cases, it still segfaults a lot, because
error checking is non existent, but I figured maybe one can add that “over
time”.

So, the code is basically not yet improved, it needs more work before one can
start improving on it, I noticed a stale PR AFTER I started the work, that had
more features!, too late for that now I guess.

I had fun trying to understand the code, but some aspects of it are still a
mystery to me, the intent isn’t too clear, unfortunately.

I also didn’t get around renaming the names of the fields of the struct like p
or r or d to something different and perhaps more informative, yet, perhaps in a
future session.

I’ve considered adding the original code as “comments at the beginning of each
line” so it’s easier to keep track of the changes.

But I thought that could be considered offensive, so maybe not.

I also thought perhaps one could rewrite this in Rust, but I fear the current
design maybe Rust’ borrow checker won’t like the code very much if at all, I
foresee a lot of weird errors if one is to attempt such a thing.

Thanks for the feedback, and for the prompt response, I’ll review the other
code.

After all the work I googled what is K and J and found these wonderful
languages

oh. welcome to the club :)

it segfaults a lot
this is by design. this is a sketch of an interpreter written in one sitting. i dare to assume that back in 1989 Arthur Whitney couldn't afford his own AT&T 3B1, which wasn't exactly a cheap machine.

I’ve considered adding the original code as “comments at the beginning of each line”

so did i, but i opted to leave this piece of code uncommented, and there are good reasons for that. and it paid off.

at the beginning of each line
usually, we annotate this kind of code this way:
https://github.com/kparc/pf/blob/master/pf.h
it is up to you whether you want to beautify this any further or read it as is.

If the AI likes printTab, I call it printTab()
if you're available to take friendly advice - just don't. think for yourself and question "authority".

this were the ideas by the AI:
This program appears to be a minimalistic implementation of some operations common in array programming languages like J. It defines operations on arrays (referred to as K-structures in the code) and includes functions for arithmetic, reshaping, boxing, etc.
Here's a proposed renaming of variables and functions to make the code more readable. The goal is to maintain brevity while improving clarity. The renaming is based on the context in which these entities are used and the typical naming conventions in array programming:

Original Name
New Name
Description/Notes

_
VoidFunction
Typedef for void function

C
Char
Typedef for char

S
String
Typedef for char pointer (string)

J
Long
Typedef for long long

K
Array
Typedef for main array structure

st
globalArrayStack
Global stack for arrays

WS
WorkspaceSize
Tracks the workspace memory usage

ma
allocMem
Memory allocation function

mv
copyMem
Memory copy function

tr
calcSize
Calculate size of an array

i
indexOfChar
Find index of a character in a string

ga
createArray
Function to create a new array

id
identity
Identity function

iota
sequence
Generate sequence array

plus
addArrays
Add two arrays

mul
multiplyArrays
Multiply two arrays

from
extract
Extract subarray

box
boxValue
Box a value into an array

cat
concatenate
Concatenate two arrays

find
findElement
Find element (not yet implemented)

rsh
reshapeArray
Reshape an array

sha
shapeArray
Get the shape of an array

size
arraySize
Get the size of an array

fst
firstElement
Get the first element of an array

rev
reverseArray
Reverse an array

vt
verbTable
Table for verbs

at
adverbTable
Table for adverbs

vd
verbDispatcher
Dispatcher for verb functions

vm
monadDispatcher
Dispatcher for monadic functions

va
adverbDispatcher
Dispatcher for adverb functions

over
reduce
Reduction operation

scan
scanArray
Scan operation

sI
stringToInt
Convert string to integer

pi
printInt
Print an integer

nl
newline
Print a newline

pt
printTab
Print a tab (or space)

pr
printArray
Print an array

qp
isLowercase
Check if char is lowercase

qv
isUppercase
Check if char is uppercase

adv
getAdverb
Get adverb from character

verb
getVerb
Get verb from character

noun
getNoun
Get noun (number) from string

ex
execute
Execute parsed expressions

wd
parseInput
Parse input string into expressions

main
main
Main function (unchanged)

Please note that some functions, like find, are marked as "not yet implemented (nyi)". Additionally, the use of single-letter variable names and terse style is typical in languages like J, which this program seems to be inspired by. My renaming aims to strike a balance between maintaining the spirit of the original code and improving readability.
The reason the code is inconsistent is because I didn't apply all the AI suggestions, just some of them.

this were the ideas by the AI [...]

hats off, this part of the footwork the machine got almost flawlessly. only i'm not sure why anyone would want to make use of the middle column. it is superfluous.

endless array of rather mysterious single-letter local variables.

yes, i know - at first, some such code looks like an "endless" soup of someone's exercise in obscurity and pretentiousness.
but local variables are just xyzrf, and they are neither endless nor mysterious.
sometimes you'll see extra locals (s, c, t) but they are rare and easy to infer even without comments.
i assume you discovered this repo via HN post. there's plenty of links there which point to resources which describe rationale and conventions of this particular style of c.

this were the ideas by the AI

i learned something new today. thank you.

this were the ideas by the AI

how can i reproduce this remarkable result?

this were the ideas by the AI

which AI did you employ, and how did you state the prompt?

@dataf3l fwiw, these are the next evolutions of j you can try and run:
This comes with a paper from the APL90 conference. the only version i got, was a dos binary distributed at that time:
https://ktye.github.io/zoo/#j90
The next version from roger where i could get the source is j4.1 or 4.2:
this is the first fully working version that you can study the source code of.
compiled to wasm:
https://ktye.github.io/zoo/#j42


chore(): update link

Replace with new link, to which the old one (still) redirects.

@dmitriz could you update your commit message to be more specific, e.g.:
chore(): update .gitignore link to relevant github article

I updated the link in ced8d09c0e9759d6bd1ccf6ae09310d8483ab8a4

Thanks, you are right, it should have been more descriptive :)


how to batch learning when using input builder function, in skflow

I have got some problem in modifying wide_n_deep_tutorial.py
The problem is the same as
http://nticformation.com/solutions_problems.php?tuto=145994&subCategory=python+tensorflow+skflow&Category=python
Sorry for my poor english. And many thanks in advance.

This sort of question is better asked on stackoverflow, using the #tensorflow tag.


Getting Error 404 when plugin tries to log in

Describe Your Problem:
Log in to VW We Connect iD does not work. Homebridge log reports error 404.
Logs:
ERROR: Failed in receive login url
ERROR: 404
ERROR: "404 Not Found: Requested route ('login.apps.emea.vwapps.io') does not exist.\n"
ERROR: Failed in first login step
ERROR: 404
ERROR: "404 Not Found: Requested route ('login.apps.emea.vwapps.io') does not exist.\n"
ERROR: Login Failed
Plugin Config:
"platforms": [
{
"name": "Config",
"port": 8581,
"platform": "config"
},
{
"name": "iD.4",
"platform": "WeConnectID",
"weconnect": {
"username"<EMAIL_ADDRESS>"password": "mypasswdxyz",
"vin": "myvinMan"
},
"options": {
"chargingAccessory": "Charging",
"climatisationAccessory": "Climatisation",
"locationMotionSensors": [
{
"name": "Home",
"lat": 60,
"lon": 40,
"radius": 100
},
{
"name": "Work",
"lat": 40,
"lon": 2,
"radius": 100
}
],
"eventMotionSensors": [
{
"name": "notSafeCar",
"event": "statusNotSafe"
}
]
}
}
Screenshots:
Environment:

Plugin Version: v1.0.1
Homebridge Version: v1.6.0
Node.js Version: v18.14.2
NPM Version: 9.5.1
Operating System: Raspbian /hb-service

Looks like a problem at the server side (VW). I will dive into this a bit more later.


Drawer content top offset with navigation bar

I'm using this lib with a navigation controller and in my case, it seems as though the right drawer content is not being offset to account for the height if the navigation bar. When inspecting the view hierarchy, i can see that the navigation bar is blocking the top portion of my drawer view controller.

Also, i just discovered that when the drawer view is updated, it gets pushed down to the correct offset. So it seems as though the logic is in there but not being applied on first load.

I've fixed the issue by setting edgesForExtendedLayout = .None in my ViewController that extends MMDrawerController. Closing.


Dead storage incorrect merge of storage load at the same slot

Loading the length of an array and the array itself should not be
merged.
Fixes #776 and #789.
Signed-off-by: Sean Young<EMAIL_ADDRESS>

I patched your branch. It does not fix #789 .


Add New project in Machine Learning section

predicting multivitamin purchase using 1mg website
I have scraped the data using selenium .
And deployed a model using Microsoft Azure

@AKSHITHA-CHILUKA I am closing this issue and please use Feature Addition issue template for adding new features and for now work on 1 issue at a time


updated dependency versions

Hello. Apologies due to GitHub notification I missed seeing this. I have integrated you work in #53
Thanks a lot! 👍


How do I set it up..?

Hello all, this isn't really a problem, but I am having trouble will setting this up. I ssh'ed into the pi and pasted the command line to install everything, and that worked perfectly. Now I don't know what to do to get this working. after that I don't know what to do. I paste it into putty and it says that syntax error near unexpected token (' and syntax error near unexpected token p110.getEnergyData'. I have no idea whether im supposed to paste it in a config file on mainsail, or if im supposed to create a file through terminal and paste it in there. Any help would be greatly appreciated.
Cheers
`from PyP100 import PyP110
110 = PyP110.P110("myip", “myemail”, "mypassword")
#The P110 has all the same basic functions as the plugs and additionally allow for energy monitoring.
p110.getEnergyUsage()  # Returns dict with all of the energy usage of the connected plug
p110.getEnergyData(1706825847,<PHONE_NUMBER>, MeasureInterval.DAYS) # Returns power consumption per day since 1st Feb 24`

paste it in a file like "hello.py"
then run the py file with python3 hello.py


add copyright to LICENSE

MIT needs copyright.

Please add license file. We want to use this without legal risk.

bump


eu-central-1 region missing

Frankfurt regions is supported but eu-central-1 is not in the list.

From source code I can clearly see eu-central-1 from src/regions.ts
export const standardRegions = ['us-east-1', 'us-east-2', 'us-west-2', 'eu-west-1', 'eu-central-1'];

timestream-datasource version v1.3.1
grafana v7.5.7

This has been included in the latest release 1.3.2:
https://grafana.com/grafana/plugins/grafana-timestream-datasource/?tab=changelog


Do not highlight '.cs' extension when prompting for new class (etc.) …

…name
Maybe I should have opened an issue for this first, but one thing I wanted to fix about this extension is that when prompting for a new class (or interface etc) name, the entire prompt filename "newclass.cs" is selected, forcing me to either retype the .cs extension or (worse) play with the mouse to fix the selection before typing in the new class name.

Seems fine to me, but did you know that the extension puts an .cs to the end of the filename if it is missing? If you input NewClass, the created file will be NewClass.cs. If you input NewClass.txt, NewClass.txt.cs.
Still, your solution seems better to me compared to removing the .cs-part.

Oh, I had no idea that the extension would add  ".cs"; I've been retyping it constantly. At least with my extension it's clear what the behavior is. I guess it's a little less convenient when you want to use another extension, but that's a rare case.

I hate to bug you about this, but do you think you can label this PR 'hacktoberfest-accepted' ? When looking at the PR page, click on 'Labels' on the right hand column and enter hacktoberfest-accepted. Then click on "create new label" just below the text box. Then you have to click on labels again to add the new label from the list.
No need, but I'd be very happy if you went to the trouble to do this.


I need the ability to add additional columns to the target structure.

For example, we need to add multiple timestamps to the target structure representing both load date and business effective date.

This is currently possible using a custom splitter.


[pwrmgr] Fix missing production state qualification on rom checks

fixes #9455

Signed-off-by: Timothy Chen<EMAIL_ADDRESS>

@davebwil FYI


publish to cdnjs

please publish this to cdnjs so we can use this lib directly off a cdn instead of needing to use bower

Thanks, It's now on cdnjs! https://cdnjs.com/libraries/angular-highlightjs


Hooks don't work when checkout is skipped

Hey, I noticed that when we try disabling checkout (https://github.com/buildkite/agent-stack-k8s/pull/303) that our environment hooks don't run (the pre-checkout hook also doesn't run but I'd expect that :) )
Maybe the environment hooks normally get run on the checkout container which is no longer present when checkout is disabled?
potentially related issues:

https://github.com/buildkite/agent-stack-k8s/issues/227
https://github.com/buildkite/agent-stack-k8s/issues/239
https://github.com/buildkite/agent-stack-k8s/pull/258

Hi @bpoland, that's kind of weird! It was working before?
I had a quick look in the agent and couldn't see a reason the environment hook wouldn't still be run in the command container(s). It's part of setUp which isn't conditional on any phases.

Hi @bpoland, that's kind of weird! It was working before?
I had a quick look in the agent and couldn't see a reason the environment hook wouldn't still be run in the command container(s). It's part of setUp which isn't conditional on any phases.

Hey, yep I tried removing the kubernetes.skip.checkout: true and then the hooks run again, although I think likely on the checkout container? (hard to tell from the Buildkite UI which container it is).
Is the environment hook supposed to run on both the checkout container and the command container separately?  With checkout enabled I only see it running once.

Yeah, as far as I can tell if both containers are enabled, and the environment hook is present in both, and the hooks env var is configured, then the environment hook should still get run twice.

I couldn't replicate, but I'll paste my notes here and we can compare 🧑🏻💻
As setup, I have a directory of trivial testhooks containing most job lifecycle hooks except checkout and command. For testing purposes I'm mounting them using hostPath.
Here's a pipeline which skips checkout:
agents:
  queue: kubernetes
steps:
  - label: "hook time"
    command:
      - echo $$BUILDKITE_HOOKS_PATH
      - ls /buildkite/hooks
    plugins:
      - kubernetes:
          checkout:
            skip: true
          podSpecPatch:
            containers:
              - name: "container-0"
                image: ghcr.io/buildkite/agent:latest
                env:
                  - name: BUILDKITE_HOOKS_PATH
                    value: /buildkite/hooks
            volumes:
              - name: agent-hooks
                hostPath:
                  path: /Users/josh/testhooks
                defaultMode: 0755
          extraVolumeMounts:
            - name: agent-hooks
              mountPath: /buildkite/hooks
              readOnly: true

It ran the environment, pre-command, post-command, and pre-exit hooks:
Running global environment hook
Running global pre-command hook
Running commands
$ echo $BUILDKITE_HOOKS_PATH
ls /buildkite/hooks
/buildkite/hooks
environment    post-checkout  pre-artifact   pre-checkout   pre-exit
post-artifact  post-command   pre-bootstrap  pre-command
Running global post-command hook
Running global pre-exit hook

I ran the same pipeline with checkout: skip: true commented out and another container podSpecPatch for "checkout":
...
      - kubernetes:
          # checkout:
          #   skip: true
          podSpecPatch:
            containers:
...
              - name: "checkout"
                image: ghcr.io/buildkite/agent:latest
                env:
                  - name: BUILDKITE_HOOKS_PATH
                    value: /buildkite/hooks
...

and it ran environment, pre-checkout, post-checkout, environment (again), pre-command, post-command, and pre-exit hooks:
Running global environment hook
Running global pre-checkout hook
Preparing working directory
Running global post-checkout hook
Running global environment hook
Running global pre-command hook
Running commands
$ echo $BUILDKITE_HOOKS_PATH
ls /buildkite/hooks
/buildkite/hooks
environment    post-checkout  pre-artifact   pre-checkout   pre-exit
post-artifact  post-command   pre-bootstrap  pre-command
Running global post-command hook
Running global pre-exit hook

ahhh 🤦 it looks like my hooks volume is not getting correctly mounted on the command container. I will figure out why that is but that's probably it. I assume then I'll see the env hook running twice (or just once if I disable checkout again). Sorry for the wild goose chase!


[pdpix] Have a System-Wide Maximum Size for a Receive Buffer

Description
This PR closes https://github.com/demikernel/demikernel/issues/698
Summary of Changes

Added a system-wide constant for the maximum size of receive buffers.
Changed Catnap LibOS to use that system-wide constant.
Changed Catmem LibOS to use that system-wide constant.
Changed Catcollar LibOS to use that system-wide constant.
Changed Catpowder LibOS to use that system-wide constant.

The code looks fine to me but we might not want to use a global RECVBUF size. For example, RDMA will accommodate up to 1Gb sends and receives.

Sure. Let us revisit this when we have a RDMA LibOS merged in.


Possible vulnerability

Description
Possible vulnerabilities detected by Snyk:

1
2

@rin-skylight, you were looking at these issues, correct?

Affirmative, these are already covered in in-progress code.


Update README

Hi Martin this PR updates the README. Could you please merge it? Thanks!

Hi @martinjankoehler, just checking whether you have seen this :)

Hi @martinjankoehler, just checking whether you have seen this :)

Sorry for the delay, merged now!

Thanks! Also merged on Efabless' side.


color.rgb2hsl gives invalid results

Documentation for the function says that color will fall into the range between 0.0-1.0. However, for the "s" and "l" components this is not the case:
g.color.rgb2hsl(255, 0, 0)
> [0, -1.007905138339921, 127.5]

Ah it seems this only works if the source values are in the 0-1 range as well. My bad.


cloudera-scm-server not starting

Hello ,
Using setup-master.sh , its failing at below step :
_+ sudo service cloudera-scm-server-db start
Creating SCM configuration file: /etc/cloudera-scm-server/db.properties
waiting for server to start...............................................................could not start server
Could not start database server, giving up

sudo service cloudera-scm-server start
Starting cloudera-scm-server:                              [  OK  ]
sudo sed -i.bak $'-es%server_host=localhost%server_host=indlin2394.corp.amdocs.com\nindlin2394%' /etc/cloudera-scm-agent/config.ini
sed: -e expression #1, char 62: unterminated `s' command
sudo service cloudera-scm-agent start
Starting cloudera-scm-agent:                               [  OK  ]_

cloudera-scm-server is not coming UP .
Logs attached herewith .
Logs&Files.zip
i am using below python version .
[root@indlin2394 cloudera-scm-server]# python -V
Python 2.7.13
Kindly help .

@sorabhj,
You have used mysql as external database for cloudera manager and seems like it wasn't configured properly as per the error messages in the cloudera-scm-server.log :

2017-02-22 15:45:23,508 WARN com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0:com.mchange.v2.resourcepool.BasicResourcePool: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@42c5d9ca -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (5). Last acquisition attempt exception:
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

Make sure you can access mysql server from localhost and remote host. If you can, then refer the following link to ensure any other possibilities cause the error :
http://stackoverflow.com/a/2985169/2383136


[DPIOS-4] Audit of Swift-Wisdom

Summary
Initial audit of Swift-Wisdom to remove out-of-date code. This was a fairly conservative pruning of low-hanging fruit.
Jira ticket: https://intrepid.jira.digital.accenture.com/browse/DPIOS-4
Removed:

IPResult and tests

Marked as unavailable:

Array.ip_passes: duplicate of allSatisfy in stdlib
Set.ip_passes: duplicate of allSatisfy in stdlib
Set.ip_filter: duplicate of filter in stdlib

Added TODO comments:

Array.ip_uniqueValues: Inefficient implementation
String.ip_dropFirst: propose renaming to ip_removeFirst to be more consistent with Apple API naming conventions
UIColor.init(hex:): propose adding documentation or making failable init

Updated implementation:

String.range(from:)
UIView.ip_fromNib

Didn't touch yet but would like to remove/deprecate:

Array.ip_generator mostly duplicates the functionality of makeIterator() and is only needed if we need a type eraser that returns AnyIterator instead of IndexingIterator<Element>
String.subscript(range: CountableRange<Int>) Can be removed if Xcode 9 is no longer supported (I'm guessing yes?)
String.ip_length is this really necessary? Do people like ip_length better than using count directly?

          1 Error

:no_entry_sign:
UIView+Nib.swift#L13 - SwiftWisdom/Core/UIKit/UIView+Nib.swift#L13: expression of type ‘T’ is unused
        ip_fromNib(nibNameOrNil, type: T.self, in: bundle)!

  Generated by :no_entry_sign: Danger


Gepetuto hooks

fix #43

It works: https://results.pre-commit.ci/run/github/668641025/1692190071.Tvgh9UshQlyd2NNNuKfu8A :)

It works: https://results.pre-commit.ci/run/github/668641025/1692190071.Tvgh9UshQlyd2NNNuKfu8A :)

nice !

But yes, you are right about the folder


Show encoding in Strings view

Add a column for guessed ASCII, UTF-8, UTF-16-LE, etc.

This was done in 4.2.6089-dev


Missing API Management API Definition Documentation

What was expected:
The Azure documentation for importing an API into API Management from an existing Function App (which uses a custom handler), should define how descriptions are created. There should be documentation on how to create the required API definition for the functions in the custom handler.
Issues encountered:
The Azure documentation for importing existing Function Apps into API Management only covers the "Operations" tab at the bottom of the API Management UI. When selecting the "Definitions" tab next to it, it's empty.
Although it's possible to collect a definition from the API by selecting the three dots next to it's name,  that definition generates an error when attempting to use it to populate a new definition.
This is an issue because when a Logic App selects the Function App, no functions/actions are available. It's unclear how an Open API Definition needs to be applied because there's no documentation or examples for it.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 76ca8cff-348b-5595-1c3a-f319d606f82e
Version Independent ID: 5930a3f8-45f7-e782-f917-0235601f873b
Content: Tutorial - Import and publish your first API in Azure API Management
Content Source: articles/api-management/import-and-publish.md
Service: api-management
GitHub Login: @dlepow
Microsoft Alias: danlep

@jberry777 Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.

@adrianhall - Are there steps to create the OpenAPI definitions that we should document for this scenario? Thank you!

Admins can either import an OpenAPI spec (in which case, we are advising OAS 3.0.3 compliant documents, modulo the few fields we don't support) or bringing in a Function App.  Alex should be able to assist on anything around the Function app (since that is done from the portal).

When selecting a function from a Function App in the Logic App UI, a pop up
says that there's a better experience when using an OpenAPI definition.
It's unclear if this is still true for Function Apps that are using a
custom handler, or what the differences would be.
It's certainly not a blocker, but might be a gap in documentation for
OpenAPI definitions and custom handler Function Apps.
On Mon, Feb 28, 2022 at 3:30 PM Adrian Hall @.***>
wrote:

Admins can either import an OpenAPI spec (in which case, we are advising
OAS 3.0.3 compliant documents, modulo the few fields we don't support) or
bringing in a Function App. Alex should be able to assist on anything
around the Function app (since that is done from the portal).
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/87629#issuecomment-1054813823,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK5HIRWILXACW7FQG6JIXXLU5QASTANCNFSM5NZBRHAQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Regards,
Joshua Berry
Cloud Security

Now I'm confused - is this related to API Management or Logic Apps?

I think this dovetails from one to the other. Starting in Logic Apps, when
selecting a function from a Function App, the pop up says there's a better
experience if you use an OpenAPI definition in the Function App. When
searching the Microsoft Azure documentation page for OpenAPI documentation,
it directs users to API Management.
Using API Management doesn't appear to be a requirement for using Function
Apps in Logic Apps, but it's unclear what the relationship is between the
OpenAPI definition and including it in the Function App as the pop up
suggests. This might be an opportunity to improve the documentation on
OpenAPI and it's use, and/or clarifying the wording in the Logic App pop up.
On Tue, Mar 1, 2022 at 10:47 AM Adrian Hall @.***>
wrote:

Now I'm confused - is this related to API Management or Logic Apps?
—
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/87629#issuecomment-1055747475,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK5HIRRSXQQJCQV2VA2JAFLU5ZQ2RANCNFSM5NZBRHAQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Regards,
Joshua Berry
Cloud Security

Got it - this definitely needs to be triaged by the Logic Apps team.  API Management is not involved in the Logic Apps to Function Apps (it can be, and we have lots of information about importing the function app and exporting the resulting capabilities as OpenAPI specifications), but the Logic Apps to Function Apps (without API Management) should still be supported.
@dlepow - not sure how to re-assign this, but it's not for API Management and needs to be triaged by the Logic Apps team.

@MayankBargali-MSFT - It sounds like this issue is more likely about the product/documentation experience in Logic Apps:

Starting in Logic Apps, when selecting a function from a Function App, the pop up says there's a better experience if you use an OpenAPI definition in the Function App. ... it's unclear what the relationship is between the OpenAPI definition and including it in the Function App as the pop up suggests. This might be an opportunity to improve the documentation on OpenAPI and it's use, and/or clarifying the wording in the Logic App pop up.

Could you please assign there as a possible product or doc issue? Thanks very much.

#reassign: @MayankBargali-MSFT

@jberry777 Can you share the document from the logic app/function app end if you are following any so we can assign the issue to the right content team. Please also share the screenshot in which portal blade you observe the popup and what operation you were trying to perform.


Edge-cases where arkade chart upgrade picks the wrong tag

There are two edge-cases where arkade chart upgrade picks the wrong tag for an image
Expected Behaviour

Running an update where the latest two tags are: prom/prometheus:v2.44.0 and prom/prometheus:v2.45.0-rc0 should not move from a stable version to an RC
The latest two tags are: moby/buildkit:v0.11.6-rootless and moby/buildkit:v0.11.6. In my YAML file I have: moby/buildkit:v0.11.6-rootless, but the upgrade command just finds the latest and replaces it with: moby/buildkit:v0.11.6 which is wrong

Possible Solution

Detect and extract a semver version
Detect any suffix
When finding the latest tags, make sure the suffix is matched - for the case where it is "" and when it's anything else like "rootless"

Steps to Reproduce (for bugs)

Run helm chart upgrade on a values.yaml like this:

builder:
  image: moby/buildkit:v0.11.5-rootless
prom:
  image: prom/prometheus:v2.44.0

Wrong output:
builder:
  image: moby/buildkit:v0.11.6
prom:
  image: prom/prometheus:v2.45.0-rc.0

Right output:
builder:
  image: moby/buildkit:v0.11.6-rootless
prom:
  image: prom/prometheus:v2.44.0

Context
This makes means additional checking and having to undo/manually change the upgrade steps
See also: https://github.com/alexellis/arkade/blob/master/cmd/chart/upgrade.go

Who feels like a challenge and can work on this within the next few days?

@joebowbeer wdyt?

I'm offering up a small token / bounty 💎  for this - https://twitter.com/alexellisuk/status/1672245426831908864?s=20

/close: addressed in #1087 and #1110


Change  ROS's .bag file to kitti's format, But the performance is terrible

When I rosplay the .bag file  and change the format into kitti's format as the input， the detected results is very terrible. Does anyone have the same problem?

you add some ros code in this base? I have some problem for my data. Can we communicate?

您的邮件已收到，我会尽快阅读！

you add some ros code in this base? I have some problem for my data. Can we communicate?

do you fix the problem ?

Sorry, I am not fix it now. How about we add a contact information and communicate?

<EMAIL_ADDRESS>

I fix it now, try to remove the build folder and rebuild it.
you can input some bin file and write a visualized file to test your onnx file!


Use foreground service to handle foreground input

2022-10-13 20:21:18.165  3797-3826  Ki2Service              com.valterc.ki2                      I  Sending input to adapter
2022-10-13 20:21:18.167   720-1852  InputDispatcher         pid-720                              W  Permission denied: injecting event from pid 3797 uid 10061 to window Window{52c7c52 u0 io.hammerhead.launcherapp/io.hammerhead.launcher.dashboard.DashboardActivity} owned by uid 10027
2022-10-13 20:21:18.167   720-1852  InputDispatcher         pid-720                              W  Asynchronous input event injection permission denied.
2022-10-13 20:21:18.169   720-1852  InputDispatcher         pid-720                              W  Permission denied: injecting event from pid 3797 uid 10061 to window Window{52c7c52 u0 io.hammerhead.launcherapp/io.hammerhead.launcher.dashboard.DashboardActivity} owned by uid 10027
2022-10-13 20:21:18.169   720-1852  InputDispatcher         pid-720                              W  Asynchronous input event injection permission denied.

Android restricts injecting input with permission android.permission.INJECT_EVENTS only granted to system apps.


p272 - Less nested selector

At page 272, you can read the following.
// the & char represents the current selector parent .
// in this scenario, it stands for item-list.latest .

Shouldn't it be quiz-list.latest instead of item-list.latest?

Hi samiroquai,
That's correct! Many thanks for pointing it out.


change query names

some of the queries like regression_querry_ann are quite tacky, a system for naming queries needs to be made.

If we were to work on approaching this problem, would it be okay for us to first come up with a naming convention on a separate file documenting the new protocol and upload for reference before making any changes?

This issue is for the future; not something we should worry about right now. My bad for not specifying.


Epsilon is applied twice?

Hello there, Thank you for sharing your code!
We are a bit confused about a possible bug in the application of epsilon during the action selection. In the controller during the forward call an epsilon floor is applied after the softmax , here's that part of the code:
class BasicMAC:
    ...
    def forward(self, ep_batch, t, test_mode=False):
        ...
        # Softmax the agent outputs if they're policy logits
        if self.agent_output_type == "pi_logits":
            ...
            agent_outs = th.nn.functional.softmax(agent_outs, dim=-1)

            if not test_mode:
                # Epsilon floor
                epsilon_action_num = agent_outs.size(-1)
                if getattr(self.args, "mask_before_softmax", True):
                    # With probability epsilon, we will pick an available action uniformly
                    epsilon_action_num = reshaped_avail_actions.sum(dim=1, keepdim=True).float()

                agent_outs = ((1 - self.action_selector.epsilon) * agent_outs
                               + th.ones_like(agent_outs) * self.action_selector.epsilon/epsilon_action_num)
               ...

but then during the multinomial action selection the actions are chosen randomly with probability epsilon as its shown in the following part of the code:
class MultinomialActionSelector():
    ...
    def select_action(self, agent_inputs, avail_actions, t_env, test_mode=False):
            ....
            picked_actions = Categorical(masked_policies).sample().long()

            random_numbers = th.rand_like(agent_inputs[:, :, 0])
            pick_random = (random_numbers < self.epsilon).long()
            random_actions = Categorical(avail_actions.float()).sample().long()
            picked_actions = pick_random * random_actions + (1 - pick_random) * picked_actions
            ...

In our understanding, both of this code segments are appliying the epsilon probability of picking a random action, the problem is that they're applied sequentialy, so we think the probability of picking randomly ends up being greater than intended.  Could you check if this is right?
Thank you very much!

Thanks for pointing this out! Yes, this is a bug, and the reason for unstable learning curves.
We are going to fix this issue. Thank you very much!

Hi, we have removed the epsilon greedy in MultinomialActionSelector.
Actually, we were aware of this bug a few weeks ago. We tested the version with one epsilon greedy and found that the learning will be much more stable. We hope that you can find similar results :)

Thank you very much for your reply!


Add warning about using pickle during loading

Before submitting (must do checklist)

[x] Did you read the contribution guide?
[x] Did you update the docs? We use Numpy format for all the methods and classes.
[ ] Did you write any new necessary tests?
[x] Did you update the CHANGELOG?

Proposed Changes
Look #1320.
Closing issues
Closes #1320.

Codecov Report

Merging #1346 (be92d11) into master (f4bcc29) will decrease coverage by 82.55%.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master   #1346       +/-   ##
==========================================
- Coverage   89.15%   6.60%   -82.55%
==========================================
  Files         204     204
  Lines       12675   12669        -6
==========================================
- Hits        11300     837    -10463
- Misses       1375   11832    +10457

Files Changed
Coverage Δ

etna/core/mixins.py
27.48% <ø> (-68.43%)
:arrow_down:

etna/core/utils.py
29.26% <ø> (-68.30%)
:arrow_down:

etna/ensembles/mixins.py
0.00% <ø> (-100.00%)
:arrow_down:

etna/pipeline/mixins.py
0.00% <ø> (-99.16%)
:arrow_down:

... and 183 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Update canvas dependency to be compatible with v1.x

In #77, @waissbluth tripped over a dependency on an out-of-date version of Canvas that doesn’t build on the latest OS X :(
Rather than keep updating the dependency every time Canvas does a release, I’ve changed our dependency to work with any Canvas 1.x version. Since I believe Canvas uses semver, this should be safe. All our tests still pass (including new rendering tests in bug-10-image-tests).

:+1:
...though ugh for Travis crashing out on installing Canvas module

I hope you are also enjoying an inbox full of me fighting with Travis right now, too ;)

Coverage remained the same at 18.35% when pulling 4b75680f91978c99eb4804a65c2cd5a96a5026cc on 77-canvas-out-of-date into f15d4a6d0207c9a91ab42279bc041ed53ca5004d on master.

Coverage remained the same at 18.35% when pulling 8c7d6327e882b86807425c2a77b47d90a13069d0 on 77-canvas-out-of-date into f15d4a6d0207c9a91ab42279bc041ed53ca5004d on master.

Coverage remained the same at 18.35% when pulling 8c7d6327e882b86807425c2a77b47d90a13069d0 on 77-canvas-out-of-date into f15d4a6d0207c9a91ab42279bc041ed53ca5004d on master.

Ok, going to merge, bump version, and publish.


Request: Django DRF vs Django Ninja  vs Django with celery

Hello,
I Hope we can see :
-Django DRF vs Django Ninja
-Django with celery  vs Nodjs or Go
And you can chose the best combination of Django Ninja with celery vs Nodjs or Go.
This will be fair comparison
Thank you for the valuable content

I'll be using a new, improved Ruby on Rails application to test with Django. If you have experience, would you @zakimimit  mind looking into how Django can be improved?
For example, unused middleware can be removed from Django.
PR with improved Ruby on Rails - https://github.com/antonputra/tutorials/pull/335
Original Django app - https://github.com/antonputra/tutorials/tree/main/lessons/209/mydjango

First of all, thank you for accepting my suggestion.
1 - Use Django Ninja to make API calls asynchronous.
2 - You can use task queues like Celery.
3 - Then combine them and check the result.
4 - Compare the results of 1-2-3 with Ruby on Rails and also if you can with Nodjs.
Otherwise, I am not an expert in test configuration

Okay, thanks. I was wondering about async Django in the past as well, but it looks like it's not officially supported—only available through third-party packages.

Django >5.1 now supports asynchronous.
(https://docs.djangoproject.com/en/5.1/topics/async/#asynchronous-support)
But it is poorly designed, according to several reviews.
This is why I told you to use Django Ninja.
(https://django-ninja.dev/)
You can check out some use cases and benefits of using Django Ninja.

@zakimimit got it

Hello @antonputra ,
I found an article that might be it will be so helpful
https://jonathanadly.com/is-async-django-ready-for-prime-time
I hope you make the comparison between Django vs Nodjs then Django vs ruby or Nexjs
My best regards


Handle data that is not a multiple of 100k rows in size

Sorry for the delay in that. Really appreciate the contribution.


Improve instant articles support

Coverage increased (+0.08%) to 96.592% when pulling 517874892a8b47ed389230c542de801e7e521e47 on feature/instant_articles_improved into 40c240ace955790c056917def4f13372f1396f1a on develop.

[Current coverage][cc-pull] is 92.68%

Merging [#239][cc-pull] into [develop][cc-base-branch] will decrease coverage by -0.24%

@@            develop       #239   diff @@
==========================================
  Files            19         19
  Lines          1147       1203    +56
  Methods           0          0
  Messages          0          0
  Branches        135        142     +7
==========================================
+ Hits           1066       1115    +49
- Misses           40         41     +1
- Partials         41         47     +6

File ...cms_blog/managers.py (not in diff) was modified. more

Misses -2
Partials 0
Hits +2

File ...gocms_blog/models.py was modified. more

Misses -3
Partials 0
Hits +3

Powered by Codecov. Last updated by [40c240a...5178748][cc-compare]
[cc-base-branch]: https://codecov.io/gh/nephila/djangocms-blog/branch/develop?src=pr
[cc-compare]: https://codecov.io/gh/nephila/djangocms-blog/compare/40c240ace955790c056917def4f13372f1396f1a...517874892a8b47ed389230c542de801e7e521e47
[cc-pull]: https://codecov.io/gh/nephila/djangocms-blog/pull/239?src=pr

Coverage increased (+0.3%) to 96.846% when pulling b1b6c91050c2032ed70e1ee5324d7539e735aa1d on feature/instant_articles_improved into 5669b28dc8cfcc4493af0f89e0ab254dc19924a4 on develop.


refactor: use modueVisitor for no-extraneous-dependencies

Hi.
I start with simple refactoring but I already have few suggestions with code changes and tests that will make no-extraneous-dependencies more flexible for monorepo projects.
This PR is a warmup. I'd like to see if our interaction goes well.
I hope you will enjoy my contribution.
Cheers,
Adam

Coverage decreased (-0.04%) to 97.697% when pulling ed7e57f1d271a70a8776b043fc15141b832b3955 on CloudinaryLtd:master into 92caa3594e0f8d7bf143dedba0c7c2b47b541f34 on benmosher:master.

I don't think so, this is just refactoring. I will add several PRs with tests from our forked rule that we really miss.

Thanks! I can merge it now without them, since existing tests pass, but more test cases are always appreciated, so I'll wait for those if you're OK with that :-)

I think for this particular PR there is no more cases.

@adamborowski can you please check "allow edits" on the RHS of the PR? also, there's a github bug where PRs from forks that aren't your own (CloudinaryLtd vs adamborowski) won't grant the permission properly, so I'll need you to add me to that fork so I can force push to the PR branch. Thanks!

Added. There is no option to allow edit on the right side

Interesting, maybe they "fixed" their bug by hiding the checkbox in those cases :-p Thanks, I should be able to land this shortly.


[Up issue] seeing error with dns_only flag

So when running kraken-CI, with kraken, i have found these errors:
[gke] TASK [roles/kraken.services : set cluster fact] ********************************
[gke] fatal: [localhost]: FAILED! => {"failed": true, "msg": "The conditional check '(kraken_action == 'up') and not ( dns_only | bool )' failed. The error was: error while evaluating conditional ((kraken_action == 'up') and not ( dns_only | bool )): 'dns_only' is undefined\n\nThe error appears to have been in '/kraken/ansible/roles/kraken.services/tasks/run-services.yaml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: set cluster fact\n  ^ here\n"}

my suspicion is that the file found in ansible/roles/kraken.config/main.yaml which has
dryrun: false
also needs
dns_only: false
BUT this is a crutch the real issue is the bash and needs to be fixed there.

Correction for filepath:
ansible/roles/kraken.config/defaults/main.yaml
(it's not in the main tasks file)

@guineveresaenger thanks for the correction :)

I'm going to do this now.  its a blocker for getting a 1.8 conformance PR up.

I just did

@guineveresaenger can you link here?

one sec

https://github.com/samsung-cnct/kraken-lib/pull/905

this is fixed.


execprog: correctly handle fault injections

syz-execprog doesn't utilize info about fault injections from a prog log.
Since syz-execprog is used by the repro package to reproduce crashes, crashes caused by fault injections might not reproduce.
Fixes #410

LGTM


Single Div Sizing Affecting Spacing of Everything Else

Heya,
So I'm making a web application that implements shapeshift to a bunch of dynamically generated elements, each generated from their own plugin/library/code I've written, etc. Essentially, my system builds each element (which I'll call modules from here) to a certain div, and then I call shapeshift on that div. One library in particular that I'm implementing is nipplejs.js. There's something interesting going on...
Essentially, for every nipple that is generated I have to specify the height and width of it's container (plus some padding so that when I unlock the page I can drag nipples around as well as other things). When nipplejs.js makes the nipple it appends it to a div that was pre-appended to the div where I'm building everything (and calling shapeshift on). This then modifies the "order" of everything so the nipples go first. Shapeshift is then, I think, reading the height/width of the nipple (which is first in the order of modules) and then using that to set the spacing for everything else. Here is a picture of what I am describing:

If I don't build the nipples, everything works fine:

Any thoughts?
Thanks in advance,
Daniel

@McPants Any thoughts?

@dggsax Fun project name :)
If I understand you right, it seems like you are wanting to add items to a collection after Shapeshift has already been instantiated.
This will work - I would recommend just destroying the previous Shapeshift instance and create a completely new one immediately after. It should be fast enough that there is no change in DOM position from their original points.
I hope this helps.


Creating Low Level L2 specification for TVsettings

To create the low level L2 specification for TV settings

This task is now not required.


Update gitignore for mac OS files

ignore common mac files

@tomanderson2 I haven't seen the question mark in .gitignore before, thanks for pointing that out.  Why have one trail .DS_Store, though?  I haven't seen that happen before.

Actually, I've never seen .DS_Store named anything except exactly that.  Where does that vary?

@ajnelson-nist I'll be honest and say I don't know... I've been using those same .gitignore values for mac on projects for a while now and just copy / pasted it from one on my machine.
The official github gitignore doesn't include it, but others (like this which is the second hit in google https://gist.github.com/pcstl/d118342ef049a086fb555c9795beb4ba) do.
I can remove it for now to avoid any issues

Huh.  That gist points at this repository, where I would expect the pattern to appear in the macos file...
https://github.com/github/gitignore/blob/master/Global/macOS.gitignore
For now, please reduce the .DS_Store lines to just spell exactly .DS_Store.

@tomanderson2 I added one follow-on commit to reduce the chance of files looking like .DS_Store being ignored.
Thanks for the patch!


DA14531 chip support

I don't have any experience on what would be needed, I see that probe-rs uses CMSIS packs for getting kind of the gist of the chip but it also has a flashing method which I wouldn't know how to implement.
There is an open-source implementation on flashing Dialog Semiconductors Smartbond devices. Maybe that helps

We extract the flash algorithm from the CMSIS-pack, so if there is one available, we could use that. You can use https://developer.arm.com/tools-and-software/embedded/cmsis/cmsis-search to search for a pack, and then use the target-gen tool to generate the YAML files:
cargo run -p target-gen -- <pack_file>.zip out

See https://github.com/probe-rs/probe-rs/tree/master/target-gen for more info about target-gen.

I tried running it and it didn’t include any flashing method, so it’s something that will have to get added in the code ;-;

So I gave an empty flashing method and this still happens
$ probe-rs-cli info
Probing target via JTAG
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
ERROR probe_rs::probe::jlink::arm: Unexpected DAP response: 7
Error showing ARM chip information: An error occured in the communication with an access port or debug port.
ERROR probe_rs_cli::info: Error: The version '15' of the debug transport module (DTM) is currently not supported.
Probing target via SWD
Error showing ARM chip information: An error occured in the communication with an access port or debug port.

Please try running cargo run -p probe-rs-cli -- debug --chip cortex-m0. Adding a new target is not really necessary, just using a generic description should be enough to work.
The info command can sometimes be a bit misleading, because it tries to autodetect the chip. This can sometimes put the chip in a weird state, so trying another command might work better.

Yeah that worked, what should I do now?

Without flash algorithm, you will be able to debug the chip, but you can't flash any new software to it.
Unfortunately, if there is no flash algorithm in the CMSIS pack, the only solution is to either write it manually, or find another source.
probe-rs can work with flash algorithms which follow this specification: https://open-cmsis-pack.github.io/Open-CMSIS-Pack-Spec/main/html/flashAlgorithm.html
An example for a flash algorithm written in Rust can be found here: https://github.com/rp-rs/flash-algo


"Exception: Failed to find regex match in html"

I was seeing this issue awhile back, but it "went away" but it appears to have returned.
$ python3.5 ~/imgur_downloader/imgur_downloader/imgurdownloader.py https://imgur.com/ADImt3B
Traceback (most recent call last):
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 481, in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 430, in main
    downloader = ImgurDownloader(url)
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 156, in __init__
    self.json_imageIDs = list(self._init_image_ids_with_json(html=html))
  File "/home/mmattox/imgur_downloader/imgur_downloader/imgurdownloader.py", line 188, in _init_image_ids_with_json
    raise Exception("Failed to find regex match in html")
Exception: Failed to find regex match in html

And now it works again.  I swear imgur is gaslighting me.

Having this error right now, looks like imgur just started requiring auth to access certain albums.

@crobo1337 you mean to access private albums or just some public ones?

It looks like any posts tagged as NSFW require a login now.
https://blog.imgur.com/2019/10/14/discontinuing-support-for-nsfw-reddit-subsections/
Will likely require a re-work to grab an Auth token and pass that with the
request. Or just using the api directly.
On Tue, Oct 15, 2019, 12:48 PM James T<EMAIL_ADDRESS>wrote:

@crobo1337 https://github.com/crobo1337 you mean to access private
albums or just some public ones?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jtara1/imgur_downloader/issues/21?email_source=notifications&email_token=AH4ZGDKOXCAQFGOHDCLUTGLQOXX47A5CNFSM4GJECO7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBJOXSY#issuecomment-542305227,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH4ZGDOT6XYMNXPS5GZLXZTQOXX47ANCNFSM4GJECO7A
.

Looks like you can just embed an existing global api key to get it working.
https://github.com/mikf/gallery-dl/issues/446

gallery-dl  supports downloading from the variety of links this project supports. I'm going to archive this repo.
Check for support for this there or report an issue there.


explicit closes() are not need in context block

(just spotted this while looking at the code)

I think this is a good candidate dataset for a code review, since it could be simplified using tools from cldfbench, e.g. replacing self.dir.joinpath('raw') with self.raw_dir and generally making use of the methods of https://github.com/cldf/cldfbench/blob/9a4ed2dd637f6f80f8e3fe8e789b9905aef166b6/src/cldfbench/datadir.py#L30

In fact, I think, proper usage of cldfbench tools should push this dataset's python module to <100 lines of code - which may translate to one "screen-full" on big enough screens :)

@MacyL, as you were also involved in this, and also wanted to learn more lexibank usage, please have a close look on this code review here, as it may be important.

In fact, I'd ask @tresoldi, @Bibiko, @chrzyki also to have a close look here (apart from @SimonGreenhill and @xrotwang already looking into it): we can use this as an example for major aspects of coding, also because it makes active use of orthoprofiles.
BTW: we may in fact make common code reviews for all datasets that are maximally different, specifically based on their usage of adding values:

kitchensemitic should not add any forms, as it is too messy
chenhmongmien is tinkering with clean_form, which can be handled via dataset-attributes now
beidazihui is using add_form_with_segments, so a clear-cut case for pre-segmented data

Maybe we find a third nice usecase, maybe IDS or ABVD, we should also have an example of models.lexeme being modified.

A, and bodtkhobwa is useful to look at as it illustrates partial cognates.


Project license?

Currently, the project doesn't state any license. Could you please state it?
If I am to be asked, I'd like to see a permissive one, like MIT or BSD or Apache-2.

Currently, the project doesn't state any license. Could you please state it?
If I am to be asked, I'd like to see a permissive one, like MIT or BSD or Apache-2.

It's MIT. You may do everything you want.

That's great, but could you please clarify that somewhere near the sources? Thanks!

In particular, the MIT license requires me to attach a copy of the copyright notice if I fork the repository (or portions of code from it).
And it's kinda hard to copy the copyright notice if there's no notice to begin with 😅

That's great, but could you please clarify that somewhere near the sources? Thanks!

Done


Market history should be shown when market is closed

So users can see what was reported

@Robiquet was the market reported just shortly around when you noticed this? The market now has the history. It's setup to show when markets are reported, disputed, or resolved so I wonder if there just a delay between when the data was indexed?

@Robiquet was the market reported just shortly around when you noticed this? The market now has the history. It's setup to show when markets are reported, disputed, or resolved so I wonder if there just a delay between when the data was indexed?

Yeah looks like it was reported fairly recently, so perhaps that is the issue


Image Created Doesn't Work For ARM Architecture

After the images are built, gives an error that 'Image created might not work for ARM architecture' and it actually doesn't work. Streamlit throws connection errors. How can we make the built microservice work for ARM architecture? Can we declare the architecture type in Docker file?

Thanks a lot for raising this issue. I will try to reproduce the issue on Monday when having access to an m1 computer.

I tried to have this as a workaround before starting to generate:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
It doesn't work. But after I quite the generation, I can build the first version by just using:
docker build .

@mertozlutiras @mertozlutiras-hyrd Hi, did this fix solve your issue?

That is great news. Thanks for raising the issue

doesnt work on mac2 anymore


MultiSplitPane should not grab touches inside content

Fixing an issue where the MultiSplitPane was grabbing touches inside the content area - it should only consume touches on the handles which is the interaction area of the class. This was blocking other listeners behind the MultiSplitPane.

I'm pretty sure returning true does not affect event propagation within stage2d. From InputListener#touchDown javadocs:
	/** Called when a mouse button or a finger touch goes down on the actor. If true is returned, this listener will receive all
	 * touchDragged and touchUp events, even those not over this actor, until touchUp is received. Also when true is returned, the
	 * event is {@link Event#handle() handled}.
	 * @see InputEvent */

From Event#handle()
	/** Marks this event as handled. This does not affect event propagation inside scene2d, but causes the {@link Stage} event
	 * methods to return true, which will eat the event so it is not passed on to the application under the stage. */

Which means that other listeners in stage2d will receive event but it won't be passed to next InputProcessor in InputMultiplexer, not sure if you meant that.
I'll merge this but I need to fix cursor handling anyways. Seems like some libgdx update changed how exit() is called which now resets custom cursor before dragging has been finished. This also affects VisSplitPane.
Thanks!

Fixed. I've also added you to contributors list. Note that next snapshot version was set to 1.4.0-SNAPSHOT if you want to try it out before release.

Thanks - It was another InputProcessor that was blocked for us here, not other scene2d UI - that's an interesting distinction, I wasn't aware of that. We are almost always using a second InputProcessor so i'm pretty conservative on returning true only when needed.


Get "invalid value (nan) encountered in jit" even when jit disabled globally

Description
In my following code clearly there's no jit anywhere, but the error suggests that the issue comes from jit.
import jax
jax.disable_jit(True)
jax.config.update('jax_platform_name', 'cpu')
jax.config.update("jax_debug_nans", True)
import jax.numpy as jnp
jnp.log(-10)

Error information:
...
...
Traceback (most recent call last):
  File "/home/jiace/shadow/TN/shadow_vmc/debug.py", line 6, in <module>
    jnp.log(-10)
FloatingPointError: invalid value (nan) encountered in jit(log). Because jax_config.debug_nans.value and/or config.jax_debug_infs is set, the de-optimized function (i.e., the function as if the `jit` decorator were removed) was called in an attempt to get a more precise error message. However, the de-optimized function did not produce invalid values during its execution. This behavior can result from `jit` optimizations causing the invalid value to be produced. It may also arise from having nan/inf constants as outputs, like `jax.jit(lambda ...: jax.numpy.nan)(...)`.

It may be possible to avoid the invalid value by removing the `jit` decorator, at the cost of losing optimizations.

If you see this error, consider opening a bug report at https://github.com/jax-ml/jax.

System info (python version, jaxlib version, accelerator, etc.)
jax:    0.4.36
jaxlib: 0.4.36
numpy:  1.26.1
python: 3.11.5 | packaged by conda-forge | (main, Aug 27 2023, 03:34:09) [GCC 12.3.0]
device info: NVIDIA GeForce RTX 2060-1, 1 local devices"
process_count: 1
platform: uname_result(system='Linux', node='jiace-XPS-8930', release='5.4.0-150-generic', version='#167~18.04.1-Ubuntu SMP Wed May 24 00:51:42 UTC 2023', machine='x86_64')
$ nvidia-smi
Mon Dec 30 22:29:29 2024
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  On   | 00000000:01:00.0 Off |                  N/A |
| 32%   28C    P2    15W / 160W |    131MiB /  6144MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2745      G   /usr/lib/xorg/Xorg                 16MiB |
|    0   N/A  N/A     13172      C   ...envs/py311/bin/python3.11      110MiB |
+-----------------------------------------------------------------------------+

Thanks for the report! Just to be clear, jax.disable_jit is a context manager, and does not affect the global configuration. If you want to disable JIT globally, you should do something like this:
jax.config.update('jax_disable_jit', True)

Even with this change, however, the same error message appears. This is due to the fact that jax_disable_jit is more of a debugging tool than something we expect users to configure as a matter of course, and so the error message is written assuming more typical configurations. We assume that the user advanced enough to use this setting is also advanced enough to understand the context of the error message.
The fix, if we were to do it, would be to add a specific check for jax_disable_jit and manually create an alternative error message in this location. In my view, this isn't worth the added complexity.
What do you think?

Thanks for your response! I guess my question is more related to the other side: the message seems to suggest that there's an optimized function that generates nan, and there's another de-optimized function that does not generate nan. However in this case log(-10) is always nan, so why it says that there's some de-optimized function that does not generate nan? Actually I have some complicated function in my realistic setting which has the same error (maybe related to autograd of svd which is natually unstable), and I hope that I can disable jit globally to remove the nan but I can't.

Sorry, that error message is busted. #25519 will fix it, but for now the "de-optimized function doesn't generate a nan" erroneously happens every time.

Here's what I get when I run on the #25519 branch:
$ python 25701.py
Invalid nan value encountered in the output of a jax.jit function. Calling the de-optimized version.
Traceback (most recent call last):
  File "/usr/local/google/home/mattjj/packages/jax/25701.py", line 6, in <module>
    jnp.log(-10)
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 342, in log
    return log_p.bind(x)
           ^^^^^^^^^^^^^
FloatingPointError: invalid value (nan) encountered in log
--------------------
For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.

I think this is a decent error message, but the phrasing is still a bit confusing with disable_jit=True present. @emilyfertig let's think about disable_jit=True, either in #25519 or a follow-up.
@SUSYUSTC sorry for the confusion! We hope to land that PR soon. In the meantime, if you think debug_nans isn't giving you a useful error message where it should, you could try patching that branch.

Thanks a lot! That is indeed what I expected to have. Another question is related to nan appeared in autograd. Say I have a function whose value is valid but grad is not. Is it possible that jax can give me the traceback which tells me which exact line generates nan in a very complicated function? Is this feature currently available in this branch or even somewhere in the main branch? Here's an example:
import jax
jax.config.update('jax_platform_name', 'cpu')
jax.config.update("jax_debug_nans", True)
import jax.numpy as jnp

def func(x):
    y = x ** 2
    z = jnp.sqrt(y)
    return z

print(func(0.0))
print(jax.grad(func)(0.0))

Clearly the issue is that sqrt is not differentiable at 0.0, so I hope it could pin to the z = jnp.sqrt(y) line. However the error message is
...
Traceback (most recent call last):
  File "debug.py", line 15, in <module>
    print(jax.grad(func)(0.0))
          ^^^^^^^^^^^^^^^^^^^
FloatingPointError: invalid value (nan) encountered in jit(mul).
...

Here's the traceback on the branch:
0.0
Traceback (most recent call last):
  File "/usr/local/google/home/mattjj/packages/jax/25701_2.py", line 14, in <module>
    print(jax.grad(func)(0.0))
  File "/usr/local/google/home/mattjj/packages/jax/25701_2.py", line 8, in func
    y = x ** 2
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/numpy/array_methods.py", line 1049, in op
    return getattr(self.aval, f"_{name}")(self, *args)
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/numpy/array_methods.py", line 573, in deferring_binary_op
    return binary_op(*args)
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/numpy/ufuncs.py", line 2645, in power
    return lax.integer_pow(x1, x2)
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 405, in integer_pow
    return integer_pow_p.bind(x, y=y)
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 2672, in _integer_pow_jvp
    return _zeros(g) if y == 0 else mul(g, mul(_const(x, y), integer_pow(x, y - 1)))
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 453, in mul
    return mul_p.bind(x, y)
jax._src.source_info_util.JaxStackTraceBeforeTransformation: FloatingPointError: invalid value (nan) encountered in mul
When differentiating the code at the top of the callstack:
/usr/local/google/home/mattjj/packages/jax/25701_2.py:8:8 (func)

The preceding stack trace is the source of the JAX operation that, once transformed by JAX, triggered the following exception.

--------------------

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/google/home/mattjj/packages/jax/25701_2.py", line 14, in <module>
    print(jax.grad(func)(0.0))
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 2815, in _mul_transpose
    return [_unbroadcast(x.aval, mul(ct, y)), None]
                                 ^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 453, in mul
    return mul_p.bind(x, y)
           ^^^^^^^^^^^^^^^^
FloatingPointError: invalid value (nan) encountered in mul
When differentiating the code at the top of the callstack:
/usr/local/google/home/mattjj/packages/jax/25701_2.py:8:8 (func)
--------------------

We'd like to improve this further since it's not as easy to read as we'd like, but there's interesting information there:

the first traceback shows you the primal code that was problematic, and is pointing to the differentiation rule for the x ** 2 line)
the second traceback shows you the backward pass problem (and since it's the backward pass, it doesn't include any of your code in the stacktrace), namely the transpose rule _mul_transpose.

The reason the issue in this particular example shows up with the mul and not the sqrt is that, effectively, the sqrt VJP rule actually produces an inf cotangent, and the nan only arises when we do the multiply against x==0. when applying the VJP of the mul.
If we instead set jax.config.update('jax_debug_infs', True), we get:
0.0
Invalid nan value encountered in the output of a jax.jit function. Calling the de-optimized version.
Traceback (most recent call last):
  File "/usr/local/google/home/mattjj/packages/jax/25701_2.py", line 14, in <module>
    print(jax.grad(func)(0.0))
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/25701_2.py", line 9, in func
    z = jnp.sqrt(y)
        ^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/numpy/ufuncs.py", line 1146, in sqrt
    return lax.sqrt(*promote_args_inexact('sqrt', x))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 409, in sqrt
    return sqrt_p.bind(x)
           ^^^^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 2582, in <lambda>
    ad.defjvp2(sqrt_p, lambda g, ans, x: mul(g, div(_const(x, 0.5), ans)))
                                                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/google/home/mattjj/packages/jax/jax/_src/lax/lax.py", line 462, in div
    return div_p.bind(x, y)
           ^^^^^^^^^^^^^^^^
FloatingPointError: invalid value (inf) encountered in div

That points to the divide-by-zero that happens in the JVP of sqrt, and in particular to "25701_2.py, line 9, in func", as we might expect.
WDYT?

Thanks a lot for the explanation! It is super clear. Actually I can get the same message in the main branch code but I didn't understand its meaning.


Failed tests from composite clusters are not shown in junit.xml

Expected Behavior
Failed are shown in junit.xml

Current Behavior
Failed are not shown in junit.xml

Failure Information (for bugs)
https://circleci.com/gh/networkservicemesh/networkservicemesh/88280#tests/containers/0

It seems fixed by Artyom


9.0.x SplitDNS is not working

On investigation of #7315, I found that SplitDNS is not working at master & 9.0.x with the same configs which I used for 8.1.x.
Debug log says the splitdns fallback to default dns resolver.
[Nov 13 16:18:29.545] [ET_NET 11] DEBUG: <SplitDNS.cc:186 (getDNSRecord)> (splitdns) Called SplitDNS::getDNSRecord(example.com)
[Nov 13 16:18:29.545] [ET_NET 11] DEBUG: <SplitDNS.cc:200 (getDNSRecord)> (splitdns) Fail to match a valid splitdns rule, fallback to default dns resolver

It looks like SplitDNS::findServer() always returns DNS_SRVR_UNDEFINED when the fast path is enabled (SplitDNS::m_bEnableFastPath).

The removing TCL dependency change from HostLookup looks root cause.
https://github.com/apache/trafficserver/commit/a7d06b85e5253ac118dda36bef11311d8d9c1ffe

With #7320 fix, the assertion of mutex in Continuation::handleEvent() is failed. Which is the same symptom as #7315 (crash on 8.1.x). Please note that the 8.1.x doesn't have the assertion.
(lldb) bt
* thread #2, name = '[ET_NET 0]', stop reason = signal SIGABRT
  * frame #0: 0x00007fff6e38633a libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff6e442e60 libsystem_pthread.dylib`pthread_kill + 430
    frame #2: 0x00007fff6e30d808 libsystem_c.dylib`abort + 120
    frame #3: 0x000000000006a04e libtscore.10.dylib`ink_abort(message_format="%s:%d: failed assertion `%s`") at ink_error.cc:99:3
    frame #4: 0x000000000006716c libtscore.10.dylib`::_ink_assert(expression="!mutex || mutex->thread_holding == this_ethread()", file="/Users/masaori/src/github.com/apache/trafficserver-asf-master/iocore/eventsystem/I_Continuation.h", line=218) at ink_assert.cc:37:3
    frame #5: 0x0000000100004f5c traffic_server`Continuation::handleEvent(this=0x000000000702f000, event=0, data=0x0000000000000000) at I_Continuation.h:218:5
    frame #6: 0x0000000100294914 traffic_server`DNSConnection::trigger(this=0x0000000007043c20) at DNSConnection.cc:88:12
    frame #7: 0x00000001003bd1fb traffic_server`NetHandler::waitForActivity(this=0x0000000003ec7080, timeout=39995000) at UnixNet.cc:534:27
    frame #8: 0x00000001003fe701 traffic_server`EThread::execute_regular(this=0x0000000003ec3000) at UnixEThread.cc:303:14
    frame #9: 0x00000001003feb7d traffic_server`EThread::execute(this=0x0000000003ec3000) at UnixEThread.cc:364:11
    frame #10: 0x00000001003fcd3b traffic_server`spawn_thread_internal(a=0x0000000000d17200) at Thread.cc:92:12
    frame #11: 0x00007fff6e443109 libsystem_pthread.dylib`_pthread_start + 148
    frame #12: 0x00007fff6e43eb8b libsystem_pthread.dylib`thread_start + 15


v5.2.0

Fix https://github.com/lucoiso/UEAzSpeech/issues/37
Closes https://github.com/lucoiso/UEAzSpeech/issues/36 https://github.com/lucoiso/UEAzSpeech/issues/35 https://github.com/lucoiso/UEAzSpeech/issues/22

Note: Created a first PR to development branch to adapt the test project to all modifications before merging into the main branch


I needed double quotes for more than 1 -clp:"parameter1;parameter2"

for example:
Does not work:
> msbuild SolutionName.sln /p:NuGetRestorePackages=false /verbosity:quiet /p:WarningLevel=0 /clp:ErrorsOnly;Summary
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1009: Project file does not exist.
Switch: SolutionName.sln
> msbuild SolutionName.sln /p:NuGetRestorePackages=false /verbosity:quiet /p:WarningLevel=0 /clp:"ErrorsOnly;Summary"
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
44 Warning(s)
0 Error(s)

Works a treat!!
edit: removed additional remarks as I thought i was commenting on a page rather than logging a github issue.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e6254da8-fbe7-cc2a-2c10-1ba918a61039
Version Independent ID: 7d3100b1-8ab0-f17f-6494-d183bdeb9081
Content: MSBuild Command-Line Reference - Visual Studio
Content Source: docs/msbuild/msbuild-command-line-reference.md
Product: visual-studio-windows
Technology: msbuild
GitHub Login: @Mikejo5000
Microsoft Alias: mikejo

@rainersigwald Rainer, is it generally true that double quotes are needed for multiple parameter entries?

It depends on your operating system and shell's escaping rules. ; is a special character in many shells including PowerShell and bash, but it isn't in cmd.exe. The example command line given works fine in cmd:
C:\play>msbuild SolutionName.sln /p:NuGetRestorePackages=false /verbosity:quiet /p:WarningLevel=0 /clp:ErrorsOnly;Summary
Microsoft (R) Build Engine version 16.3.0-preview-19426-01+faf5e5d75 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.60

Since other shells are becoming more common for MSBuild users, we should probably update the examples to add quotes around any command-line argument that contains a semicolon.

Thanks, I'll plan to update the doc.

Thanks, I was a bit frustrated when I wrote this initially, and should say i am not singling out msbuild only, this sort of thing crops up with other utilities and other shells and I feel this confusion could really be eliminated by linking to a page that keeps us weary of the different shells and contexts that we could be making calls from.  Would be a huge productivity boost.
For example, I still had problems with using double quotes when running this in Windows Docker containers.  I switched the SHELL to powershell not realizing that this is not equivalent to being  in a [can i call it?] native powershell session but in actuality every line of your Docker for Windows Dockerfile is invoking PS from cmd.exe like so:  powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $params = "ErrorsOnly;Summary" ; msbuild $ENV:SOLUTION_FILENAME -p:NuGetRestorePackages=false -verbosity:quiet -p:WarningLevel=0 -clp:'ErrorsOnly;Summary's  --- so actually single quotes were best for powershell

Double quotes are not the right fix then. Are there scenarios where single quotes won't work?

I think it depends on the user intent, so in bash for example double-quotes allow expansion of variables, and single quotes do not.  For now, I have a PR for the MSBuild command-line topic that says to use quotes (single or double as appropriate) if running from a shell other than the Windows command prompt.

Added a note to mention that if you are using a shell other than cmd, you might have to use single or double quotes.

Reopening to discuss whether to do any global modifications to the content to add single or double quotes.

Discussed and closing - customers who call MSBuild from a shell environment should refer to the documentation for their shell.


Document use of activator template

It's great, let's let our users know :)

+1

+1

Updated the readme to include activator usage.