text:
Docker image v0.17.0 fails to run

Hello,
I am trying to run the DebiAI in an Openshift cluster using the docker image v0.17.0, but it seems there is some issue of a python package in the image.
I got the following error logs:
Traceback (most recent call last):
  File "websrv.py", line 1, in <module>
    import connexion
  File "/usr/local/lib/python3.8/site-packages/connexion/__init__.py", line 5, in <module>
    from .apis import AbstractAPI  # NOQA
  File "/usr/local/lib/python3.8/site-packages/connexion/apis/__init__.py", line 1, in <module>
    from .abstract import AbstractAPI  # NOQA
  File "/usr/local/lib/python3.8/site-packages/connexion/apis/abstract.py", line 13, in <module>
    from ..operations import make_operation
  File "/usr/local/lib/python3.8/site-packages/connexion/operations/__init__.py", line 1, in <module>
    from .abstract import AbstractOperation  # noqa
  File "/usr/local/lib/python3.8/site-packages/connexion/operations/abstract.py", line 9, in <module>
    from ..decorators.response import ResponseValidator
  File "/usr/local/lib/python3.8/site-packages/connexion/decorators/response.py", line 11, in <module>
    from .validation import ResponseBodyValidator
  File "/usr/local/lib/python3.8/site-packages/connexion/decorators/validation.py", line 13, in <module>
    from ..json_schema import Draft4RequestValidator, Draft4ResponseValidator
  File "/usr/local/lib/python3.8/site-packages/connexion/json_schema.py", line 6, in <module>
    from openapi_spec_validator.handlers import UrlHandler
ModuleNotFoundError: No module named 'openapi_spec_validator.handlers'

Can you please point us to the correct image?

Thank you for noticing, a fix is on the way

debiai/app:0.17.2 or debiai/app:latest  should work fine, sorry for the inconvenience

Thanks for the help, I tested the latest image and it works fine! 👍🏽
So, I am closing this issue.

repo: debiai/debiai


text:
Move all handlers from core in a new package handler?

A new package core.handler and move all handlers (*Handler.java, route.*Handler.java) in this package.

I agree, the core package is a little fat.  Another alternative would be moving *Handler.java into core.route?  We already have that and they are directly related - a Route has a url, method, and a Handler.  That would add 5-6 classes to core.route perhaps making it too fat.  If we a create a new package that moves 5-6 classes out of core and 5-6 classes out of core.route.  I'm fine with whatever you think is best.
Unrelated, but looking at the Route constructor I'm struck by feeling the signature is backwards:
public Route(String uriPattern, String requestMethod, RouteHandler routeHandler)

I think everywhere else we specify the order as METHOD URL (.e.g. GET /webjars/jquery...)

source: gharchive/issue

authors: decebals gitblit

repo: decebals/pippo

license_type: permissive

license_source: github-api


text:
Server static resources from the root url

See https://groups.google.com/forum/#!topic/pippo-java/P9XlmtrmaxA

// add public static resources ("/" is mapped to "/src/main/resources/public")
addPublicResourceRoute("/");


text:
Subscription

@lalc We don't have the wireframe for this page at the moment. But I am attaching a reference wireframe from iGrant.io ED here.

Need to discuss this before finalising the screen

authors: georgepadayatti lalc


text:
Real time simulation

What changes do you make in this PR?
#211

Please describe why you create this PR

Checklist

[x] I have merged the latest main branch into current branch.
[x] I have run bash scripts/format.sh before merging.
Please use "squash and merge" mode.

What is the minimal script I need to use to verify the effectiveness of this PR?

What is the minimal script I need to use to verify the effectiveness of this PR?

What is the minimal script I need to use to verify the effectiveness of this PR?

Every script, since the force fps function is switched to do real simulation. Press 'f' to experience

What is the minimal script I need to use to verify the effectiveness of this PR?

Every script, since the force fps function is switched to do real simulation. Press 'f' to experience

close #211

close #211

source: gharchive/pull-request

repo: decisionforce/pgdrive


text:
AsyncDDGS returns different number of results everytime it's executed.

Let's say I search for the term "amazon", sometimes I receive 30 results, sometimes 70, sometimes 100. It's never inconsistent, what's wrong here?
How is this package working with DDG to retrieve search results and does it relates to this issue?
Code:
from duckduckgo_search import AsyncDDGS

results = await AsyncDDGS(proxies=None).news(
    keywords="amazon", region="wt-wt", safesearch="off", timelimit="d",
    max_results=100
)
print(len(results))

Show me the code.

license: MIT


text:
feat: add package golang-github-mattn-go-runewidth

Imported from debian.

/check obs

/approve

authors: YukariChiba Zeno-sole hudeng-go


text:
Resource Leak Issue with Files.list in ai.djl.util.Utils

Description
In the ai.djl.util.Utils class of the ai.djl:api version 0.26.0, there appears to be an issue with the usage of Files.list in the getNestedModelDir method. Specifically, the stream returned by Files.list(modelDir) is not being closed properly, which may lead to file descriptor leaks.
Expected Behavior
The expected behavior is that any resources opened via Files.list(modelDir) should be closed after their use to prevent file descriptor exhaustion and ensure proper resource management.
Error Message
N/A (This is a potential resource leak issue rather than a runtime error that generates a message.)
How to Reproduce?
The issue can be observed in the code snippet provided but might not manifest as a direct error during execution. It is a best practice concern rather than a functional bug that crashes the application.
Steps to reproduce
Since this is a resource management issue, it doesn't produce a direct error trace but can be verified through code inspection or static analysis tools that check for resource leaks.

Inspect the code of ai.djl.util.Utils.getNestedModelDir, ai.djl.util.Utils.getCurrentEpoch, ai.djl.util.ClassLoaderUtils.scanDirectory, and ai.djl.util.ClassLoaderUtils.findImplementation.
Notice the lack of try-with-resources or explicit .close() calls on the Stream returned by Files.list().

What have you tried to solve it?
I propose incorporating try-with-resources to ensure the Stream is closed automatically:
public static Path getNestedModelDir(Path modelDir) {
    if (Files.isDirectory(modelDir)) {
        try (Stream<Path> paths = Files.list(modelDir)) {
            // handle actual model directory is subdirectory case
            List<Path> files = paths
                    .filter(p -> !p.getFileName().toString().startsWith("."))
                    .collect(Collectors.toList());
            if (files.size() == 1 && Files.isDirectory(files.get(0))) {
                return files.get(0);
            }
        } catch (IOException e) {
            throw new AssertionError("Failed to list files: " + modelDir, e);
        }
    }
    return modelDir.toAbsolutePath();
}

Similar modifications should be applied to the mentioned methods in Utils and ClassLoaderUtils.
Environment Info
N/A

@yhzdys
From API point of view, we should close the Stream, however, there is no resource leak in Files.list() case. The DirectoryStream object doesn't hold any resource.

😃Thank you for your response.

Files.list() relies on file descriptors to manage the underlying file system resources. However, while Java's Garbage Collection automatically handles the closure of DirectoryStream objects created by Files.list(), there's a potential risk of file descriptor exhaustion before GC is triggered.

This occurs because GC operates non-deterministically, meaning it's uncertain when exactly it will run to reclaim resources. Consequently, if file descriptors aren't properly managed and closed, there's a possibility of exhausting system resources, leading to performance issues or even system crashes.

😃Thank you for your response.  Files.list() relies on file descriptors to manage the underlying file system resources. However, while Java's Garbage Collection automatically handles the closure of DirectoryStream objects created by Files.list(), there's a potential risk of file descriptor exhaustion before GC is triggered.  This occurs because GC operates non-deterministically, meaning it's uncertain when exactly it will run to reclaim resources. Consequently, if file descriptors aren't properly managed and closed, there's a possibility of exhausting system resources, leading to performance issues or even system crashes.

Upon reviewing the discussion at Stack Overflow, I've realized my previous understanding was mistaken. The feedback there confirms that Java's GC, while eventually handling DirectoryStream objects, does not reliably or promptly close file descriptors. To avoid leaks and ensure efficient resource management, employing try-with-resources is the recommended approach.
In light of this, updating methods like ai.djl.util.Utils.getNestedModelDir() with try-with-resources would align with best practices, ensuring file descriptors are closed in a timely manner. My previous assertion lacked accuracy, and I concur with the necessity for these improvements.

authors: frankfliu yhzdys

repo: deepjavalibrary/djl


text:
Yolo Model

Description
Implement a YOLO model and add it to the DJL model zoo
References

https://arxiv.org/abs/1506.02640

We already have YOLO model, we can close thise now.

This is for a Yolo imperative model (as we only have SSD). We only have a symbolic one

We now have a Yolo imperative model YoloV3 in our model zoo.

authors: frankfliu siddvenk zachgk


text:
Intended shape for TAD in in java is wrong

Given shape: 4,3,1,1
Given dimensions: 0,2,3
TAD shape should be: keep(shape,dimensions)
TAD shape right now is: 1,1
Should be: 4,1,1

https://github.com/deeplearning4j/nd4j/commit/24a3b297626fc46a6083bb078edd36240e26444e

license_source: bigquery


text:
word2vec

WIP; DO NOT MERGE

Batched ops
Wrappers for native SkipGram, CBOW, PV-DBOW, PV-DM for word2vec using batches
gradient checks for SkipGram & CBOW added as tests to nd4j-tests

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/215/Build result: FAILURE[...truncated 2758 lines...][JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-shade/pom.xml to org.nd4j/nd4j-shade/0.6.1-SNAPSHOT/nd4j-shade-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-jackson/pom.xml to org.nd4j/nd4j-jackson/0.6.1-SNAPSHOT/nd4j-jackson-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-jackson/target/nd4j-jackson-0.6.1-SNAPSHOT.jar to org.nd4j/nd4j-jackson/0.6.1-SNAPSHOT/nd4j-jackson-0.6.1-SNAPSHOT.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-jackson/target/nd4j-jackson-0.6.1-SNAPSHOT-sources.jar to org.nd4j/nd4j-jackson/0.6.1-SNAPSHOT/nd4j-jackson-0.6.1-SNAPSHOT-sources.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-jackson/target/nd4j-jackson-0.6.1-SNAPSHOT-javadoc.jar to org.nd4j/nd4j-jackson/0.6.1-SNAPSHOT/nd4j-jackson-0.6.1-SNAPSHOT-javadoc.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-aeron/pom.xml to org.nd4j/nd4j-aeron/0.6.1-SNAPSHOT/nd4j-aeron-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-instrumentation/pom.xml to org.nd4j/nd4j-instrumentation/0.6.1-SNAPSHOT/nd4j-instrumentation-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-kryo/pom.xml to org.nd4j/nd4j-kryo_2.10/0.6.1-SNAPSHOT/nd4j-kryo_2.10-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-buffer/pom.xml to org.nd4j/nd4j-buffer/0.6.1-SNAPSHOT/nd4j-buffer-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-buffer/target/nd4j-buffer-0.6.1-SNAPSHOT.jar to org.nd4j/nd4j-buffer/0.6.1-SNAPSHOT/nd4j-buffer-0.6.1-SNAPSHOT.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-buffer/target/nd4j-buffer-0.6.1-SNAPSHOT-sources.jar to org.nd4j/nd4j-buffer/0.6.1-SNAPSHOT/nd4j-buffer-0.6.1-SNAPSHOT-sources.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-buffer/target/nd4j-buffer-0.6.1-SNAPSHOT-javadoc.jar to org.nd4j/nd4j-buffer/0.6.1-SNAPSHOT/nd4j-buffer-0.6.1-SNAPSHOT-javadoc.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-backends/pom.xml to org.nd4j/nd4j-backends/0.6.1-SNAPSHOT/nd4j-backends-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/pom.xml to org.nd4j/nd4j-serde/0.6.1-SNAPSHOT/nd4j-serde-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/pom.xml to org.nd4j/nd4j/0.6.1-SNAPSHOT/nd4j-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-perf/pom.xml to org.nd4j/nd4j-perf/0.6.1-SNAPSHOT/nd4j-perf-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-jdbc/pom.xml to org.nd4j/nd4j-jdbc/0.6.1-SNAPSHOT/nd4j-jdbc-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-base64/pom.xml to org.nd4j/nd4j-base64/0.6.1-SNAPSHOT/nd4j-base64-0.6.1-SNAPSHOT.pom[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-base64/target/nd4j-base64-0.6.1-SNAPSHOT.jar to org.nd4j/nd4j-base64/0.6.1-SNAPSHOT/nd4j-base64-0.6.1-SNAPSHOT.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-base64/target/nd4j-base64-0.6.1-SNAPSHOT-sources.jar to org.nd4j/nd4j-base64/0.6.1-SNAPSHOT/nd4j-base64-0.6.1-SNAPSHOT-sources.jar[JENKINS] Archiving /jenkins/workspace/nd4j_PR/nd4j-serde/nd4j-base64/target/nd4j-base64-0.6.1-SNAPSHOT-javadoc.jar to org.nd4j/nd4j-base64/0.6.1-SNAPSHOT/nd4j-base64-0.6.1-SNAPSHOT-javadoc.jarchannel stoppedAdding one-line test results to commit status...Setting status of 96f15b276ed0013208a696fcbb398a2265f1d125 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/215/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/216/Build result: ABORTED[...truncated 2678 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8066:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8091:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 8a65eca1ede7cae5bb428509b16aed9ca56b1daa to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/216/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/217/Build result: ABORTED[...truncated 2675 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 4ea6c698564c6517754f0f39574920e5c2638cb1 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/217/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/218/Build result: ABORTED[...truncated 2675 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 630df7c8fa7d4e35afeb6a2c296ffa2b0de95746 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/218/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/219/Build result: ABORTED[...truncated 2675 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 445ff3599cea46cbd7a7a48ae5a61a4d80ed9817 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/219/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/220/Build result: ABORTED[...truncated 2674 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 320405fa37bcffd18a516d54f9f544d246aa3e77 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/220/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/221/Build result: ABORTED[...truncated 2675 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of d54ba04c83046744f862c3a5bf32d33c9a3aa7e3 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/221/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/222/Build result: ABORTED[...truncated 2675 lines...]     return ((float)((void*)&temp));                                    ^/jenkins/workspace/libnd4j//include/types/float16.h: In function 'half cpu_float2half_rn(float)':/jenkins/workspace/libnd4j//include/types/float16.h:92:37: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]     unsigned x = ((int)(void*)(&f));                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateFloat(JNIEnv*, jobject, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7930:14: error: 'class NativeOps' has no member named 'execAggregateFloat'         ptr->execAggregateFloat(ptr0, arg1, (float )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:7955:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char JavaCPP_getStringBytes(JNIEnv env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 65eda769e7732aaabd16fdb5451640c8e5f1e4da to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/222/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/223/Build result: ABORTED[...truncated 2699 lines...]         ptr->execAggregateHalf(ptr0, arg1, (float16 )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, (float16)ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8165:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchDouble(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8190:14: error: 'class NativeOps' has no member named 'execAggregateBatchDouble'         ptr->execAggregateBatchDouble(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchHalf(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8215:14: error: 'class NativeOps' has no member named 'execAggregateBatchHalf'         ptr->execAggregateBatchHalf(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char* JavaCPP_getStringBytes(JNIEnv* env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv*, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of fceb3eaf0846a16121d8a529e684f3e00d626d6f to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/223/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'

Refer to this link for build results (access rights to CI server needed):
/job/nd4j_PR/224/Build result: ABORTED[...truncated 2700 lines...]         ptr->execAggregateHalf(ptr0, arg1, (float16 )ptr2, arg3, (int )ptr4, arg5, ptr6, arg7, (int )ptr8, arg9, (float16)ptr10, arg11);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchFloat(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8165:14: error: 'class NativeOps' has no member named 'execAggregateBatchFloat'         ptr->execAggregateBatchFloat(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchDouble(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8190:14: error: 'class NativeOps' has no member named 'execAggregateBatchDouble'         ptr->execAggregateBatchDouble(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: In function 'void Java_org_nd4j_nativeblas_NativeOps_execAggregateBatchHalf(JNIEnv, jobject, jobject, jint, jint, jint, jint, jint, jint, jint, jint, jobject)':/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:8215:14: error: 'class NativeOps' has no member named 'execAggregateBatchHalf'         ptr->execAggregateBatchHalf(ptr0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, ptr9);              ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp: At global scope:/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:288:37: warning: 'const char JavaCPP_getStringBytes(JNIEnv, jstring)' defined but not used [-Wunused-function] static JavaCPP_noinline const char* JavaCPP_getStringBytes(JNIEnv* env, jstring str) {                                     ^/jenkins/workspace/nd4j_PR/nd4j-backends/nd4j-backend-impls/nd4j-native/target/classes/org/nd4j/nativeblas/jnind4j.cpp:310:30: warning: 'void JavaCPP_releaseStringBytes(JNIEnv*, jstring, const char*)' defined but not used [-Wunused-function] static JavaCPP_noinline void JavaCPP_releaseStringBytes(JNIEnv* env, jstring str, const char* ptr) {                              ^ERROR: Maven JVM terminated unexpectedly with exit code 1Adding one-line test results to commit status...Setting status of 629d4a6ed7e8d173eb12657b52738d5ecb159574 to FAILURE with url http://ec2-54-191-187-162.us-west-2.compute.amazonaws.com:8080/job/nd4j_PR/224/ and message: 'Build finished. 1 tests run, 1 skipped, 0 failed.'


text:
Implement Battleship game

This draft pull request tracks progress on the implementation of the Battleship game. One of the goals of this implementation is to be able to exactly match the game generator that was used to generate game instances for some recent papers on extensive-form correlated equilibria. This particular version of the game was introduced in here.
Things done:

[x] Initial implementation --- build is green
[x] Construct game parameters from string literals ( #380 )
[x] TestSerializeDeserialize fails on integer parameters that represent doubles ( #382 ) Edit: opened #386
[x] Adjust implementation of Observation
[x] Implement InformationStateTensor Edit: comment
[x] Dynamic overriding of kGeneralSum as pointed out by @michalsustr
[x] Perform lookahead on ship placement so that we don't get to infeasible situations
[x] Update ToString to be the current ToPrettyString
[x] Tests -- so far only very basic / automatic ones are run
[x] Add game to the table of games in the wiki -- will wait for #374 to land first
[x] Figure out if it's OK that the observation consistency checks fail for this game? Several other implemented games seem to be on the same boat?
[x] Figure out if implementing InformationStateTensor is important (so far, only InformationStateString is implemented)
[x] Figure out a plan for registering the game as zero-sum only when the loss_multiplier parameter is == 1.0. Is this important?
[x] Figure out what the observers are and whether it makes sense to have them for this implementation

The pull request is pretty big, and given that build is green, I think it would make sense to have a preliminary review to see if everything is on the right track. It would also be great if one of the maintainers could help shed some light on my last three things above.
r? @lanctot

This is great, thank you! I willy likely use this game as well :)
Maybe I can say something about the last points:

Figure out if implementing InformationStateTensor is important (so far, only InformationStateString is implemented)

It is not "important", as in the game will work completely fine without it. It would be however useful for algorithms that make use of learning (neural networks).

Figure out a plan for registering the game as zero-sum only when the loss_multiplier parameter is == 1.0. Is this important?

You can first register it as general sum and "override" the type, like here: https://github.com/deepmind/open_spiel/blob/master/open_spiel/game_transforms/turn_based_simultaneous_game.cc#L267

Figure out what the observers are and whether it makes sense to have them for this implementation

Observers are a recent addition to the library. Basically we ended up with a bunch of methods like (InformationState|Observation|PublicObservation)(String|Tensor) with respective tensor layouts, etc., and the API for State started to be cluttered. The plan is that these existing methods will become deprecated, once all games implement their own observers. If you do not want to implement tensor observations (which I would recommend however), you can skip it, and just implement the current string variant you already have for a BattleShipObserver. You can check out KuhnObserver / LeducObserver / GoofspielObserver (that one is still a PR, but should be merged soon). The usage of observer allows us to parametrize the observations based on the information revealed, and even use custom observer parameters. Example of leduc poker.

Ah, this is fantastic, thanks for doing this. I have some research that will use this once it's implemented. I was looking into implementing this myself, so thanks for saving me the work!

Wow, thanks so much for the enthusiasm :-)
@michalsustr Thanks for the information about observers, I think I see now. I think it is definitely worthwhile to add the tensor-based representations, though at this point it would make a lot of sense to create an observer to get ahead of the deprecation wave for the non-observer-based methods.
I think that for this game in particular it is OK for InformationState and Observation to be the same, so perhaps only having one observer will be fine. I'm not sure about PublicObservation(String|Tensor) though, do you have a pointer for it? From the name, I guess it would just be a sequence of (player, shot, shot outcome) triplets, with no information about where the players placed their ships?
Thanks for pointing out to an example of how to override the game type, I will add something like that. I think it's important to do that type of override just in case some code down the line checks that the game is zero-sum by only looking into the trait object before doing anything, and would therefore fail on Battleship even when the game is actually zero sum.

Very nice implementation.
Generally I like the incremental plan for large code changes, so we can even accept this when you're happy with the basic implementation and you can submit more PRs later. Or if it's easier you can just keep adding to this one. Your call.
A few follow-ups:

I think it's ok to defer the more general observers until later. The basic game implementation is already large enough, and not many games have them yet. Much easier to get started just implementing the ones you have done now, and you can change them later. I kind of like having the simple ones for the simpler games. We have not really discussed deprecating these as a team, despite Michal's preferences :) I think it will make sense to retain these simpler ones for games where the heavier machinery is not necessary (or just adds implementation overhead). Either way, for now I say start with these.
Similarly goes for the InformationStateTensor and ObservationTensor: you can add these later.

Filed #382. Currently blocked on that issue.

Generally I like the incremental plan for large code changes, so we can even accept this when you're happy with the basic implementation and you can submit more PRs later. Or if it's easier you can just keep adding to this one. Your call.

I don't mind adding all the low hanging fruits to this implementation, including some tests. Before marking it as ready, I would also like to make sure that this implementation can reproduce some of the results from [1].

A few follow-ups:

I think it's ok to defer the more general observers until later. The basic game implementation is already large enough, and not many games have them yet.

Sounds good! It sounds like adding Observers to this game would be smooth sailing, so for the time being, I will focus on the "basic" methods like you suggested.

Similarly for the InformationStateTensor and ObservationTensor: you can just add these later. Or I might!

If I understood correctly how these work from the doc in spiel.h, adding those would be pretty easy --- just allocate a big enough vector, and set a few entries to 1. I'm happy to take a first crack. Do you have automatic ways of checking that the String and Tensor implementations are in sync?

I opened #386 and applied the fix locally to this branch. Right now the basic tests work.

Tests are now green locally :tada:
The only test that was failing was this
https://github.com/deepmind/open_spiel/blob/91da643188fcacd7a57bf5a64ee392d6c919dcfc/open_spiel/integration_tests/api_test.py#L461-L471
It looks like several games are on the same boat so for now I've just added the battleship to the list. @lanctot have you been having many false positives with that test? Do you have a feeling for why it might fail?

Yep this is ok for now. To be honest, I don't remember.. @michalsustr can you clarify?

I've implemented ObservationString as discussed, so I'm going to close the last unresolved comment from @lanctot's preliminary review.
On second thought, I think that it would make sense for everybody if InformationStateTensor was added in a followup PR. The changeset is already pretty large, and implementing that method can be its own standalone task with its own review. So I think for now I will only implement the string version. The tensor version could even be implemented through an observer, as @michalsustr suggested.
At this point the only big task that remains is to write some tests and make sure that the games generated by this implementation match the implementation used in [1].

Do you have a feeling for why it might fail on Battleship in particular?

I would have to go through the code more carefully, I might take a look tomorrow. I added a few comments though. What was the error message for the failed test?

have you been having many false positives with that test ?

I believe the test is fine, it's just that those games are indeed not implementing observations correctly. I didn't have the capacity to fix all the games back then. I think the most common case was that information state / observation was spanning States with different MoveNumbers, because it did not distinguish between encoding observations when the requested player was acting, or the opponent(s) were.

@michalsustr this is the error:
AssertionError: False is not true : Observation consistency failed.
It should hold that partition of 'information_state_string' is Relation.SUBSET_OR_EQUALS of 'move_number'
Problem occurred while evaluating action history '2 2' for player 0.
The state representation is:
/0:h_1_0/1:h_1_0
--------------------------------------------------------------------------------
Detailed information:
The set of histories that have the same 'information_state_string':
{'2', '2 0', '2 2'}
The set of histories that have the same 'move_number':
{'0 0', '0 2', '2 0', '2 2'}
The set difference is:
{'0 0', '0 2'}
The problematic information_state_string is '/h_1_0'
The problematic move_number is '2'

By default the board is 2 x 2, and each player has exactly one ship of length 2. The action string h_1_0 means that the player has placed their ship horizontally, starting from the leftmost corner in (row, col) = (1, 0).
If you want to poke around with the implementation, you can clone my battleship branch and git revert  60dd0fe which was the comment blacklisting battleship from the observation consistency tests.

@lanctot

Can you generate a playthrough?

What's the best way to do that? I noticed that integration_tests contains a few playthroughs. Should we add one for Battleship? How did you generate those files?

What's the best way to do that? I noticed that integration_tests contains a few playthroughs. Should we add one for Battleship? How did you generate those files?

There is a script to do it automatically: https://github.com/deepmind/open_spiel/blob/master/open_spiel/scripts/generate_new_playthrough.sh. Just run it with the game string as the argument.

Ok I did several updates to the master branch, you can rebase now. Note that I slightly changed the formatting of the doubles to remove unnecessary trailing zeroes (new function in spiel_utils.cc called FormatDouble).

I have addressed most of the comments and rebased. We now have a playthrough and I have also removed battleship from the blacklist of games that did not pass the observation consistency checks.
There are still a couple of comments unresolved.

Cool. Can you add it to the games list?

@lanctot Done. I have added "Good for correlated equilibria" on a new bullet --- I hope that's OK.

@lanctot Done. I have added "Good for correlated equilibria" on a new bullet --- I hope that's OK.

Haha, absolutely.. ! My next question once this is all done and in will be "How do you feel about implementing Sheriff?" :)

Ah yeah I don't mind taking a crack at that too once this is done :-)

AFAICT this is ready to go. Can you confirm @gabrfarina ?

The basic implementation is there, though I still need to address the last comment from the review (have ToString be what is currently called ToPrettyString).
I think there are a couple of things that we might want to sneak into this PR as well:

Currently, we abort if we find ourselves in the situation where we cannot place our next ship on the board because there's no space. So for example, if we have a 1x4 board and two ships of size 2, and we place our first ship in the middle, we are going to abort when we try to place the second ship.
In order to fix that, I was thinking that it would be easy to implement a quick DFS lookahead: before placing a ship, we make sure that there will be space for all the future ships. This would take me very little to implement and it might be worth it.
The implementation is currently untested if you ignore the automatic checks. Maybe it would be good to at least add some very basic tests that check things are not Super Broken :tm: .

I was planning to have the DFS check and the last comment from the review by later today. I don't mind adding a few tests as well. If you prefer, we could defer the more subtle tests (like replicating some of the experiments in the EFCE paper) to a different PR, or else I don't mind adding those too.
For the last thing though (EFCE), it would be useful to know if OpenSpiel implements an exact Nash and exact optimal EFCE solver for two player games (with no chance in the EFCE case)?

For the last thing though (EFCE), it would be useful to know if OpenSpiel implements an exact Nash and exact optimal EFCE solver for two player games (with no chance in the EFCE case)?

No, it does neither for the general case, we only have the Nash one for the zero-sum case and only in Python. We don't even have optimization algorithms on the C++ side yet, even for zero-sum (but I have that half-written now, expect it in a few weeks).
Right now we have implementations of the EFCE, EFCCE, AFCE, and AFCCE gaps and some very basic utilities for assembling correlation devices in extensive form. See algorithms/corr_dist and algorithms/corr_dev_builder. I've only added these over the past few months when I had time. We've only done basic stuff with it so far, like check convergence of vanilla CFR.
I do expect to see more on this front over the next year but so far OpenSpiel has mostly been used for the two-player zero-sum setting, so support for these more general settings has been lacking. That's why I'm happy that you're adding these benchmark games, and would invite you-- or any enthusiastic party you know-- to contribute some of the algorithms in your recent papers.

@lanctot I see, very interesting! Unfortunately, to replicate many of the EFCE paper I was talking about it is important to have access to a linear programming solver so perhaps for the time being we will need to settle for some more basic tests. I've pushed the DFS check for ship placement actions, if everything goes well this PR will be ready for review tomorrow.
I'm very happy to discuss directions for setting up and building optimization-based infrastructure for OpenSpiel in a separate issue, and once that's done start helping out port some of the structures and algorithms for optimal/feasible correlated equilibria and collusive/coordinated team strategies.

@lanctot I see, very interesting! Unfortunately, to replicate many of the experiments in the EFCE paper it is important to have access to a linear programming solver so perhaps for the time being we will need to settle for some more basic tests. I've pushed the DFS check for ship placement actions---if everything goes as planned this PR should be ready for review tomorrow after I add a few basic tests.

Yes, that's what I'm thinking. I already have zero-sum matrix games being solved on the C++ side, need a block of a few hours of time to get sequence-form LPs coded and then I'll release it.

I'm very happy to discuss directions for setting up and building optimization-based infrastructure for OpenSpiel in a separate issue, and once that's done start helping out port some of the structures and algorithms for optimal/feasible correlated equilibria and collusive/coordinated team strategies.

We're using OR-Tools which is pretty cool, very clean library and it allows several different back-ends (GLPK, GLOP, CPLEX, and Gurobi). And this means we have it working seemlessly internally as well, with minimal changes. Thanks @michalsustr for pointing me out to it, I wish I had known about it before I developed the python LP code.

Using OR-Tools to abstract the details of the solver is a great idea! Implementing the von Stengel-Forges constraints (aka consistency constraints in their 2008 math of OR paper) and the linear incentive constraints for EFCE/EFCCE/NFCCE can get a bit hairy because you have to iterate over all subtrees of sequences of each player. Also, because extensive-form correlation plans are indexed over relevant sequence pairs, it's important to be able to quickly preprocess the decision trees of the agents so that iterating over several subsets of relevant sequence pairs is easy. In my experience that preprocessing step can be expensive if you use the standard library's data structures.
I don't know if you already had a plan to support iterating over relevant sequences and sequence-form subtrees, but if not I'm happy to talk about what objects we built internally to handle the different tasks above more easily, and see whether you think it would make sense to add some of those to OpenSpiel.

I have a question about tests for Battleship. Since we currently abort with a SpielFatalError when the player board cannot fit all the ships, I'd like to write a few tests that check that the Battleship code correctly aborts in a few situations, and with the correct error message. Is there a way to catch fatal errors in the tests and stop the stack unwinding? Is using a fatal error to handle an invalid board configuration reasonable?

@lanctot @michalsustr I've added some more tests, ironed out a couple of bugs, and I think this is now in a good shape.
I haven't added tests that catch fatal errors (comment), but those seemed less high priority anyway. Once I understand how to add those tests I don't mind sneaking them in the PR, and I expect that change to be very localized inside of battleship_test.cc.
So, I am upgrading this PR from draft to ready for review :rocket:

I don't know if you already had a plan to support iterating over relevant sequences and sequence-form subtrees, but if not I'm happy to talk about what objects we built internally to handle the different tasks above more easily, and see whether you think it would make sense to add some of those to OpenSpiel.

Yes I was thinking it might be good to support a general way to represent sequence form strategies and constraints because then multiple projects could make use of that code. I have never done that myself, so happy to get your input. I might then defer the sequence form LP as it might be easier to build it from those data structures.

I have a question about tests for Battleship. Since we currently abort with a SpielFatalError when the player board cannot fit all the ships, I'd like to write a few tests that check that the Battleship code correctly aborts in a few situations, and with the correct error message. Is there a way to catch fatal errors in the tests and stop the stack unwinding? Is using a fatal error to handle an invalid board configuration reasonable?

We currently do not have a way to do this. I tried to do a quick version when I removed your SPIEL_CHECK_THROWS but could not get it to work. In principle, should be doable since we register a error handler function that gets called, and for the tests we could just use a custom handler that sets a boolean flag, and then check that it has bern set. I tried to do this using a lambda that captured a local flag and didn't work( not sure why). But I bet if we predefined a function that set a specific (global) flag-- only to be used within tests, then we could do something like you had (maybe call it SPIEL_CHECK_FAIL?) Just needs to be done without try/catch. But anyway I say we put it off until after this PR until we have that implemented.

Yes I was thinking it might be good to support a general way to represent sequence form strategies and constraints because then multiple projects could make use of that code. I have never done that myself, so happy to get your input. I might then defer the sequence form LP as it might be easier to build it from those data structures.

Sounds good! OpenSpiel and our internal library seem pretty complementary at this point, so I think this is an opportunity: if we could manage to somehow settle on a philosophy for representing and dealing with (1) treeplexes (aka the polytopes of sequence-form strategies), (2) extensive-form correlation plans and (3) the von Stengel-Forges polytope constructed for relevant sequence pairs that is compatible with the philosophies of both libraries, there's a real possibility that we would be able to over time merge the libraries and focus the effort in a single code base. OpenSpiel is very general purpose and great at dealing with game trees, while our library is mostly concerned with providing efficient optimization primitives over decision spaces of individual players, or correlated decision spaces of multiple players. (Actually our library does not even have a way of representing game trees, it only operates at the treeplex level directly.) I think both libraries have much to gain from the other, and if there was a way to reconcile the different needs and philosophies of the libraries, focusing the efforts in one place could be beneficial to the community.
As you can imagine, it took several iterations (and years) to get the internal structures exposed by our library to have just the right mix of efficiency (so that we can scale to reasonably large games), low friction, and future proofness. I'm pretty happy with what we have now, and I think it's stable and mature enough for the effort to merge the code bases in reasonable time to be achievable.
Happy to chat more with you and the OpenSpiel team, and try to come up with a tentative roadmap.

We currently do not have a way to do this. I tried to do a quick version when I removed your SPIEL_CHECK_THROWS but could not get it to work. In principle, should be doable since we register a error handler function that gets called, and for the tests we could just use a custom handler that sets a boolean flag, and then check that it has bern set. I tried to do this using a lambda that captured a local flag and didn't work( not sure why). But I bet if we predefined a function that set a specific (global) flag-- only to be used within tests, then we could do something like you had (maybe call it SPIEL_CHECK_FAIL or SPIEL_CHECK_ERROR) Just needs to be done without try/catch. But anyway I say we put it off until after this PR until we have that implemented.

I agree that this seems lower priority and we can go ahead without it for now. What you said about the boolean flag makes sense, though I'm wondering whether most code that uses OpenSpiel's check routines probably assumes that the call to SpielFatalError (or any SPIEL_CHECK_*) will start unwinding the stack and the rest of the function won't be executed. For example, right now many failing bound checks assume the code will hang if the bound check fails instead of running into undefined behavior later on for reading out of bound. If so, just setting a bool and continuing the function until it naturally returns instead of unwinding the stack forcefully probably would not work (not sure if that is what you were proposing though). Maybe something like longjmp/setjmp could work better if you're OK with leaking objects, but I'm definitely not an expert.
Also, I feel like the original SPIEL_CHECK_THROWS function I had implemented was a bit different, in the sense that it was catching std::invalid_argument, which is generated from within the standard library (I believe that was for std::stoi and std::stod) instead of OpenSpiel. Instrumenting those exceptions seems harder, as we cannot really change the standard library. Even just being able to catch OpenSpiel's exceptions though seems very appealing for tests.
I guess for now we can leave without exercising code paths that result in exceptions. If you end up figuring out a plan for handling exceptions let me know and I'm happy to add more tests :-)

This PR is now ready for review. Will that happen here on Github, or will you handle it internally with the rest of the team? Either way, happy to stick around and answer/address any question or request for change in the code.
This has been a fun PR :slightly_smiling_face:

if we could manage to somehow settle on a philosophy for representing and dealing with (1) treeplexes (aka the polytopes of sequence-form strategies)

I am interested in this, please keep me in the loop. Also, some work I just did with #393 on infostate trees might be useful.

I think both libraries have much to gain from the other, and if there was a way to reconcile the different needs and philosophies of the libraries, focusing the efforts in one place could be beneficial to the community.

That would be awesome! In fact, I am doing something similar with our GTLib :smile:

Even just being able to catch OpenSpiel's exceptions though seems very appealing for tests.

You can do that in Python with pyspiel.SpielError. Or at least at some point I added it, but I think it got reverted, not sure why.

I'm off for a few days, so just a quick reply: that all sounds good, looking forward to the design discussions!

This PR is now ready for review. Will that happen here on Github, or will you handle it internally with the rest of the team? Either way, happy to stick around and answer/address any question or request for change in the code.

Yes, I'd like it if any one of { @finbarrtimbers, @jblespiau, @elkhrt } took a look. And if it's all well, hopefully import today for Monday's update. I can't do it because I'm off, but there's been enough review from @michalsustr that I don't expect much more to do.

This has been a fun PR 🙂

Glad you had fun! It's a great contribution, and thanks for the patience with all the back-and-forth.

You can do that in Python with pyspiel.SpielError. Or at least at some point I added it, but I think it got reverted, not sure why.

Hi @michalsustr, really? Can you tell me what you think was removed / reverted? I'm surprised because I just recently pointed Nolan to that PR with looks like it was merged, e.g. see here: https://github.com/deepmind/open_spiel/blob/3dfa3aebd4fc85e6de3801c029cc77fd65b88a9d/open_spiel/python/pybind11/pyspiel.cc#L568

[...] looks like it was merged [...]

Yes, it is indeed now in master, no worries. I think there was some back-n-forth in the commits.

@lanctot @finbarrtimbers There is still one FIXME in the code (here), which I think should be easy to resolve:
std::string BattleshipState::ActionToString(Player player,
                                            Action action) const {
  SPIEL_DCHECK_TRUE(player == Player{0} || player == Player{1});

  // FIXME(gfarina): It was not clear to me from the documentation whether
  //     the next condition is always guaranteed.
  //
  //     Action ids are reused at different states, so the meaning of the same
  //     action id is contingent on the current state.
  SPIEL_CHECK_EQ(player, CurrentPlayer());

CI errored (not failed) on some machines and passed on the remaining ones. Hopefully is some spurious error with Travis?

Regarding your comment about ActionToString, there is a Game::ActionToString that assumes state-independence, and a State::ActionToString that does not. They are both optional to implement.
In practice, almost every existing State::ActionToString implementation is state-independent (for a number of reasons, but perhaps the only relevant one is that a number of us think that having the action ID vary by state makes it hard for a neural network to learn the values; we have limited evidence either way). There are very few implementations of Game::ActionToString as it was recently introduced.
I should note that there is one glaring exception here; most games have overlapping chance and non-chance action IDs. E.g. in Leduc, action 1 has a different meaning in chance & non-chance states, but action 1 has the same meaning in every non-chance state, and in every chance state (calling and dealing card 1, respectively).

Looking at the Travis errors now...

About Travis: it seems that Travis errored because one test (oh_hell_test) fails and outputs so much that it saturates Travis' output quota.
@lanctot @finbarrtimbers Seems like the the recent pull request #314 that was merged interacts badly with some other PR that was merged at the same time? The failure happens only on some machines.

@lanctot @finbarrtimbers Seems like perhaps #314 (which was very recently merged) interacts badly with some other PR that was merged at the same time? The failure happens only on some machines.

Could it be that you have to rebase again as a result of this morning's sync? It was all smooth on my side; what makes you think there was an interaction with another PR at the same time?
If not: I bet this is just Travis randomly acting up. Would not be the first time.. it's odd that it only happens in the nox tests. Any reason to believe this is real?

In practice, almost every existing State::ActionToString implementation is state-independent (for a number of reasons, but perhaps the only relevant one is that a number of us think that having the action ID vary by state makes it hard for a neural network to learn the values; we have limited evidence either way). There are very few implementations of Game::ActionToString as it was recently introduced.

In light of that, would you recommend I use unique action ids? This will increase the size of the tensors, but might end up helping with nn-based methods. Changing the implementation to have unique IDs is a three line change so it's not an issue at all.
Another advantage of unique action ids is that I would be able to move the implementation from State:: to Game::ActionToString and have State::ActionToString forward to Game's method.
Let me know what your preference is :-)

what makes you think there was an interaction with another PR at the same time?

Oh, it was just because #314 was green on Travis when tested as the only PR on top of master. So we know it worked when applied to master in isolation. But now oh_hell's tests fail. So either this PR broke it (which seems unlikely), or the other PRs that landed together with #314 broke it somehow. I don't think the PR had ever been tested in combination with all the other PRs that landed at the same time.

In light of that, would you recommend I use unique action ids? This will increase the size of the tensors, but might end up helping with nn-based methods. Changing the implementation to have unique IDs is a three line change so it's not an issue at all.

How big is it & how semantically different are the different encodings? You'd probably have better intuition about this than we do, but I'd pick whichever encoding you think would be easier for a network to learn.

In general, though, I think state independent IDs are preferable.

How big is it & how semantically different are the different encodings?

Having unique IDs will multiply the number of IDs used by 1.5. So, I think it's pretty negligible. In light of your other comment about unique IDs being preferable, I'll change the implementation and add Game::ActionToString. I plan to get to all of this by tonight or tomorrow morning.

In general, though, I think state independent IDs are preferable.

Would really prefer state-independent IDs, both to be more consistent with other games and to not hinder the neural net / RL applications that I plan to do in the near future :)

If you have any remaining FIXMEs in the code, can you change them all to TODO? They break the import :)

Travis failed again on oh_hell. Last time, when @lanctot manually restarted the CI job the error disappeared. I was thinking that it could be possible that the oh_hell test would hit a time limit and that would make the test flaky, but I remember seeing that the test was passing pretty fast on other runs?

Would really prefer state-independent IDs, both to be more consistent with other games and to not hinder the neural net / RL applications

Do you think it would make sense to check this for games in general in the api_test.py ?

Travis failed again on oh_hell. Last time, when @lanctot manually restarted the CI job the error disappeared. I was thinking that it could be possible that the oh_hell test would hit a time limit and that would make the test flaky, but I remember seeing that the test was passing pretty fast on other runs?

Travis failed again on oh_hell. Last time, when @lanctot manually restarted the CI job the error disappeared. I was thinking that it could be possible that the oh_hell test would hit a time limit and that would make the test flaky, but I remember seeing that the test was passing pretty fast on other runs?

Yeah I think something is wrong, happened in another PR too. Thanks for flagging, I've opened an issue: https://github.com/deepmind/open_spiel/issues/396

Do you think it would make sense to check this for games in general in the api_test.py ?

Hmm.. how could you?
Also, we didn't strictly disallow it, so it's not really failing to meet the API standard, more of a convention (but maybe we should document it better).

Would really prefer state-independent IDs, both to be more consistent with other games and to not hinder the neural net / RL applications

Do you think it would make sense to check this for games in general in the api_test.py ?

Hmm.. how could you?
Get legal action ids from sampled states, call action to string and check that ids have consistently the same strings. But yeah, maybe it's not such a great idea :) Especially if it is not required for games to do right now.

Get legal action ids from sampled states, call action to string and check that ids have consistently the same strings. But yeah, maybe it's not such a great idea :) Especially if it is not required for games to do right now.

Oh yeah I definitely do not want to force state-independent string representations. Many games have game-specific move descriptions (e.g. chess, backgammon) and we use State::ActionToString to turn the opaque action ids into something interpretable and meaningful for that state and game.

@gabrfarina @finbarrtimbers is this good to go? I'd like to import it so we can include it in Monday's update.
Seems good AFAICT but it's still showing a change requested.

I'll add dimension tests today to validate the table with game sizes in battleship.h. If everything goes well, this will be ready in a few hours :-)

Lgtm!

Now blocked on #399 . Marking the PR as draft again to prevent accidental merging. Once #399 is solved, hopefully the new tests on the game dimensions will pass.

Now blocked on #399 . Marking the PR as draft again to prevent accidental merging. Once #399 is solved, hopefully the new tests on the game dimensions will pass.

This is really easy, you just need to add the shots info to your ToString (but please keep the nice-looking board!) More detail in my response in the issue above.

Thanks @lanctot . Based on the discussion in #399 I've reverted the old implementation of ToString, and added the new tests about the game sizes. The game sizes are now computed correctly, and this PR's Battleship generator matches exactly the sizes of the games generated by my generator :tada:
So, I'm now more confident that things are in a good shape.
Marking as ready for review again.

Seems good AFAICT but it's still showing a change requested.

@lanctot The change request was created by you a while ago, but I've since resolved it so I think you can go ahead and remove it if it all looks good to you? :-)

@lanctot The change request was created by you a while ago, but I've since resolved it so I think you can go ahead and remove it if it all looks good to you? :-)

Oops, yes there has been a lot of turnaround and comments. I'm importing it now. Thanks again, this PR was useful to us in many ways.

Thanks again, this PR was useful to us in many ways.

My pleasure, this has been a fun PR, and it was great to see all this enthusiasm :-)
Thanks all again for the help @lanctot @michalsustr @finbarrtimbers
I'm happy to stick around to answer any question / request for change.
150+ comments and 50+ commits in, I'm excited to see this get merged! :rocket: :rocket: :rocket:

Hey @gabrfarina, do you have any plans to implement InformationStateTensor? If not, I might take a crack at it as I'd like to run some experiments in Battleship.

@finbarrtimbers Thanks for the ping 🙂 I'm a bit swamped with an internal deadline by the end of next week so if you could take a crack at it that would be great, given that I'm also not super familiar with the best practices around that method (will it just be one-hot encoding for each turn? Or something more compact?). If that helps, I'm definitely happy to stick around to help / answer any question you might have!
Also, I will cut out a few hours to port over the Sheriff game generator soon...

authors: finbarrtimbers gabrfarina lanctot michalsustr


text:
Data deanonymization

Looks good, but I would add more comments in code to describe why things happen and why it is implemented that way, if this is how presidio works etc.

Notebook example could be also transformed into test cases

authors: maks-operlejn-ds piotr-grodek-dsai

repo: deepsense-ai/langchain


text:
Issues with mixing style sheets (with workaround provided)

Current behavior
I use fairly complex CSS in my panes, which interfere with the GoldenLayout CSS.

Recently, I came around the problem described in the codepen below: if you add a blank styling to the <li> element, it will mess up the way close/maximise/popout icons are displayed and function.
Expected behavior:
See workaround, although this is a partial solution.
Codepen example:
https://codepen.io/thbb/pen/YxQzKY
workaround
In the GoldenLayout themes, I added the following "list-style-type: none" in the css, and things work out fine in my context (although I have to use my local versions of the CSS).
.lm_controls>li {
position: relative;
background-position: center center;
background-repeat: no-repeat;
opacity: .4;
transition: opacity 300ms ease;
list-style-type: none
}

Actually, UL lists have not "bullets" due to this rule:
.lm_header ul {
    list-style-type: none;
}

As you pointed out, applying a bullet specifically to LI items overrides this rule.
Maybe you could directly make a "pull request" with your fix that seems the most obvious, robust and simple to fix it. :-)

authors: ldetomi thbb

repo: deepstreamIO/golden-layout

license: mit


text:
TypeScript Definitions

Typescript definitions for golden-layout are almost ready, and available from here:
Genedata/typed-golden-layout
Once this is complete, I'll submit a pull request to @typings to add these to "typings/registry" and maybe add a section to the golden-layout readme .  If anyone has any feedback in the meantime, please let me know.  BTW - This library works beautifully in combination with React and Typescript :)

Thanks. I'm glad I checked. I was about to write it myself as I need something like this for http://alm.tools/ :rose:

They should also be available via typings soon--I'm just waiting for typings/registry#355.
@basarat You're welcome, there's still some things missing so would welcome pull requests :)

Also, if the authors of the package are up to it, TypeScript users can get a lot more value having the typings moved into the package itself. If they're interested, I can definitely provide some guidance there - more information in https://github.com/typings/typings/issues/322.

TypeScript users can get a lot more value having the typings moved into the package itself

@blakeembrey  This definition depends on JQuery ambient. Can this still be moved into this repo?

@blakeembrey cheers. We'd definitely be interested. I haven't used typoscript myself yet, so I'd appreciate any guidance

@blakeembrey @WolframHempel I can work on adding the definitions the the main package today--I'll let you know how I got on soon!

@blakeembrey Here's my attempt at adding typings to the package:
[https://github.com/Genedata/golden-layout/commit/b3a1f1d574f08071519874213f6d3bf666e63043]
I'm just having problems getting the ts-linting to work:
Error: Invalid "extends" configuration value - could not require "tslint-config-typings". Review the Node lookup algorithm (https://nodejs.org/api/modules.html#modules_all_together) for the approximate method TSLint uses to find the referenced configuration file.

Seems weird, haven't seen that before - can you confirm that the module is installed locally and you aren't using a global tslint?

@blakeembrey Thanks for the hint but I didn't get this working so switched to inlined tslint rules for now.

@WolframHempel Thanks for merging these into the package.

authors: WolframHempel basarat blakeembrey stephenjelfs


text:
Centralized repo for Delivery github actions is needed

Persona

Delivery IaC Unicorn
Description

We need centralized pipeline/workflow/actions for all of our different terraform module testing and release process
Right now we don't have any proper testing for any of our terraform-aws-uds-* repos, they are just tested in this monorepo.

this pattern has been implemented in the EKS repo
https://github.com/defenseunicorns/terraform-aws-uds-eks
slash command in PR -> local trigger of workflow dispatch -> remote workflow -> remote composite action
this pattern keeps most of the meat centralized but the runners/cache/logs in each repo where the code is being developed
this also means that secrets are spread. We can either use org level secrets or some kind of tool to manage repo/secret sprawl.
additionally we could use terraform to provide configuration for each repo + secrets + ownership groups

using a githubapp narwhal-bot, this pattern is currently configured in
https://github.com/defenseunicorns/terraform-aws-uds-eks
https://github.com/defenseunicorns/terraform-aws-uds-vpc

repo: defenseunicorns/delivery-aws-iac


text:
Public facing FastAPI docs

User Story
As a person interested in the LeapfrogAI api
I want user friendly details about the API without having to run the API and hit the swagger docs
So that I can debug, develop, utilize, or understand how the LeapfrogAI API works
Acceptance Criteria
Given a user wants to get details about the API
When they go to some publicly accessible URL
Then they can access the API docs
Additional context
We have a Swagger that is only accessible by running the API, which is a high barrier to entry to working against

These should be added somewhere within the docs site
It might make sense as a subpage of the Component's API section, but I'm open to other location ideas

This is actually somewhat tangential to the idea of nightly or weekly conformance testing. Maybe something @alekst23 can look into afterwards, since we can fire the job to update our endpoints + conformance metrics in the Hugo docs website...

repo: defenseunicorns/leapfrogai


text:
I am using laravel. And when I send multiple messages in sequence sometimes the message gets delayed for 5 seconds.

I am using laravel. And when I send multiple messages in sequence sometimes the message gets delayed for 5 seconds.
Any solutions on that?
public function start(){
     $this->chat->message('')->chatAction(ChatActions::TYPING)->send();
     $this->chat->message('Hello')->send();
     $this->chat->message('this is my message to world')->send();
}

Originally posted by @cc-niravbhoi in https://github.com/defstudio/telegraph/discussions/381

I am not aware of any throttling by telegram for so few messages
Could you share a sample repository that reproduces the issue?

Hi @fabio-ivona
I have shared the code. This is the message I am sending to the user from Webhook.
If I hit /start from telegram multiple times then it will get stuck for 5 seconds and then sends the message.
Let me know If you didn't get it. I will create repo.

authors: cc-niravbhoi fabio-ivona

repo: defstudio/telegraph


text:
Oak Park, IL

To: board@oak-park.us; mayoranan@oak-park.us; trusteeandrews@oak-park.us; trusteeboutet@oak-park.us; TrusteeBuchanan@oak-park.us; trusteemoroney@oak-park.us; trusteetaglia@oak-park.us; TrusteeWalker-Peddakotla@oak-park.us; clerkscaman@oak-park.us
Subject: [INSERT UNIQUE SUBJECT LINE]
Message:  [MAKE SURE YOU FILL IN BRACKETS]
Dear Mayor Anan Abu-Taleb and Oak Park Village Board,
My name is [YOUR NAME] and I am a resident of Oak Park. I am writing to demand that the Oak Park Village Board adopt a city budget that prioritizes community well-being, and redirects funding away from the police.
In FY2019, the Village of Oak Park allocated $24,877,758 dollars to our police system, an inordinate 39.6% of our total expense budget. This is compared much higher than the amount of money allocated towards public health services (0.01% of the budget), or any other department. Next year, there will likely be deficits as a result of the pandemic. The city may recoup these funds by decreasing the police budget.
I demand that the Village Board begin meaningfully defunding the Oak Park Police Department and re-allocate those funds to programs proven to more effectively promote a safe and equitable community. We need funding for community-based mental health services, substance abuse treatment services, and affordable housing programs. Police officers should not need to be the first resource for every crisis. I demand a budget that reflects the actual needs of Oak Park residents.
History has shown that police “reform” is not enough. Policing in America was developed to protect the institution of slavery. More money and training programs will not only not fix our current system, they will cause future lives to be lost to police brutality. We must take a hard look at the way the current system in place fails to serve-and in fact actively harms-our community, and come together to reimagine the role of police in our city.
I am urging you to completely revise the budget for the 2020-2021 fiscal year, and to invest in the people, not the police.
Thank you for your time,
[YOUR NAME] [YOUR ADDRESS] [YOUR EMAIL] [YOUR PHONE NUMBER]

Thank you for submitting your city to defund12.org! Your request is now in the queue for review and publishing. We’ll reply here if we have any questions.

Reviewing now!

To: board@oak-park.us; mayoranan@oak-park.us; trusteeandrews@oak-park.us; trusteeboutet@oak-park.us; TrusteeBuchanan@oak-park.us; trusteemoroney@oak-park.us; trusteetaglia@oak-park.us; TrusteeWalker-Peddakotla@oak-park.us; clerkscaman@oak-park.us
Dear Mayor Anan Abu-Taleb and the Oak Park Village Board,
My name is [YOUR NAME] and I am a resident of Oak Park. I am writing to demand that the Oak Park Village Board adopt a city budget that prioritizes community well-being, and redirects funding away from the police.
In 2019, the Village of Oak Park allocated $24,877,758 to our police system, an inordinate 33% of the Village general fund budget. This is compared much higher than the amount of money allocated towards public health services (less than 0.01% of the budget), or any other department. Next year, there will likely be deficits as a result of the pandemic. The city must recoup these funds by decreasing the police budget.
I demand that the Village Board begin meaningfully defunding the Oak Park Police Department and re-allocate those funds to programs proven to more effectively promote a safe and equitable community. We need funding for community-based mental health services, substance abuse treatment services, and affordable housing programs. Police officers should not need to be the first resource for every crisis. I demand a budget that reflects the actual needs of Oak Park residents.
History has shown that police “reform” is not enough. Policing in America was developed to protect the institution of slavery. More money and training programs for police will not fix our current system. It will instead cause future lives, especially Black lives, to be lost to police brutality. We must take a hard look at the way the current system in place fails to serve - and in fact actively harms - our community, and come together to reimagine the role of police in our city.
I am urging you to act on this as you develop the budget for the 2020-2021 fiscal year, and to invest in the people, not the police.
Thank you for your time,
[YOUR NAME]
[YOUR ADDRESS]
[YOUR EMAIL]
[YOUR PHONE NUMBER]

authors: Gracie-F Rtrott skullface


text:
ci(brigade.js): run test GH Checks for master branch

This removes the if not master check in runSuite so that Brigade runs the same test checks on master (and, thus, updates this branch's status at https://github.com/deislabs/duffle/branches properly).

@glyn agreed.  This is mostly cosmetic.

repo: deislabs/duffle


text:
feat(config): prompt for --pfx-password

If no password is provided as a flag, prompt for one. Passewords are mandatory for PFX bundles, so there's no need to wrap this in an Option.
closes #141
Signed-off-by: Matthew Fisher matt.fisher@microsoft.com

Test failure was a flake due to the registry pull. I re-kicked them

After doing some more thinking, we don't need a feature flag to prompt for the password. If all of the previous functions don't supply one, krustlet will now automatically open a prompt in your terminal:
><> ./target/debug/krustlet-wasi
PFX file password:

A feature flag like --pfx-password-stdin implies the password is optional, which it isn't. I opened #202 to follow up on the discussion raised in #140 around --pfx-password/$PFX_PASSWORD. I don't think we should remove them until we have the proper solution in place.

repo: deislabs/krustlet


text:
Use PHPMailer instead of Swiftmailer

I see that Swiftmailer is used in Mailer::sendMessage() and I wonder if this can be changed to PHPMailer without any trouble.
My hosting provider for some reason has Swiftmailer banned and I can't use it.

Yii2-user does not use Swiftmailer itself, it just uses mailer application component. By default it is swiftmailer, but you can use this extension to enable PHPMailer support.
So you just install that extension and change your application config to use that extension.

Helped me too..thanks

authors: Inttegrum Isan26 dmeroff


text:
Create universal equality function

I think we should be able to use deep-equals/fast-equals to create one universal equality checker for all of our values, using something like this code generated by ChatGPT:
import { createCustomEqual, deepEqual } from 'fast-equals';

class Principal {
  constructor(private data: any) {}

  toText(): string {
    return String(this.data);
  }
}

const arePrincipalsEqual = (a: any, b: any): boolean => {
  // Check if both a and b are instances of Principal
  if (a instanceof Principal && b instanceof Principal) {
    return a.toText() === b.toText();
  }
  // For non-Principal types, use the default deepEqual
  return deepEqual(a, b);
};

// Create a custom equality checker using fast-equals
const customEqual = createCustomEqual({ '*': arePrincipalsEqual });

// Usage
const obj1 = { name: 'John', principal: new Principal(123) };
const obj2 = { name: 'John', principal: new Principal(123) };
const obj3 = { name: 'Doe', principal: new Principal(456) };

console.log(customEqual(obj1, obj2)); // true
console.log(customEqual(obj1, obj3)); // false

fixed with https://github.com/demergent-labs/azle/pull/1442
The problem when we tried to use fast-equals at the beginning was not that Principals were not able to be used with fast-equals but rather that if the Principals were made with different version (or different locations of the same version) of @dfinity/principal then fast-equals wouldn't even consider them and return false before even running them through the custom equals method. Now that we have made sure to use the same version and install location for Principal deepEqual from fast-equals works great out of the box.
This issue follows the odd behavior of Principal https://github.com/demergent-labs/azle/issues/1443

authors: bdemann lastmjs

repo: demergent-labs/azle


text:
Update ThMeshPhysicalMaterial.ts

@demike hello, I added transmission input to thMeshPhysicalMaterial. Working properly.

@elkestudio thanks for the contribution. The class you modified is generated from the typings (three-ts-types). I will upgrade to latest three.js and types and regenerate the classes beginning next week. This will also include transmission and many other type fixes. Hope that helps

It sureely will. Thanks!

authors: demike elkestudio

repo: demike/ngx-three


text:
testing - DO NOT MERGE

Description
new docker image for escape-room.

Docker Image Ready - Dev
Docker automatic build at CircleCI has deployed your docker image: devdemisto/escape-room:1.0.0.12195
It is available now on docker hub at: https://hub.docker.com/r/devdemisto/escape-room/tags
Get started by pulling the image:
docker pull devdemisto/escape-room:1.0.0.12195

Docker Metadata

Image Size: 22.32 MB

Image ID: sha256:6d09980cd7fb0fb45ac16d7d7c6fa314fc90f515cb96a9bcf100d93050bffa65

Created: 2020-10-07T20:36:49.273642801Z

Arch: linux/amd64

Command: ["python3"]

Environment:

PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LANG=C.UTF-8
GPG_KEY=E3FF2839C048B25C084DEBE9B26995E310250568
PYTHON_VERSION=3.8.6
PYTHON_PIP_VERSION=20.2.3
PYTHON_GET_PIP_URL=https://github.com/pypa/get-pip/raw/fa7dc83944936bf09a0e4cb5d5ec852c0d256599/get-pip.py
PYTHON_GET_PIP_SHA256=6e0bb0a2c2533361d7f297ed547237caf1b7507f197835974c0dd7eba998c53c
DOCKER_IMAGE=devdemisto/escape-room:1.0.0.12195

Labels:

org.opencontainers.image.authors:Demisto <containers@demisto.com>
org.opencontainers.image.revision:72a8448036dd4d0a2cba6cd6d69c2ac79550de41
org.opencontainers.image.version:1.0.0.12195

authors: dc-builder yaakovi

repo: demisto/dockerfiles


text:
Need any global illumination solution

Realtime?
Lit particles?
Env Lights?

Possible candidates:

Env Lights
Voxel cone tracing
Light propagation volumes
Volume light mapping
Light Grid (3D) (see AMD presentation from EG with Texel Shading)
Ambient Level — good old approach with limited applications.

This issue was moved to demiurghg/IronStar#20

repo: demiurghg/FusionEngine


text:
enhance: Adding caching optimization to improve startup/workspace initialization

Change to cut down initialization time to about 40% of what it is before this change. Timings with org-workspace can be found at [[Start up Optimization|user.nickolay.tasks.start-up-optimization]]
[x] - Ran unit tests successfully with jest in dendron/packages/engine-test-utils
[x] - Manually started a workspace using local server , checked that existing backlinks are operational.
[x] - Wrote a test script that grabs the payload from the /initialize API call and "standardizes" to be able to be used for comparison the following is performed during "standardization"
All the 'stub' notes are removed as well as all the ids that reference stub notes (parent & child ids),
Schema updated and created times are removed. Then after standardatization does a JSON compare with previously saved standardized output. Tested the payload from org-workspace to be the same before and after this change (standardized payload)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

authors: CLAassistant nickolay-kondratyev

repo: dendronhq/dendron


text:
Prevent panic to do with unknown env type change with Azure SQL v12

A previous commit ignores unknown env type changes (7e2729fe645bb216b0a23f80af5b6fd5b5bc35bf), but it can still panic with unexpected EOF. This commit ignore such errors. Applying it resolves #103 for me.

hello @michaelbironneau
what is the point of ignoring the error since the connection is closed and unusable?

@dimdin I don't think the connection is unusable. What I think happens here, for Azure SQL v12 only, is that the server sends an env change message that is not supported by the current driver (falls outside the type switch) and on top of that the rest of the message is a byte shorter, hence the EOF. But if you ignore that the connection seems to still be in a usable state - I can't connect to instances of v12 using master (neither can a bunch of other people judging by #103) but if I apply this then it all works fine. If you have access to an v12 instance then please test and check if it also resolves the issue for you.
For what it's worth if you try to change database when connected to an Azure SQL v12 database in SQL Server Management Studio 2012, it will complain and say the connection failed, but the connection will still be OK and the database change will have succeeded. I think it's probably a related issue and maybe to do with a newer version of TDS but I don't know enough about the protocol to say for sure.

I appreciate the analysis, but from first glance I don't think this is the fix I want in. What you're saying is that the proto is encountering an error in newer versions of TDS, so we should fix that so it isn't an error, not ignore the error and mask the problem.

It looks like parsing the ENV more completly was already addressed in a prior commit.  I'm closing due to timeout. If you feel this is still an issue open a new issue with a test case using latest.

authors: dimdin kardianos michaelbironneau

repo: denisenkom/go-mssqldb