More powerful transiton?

I found it may be difficult to pass data from trigger to transition's condition. For example, trigger=foo,when bar>5, StateA->StateB,  I can't use Machine.foo(bar=6) to excute the transition.
By the way, I think a transition including Event Trigger, Condition, Condition Action, Transition Action  is necessary for building compicated FSM.
That kind of  transition is described in http://mathworks.com/help/stateflow/ug/transitions.html

Can you paste a code snippet that doesn't work, for your data-passing example? Depending on how you've set it up, you may need to set send_event=True in the initializer (see the README), but it should work.
Regarding the MathWorks example, you can duplicate most (though not quite all) of that functionality with the existing code in transitions... callbacks can be added to both states and transitions (i.e., states have 'on_enter' and 'on_exit' callbacks, and transitions have 'before' and 'after' callbacks), and transitions can have a list of conditions attached that must evaluate to True in order to execute. As far as I can see, the only difference in the MathWorks implementation is that one can have code that executes on successful condition evaluation even though the transition destination is not known to be valid yet. I need to think some more about whether that's worth implementing here, but I guess my first impression is that it doesn't seem like a very common use case.

When I set send_event=True, it works:) Another question, how can I add some logical operation(AND/OR/NOT) to conditions. I have no idea how to excute the transition when condistion is not true. I think define a not_condition function should work, but it seems a little ugly. Thank you!

I added an 'unless' argument in 67dce5d8d5123d6317816227c06b4d9e818198b6. It behaves just like conditions, except inverted (i.e., all conditions in the unless list must return False, or the transition fails). I think adding logic to handle disjunctions is probably not worth the extra code; I don't think that's a very common use case. But if other people request OR handling, we can always revisit this.


Using the persister

I am still not using a persister as there are still some things I don't get:
How can you use retrofit with the FileSystemPersister? Do you have a CallAdapter for BufferedSource or how do you do it?
Also if I understand correctly it does not operate with stale and clear functionality. Shouldn't it implement RecordProvider and Clearable?

What we do is that we use .share() on our observable and then use that Observable so that we can map it to a BufferedSource that will then be written on the disk.
e.g.:
Gson gson = new Gson();
ByteArrayInputStream is = new ByteArrayInputStream(gson.toJson(object).getBytes(UTF_8));
BufferedSource bufferedSource = Okio.buffer(Okio.source(is));
return bufferedSource;

But that's terrible inefficient. You let Gson map the data to a pojo for retrofit. Then the persister will write it to a Buffered source and write it to disk. Then the persiter will read it and map it through Gson to a pojo.
That's a chain of:
network -> pojo -> bufferedSource -> file -> bufferedSource -> pojo

That is just our way because we want to operate on the POJO before converting it to a BufferedSource. You could just skip that part and have your network write directly on a BufferedSource.

And how can I do that using retrofit?

@PaulWoitaschek Just return BufferedSource instead of returning a POJO on the method that you are using in your Fetcher.

Retrofit can't return BufferedSource. That's why I was asking for a call adapter.

@PaulWoitaschek I have used it before with just adding Observable<BufferedSource> and it worked..

Hi @PaulWoitaschek thank you for questions. We do in fact use a BufferedSourceConverterFactory with retrofit.
public final class BufferedSourceConverterFactory extends Converter.Factory {
  @Override
  public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations,
                                                          Retrofit retrofit) {
    if (!BufferedSource.class.equals(type)) {
      return null;
    }
    return new Converter<ResponseBody, BufferedSource>() {
      @Override public BufferedSource convert(ResponseBody value) throws IOException {
        return value.source();
      }
    };
  }
}

As for the Record/Clearable stuff we do have another Persister Impl that has both, I can pr it into the Store lib if you'd like.
public final class FileSystemRecordClearingPersister<Key> implements Persister<BufferedSource, Key>,
        RecordProvider<Key>,
        Clearable<Key> {
    private final FSReader<Key> fileReader;
    private final FSWriter<Key> fileWriter;
    private final FileSystem fileSystem;
    private final PathResolver<Key> pathResolver;
    private final long expirationDuration;
    @Nonnull
    private final TimeUnit expirationUnit;

    private FileSystemRecordClearingPersister(FileSystem fileSystem, PathResolver<Key> pathResolver,
                                              long expirationDuration,
                                              @Nonnull TimeUnit expirationUnit) {
        this.fileSystem = fileSystem;
        this.pathResolver = pathResolver;
        this.expirationDuration = expirationDuration;
        this.expirationUnit = expirationUnit;
        this.fileReader = new FSReader<>(fileSystem, pathResolver);
        this.fileWriter = new FSWriter<>(fileSystem, pathResolver);
    }

    @Nonnull
    public static <T> FileSystemRecordClearingPersister<T> create(FileSystem fileSystem,
                                                                  PathResolver<T> pathResolver,
                                                                  long expirationDuration,
                                                                  @Nonnull TimeUnit expirationUnit) {
        if (fileSystem == null) {
            throw new IllegalArgumentException("root file cannot be null.");
        } else {
            return new FileSystemRecordClearingPersister<>(fileSystem, pathResolver,
                    expirationDuration, expirationUnit);
        }
    }

    @Nonnull
    public RecordState getRecordState(@Nonnull Key key) {
        return this.fileSystem.getRecordState(this.expirationUnit,
                this.expirationDuration,
                this.pathResolver.resolve(key));
    }

    @Nonnull
    public Observable<BufferedSource> read(@Nonnull Key key) {
        return this.fileReader.read(key);
    }

    @Nonnull
    public Observable<Boolean> write(@Nonnull Key key, @Nonnull BufferedSource bufferedSource) {
        return this.fileWriter.write(key, bufferedSource);
    }

    @Override
    public void clear(@Nonnull Key key) {
        try {
            fileSystem.deleteAll(pathResolver.resolve(key));
        } catch (IOException e) {
            Log.e("don't worry about it", ":-)");
        }
    }
}

The store will absolutely respect streaming from network to FS without having to worry about inflating and deflating Pojos unnecessarily. :-D

Not sure if I answered all your questions, please don't hesitate to follow up if you have any other questions!

Fyi when registering the above adapter, order does matter this works:
Retrofit.Builder retrofitBuilder = new Retrofit.Builder()
                .client(client)
                .addConverterFactory(new ToStringConverterFactory())
                .addConverterFactory(new BufferedSourceConverterFactory())
                .addConverterFactory(GsonConverterFactory.create(gson))
                .addCallAdapterFactory(RxJavaCallAdapterFactory.create())

Great! Why not adding that functionallity to the FileSystemPersister directly? Also this does not handle the clearAll case, right?

Breaking change, open source is harder than I thought :-)
Doesn't handle clearAll.  I'm open to a PR that would have clear() delete everything in the root folder allowing you to use a seperate file system for each store...  I can't think of a better solution for the time being.

How can i change Persister<BufferedSource,T> to Persister<POJO,T> in FileSystemPersister ? Beacause i don't want to change my Retrofit interface to return Observable !

You would need to either implement your own persister or return observable
of a BufferedSource from retrofit. If you want the second option I can post
a converter to use
On Apr 8, 2017 6:13 AM, "UsherBaby"<EMAIL_ADDRESS>wrote:

How can i change Persister<BufferedSource,T> to Persister<POJO,T> in
FileSystemPersister ? Beacause i don't want to change my Retrofit interface
to return Observable !
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/NYTimes/Store/issues/156#issuecomment-292693464, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AEUX3N5pPj9v0RY_pQT67B0BxF5RuOt-ks5rtwlbgaJpZM4MZQOn
.

@PaulWoitaschek Ok , so post the converter ! Thanks

public final class BufferedSourceConverterFactory extends Converter.Factory {
  @Override
  public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations,
                                                          Retrofit retrofit) {
    if (!BufferedSource.class.equals(type)) {
      return null;
    }
    return new Converter<ResponseBody, BufferedSource>() {
      @Override public BufferedSource convert(ResponseBody value) throws IOException {
        return value.source();
      }
    };
  }
}


Problem logging in when using non-standard SSL port

Your Rocket.Chat.Android version: Latest from Play Store
Hi,
is it possible that the Android app is not able to connect if SSL is configured on a port other than 443? I can connect using the browser but the app gives something similar to "unable to connect. abort abort" when using e.g. https://URL:444
Thx

Now I get "ERR_CERT_AUTHORITY_INVALID" in Chrome on Android. Didn't happen 2 days ago. Will report back...

Sorry, this problem had to do with a missing certificate chain in my nginx SSL setup. Sorry for the noise.


File Not found when I try to patch platformio

C:\Users\gabri.platformio\RAK_PATCH>python ./rak_patch.py
Patching RAK4631
Patched RAK4631
Patching RAK11200
Patched RAK11200
Patching RAK11310
File not found.
Traceback (most recent call last):
File "C:\Users\gabri.platformio\RAK_PATCH\rak_patch.py", line 66, in
copy_files_ext(src_dir1, src_dir2, src_dir3, dest_dir1, dest_dir2, dest_dir3, "RAK11310")
File "C:\Users\gabri.platformio\RAK_PATCH\rak_patch.py", line 27, in copy_files_ext
shutil.copyfile(src_3+"/Print.h", dest_3+"/Print.h")
File "C:\Users\gabri\AppData\Local\Programs\Python\Python310\lib\shutil.py", line 256, in copyfile
with open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '../packages/framework-arduino-mbed/cores/arduino/api/Print.h'

For which platform do you want to patch?
Do you have Arduino-MBed BSP installed?
The patch tries to add required files for all Wisblock Core modules, if you need only RAK4631 or RAK11200 you can ignore the message.

i am trying to flash a new bootloader and wipe the old from an outdated unit i just bought. having the same issue with file not found. im stuck and i am NOT a coder but im not an idiot i just need some help tryin to set up this developer wisblock kit i bbought that has two boards to make two messaging units

What exactly is your output?
Did you install all three BSP's?
If only one is missing, the error will show, but the patch works for the ones that are installed.


Unable to run demo

Hi,
I've been trying to run the demo but I get:
$ embark run
>> Local Npm module "grunt-cli" not found. Is it installed?

Running "coffee:compile" (coffee) task
>> 0 files created.

Running "deploy_contracts" task
address is : 0xecb5f90c7887f3dddb38a1dc92f6dbe46894ee75
deploying app/contracts/simple_storage.sol
deployed at 0x739bbc4d85c0ddbdb73451a4c91cd101d7a3fa3a
Warning: Cannot read property 'abiDefinition' of undefined Use --force to continue.

Aborted due to warnings.

what am I doing wrong?

@ajunge that's a strange one. might be the solc or geth version. could you post the versions you have installed plz. i.e:
solc --version
geth version
npm list web3

$ solc --version
solc, the solidity compiler commandline interface 0.9.23
  by Christian<EMAIL_ADDRESS>and Lefteris<EMAIL_ADDRESS>(c) 2014.
Build: Linux/g++/int/Release

$ geth version
Geth
Version: 0.9.23
Protocol Version: 60
Network Id: 0
Go Version: go1.4.2
OS: linux
GOPATH=
GOROOT=/usr/lib/go

$ npm list web3
<EMAIL_ADDRESS>/home/ajunge/work/eth/embark_demo
└──<EMAIL_ADDRESS>

@ajunge geth changed the way it handles ABI's. I'll release soon a version addressing this

@ajunge released 0.1.1 with support for 0.9.23. Could you give it a try and let me know if it works for you?

Great., how do I upgrade?
El 26 de mayo de 2015 23:20:00 GMT-03:00, Iuri Matias<EMAIL_ADDRESS>escribió:

@ajunge released 0.1.1 with support for 0.9.23. Could you give it a try
and let me know if it works for you?

Reply to this email directly or view it on GitHub:
https://github.com/iurimatias/embark-framework/issues/3#issuecomment-105724677

--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

npm update -g embark-framework
also preferably, remove the previous demo folder and re-run "embark demo"

Now it works great!. Thanx!


Mail reports incorrect charset and fails to set string encoding

I'm having some issues using mail with latin characters. For example if I create an email in apple mail with ç it will set the charset of the email to latin (iso-8859-1). When i then call mail.body.charset I see US-ASCII, in addition mail.body.decoded.encoding is ASCII-8Bit.
Because of this mail.body.decoded.unpack("a*").inspect will become ["\xE7"] however if I try and say mail.body.decoded.encode('utf-8') an error will be thrown as ç is not a valid ascii character and the encoding should have registered as iso-8859-1 which would allow conversion to UTF-8 occur correctly and give a value of ["\xC3\xA7"] as the result.
I'm having a bit of trouble finding the relevant sections in the code to be able to add a spec and patch things so any help from someone who can get through things quicker would be appreciated. I have also included the following which illustrates the issue https://gist.github.com/53bb4016b8177198c387.

Merged the pull request in, thanks :)


Account page (with fyne library)

This pull request implements the accounts page using the fyne library.
The page displays the list of accounts available, together with the accounts' balances.
Beside each account name, a toggle button is displayed. Clicking it will hide/show more information about the account.
The target functionality is that available in the mobile app, as seen in the following screenshots. Controls for changing account settings (i.e., setting an account as the default account, or hiding an account from the UI) will be done in another PR.

The current functionality is as shown in the screenshot below.

This are the issues noticed on your PR.

Collapsible doesn't resize

Create new wallet gives invalid passphrase as shown on the top left.
Account page is already being worked on by a developer.


Samples take really long when profiling

Hi, and thanks for working on Criterion! It's been great for my template benchmarks.
I was trying to understood the performance differences between Askama and other template engines, and so I wanted to use Callgrind on Askama's benchmarks. However, when I do so (on my 2013-vintage MacBook Pro), the "Collecting samples" phase time blows up about 100x, such that it takes about 10 minutes for 5050 iterations:
djc@djc-mbp testing $ cargo bench
    Finished release [optimized] target(s) in 0.44s
     Running /Users/djc/src/askama/target/release/deps/all-736ecca55ba013b0
Benchmarking Big table: Collecting 100 samples in estimated 6.4974 s (5050 iterations)
djc@djc-mbp testing $ valgrind --tool=callgrind /Users/djc/src/askama/target/release/deps/all-736ecca55ba013b0 --bench --measure-only
[callgrind output elided]
Benchmarking Big table: Collecting 100 samples in estimated 560.24 s (5050 iterations)

I think (a) for profiling the sampling is not as important anyway, since the goal isn't really to compare to another run, and (b) if the run-time is so long, fewer samples is probably enough to deal with the variance?
It would be rad if Criterion would adjust the number of samples taken in a case like this (maybe contingent on --measure-only?), or, failing that, if there was a way to configure Criterion to take fewer samples.

I did find that eventually -- I was looking for in the book initially, but it wasn't mentioned there. It would be nice if there was a command-line option available to do that, since for the goal of profiling vs comparison I'd really only want to reduce the sample size for the former (because it's so slow).

I'm thinking of introducing a --profile option in 0.2.6 which iterates each benchmark a fixed number of times (or perhaps iterates until a fixed number of seconds has passed?).
I'll probably deprecate --measure-only in 0.2.6 and (if nobody objects) remove it in 0.3.0. I can't think of a reason why one would want to disable the analysis but keep the usual measurement logic.

Sounds good! I think it would make more sense to have fixed number of seconds over fixed number of times, so that a microbenchmark will still get enough samples to be somewhat reliable.


Indexing Failure When Adding Files via llama_parse Due to Event Loop Conflict

Describe the bug
When adding files using llama_parse, the indexing process fails to complete successfully, resulting in an error. Even after manually deleting a file and successfully indexing the remaining files, the error reoccurs upon adding a new file.
To Reproduce
Steps to reproduce the behavior:

Initialize the project in development mode with the following commands:

nvm use 18.17.0

export PATH="$HOME/.local/bin:$PATH"

poetry install --no-root

make build-frontends

make dev

Add a new file via the UI (use_llama_parse: true).

Observe that the indexing process fails with an error.

Delete one of the previously added files.

Observe that the indexing process completes successfully.

Add another new file using llama_parse.

Observe that the indexing process fails again with the same error.

Expected behavior
The indexing process should automatically handle newly added files via llama_parse and successfully generate an index without encountering any errors, even after files have been deleted and new ones added.

OS: macOS

Additional context
The error logs indicate that the event loop is already running, suggesting a conflict in asynchronous operations. The specific error message is:

Failed to load file /path/to/file.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...

Full logs
INFO:     Will watch for changes in these directories: ['/Users/morph/Desktop/repo/ragapp']
INFO:     Uvicorn running on http://<IP_ADDRESS>:8000 (Press CTRL+C to quit)
INFO:     Started reloader process [71112] using WatchFiles
INFO:     Started server process [71200]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     <IP_ADDRESS>:55270 - "GET / HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55270 - "GET /_next/static/media/c9a5bc6a7c948fb0-s.p.woff2 HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55271 - "GET /logo.png HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/css/4d88347adb5b84a3.css HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /_next/static/css/c2c73084e6239ceb.css HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /_next/static/chunks/webpack-9873e35bb69d16f2.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55274 - "GET /_next/static/chunks/fd9d1056-bafb250fea15ab8f.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55270 - "GET /_next/static/chunks/23-8382186d5f126da1.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /_next/static/chunks/d3ac728e-9015be3d5bd93097.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /_next/static/chunks/398-77845278697e7890.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55271 - "GET /_next/static/chunks/643-44e77415f95bc097.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/7a49ec60-430645e2cccb3ef0.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55274 - "GET /_next/static/chunks/main-app-34347c60bb8fcf6c.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55270 - "GET /_next/static/chunks/app/page-bf3d433eb9b5b231.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /admin/ HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /admin/_next/static/css/066e5f2567fdda4c.css HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /admin/_next/static/chunks/webpack-e87a2277ef2add6f.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55273 - "GET /admin/_next/static/chunks/framework-ecc4130bc7a58a64.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /admin/_next/static/chunks/pages/_app-98aa307ef5d20896.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /admin/_next/static/chunks/main-9f6c0b9b667f3728.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55273 - "GET /admin/_next/static/chunks/34-53d9122ea2ef75cd.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /admin/_next/static/chunks/pages/index-850972270ba9fadd.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /admin/_next/static/1kqJmHIIlQg6cEGv0c3OL/_buildManifest.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /admin/_next/static/1kqJmHIIlQg6cEGv0c3OL/_ssgManifest.js HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /api/management/config HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55272 - "GET /chat.html HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /api/management/files HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55273 - "GET /api/management/tools HTTP/1.1" 200 OK
INFO:     <IP_ADDRESS>:55275 - "GET /_next/static/media/c9a5bc6a7c948fb0-s.p.woff2 HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/css/c2c73084e6239ceb.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/css/4d88347adb5b84a3.css HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/webpack-9873e35bb69d16f2.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/fd9d1056-bafb250fea15ab8f.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/23-8382186d5f126da1.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/main-app-34347c60bb8fcf6c.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/d3ac728e-9015be3d5bd93097.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/7a49ec60-430645e2cccb3ef0.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/398-77845278697e7890.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/643-44e77415f95bc097.js HTTP/1.1" 304 Not Modified
INFO:     <IP_ADDRESS>:55273 - "GET /_next/static/chunks/app/chat/page-408ff40d37c577ea.js HTTP/1.1" 200 OK
INFO:root:Generate index for the provided data
INFO:app.engine.loaders:Loading documents from loader: file, config: {'use_llama_parse': True}
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Bonus_Matmut_Famille.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
/Users/morph/Library/Caches/pypoetry/virtualenvs/rag-box-UfsaE1sc-py3.10/lib/python3.10/site-packages/llama_index/core/readers/file/base.py:546: RuntimeWarning: coroutine 'LlamaParse.aload_data' was never awaited
  return []
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
INFO:watchfiles.main:5 changes detected
INFO:app.engine.vectordb:Using vector provider: chroma
INFO:chromadb.telemetry.product.posthog:Anonymized telemetry enabled. See                     https://docs.trychroma.com/telemetry for more information.
INFO:watchfiles.main:2 changes detected
Parsing nodes: 0it [00:00, ?it/s]
Generating embeddings: 0it [00:00, ?it/s]
INFO:root:Finished generating the index
INFO:     <IP_ADDRESS>:55300 - "POST /api/management/files HTTP/1.1" 200 OK
INFO:watchfiles.main:8 changes detected
INFO:root:Generate index for the provided data
INFO:app.engine.loaders:Loading documents from loader: file, config: {'use_llama_parse': True}
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Bonus_Matmut_Famille.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
/Users/morph/Library/Caches/pypoetry/virtualenvs/rag-box-UfsaE1sc-py3.10/lib/python3.10/site-packages/llama_index/core/readers/file/base.py:546: RuntimeWarning: coroutine 'LlamaParse.aload_data' was never awaited
  return []
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Petit_rouleur_Matmut.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
INFO:app.engine.vectordb:Using vector provider: chroma
INFO:chromadb.api.segment:Collection default is not created.
Parsing nodes: 0it [00:00, ?it/s]
Generating embeddings: 0it [00:00, ?it/s]
INFO:root:Finished generating the index
INFO:     <IP_ADDRESS>:55304 - "POST /api/management/files HTTP/1.1" 200 OK
INFO:watchfiles.main:5 changes detected
INFO:root:Generate index for the provided data
INFO:app.engine.loaders:Loading documents from loader: file, config: {'use_llama_parse': True}
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Bonus_Matmut_Famille.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Petit_rouleur_Matmut.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Usage_Sérénité_-_2_roues.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
INFO:app.engine.vectordb:Using vector provider: chroma
INFO:chromadb.api.segment:Collection default is not created.
Parsing nodes: 0it [00:00, ?it/s]
Generating embeddings: 0it [00:00, ?it/s]
INFO:root:Finished generating the index
INFO:     <IP_ADDRESS>:55305 - "POST /api/management/files HTTP/1.1" 200 OK
INFO:watchfiles.main:5 changes detected
INFO:root:Generate index for the provided data
INFO:app.engine.loaders:Loading documents from loader: file, config: {'use_llama_parse': True}
INFO:watchfiles.main:1 change detected
INFO:httpx:HTTP Request: POST https://api.cloud.llamaindex.ai/api/parsing/upload "HTTP/1.1 200 OK"
Started parsing the file under job_id a15970a0-c3ac-42bc-9282-4c3b14827140
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/a15970a0-c3ac-42bc-9282-4c3b14827140 "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/a15970a0-c3ac-42bc-9282-4c3b14827140/result/markdown "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.cloud.llamaindex.ai/api/parsing/upload "HTTP/1.1 200 OK"
Started parsing the file under job_id f2dde6cb-f69d-412b-bf0d-3f94a56e45d8
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/f2dde6cb-f69d-412b-bf0d-3f94a56e45d8 "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/f2dde6cb-f69d-412b-bf0d-3f94a56e45d8/result/markdown "HTTP/1.1 200 OK"
INFO:app.engine.vectordb:Using vector provider: chroma
INFO:chromadb.api.segment:Collection default is not created.
Parsing nodes: 100%|████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 37.21it/s]
Generating embeddings:   0%|                                                        | 0/4 [00:00<?, ?it/s]INFO:httpx:HTTP Request: POST https://api.openai.com/v1/embeddings "HTTP/1.1 200 OK"
Generating embeddings: 100%|████████████████████████████████████████████████| 4/4 [00:01<00:00,  3.79it/s]
INFO:root:Finished generating the index
INFO:     <IP_ADDRESS>:55306 - "DELETE /api/management/files/Conditions_des_avantages_Gamme_4_Roues_Re%CC%81fe%CC%81rence-Essentiel_Bonus_Matmut_Famille.pdf HTTP/1.1" 200 OK
INFO:watchfiles.main:11 changes detected
INFO:root:Generate index for the provided data
INFO:app.engine.loaders:Loading documents from loader: file, config: {'use_llama_parse': True}
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Flotte_Bris_de_glaces.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
/Users/morph/Library/Caches/pypoetry/virtualenvs/rag-box-UfsaE1sc-py3.10/lib/python3.10/site-packages/llama_index/core/readers/file/base.py:546: RuntimeWarning: coroutine 'LlamaParse.aload_data' was never awaited
  return []
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Petit_rouleur_Matmut.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
Failed to load file /Users/morph/Desktop/repo/ragapp/data/Conditions_des_avantages_Gamme_4_Roues_Référence-Essentiel_Usage_Sérénité_-_2_roues.pdf with error: The event loop is already running. Add `import nest_asyncio; nest_asyncio.apply()` to your code to fix this issue.. Skipping...
INFO:app.engine.vectordb:Using vector provider: chroma
INFO:chromadb.api.segment:Collection default is not created.
Parsing nodes: 0it [00:00, ?it/s]
Generating embeddings: 0it [00:00, ?it/s]
INFO:root:Finished generating the index
INFO:     <IP_ADDRESS>:55333 - "POST /api/management/files HTTP/1.1" 200 OK
INFO:watchfiles.main:7 changes detected

we will support this in #38


Updated the function calc_nonlinear_tire_force to handle dataclass

The function calc_nonlinear_tire_force can now take as input tire_data.py dataclass.
Added LQR gains for rider Gabriele (635 N).

I'll merge this, but I'd like to leave the base simulation in place. You can start a new simulation file that does your comparisons by coping base_simulation.py and then working out the various simulations you like to do.


General Suggestions + Peer review

There are a ton of branches... I doubt this is intentional but I would strongly suggest both deleting and naming them appropriately

After signup is it possible to automatically log me in?
1.1 if not above, can you at least take me to log in page?

Once logged in the search box doesn't have a search button... please add
2.1 Autocomplete would be an awesome enhancement

are there other moods that could be added?
3.1 could i add my own mood?

The player is at the bottom... would be much better at top and not get filtered away / maybe on the fixed on one of the side bars

the home page is sign up even if i am logged in, let's have some conditional to avoid that

maybe a close button on "profile" page

Thanks for your suggestions, Tyler! Will definitely consider these to our backlog.
As for specifics
3. This feature is currently not there.
4. We are planning to make the player sticky, so that even if the result cause a scroll, it'll still be accessible

Thanks for the followup, I am content; everything seemed good with CI/CD as well !


[Bug][iOS] foregroundStyle is not reflected to icons

Describe the bug
From #777.
In case of the above PR, the bookmark icons' color is not changed although foregroundStyle is applied to them.
This is because icons' rendering mode in Assets folder is set as Default.
To Reproduce
Just to open the app.
Expected behavior
Icons are tinted correctly.
Screenshots

🙋

@fumiyasac
Thank you! Assigned!


Generalized Linear Mixed Models	- MMRM

@statasaurus Is there a plan to examine how SAS and R compute the LS mean in the MMRM? And moving forward, to do more specific scenarios, such as computing the LS mean in the non-inferiority or superiority trials.

Hello @kaigu1990 we don't have a specific plan for this, but if you would like to add in the content I imagine it would be very helpful.

there are examples of LSMeans calculations in the mmrm package repository documentation

Hi @statasaurus and @yonicd , Thanks for your advice.
After learning the mmrm and emmeans related documents, we can compute the least-square means, corresponding contrasts and hypothesis testing using emmeans functions.
First, we fit a MMRM model.
library(mmrm)
library(emmeans)

fit <- mmrm(
  formula = FEV1 ~ RACE + SEX + ARMCD * AVISIT + us(AVISIT | USUBJID),
  reml = TRUE, method = "Kenward-Roger", vcov = "Kenward-Roger-Linear",
  data = fev_data
)
summary(fit)

And then compute the least-square means with corresponding CI.
ems <- emmeans(fit, ~ ARMCD | AVISIT)
confint(ems)

Suppose we want to answer the question that the null hypothesis is that treatment minus placebo equals zero. The contrast can be created below.
contr <- contrast(ems, adjust = "none", method = "pairwise")
contr

Suppose we would like to test the hypothesis that treatment is superior to placebo with a margin of 2.
test(contr, null = 2, side = ">")

This is just a brief summary. I have also compared the above results with the SAS code below. If there is something wrong, please tell me.
proc mixed data=fev_data;
	class ARMCD(ref='PBO') AVISIT RACE SEX USUBJID;
	model FEV1 = RACE SEX ARMCD ARMCD*AVISIT / ddfm=KR;
	repeated AVISIT / subject=USUBJID type=UN r rcorr;
	lsmeans ARMCD*AVISIT / cl alpha=0.05 diff slice=AVISIT;
	lsmeans ARMCD / cl alpha=0.05 diff;
	lsmestimate ARMCD*AVISIT [1,1 4] [-1,2 4] / cl upper alpha=0.025 testvalue=2;
	ods output lsmeans=lsm diffs=diff LSMEstimates=est;
run;

Just FYI:    @stephenwaugh  will be investigating further into MMRMs and updating these pages from Sept 2024 - July 2025.


Issues with Clock

https://github.com/kubernetes/utils/blob/67b214c5f920060488eda08cd2b5c30597f2f1d7/clock/clock.go#L31-L37

After(d time.Duration) <-chan time.Time does not allow to stop the underlying timer to free resources if it's no longer needed. This can lead to memory leaks when a lot of long-lived timers pile up. It's a well-known pitfall. The fix is to remove the method and use the Timer() method instead.

Tick(d time.Duration) <-chan time.Time has the same issue as After(). This method should be replaced with NewTicker() from the sister package (which I added here https://github.com/kubernetes/kubernetes/pull/61976).

Sleep(d time.Duration) should take context.Context to allow for early interruption of sleep. This method is used e.g. in client-go to sleep between request retries and often there is a context to signal that the attempt should be aborted. Currently there is no way to interrupt this sleep.

I'd like to replace https://github.com/kubernetes/kubernetes/pull/93709 with clock usage.

I'd like to replace https://github.com/kubernetes/kubernetes/pull/93709 with clock usage.

Removing methods from the interface is not API compatible, and is not permitted for the utils library due to its wide use across versions and across projects.
Adding methods to surface the NewTimer and NewTicker methods provided by the time package and marking the After and Tick methods deprecated (but not removing them) could be reasonable.

Sleep(d time.Duration) should take context.Context to allow for early interruption of sleep. This method is used e.g. in client-go to sleep between request retries and often there is a context to signal that the attempt should be aborted. Currently there is no way to interrupt this sleep.

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Removing methods from the interface is not API compatible, and is not permitted for the utils library due to its wide use across versions and across projects.
Adding methods to surface the NewTimer and NewTicker methods provided by the time package and marking the After and Tick methods deprecated (but not removing them) could be reasonable.

Sleep(d time.Duration) should take context.Context to allow for early interruption of sleep. This method is used e.g. in client-go to sleep between request retries and often there is a context to signal that the attempt should be aborted. Currently there is no way to interrupt this sleep.

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Thanks for responding. I agree adding + deprecating methods is a better way forward. This repository is different from all the other Kubernetes repositories that I've seen - it provides some compatibility guarantees. There is way more code that is using the unstable APIs (e.g. client-go) than these utils, so I'm curious why it's been made special.
Regarding Sleep - if the Clock does not have the method I'm suggesting then I see the following not mutually exclusive outcomes:

(ok-ish) People use Clock's Timer + select on context to implement interruptible sleep. The existing Sleep method is not as useful as it could be.
People use Clock's Sleep and the sleep is not interruptible where it should be. This is suboptimal as often the resources can be freed earlier and latency reduced if cancellation is respected.

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Yes, but it'd be very useful to have on the fake clock. According to the description, this repo is for "packages supplementing the Go standard libs" so hopefully it can still fit?

Thanks for responding. I agree adding + deprecating methods is a better way forward. This repository is different from all the other Kubernetes repositories that I've seen - it provides some compatibility guarantees. There is way more code that is using the unstable APIs (e.g. client-go) than these utils, so I'm curious why it's been made special.
Regarding Sleep - if the Clock does not have the method I'm suggesting then I see the following not mutually exclusive outcomes:

(ok-ish) People use Clock's Timer + select on context to implement interruptible sleep. The existing Sleep method is not as useful as it could be.
People use Clock's Sleep and the sleep is not interruptible where it should be. This is suboptimal as often the resources can be freed earlier and latency reduced if cancellation is respected.

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Yes, but it'd be very useful to have on the fake clock. According to the description, this repo is for "packages supplementing the Go standard libs" so hopefully it can still fit?

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Yes, but it'd be very useful to have on the fake clock. According to the description, this repo is for "packages supplementing the Go standard libs" so hopefully it can still fit?

The intent of the clock interface is to allow swapping a fake clock for unit testing, not to extend stdlib time methods. If the stdlib added a Sleep(ctx, duration) method, that would be a candidate for inclusion.

These methods mirror the ones provided by the time package. There is no Sleep(context.Context, time.Duration) method, so I would not expect our clock fake to provide that.

Yes, but it'd be very useful to have on the fake clock. According to the description, this repo is for "packages supplementing the Go standard libs" so hopefully it can still fit?

The intent of the clock interface is to allow swapping a fake clock for unit testing, not to extend stdlib time methods. If the stdlib added a Sleep(ctx, duration) method, that would be a candidate for inclusion.

@liggitt ok. Would it be fine to add a function rather than a method? It's short and maybe it's not worth it, but also this snipped will possibly be copied many times.
func SleepInterruptibly(ctx context.Context, clock Clock, d time.Duration) bool {
	t := clock.NewTimer(d)
	select {
	case <-ctx.Done():
		t.Stop()
		return false
	case <-t.C():
		return true
	}
}

@liggitt ok. Would it be fine to add a function rather than a method? It's short and maybe it's not worth it, but also this snipped will possibly be copied many times.
func SleepInterruptibly(ctx context.Context, clock Clock, d time.Duration) bool {
	t := clock.NewTimer(d)
	select {
	case <-ctx.Done():
		t.Stop()
		return false
	case <-t.C():
		return true
	}
}

that seems short/not worth it to me, but I'm happy to hear other perspectives from apimachinery folks

that seems short/not worth it to me, but I'm happy to hear other perspectives from apimachinery folks

/lifecycle frozen

Part of this issue is about stuff that was addressed in the other clock package in https://github.com/kubernetes/kubernetes/pull/61976 (as noted in https://github.com/kubernetes/kubernetes/issues/94738).
I would like to consolidate on one clock package.
I agree with adding new methods and deprecating the old ones.


Move docs’s legacy html to https://github.com/apache/incubator-shardingsphere-doc repo

We have already moved docs from https://github.com/apache/incubator-shardingsphere-doc to this repo.
But some legacy html files which generated by Hugo for previous version are not source code, the docs folder should only contains source code (the md files).
So we need to move all html files to asf-site branch of https://github.com/apache/incubator-shardingsphere-doc.
The remain tasks are:

[x] Remove legacy folder
[ ] Remove homepage folder (to be decision, because even homepage is html file, but it is not generated by Hugo)
[ ] Move docs/document/current to docs/document
[ ] Revise build shell

@terrymanu My suggestion is to remain homepace at current repo, since we may update it in future.

@tristaZero Sure, it is better to move homepage to asf-site branch


[BUG] - The Prompt Reader doesn't populate when image is loaded, and can display the wrong information to the user.

Description
I feel like the only person running into this, since no one has mentioned it here so far, but whenever I drag an image or manually choose an image for the prompt reader node, the boxes stay blank. It can populate with the wrong information if changing images, causing problems if the user isn't aware that the prompt info doesn't match the current image. I added steps into the Reproduction Steps that you can follow.
Here's what it ends up looking like. It displays information from the wrong image.

 I'm on ComfyUI: 1930d1533d.
Reproduction steps

Add an SD Prompt Reader node
Add an SD Prompt Saver node (not necessary, but done because the usage instructions says to do that, even if you're not using it)
Connect the Prompt Reader node to the Prompt Saver image input (not required for the bug, but just to be safe).
Drag an image into the standalone SD Prompt Reader program, to confirm that it has metadata that can be read.
In the SD Prompt Reader node, either drag the image from step 4 onto the node, or click on the "choose file to upload" button, and choose the file in step 4.
Notice that nothing is being populated. It's completely blank.
Add the generation to the queue.
Notice that it's populated.
Add several generations to the queue.
Change the image in the SD Prompt Reader node.
Notice that it doesn't change due to actions taking place, but only when adding it to a queue.

Image file
No response

Hi Friend! I has same issue.

First, let me explain why the metadata shown in the Prompt Reader node may not match the current image.
When you select an image, the change in the image preview is real-time, but reading metadata can only be triggered by image generation. Therefore, the complete process is as follows:
Select the image → Update the image preview → Press the Queue button → The prompt reader reads the metadata from the image → Outputs the metadata → Updates the text box.
Anytime you see metadata, it is data from the image used by the previous generation.
This is a feature of comfyui (python script can only be triggered by image generation), and I currently have no solution to this.

Anytime you see metadata, it is data from the image used by the previous generation. This is a feature of comfyui (python script can only be triggered by image generation), and I currently have no solution to this.

I see. Some nodes have a right click action that lets you view model data when you set a Lora or Checkpoint. Is it maybe possible to right click to populate the node in the same way? Generating an image/video/whatever seems a bit wasteful if it can be avoided.

Some nodes have a right click "View Info..." action that lets you view model data when you set a Lora or Checkpoint. Is it maybe possible to right click to populate your node in the same way? Similarly, the latent node has a right click action that swaps the height/width. RGThree has general right click actions on empty space that can convert several nodes in the graph, or can bring you to a place to rate the add-on on Github. Or is there a way to get it to hook into the "Refresh" action, which repopulates all the checkpoints/loras?

This is very useful to me! As far as I know, this can only trigger JS code, not Python code. Anyway, I will go check their source code.

Bad news: my guess was correct, no one can trigger Python code using the right-click menu. That's to say, I can't use right-click to update the text box.

Install https://github.com/rgthree/rgthree-comfy
Then you can execute selected nodes.

Install https://github.com/rgthree/rgthree-comfy Then you can execute selected nodes.

Ohhh, I have that. I didn't know it had that feature. SO many features on that one. In case anyone else finds this, it seems to be the "Queue Selected Output Nodes (rgthree)" feature. Thanks!


Bootc with credential helper fails without /etc/ostree/auth.json

A bit of a strange one, and I'm not too sure where to file this.
I am trying to deploy a bootc image to AWS, with the image hosted in ECR.  To pull from ECR, it's best to use the docker-credential-ecr-login helper.  I don't know if any of this information about the credential helpers is actually relevant, but I do not currently have an environment to test without.
So I added the credential helper binary to my $PATH, along with the following /etc/containers/registries.conf.d/001-ecr-login.conf config:
credential-helpers = ["ecr-login"]

A bootc upgrade failed with "authentication required".
Now comes the weird part.  If I create an empty /etc/ostree/auth.json file, an upgrade works...
If this is a required file, I suggest a relevant error message be thrown when not present.  Or specifying this somewhere in the docs would also be good.
Thank you
Rob

PR in https://github.com/containers/bootc/pull/563 for docs, sorry it's going to be hard for us to do better in a short term.

Updating the docs is great, thanks!  Just don't want others to get stuck on this for as long as I did :laughing:
I don't mind whether you close this as complete, or leave it in the hope it will be fixed further down the line.


YAML: let String handle numbers too

Fixes #5798
I already gave a lot of reasons why this is a good/correct change (every other statically typed language does this), plus we recently bumped into this with something like:
version: 2.8

If I say I want to read the version as a string, there's no reason why I have to go and modify the yaml file to add an annotation like !string or put it in quotes. People don't do that, at all. And there's no point forcing people to do that (and sometimes it's impossible because the yaml is not in their control).
Or imagine have some kind of code:
code: abc123

That looks like a String. Now this (imagine someone is editing it manually, typing it):
code: 12e45

Oops! You just input something that looks like a floating point number. You should be more careful when that happens and put quotes around it. Right? No... people don't do that, they don't care about how the machine will work in this case, they are just editing a string in their mind. And I think that's fine.

This change is unacceptable. It makes it impossible to use type safe YAML parsing.
I understand that the implemented behaviour can be desired in many cases, but in other cases it is necessary to distinguish between explicit YAML types.
I'm a bit disappointed this change was merged within hours despite my objections in #5798.
The previous behaviour is not a bug. It doesn't need to be fixed.
Instead, we should discuss how both use cases can be made possible.

@straight-shoota Could you provide a use case where this behavior is not desired?

I'm also having a hard time understanding why this is something desirable:

I’ve been using String | Int64 on mappings and then a to_s manually

Or another question: how would you map the version field above without having to use an ugly hack like String | Int64 | Float64 and then calling to_s? We can't use String because it will choke. And we don't want to tell users to put quotes around values that look like numbers (because our users might not be programmers!).

There is https://crystal-lang.org/api/master/String/RawConverter.html, but it is currently only for JSON.  Having that support YAML as well would allow for this.  They would just have to specific that converter.

Right, but in JSON every type has a different representation. In YAML that's not exactly like that because you have schemas, and also a proof of this is that using libyaml scalars are just scalars (strings): how to interpret them is left to the user of the library. In this case, the user is Crystal, and by saying "I want this scalar to be a string" we are effectively not treating 2.8 as a number, which it was never in the first place (it's just a scalar, according to libyaml).

Specifying the type should be enough in resolving ambiguities, if there are such. There's nothing wrong in having user-friendly, loose (in terms of YAML spec) parser, which works "just right" in such cases, with no negative side-effects (perhaps I'm wrong here, but I don't see any...).

Now if you parse with YAML.parse, well, that has to use some default schema, for the lack of type annotations, and then 2.8 is parsed as a float, not a string.
But I think I'm just repeating what I said in the other thread...

YAML is based on elaborate schemas which describe how to interpret scalars.

Exactly! There's the core schema, there's the fail-safe schema. And in my mind, YAML::Serializable or YAML.mapping define a schema: how you want to map a given YAML to Crystal types. And in that case, if I want to map a scalar to a String, every scalar can be mapped into a String.

While having the same string representation, 2.8 and "2.8" are different values in the Core schema, the most commonly used YAML schema (and also the default in Crystal).

Yes, in the Core schema and when you do YAML.parse, where you can't define any schema at all. That's why the default one (Core) is used. But using YAML.mapping changes that.

Even YAML's null value is suddenly interpreted as a string. Mapping String? only works correctly because Nil is lexically sorted before String

I think null is not common at all in YAML. If you want to omit a value you omit it. And we can simply fix th Nil behavior in unions by considering it first.

(String | Time).from_yaml("2019-05-27 16:38:42.536517000").class # => String
(String | UInt32).from_yaml("1").class # => String

I will say that union types in YAML are pretty rare. I wouldn't expect, ever, to have a value that can either be a String or a Time. It's always one value. When it's a union it's usually a composite type. But that type is then usually distinguished by another key.
And we can always fix this by considering String last in unions.

For the use case this PR intends to solve, using the Failsafe schema would be an appropriate solution

I think the problem of wanting to read something as a String but not being able to do that because it looks like a number is not specific to a specific key-value. It's a general problem.
Finally: why C#, Java and Go behave like this PR?

if I want to map a scalar to a String, every scalar can be mapped into a String.

Until this PR, you could only map matching types. And that's a great default because it fails when there is an unexpected value instead of simply digesting it, which might result in unexpected behaviour later on.

Yes, in the Core schema and when you do YAML.parse, where you can't define any schema at all. That's why the default one (Core) is used. But using YAML.mapping changes that.

I don't follow. What does YAML.mapping change? It uses the Core schema as well.
And the solution I'm proposing is to make .from_yaml (and following that YAML.mapping/YAML::Serializable) aware of the schema to provide different implementations, depending on the intended use case.

I think the problem of wanting to read something as a String but not being able to do that because it looks like a number is not specific to a specific key-value. It's a general problem.

Yes, you wouldn't use the Failsafe schema for mapping a specific key, but for parsing the entire YAML document.

why C#, Java and Go behave like this PR?

Do you have examples for that?

@straight-shoota

Go: https://github.com/crystal-lang/crystal/issues/5798#issuecomment-372048798
C#: https://github.com/crystal-lang/crystal/issues/5798#issuecomment-372049564

I don't have time to set up a Java project right now, but if you can try it I'm pretty sure mapping a String works like this PR.

I just tried it in Java:
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;

public class Main {
	public static class Customer {
		private String firstName;

		public String getFirstName() {
			return firstName;
		}

		public void setFirstName(String firstName) {
			this.firstName = firstName;
		}
	}

	public static void main(String[] args) throws Exception {
		new Main().main();
	}

	public void main() throws Exception {
		Yaml yaml = new Yaml(new Constructor(Customer.class));

		Customer customer = (Customer) yaml.load("firstName: 123");
		System.out.print(customer.firstName);
	}

}

Works just fine :-)

Ooops, sry. I couldn't recall these examples. Thanks for pointing it out.
At least YAMLDotNet and snakeyaml only implement YAML 1.1, which means untagged nodes are not resolved and their interpretation is completely application-defined. This mostly resembles the fail safe schema of YAML 1.2
go-yaml supports YAML 1.2 but it also seems to employ the fail safe schema and only apply type conversions on top of that.
For example, an explicitly tagged string can be mapped to a time instance:
time := time.Time{}
yaml.Unmarshal([]byte("!!str 2006-01-02T15:04:05Z"), &time)

In Crystal, this does not work, because Time.from_yaml expects a YAML time type:
Time.from_yaml("!!str 2006-01-02T15:04:05Z") # Error: Expected Time, not 2006-01-02T15:04:05Z

But String.from_yaml now accepts literally anything:
String.from_yaml("!!float not even a valid float") # => "not even a valid float"

This should definitely be an error. I suppose this could be fixed, though.
But what about this:
String.from_yaml("!!float 1.00") # => "1.00"
String.from_yaml("!!float 1")    # => "1"

According to the YAML specification, !!float 1.00 and !!float 1 represent the same value. But when you ask to map it to a string, they suddenly become different values?
YAMLDotNet treats them equally:
deserializer.Deserialize<String>(new StringReader("!!float 1.00")) // => "1"
deserializer.Deserialize<String>(new StringReader("!!float 1"))    // => "1"

This means it correctly resolves the value according to the specified tag and then maps that value (a YAML float) to a .NET string.

The approach of using the fail safe schema + custom type mappings can certainly be useful. But Crystal's entire YAML library is based on the core schema which is recommended as default schema. It provides tag resolution for the most common data types.
The current state after this PR is an inconclusive mixture between failsafe and core schema, which is not a desirable state. It should be either one, or even better, optional support for both of them (plus eventually JSON schema).

Maybe we should fail on explicitly tagged valued. But I disagree about everything else. We should take pragmatism into account. For me that @bcardiff had to use a union and then call to_s is not acceptable, and that people keep bumping into this issue isn't acceptable either. Let's keep this PR merged for a couple of releases. I'm pretty sure nobody will complain about this anymore, practically (theoretically we could continue discussing what's right or wrong).

I'm not at all against a pragmatic solution. And I totally agree that union + to_s is not practical, it can even be incorrect (when a value is normalized).
But please let's introduce a standard-conform solution, not a weird hack that essentially creates a hybrid between fail safe and core schema, specific to the String type.
YAML is already complex enough at times, we should avoid imposing more complexity and surprises on the developer.
A proper solution is to fully support YAML parsing using the fail safe schema. This would fix #5798 and work similar to the implementations in other languages as mentioned above, while being fully compliant to the YAML specification.

@straight-shoota But doesn't the failsafe schema just support strings? Not even floats or ints.
I really don't think there's any conflict here. YAML.parse uses the core schema. There String.from_yaml isn't used at all. Then YAML.mapping defines the schema to use on top of YAML. The core schema isn't involved at all there.
They are two different schemas with no interaction.
I also want to add the note that tagging isn't common at all and I've never seen it used (mainly because YAML is mainly for humans, and humans don't worry/think about tags). So yes, we could theoretically worry about it and try to make a best effort, but maybe it's not worth it.

But doesn't the failsafe schema just support strings? Not even floats or ints.

No. The failsafe schema supports any data type in YAML. It just doesn't provide any default tag resolution for untagged scalars and leaves that to the application. So, for example when the scalar value 2.8 can be interpreted as a string or a float, depending on whether you call String.from_yaml or Float64.from_yaml.
That's how go-yaml, YAMLDotNet and snakeyaml work and the proper implementation for the problem described in #5798.
In the core schema on the other hand, 2.8 is defined to be resolved to a float and it can be parsed with Float64.from_yaml. But when asking for a string (String.from_yaml) it should error because there is a type conflict.

YAML.mapping defines the schema to use on top of YAML

YAML.mapping defines the mapping from YAML types to Crystal types. All .from_yaml implementations are based on the YAML types which are resolved according to the Core schema.
For example: Int32.from_yaml only works with a plain scalar like 1 which resolves to the YAML int type and thus provides a matching data type. It does not work with a quoted scalar like "1" which resolves to the YAML str type and is not a matching data type.

They are two different schemas with no interaction.

Exactly. But this PR combines behaviour of the fail safe schema (plain scalar maps to string) with the core schema (plain scalars resolve to a specific type depending on their format).

No. The failsafe schema supports any data type in YAML. It just doesn't provide any default tag resolution for untagged scalars and leaves that to the application. So, for example when the scalar value 2.8 can be interpreted as a string or a float, depending on whether you call String.from_yaml or Float64.from_yaml.
That's how go-yaml, YAMLDotNet and snakeyaml work and the proper implementation for the problem described in #5798.

However, when I parse with go-yaml into map[interface{}]interface{}, meaning I don't know what types I'll get, when I parse 123, using reflection, I get an int. When I parse 123.45 I get a float. But when I map it to a string I always get a string.
But maybe I shouldn't base my thoughts on how it should work based on other implementations.
I guess... I'll stop commenting here. Feel free to come up with a good implementation and submit a PR or an RFC. Thank you!


Exclude files from coverage

I'd like to see the ability to exclude files from coverage.
The use case is some 3rd party code that is embedded in other code (minified plugins).
I'd like to be able to either exclude blocks of code, or the entire file.

@gotwarlost what should we store in the .istanbul.yml file so we dont have to do it on the cli?

@gotwarlost: +1 for an exclusion option to add to .istanbul.yml. Seems like a major oversight if such an option doesn't exist.

there is an excludes portion in the yml file:
instrumentation:
    root: .
    extensions:
        - .js
    default-excludes: true
    excludes: []

But it doesn't seem to do what we want, I tried excluding my samples and etc folders:
instrumentation:
  excludes: ['**/samples/**', '**/etc/**']

but it's still reporting coverage for code in those folders.
Same for -x:
./node_modules/.bin/istanbul cover -x 'etc' -x 'sample'

Still reporting coverage for code in those folders.

+1 @jcollum I'm having exactly the same problem. Can't find documentation anywhere on how to populate the excludes. Have tried everything so far and I still get the lcov-report/index.html file show unneeded files

@gotwarlost Seems like this issue is not actually resolved. Or the docs are unclear on how to actually use the excludes feature.

I've managed to exclude file extensions but not directiores.

Seems to completely ignore the -x command line option for me, too...

I can exclude with ```-x "**/folder/**"``` now, but I cannot figure out how to exclude multiple as the help is not clear about it in the slightest...

You can pass in multiple -x pattern directives

@jcollum Late to the party, but thats not how you do arrays in yml:
instrumentation:
    root: .
    extensions:
        - .js
    default-excludes: true
    excludes:
        - src/utils.js

@Ehesp I think you should read the docs: http://yaml.org/spec/1.0/ section A.1. Sequence

I got this working as follows
istanbul cover -x "mocha-test/*.js" -x "mocha-test/**/*.js" -x "api/hooks/*.js" -x "api/responses/*.js"

@jcollum It's the double quotes that did it for me. Single quotes worked just fine:
instrumentation:
    root: .
    extensions:
        - .js
    default-excludes: true
    excludes: ['*-spec.js', '**/mock/**']

Hope this helps

There seems to be an issue with the CLI.
When setting excludes via yml file, everything works as expected.
When setting it as a command arg, it outright fails.

Looking at the source code, the issue is a discrepency between the docs and the expected CLI arguments:

the docs refer to --excludes but this is never captured or istanbul/command/cover.js
the cover command is expecting only -x as a CLI argument.

for
instanbul instrument
does the -x flag work the same way as with
instanbul cover
?

This didn't work for me:
istanbul instrument public --output public-coverage -x **public/lib** --embed-source true

Yeah, as always, globs kinda suck. I have had way more success working with JS regexes to match paths than globs...
istanbul instrument public --output public-coverage -x "**public/lib**" --embed-source true
this does not exclude the public/lib directory!
and I have tried all sorts of variations in the glob, nothing works, what can I do?

the following excludes in .istanbul.yml works, just for the reference:
.istanbul.yml:
instrumentation:
excludes:
- "spec/libSpec.js"
package.json:
"scripts": {
"test": "istanbul cover ./node_modules/jasmine/bin/jasmine.js"
},

What's up with this pattern matching?
  root: src
  extensions:
    - .jsx
    - .js
  default-excludes: true
  excludes:
    - '**/CalendarUtils.js'

Doesn't exclude CalendarUtils. If I put in the path to the file it doesn't work either.
Can someone explain how excludes is supposed to work?

If your objective is to ignore some part of the code (or even entire code) of a file from coverage, putting this in your src might serve the purpose:
/* istanbul ignore next: / (This at the top of a file will ignore whole file)
/ istanbul ignore if / (will ignore 'if' when placed before the condition)
/ istanbul ignore else */ (will ignore 'else' when placed before the condition)
The resulted coverage html will show count of ignored statements/branches/functions and will grey out the ignored code.

If your objective is to ignore some part of the code (or even entire code) of a file from coverage, putting this in your src might serve the purpose:
'/* istanbul ignore next */'  - (This at the top of a file will ignore whole file)
'/* istanbul ignore if */' - (will ignore 'if' when placed before the condition)
'/* istanbul ignore else */'  - (will ignore 'else' when placed before the condition)
The resulted coverage html will show count of ignored statements/branches/functions and will grey out the ignored code.

If your objective is to ignore some part of the code (or even entire code) of a file from coverage

This is documented at https://github.com/gotwarlost/istanbul/blob/bc84c315271a5dd4d39bcefc5925cfb61a3d174a/ignoring-code-for-coverage.md

You can pass in multiple -x pattern directives

If your objective is to ignore some part of the code (or even entire code) of a file from coverage, putting this in your src might serve the purpose:
'/* istanbul ignore next */' - (This at the top of a file will ignore whole file)
'/* istanbul ignore if */' - (will ignore 'if' when placed before the condition)
'/* istanbul ignore else */' - (will ignore 'else' when placed before the condition)
The resulted coverage html will show count of ignored statements/branches/functions and will grey out the ignored code.

Is there a way to configure specific line number in a file or function line numbers please. This is very much needed for client coverage, usually client js files in nodejs will be generated using webpack during build phase. So it will not be a good way to physically add /* istanbul ignore next */ to exclude/ignore a line or a function etc.

I was expecting this to be documented in some file as well.
The current solution I found is to use the "exclude" directive as per the discussion here https://stackoverflow.com/questions/42114528/istanbul-nyc-to-exclude-test-files .
I guess the above examples just need to be corrected to remove the extra "s" from "excludes" as having the rules under this directive would be ignored.

@frankgreco @Scorpibear are you using nyc or other tooling to get the .istanbul.yml excludes to work?
/*istanbul ignore file*/ doesn't work for me either, seems to be an existing issue also listed in https://github.com/facebook/create-react-app/issues/6106
only // istanbul ignore next works for me on individual functions


feat(update): update docs to reflect v2.2.0

Update docs to reflect v2.2.0
@mboersma  Let me know if you want me to add NOTE for k8s bug and should try only for 1.2.5 . in this PR

@smothiki we added the 1.2.x requirement in #377 and I think this PR is good on its own.


Fix the present date's problem in Age calculator

In Age Calculator, if today's date is given, it shows a invalid date. This needed to be fixed.

For today's date, it should show Welcome! It's your first day on earth!!
For dates after today, leave it as it it- invalid date

Hey @Srijita-Mandal , I would like to work on this issue under JWOC. Can you please assign it?

@Laxmankohar Yes. Go for it.

Hey @Srijita-Mandal , Please have a look.

@Laxmankohar
Why the date is in MM/DD/YYYY format? Please keep the date in same format as it is now. This is look like this now.

@Laxmankohar Why the date is in MM/DD/YYYY format? Please keep the date in same format as it is now. This is look like this now.

I have changed nothing regarding this.This is happening because the format of date in my system is different and in your system is different. The format of date is always picked from your system by default.So, if you run this program in your system it will show DD-MM-YYYY format.

Should i make a pull request?


(PUP-6120) Pip package provider compatibility with CLI

Reduce dependencies to only require pip installed.
This results in:
Removed complexity:
Poll from PyPI API directly
Special case proxies

Added functionality:
pip can now properly manage pip package from pip repository

@Yuav thanks for the contribution! Do you mind signing the CLA at https://cla.puppetlabs.com/?

This generally looks reasonable. It makes me wonder why this code was ever going straight to the XML-RPC api.

CLA signed

I would assume the original approach is due to the fact that Pip doesn't have any official way to look up versions from PyPI. My approach is a hack, but it works

CLA signed by all contributors.

Tests for features re-added, as per comments from MikaelSmith

Hmm, that Travis failure doesn't seem to be related

You were right. I'm double-checking functionality, but this looks good.


A process crashes when trying to exit normally

Description
MxNet version 1.6.0 (manually builded from source)
I run many unit tests through ctest. ctest calls exec() for each test (I believe) and runs a new process where test is running. In most tests MxNet is used.
All tests pass, but sometimes I see messages like this:
59: Test command: /home/builder/src/face_sdk/Linux-Release/build/tests/face_sdk_tests "--gtest_filter=face_detector_200.make_face_detector_incorrect_license_format_test" "--gtest_also_run_disabled_tests" "--source_dir=/home/builder/face_sdk/Linux-Release/src" "                             --cmake_generated_dir=/home/builder/src/face_sdk/Linux-Release/build"
59: Test timeout computed to be: 10000000
59: Note: Google Test filter = face_detector_200.make_face_detector_incorrect_license_format_test
59: [==========] Running 1 test from 1 test case.
59: [----------] Global test environment set-up.
59: [----------] 1 test from face_detector_200
59: [ RUN      ] face_detector_200.make_face_detector_incorrect_license_format_test
59: [       OK ] face_detector_200.make_face_detector_incorrect_license_format_test (591 ms)
59: [----------] 1 test from face_detector_200 (591 ms total)
59:
59: [----------] Global test environment tear-down
59: [==========] 1 test from 1 test case ran. (591 ms total)
59: [  PASSED  ] 1 test.
59: terminate called without an active exception
 59/313 Test  #59: face_detector_200.make_face_detector_incorrect_license_format_test ......Child aborted***Exception:   0.69 sec

Back Trace is below:
Error Message
(gdb) bt
#0  0x00007f21dd595337 in raise () from /lib64/libc.so.6
#1  0x00007f21dd596a28 in abort () from /lib64/libc.so.6
#2  0x00007f21ddba37d5 in __gnu_cxx::__verbose_terminate_handler() () from /lib64/libstdc++.so.6
#3  0x00007f21ddba1746 in ?? () from /lib64/libstdc++.so.6
#4  0x00007f21ddba1773 in std::terminate() () from /lib64/libstdc++.so.6
#5  0x0000000003c833fa in std::vector<std::thread, std::allocator<std::thread> >::~vector() ()
#6  0x0000000003d5437f in std::_Sp_counted_ptr<mxnet::engine::ThreadedEnginePerDevice::ThreadWorkerBlock<(dmlc::ConcurrentQueueType)0>*, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
#7  0x00000000006215d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x95ae2d0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#8  0x0000000003d52bb1 in mxnet::common::LazyAllocArray<mxnet::engine::ThreadedEnginePerDevice::ThreadWorkerBlock<(dmlc::ConcurrentQueueType)0> >::Clear() ()
#9  0x0000000003d55a11 in mxnet::engine::ThreadedEnginePerDevice::StopNoWait() ()
#10 0x0000000003d55b7e in mxnet::engine::ThreadedEnginePerDevice::~ThreadedEnginePerDevice() ()
#11 0x0000000003d55e49 in mxnet::engine::ThreadedEnginePerDevice::~ThreadedEnginePerDevice() ()
#12 0x00000000006215d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x98372c0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#13 0x0000000003eb4050 in mxnet::NDArray::Chunk::~Chunk() ()
#14 0x00000000006215d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x7f21ac04b5f0) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#15 0x0000000003c84405 in std::vector<mxnet::NDArray, std::allocator<mxnet::NDArray> >::~vector() ()
#16 0x0000000003d6139e in mxnet::exec::StorageFallbackOpExecutor::~StorageFallbackOpExecutor() ()
#17 0x00000000006215d9 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x9d2b270) at /usr/include/c++/4.8.2/bits/shared_ptr_base.h:144
#18 0x0000000003d609d5 in std::vector<std::shared_ptr<mxnet::exec::OpExecutor>, std::allocator<std::shared_ptr<mxnet::exec::OpExecutor> > >::~vector() ()
#19 0x0000000003d6e996 in std::_Function_base::_Base_manager<mxnet::exec::GraphExecutor::CreateCachedSegOpr(unsigned long, unsigned long)::{lambda(mxnet::RunContext, mxnet::engine::CallbackOnComplete)#1}>::_M_manager(std::_Any_data&, std::_Function_base::_Base_manager<mxnet::exec::GraphExecutor::CreateCachedSegOpr(unsigned long, unsigned long)::{lambda(mxnet::RunContext, mxnet::engine::CallbackOnComplete)#1}> const&, std::_Manager_operation) ()
#20 0x0000000003d49995 in std::_Function_handler<void (mxnet::RunContext, mxnet::engine::CallbackOnComplete), mxnet::engine::ThreadedEngine::DeleteOperator(mxnet::engine::Opr*)::{lambda(mxnet::RunContext, mxnet::engine::CallbackOnComplete)#1}>::_M_invoke(std::_Any_data const&, mxnet::RunContext, mxnet::engine::CallbackOnComplete) ()
#21 0x0000000003d53493 in mxnet::engine::ThreadedEngine::ExecuteOprBlock(mxnet::RunContext, mxnet::engine::OprBlock*) ()
#22 0x0000000003d551d4 in std::_Function_handler<void (std::shared_ptr<dmlc::ManualEvent>), mxnet::engine::ThreadedEnginePerDevice::PushToExecute(mxnet::engine::OprBlock*, bool)::{lambda()#1}::operator()() const::{lambda(std::shared_ptr<dmlc::ManualEvent>)#1}>::_M_invoke(std::_Any_data const&, std::shared_ptr<dmlc::ManualEvent>) ()
#23 0x0000000003d52514 in std::thread::_Impl<std::_Bind_simple<std::function<void (std::shared_ptr<dmlc::ManualEvent>)> (std::shared_ptr<dmlc::ManualEvent>)> >::_M_run() ()
#24 0x00007f21ddbf8070 in ?? () from /lib64/libstdc++.so.6
#25 0x00007f21de153e65 in start_thread () from /lib64/libpthread.so.0
#26 0x00007f21dd65d88d in clone () from /lib64/libc.so.6

(gdb) info threads
  Id   Target Id         Frame
  12   Thread 0x7f21bb68ee80 (LWP 31588) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21bb68dbc8, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  11   Thread 0x7f21db6b0880 (LWP 31576) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21db6af8c8, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:397
  10   Thread 0x7f21da6ac980 (LWP 31578) 0x00007f21dd642727 in sched_yield () from /lib64/libc.so.6
  9    Thread 0x7f21daeae900 (LWP 31577) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21daead908, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  8    Thread 0x7f21dbeb2800 (LWP 31575) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21dbeb1888, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  7    Thread 0x7f21bc692d80 (LWP 31586) 0x00007f21dd642727 in sched_yield () from /lib64/libc.so.6
  6    Thread 0x7f21dfe9ca00 (LWP 31573) 0x0000000003cbf9f0 in dmlc::parameter::ParamManager::~ParamManager() ()
  5    Thread 0x7f21dc6b4780 (LWP 31574) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21dc6b3848, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  4    Thread 0x7f21bbe90e00 (LWP 31587) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21bbe8fb88, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  3    Thread 0x7f21bce94d00 (LWP 31585) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21bce93b08, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
  2    Thread 0x7f21bd696c80 (LWP 31584) _INTERNAL_25_______src_kmp_barrier_cpp_38a91946::__kmp_wait_template<kmp_flag_64, 1, false, true> (this_thr=0x7f21dfc5b4e4 <__kmp_tasking_mode>, flag=0x7f21bd695ac8, itt_sync_obj=0x10251100000000)
    at ../../src/kmp_wait_release.h:405
* 1    Thread 0x7f21c37fe700 (LWP 31583) 0x00007f21dd595337 in raise () from /lib64/libc.so.6

Environment
----------Python Info----------
('Version      :', '2.7.5')
('Compiler     :', 'GCC 4.8.5 20150623 (Red Hat 4.8.5-28)')
('Build        :', ('default', 'Jul 13 2018 13:06:57'))
('Arch         :', ('64bit', 'ELF'))
------------Pip Info-----------
No corresponding pip install for current python.
----------MXNet Info-----------
No MXNet installed.
----------System Info----------
('Platform     :', 'Linux-3.10.0-862.11.6.el7.x86_64-x86_64-with-centos-7.5.1804-Core')
('system       :', 'Linux')
('node         :', '9804039b4d8e')
('release      :', '3.10.0-862.11.6.el7.x86_64')
('version      :', '#1 SMP Tue Aug 14 21:49:04 UTC 2018')
----------Hardware Info----------
('machine      :', 'x86_64')
('processor    :', 'x86_64')
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                12
On-line CPU(s) list:   0-11
Thread(s) per core:    2
Core(s) per socket:    6
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 158
Model name:            Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
Stepping:              10
CPU MHz:               799.890
CPU max MHz:           4700.0000
CPU min MHz:           800.0000
BogoMIPS:              7392.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0-11
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch epb intel_pt ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp spec_ctrl intel_stibp
----------Network Test----------
Setting timeout: 10
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.1157 sec, LOAD: 1.0584 sec.
Timing for D2L: http://d2l.ai, DNS: 0.0791 sec, LOAD: 0.3457 sec.
Timing for FashionMNIST: https://repo.mxnet.io/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.1159 sec, LOAD: 0.8497 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0763 sec, LOAD: 0.3252 sec.
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0076 sec, LOAD: 0.7661 sec.
Timing for GluonNLP: http://gluon-nlp.mxnet.io, DNS: 0.0682 sec, LOAD: 0.7391 sec.
Timing for D2L (zh-cn): http://zh.d2l.ai, DNS: 0.0339 sec, LOAD: 0.3219 sec.
Timing for GluonNLP GitHub: https://github.com/dmlc/gluon-nlp, DNS: 0.0010 sec, LOAD: 0.6049 sec.

Did you build with cmake or make? Do you have MKL installed on your system?
What's the build configuration? In case it's build with cmake, whats the output of the configuration run?

Did you build with cmake or make?

cmake

Do you have MKL installed on your system?

It's static linked (aslo MxNet static linked too)
MKL version is 2019.3.199

What's the build configuration?

The cmake configure command line and output:
/usr/local/bin/cmake -H/home/builder/mxnet -B/home/builder/build/mxnet/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/mxnet -DUSE_OPENMP=ON -DUSE_CUDA=OFF -DUSE_OLDCMAKECUDA=OFF -DUSE_CUDNN=OFF -DBLAS=MKL -DUSE_MKL_IF_AVAILABLE=ON -DUSE_MKLDNN=OFF -DUSE_MKLML_MKL=OFF -DMKL_USE_SINGLE_DYNAMIC_LIBRARY=OFF -DMKL_USE_STATIC_LIBS=ON -DMKL_MULTI_THREADED=ON -DMKL_USE_ILP64=OFF -DMKL_USE_CLUSTER=OFF -DUSE_MKLDNN=OFF -DUSE_OPENCV=OFF -DUSE_CPP_PACKAGE=ON -DDO_NOT_BUILD_EXAMPLES=ON -DBUILD_CPP_EXAMPLES=OFF
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CROSSCOMPILING FALSE
-- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_NAME Linux
-- CMake version '3.14.3' using generator 'Unix Makefiles'
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
-- Performing Test SUPPORT_CXX0X
-- Performing Test SUPPORT_CXX0X - Success
-- Performing Test SUPPORT_MSSE3
-- Performing Test SUPPORT_MSSE3 - Success
-- Performing Test SUPPORT_MSSE2
-- Performing Test SUPPORT_MSSE2 - Success
-- Determining F16C support
-- Performing Test COMPILER_SUPPORT_MF16C
-- Performing Test COMPILER_SUPPORT_MF16C - Success
-- F16C enabled
-- Found MKL: /opt/intel/mkl/include
-- Found MKL (include: /opt/intel/mkl/include, lib: -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_blas95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_lapack95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -Wl,-rpath /usr/local/mxnet/lib /usr/local/mxnet/lib/libiomp5.so -ldl
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Could NOT find Jemalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
-- OpenCV Disabled
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
-- Found OpenMP: TRUE (found version "3.1")
-- Performing Test OPENMP_HAVE_WERROR_FLAG
-- Performing Test OPENMP_HAVE_WERROR_FLAG - Success
-- Performing Test OPENMP_HAVE_STD_GNUPP11_FLAG
-- Performing Test OPENMP_HAVE_STD_GNUPP11_FLAG - Success
-- Performing Test OPENMP_HAVE_STD_CPP11_FLAG
-- Performing Test OPENMP_HAVE_STD_CPP11_FLAG - Success
-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Cannot find llvm-lit.
-- Please put llvm-lit in your PATH, set OPENMP_LLVM_LIT_EXECUTABLE to its full path, or point OPENMP_LLVM_TOOLS_DIR to its directory.
CMake Warning at 3rdparty/openmp/cmake/OpenMPTesting.cmake:22 (message):
  The check targets will not be available!
Call Stack (most recent call first):
  3rdparty/openmp/cmake/OpenMPTesting.cmake:40 (find_standalone_test_dependencies)
  3rdparty/openmp/CMakeLists.txt:49 (include)

-- Performing Test LIBOMP_HAVE_FNO_EXCEPTIONS_FLAG
-- Performing Test LIBOMP_HAVE_FNO_EXCEPTIONS_FLAG - Success
-- Performing Test LIBOMP_HAVE_FNO_RTTI_FLAG
-- Performing Test LIBOMP_HAVE_FNO_RTTI_FLAG - Success
-- Performing Test LIBOMP_HAVE_X_CPP_FLAG
-- Performing Test LIBOMP_HAVE_X_CPP_FLAG - Success
-- Performing Test LIBOMP_HAVE_WCAST_QUAL_FLAG
-- Performing Test LIBOMP_HAVE_WCAST_QUAL_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_FUNCTION_FLAG
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_FUNCTION_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_LOCAL_TYPEDEF_FLAG
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_LOCAL_TYPEDEF_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VALUE_FLAG
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VALUE_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VARIABLE_FLAG
-- Performing Test LIBOMP_HAVE_WNO_UNUSED_VARIABLE_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_SWITCH_FLAG
-- Performing Test LIBOMP_HAVE_WNO_SWITCH_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG
-- Performing Test LIBOMP_HAVE_WNO_COVERED_SWITCH_DEFAULT_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_DEPRECATED_REGISTER_FLAG
-- Performing Test LIBOMP_HAVE_WNO_DEPRECATED_REGISTER_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_SIGN_COMPARE_FLAG
-- Performing Test LIBOMP_HAVE_WNO_SIGN_COMPARE_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_GNU_ANONYMOUS_STRUCT_FLAG
-- Performing Test LIBOMP_HAVE_WNO_GNU_ANONYMOUS_STRUCT_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_UNKNOWN_PRAGMAS_FLAG
-- Performing Test LIBOMP_HAVE_WNO_UNKNOWN_PRAGMAS_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_MISSING_FIELD_INITIALIZERS_FLAG
-- Performing Test LIBOMP_HAVE_WNO_MISSING_FIELD_INITIALIZERS_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG
-- Performing Test LIBOMP_HAVE_WNO_MISSING_BRACES_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_COMMENT_FLAG
-- Performing Test LIBOMP_HAVE_WNO_COMMENT_FLAG - Success
-- Performing Test LIBOMP_HAVE_WNO_SELF_ASSIGN_FLAG
-- Performing Test LIBOMP_HAVE_WNO_SELF_ASSIGN_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_VLA_EXTENSION_FLAG
-- Performing Test LIBOMP_HAVE_WNO_VLA_EXTENSION_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WNO_FORMAT_PEDANTIC_FLAG
-- Performing Test LIBOMP_HAVE_WNO_FORMAT_PEDANTIC_FLAG - Failed
-- Performing Test LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG
-- Performing Test LIBOMP_HAVE_WSTRINGOP_OVERFLOW_FLAG - Failed
-- Performing Test LIBOMP_HAVE_MSSE2_FLAG
-- Performing Test LIBOMP_HAVE_MSSE2_FLAG - Success
-- Performing Test LIBOMP_HAVE_FTLS_MODEL_FLAG
-- Performing Test LIBOMP_HAVE_FTLS_MODEL_FLAG - Success
-- Performing Test LIBOMP_HAVE_MMIC_FLAG
-- Performing Test LIBOMP_HAVE_MMIC_FLAG - Failed
-- Performing Test LIBOMP_HAVE_M32_FLAG
-- Performing Test LIBOMP_HAVE_M32_FLAG - Failed
-- Performing Test LIBOMP_HAVE_X_FLAG
-- Performing Test LIBOMP_HAVE_X_FLAG - Success
-- Performing Test LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG
-- Performing Test LIBOMP_HAVE_WARN_SHARED_TEXTREL_FLAG - Success
-- Performing Test LIBOMP_HAVE_AS_NEEDED_FLAG
-- Performing Test LIBOMP_HAVE_AS_NEEDED_FLAG - Success
-- Performing Test LIBOMP_HAVE_VERSION_SCRIPT_FLAG
-- Performing Test LIBOMP_HAVE_VERSION_SCRIPT_FLAG - Success
-- Performing Test LIBOMP_HAVE_STATIC_LIBGCC_FLAG
-- Performing Test LIBOMP_HAVE_STATIC_LIBGCC_FLAG - Success
-- Performing Test LIBOMP_HAVE_Z_NOEXECSTACK_FLAG
-- Performing Test LIBOMP_HAVE_Z_NOEXECSTACK_FLAG - Success
-- Performing Test LIBOMP_HAVE_FINI_FLAG
-- Performing Test LIBOMP_HAVE_FINI_FLAG - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Perl: /usr/bin/perl (found version "5.16.3")
-- Performing Test LIBOMP_HAVE_VERSION_SYMBOLS
-- Performing Test LIBOMP_HAVE_VERSION_SYMBOLS - Success
-- Performing Test LIBOMP_HAVE___BUILTIN_FRAME_ADDRESS
-- Performing Test LIBOMP_HAVE___BUILTIN_FRAME_ADDRESS - Success
-- Performing Test LIBOMP_HAVE_WEAK_ATTRIBUTE
-- Performing Test LIBOMP_HAVE_WEAK_ATTRIBUTE - Success
-- Looking for include files windows.h, psapi.h
-- Looking for include files windows.h, psapi.h - not found
-- Looking for EnumProcessModules in psapi
-- Looking for EnumProcessModules in psapi - not found
-- LIBOMP: Operating System     -- Linux
-- LIBOMP: Target Architecture  -- x86_64
-- LIBOMP: Build Type           -- Release
-- LIBOMP: Library Kind         -- SHARED
-- LIBOMP: Library Type         -- normal
-- LIBOMP: Fortran Modules      -- FALSE
-- LIBOMP: Build                -- 20140926
-- LIBOMP: Use Stats-gathering  -- FALSE
-- LIBOMP: Use Debugger-support -- FALSE
-- LIBOMP: Use ITT notify       -- TRUE
-- LIBOMP: Use OMPT-support     -- TRUE
-- LIBOMP: Use OMPT-optional  -- TRUE
-- LIBOMP: Use Adaptive locks   -- TRUE
-- LIBOMP: Use quad precision   -- TRUE
-- LIBOMP: Use TSAN-support     -- FALSE
-- LIBOMP: Use Hwloc library    -- FALSE
-- Looking for sqrt in m
-- Looking for sqrt in m - found
-- Looking for __atomic_load_1
-- Looking for __atomic_load_1 - not found
-- Looking for __atomic_load_1 in atomic
-- Looking for __atomic_load_1 in atomic - not found
-- check-libomp does nothing.
-- check-ompt does nothing.
-- check-openmp does nothing.
USE_LAPACK is ON
-- Could NOT find Jemalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
CMake Warning at 3rdparty/googletest/googletest/CMakeLists.txt:47 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.

-- Found GTest: gtest
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for fopen64
-- Looking for fopen64 - not found
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- /home/builder/mxnet/3rdparty/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
CMake Warning at CMakeLists.txt:818 (message):
  OpenCV_VERSION_MAJOR: , version 3 with imgcodecs is required for im2rec,
  im2rec will not be available

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    DO_NOT_BUILD_EXAMPLES
    USE_MKLML_MKL
    USE_OLDCMAKECUDA

-- Build files have been written to: /home/builder/build/mxnet/build

Also I used own FindMKL.cmake (changed were made for mkl static linkage)
FindMKL.zip

Could you try deleting the 3rdparty/openmp directory before configuring and building. There is an issue where both libiomp and libomp are linked when enabling MKL: https://github.com/apache/incubator-mxnet/issues/17641

Tryed. Unfortunately didn't help.
/usr/local/bin/cmake -H/home/builder/mxnet -B/home/builder/build/mxnet/build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/mxnet -DUSE_OPENMP=ON -DUSE_CUDA=OFF -DUSE_OLDCMAKECUDA=OFF -DUSE_CUDNN=OFF -DBLAS=MKL -DUSE_MKL_IF_AVAILABLE=ON -DUSE_MKLDNN=OFF -DUSE_MKLML_MKL=OFF -DMKL_USE_SINGLE_DYNAMIC_LIBRARY=OFF -DMKL_USE_STATIC_LIBS=ON -DMKL_MULTI_THREADED=ON -DMKL_USE_ILP64=OFF -DMKL_USE_CLUSTER=OFF -DUSE_MKLDNN=OFF -DUSE_OPENCV=OFF -DUSE_CPP_PACKAGE=ON -DDO_NOT_BUILD_EXAMPLES=ON -DBUILD_CPP_EXAMPLES=OFF
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_CROSSCOMPILING FALSE
-- CMAKE_HOST_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_PROCESSOR x86_64
-- CMAKE_SYSTEM_NAME Linux
-- CMake version '3.14.3' using generator 'Unix Makefiles'
-- Performing Test SUPPORT_CXX11
-- Performing Test SUPPORT_CXX11 - Success
-- Performing Test SUPPORT_CXX0X
-- Performing Test SUPPORT_CXX0X - Success
-- Performing Test SUPPORT_MSSE3
-- Performing Test SUPPORT_MSSE3 - Success
-- Performing Test SUPPORT_MSSE2
-- Performing Test SUPPORT_MSSE2 - Success
-- Determining F16C support
-- Performing Test COMPILER_SUPPORT_MF16C
-- Performing Test COMPILER_SUPPORT_MF16C - Success
-- F16C enabled
-- Found MKL: /opt/intel/mkl/include
-- Found MKL (include: /opt/intel/mkl/include, lib: -Wl,--start-group /opt/intel/mkl/lib/intel64/libmkl_blas95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_lapack95_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_lp64.a /opt/intel/mkl/lib/intel64/libmkl_intel_thread.a /opt/intel/mkl/lib/intel64/libmkl_core.a -Wl,--end-group -Wl,-rpath /usr/local/mxnet/lib /usr/local/mxnet/lib/libiomp5.so -ldl
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Could NOT find Jemalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
-- OpenCV Disabled
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
-- Found OpenMP: TRUE (found version "3.1")
USE_LAPACK is ON
-- Could NOT find Jemalloc (missing: JEMALLOC_LIBRARY JEMALLOC_INCLUDE_DIR)
CMake Warning at 3rdparty/googletest/googletest/CMakeLists.txt:47 (project):
  VERSION keyword not followed by a value or was followed by a value that
  expanded to nothing.

-- Found PythonInterp: /usr/bin/python (found version "2.7.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found GTest: gtest
-- Looking for clock_gettime in rt
-- Looking for clock_gettime in rt - found
-- Looking for fopen64
-- Looking for fopen64 - not found
-- Looking for C++ include cxxabi.h
-- Looking for C++ include cxxabi.h - found
-- Looking for nanosleep
-- Looking for nanosleep - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /usr/include
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- /home/builder/mxnet/3rdparty/dmlc-core/cmake/build_config.h.in -> include/dmlc/build_config.h
-- Found OpenMP_C: -fopenmp (found version "3.1")
-- Found OpenMP_CXX: -fopenmp (found version "3.1")
CMake Warning at CMakeLists.txt:818 (message):
  OpenCV_VERSION_MAJOR: , version 3 with imgcodecs is required for im2rec,
  im2rec will not be available

-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    DO_NOT_BUILD_EXAMPLES
    USE_MKLML_MKL
    USE_OLDCMAKECUDA

-- Build files have been written to: /home/builder/build/mxnet/build

Will try to debug.

After these changes process exits without crash:
diff --git a/src/engine/threaded_engine_perdevice.cc b/src/engine/threaded_engine_perdevice.cc
index bcb101e..adaf4c1 100644
--- a/src/engine/threaded_engine_perdevice.cc
+++ b/src/engine/threaded_engine_perdevice.cc
@@ -55,7 +55,7 @@ class ThreadedEnginePerDevice : public ThreadedEngine {
     this->Start();
   }
   ~ThreadedEnginePerDevice() noexcept(false) {
-    this->StopNoWait();
+    this->Stop();
   }

   void StopNoWait() {

Could someone explain why is there StopNoWait ?

cc: @eric-haibin-lin


ReferenceField(SomeDocument) in DictField how to implement?

Hello. I tried to find the answer, what does not work (
Suppose there is a model:
class SomeDocument(Document):
...
and any other:
class DictDoc(Document):
name=StringField()
magic=DictField( ReferenceField(SomeDocument) )
and then..
sd=SomeDocument.objects()[0:2]
DictDoc(name="voila", magic= {  'doc1' : sd[0] ,  'doc2' : sd[1]  } ).save()
and.. as a result  in mongo collection was something like that:
...
"magic" :  {  "doc1" :  {
"$ref" : "some_document",
"$id" : ObjectId("4f201f13e2c91b0d700001ae")
},
"doc2" :  {
"$ref" : "some_document",
"$id" : ObjectId("4f201f13e2c91b0d700002ae")
},
}
There is possibility?

You don't need to declare the ReferenceField - you can just set it as a value and it will do it for you..
There is an example in the tests: https://github.com/hmarr/mongoengine/blob/dev/tests/dereference.py#L483-518