Gain deeper control of split?

I want to build a parallel iterator over a 2d domain for use in a ray tracer. split looks great for this, except that I want finer grained control over how the work is split. In my case, I want to be able to define the "tile size" that split will attempt to divide the data into (with possibly some smaller tiles based on whether the tile size divides evenly into the overall data size). As far as I understand it, split will attempt to split a non-deterministic number of times to try to optimize for best performance like other parallel iterators. For a ray tracer this is not necessarily desired behavior because the complexity of work for different parts of the scene is possibly vastly different, so it is often more efficient to split into smaller pieces than would normally be optimal, so that threads are not left idle while a more complex tile is being completed. Is it possible to do something like this with rayon? I could use scope for it, but thought I'd ask if there was a better way.

I don't know if we can provide deeper control in a generic way.  Or rather, the deeper control is for you to implement ParallelIterator and IndexedParallelIterator yourself, and then you can apply a with_max_len policy as you see fit.  Or maybe implement your own par_tiles() API similar to our par_chunks() that produces a ParallelIterator of a chosen size.

As far as I understand it, split will attempt to split a non-deterministic number of times to try to optimize for best performance like other parallel iterators.

Yes, it's adaptive.  We start by splitting proportionally to the number of threads.  When work gets stolen, we split it even further, as a heuristic that the busy worker may have a long-running job on its hands already.  That dynamically hits a limit when threads stop stealing from each other, then they're sufficiently busy.

For a ray tracer this is not necessarily desired behavior because the complexity of work for different parts of the scene is possibly vastly different, so it is often more efficient to split into smaller pieces than would normally be optimal, so that threads are not left idle while a more complex tile is being completed.

That kind of imbalanced work is exactly what the adaptive splitting is meant to help with.  I suppose you could still get unlucky if the very first unstolen piece of work happened to be particularly complex though.

I could use scope for it, but thought I'd ask if there was a better way.

Dropping down to manual join or scope+spawn calls is perfectly reasonable, if you don't really need the rest of the iterator API.

@cuviper thanks for the response; very helpful!

You're welcome.  Feel free to reopen this if you have further questions, or start a new issue if unrelated.


ConversationUpdate : Different behaviour on webchat and emulator

Hi, I am greeting the user on conversation update with following code.
bot.on('conversationUpdate', (message) => {
    if (message.membersAdded) {
        message.membersAdded.forEach((identity) => {
            if (identity.id === message.address.bot.id) {
                bot.beginDialog(message.address, dialogs.keys.firstRun);
            }
        });
    }
});

First run dialog
 bot.dialog(dialogs.keys.firstRun, [
        (session) => {
            builder.Prompts.text(session, promptHelper.getMessageAsSuggestedAction(session, botMessages.initialMessage));
        },
        (session, result) => {
            let response = result.response;
            ...
        },
...

The behavior is correct in bot emulator. When a user connects, bot shows the message along suggested action. When a user sends a response the second waterfall step in dialog is run,
But, in webchat, instead of going to second waterfall step, this is triggered and rootDialog starts,
new builder.UniversalBot(connector, (session)=>{
    session.beginDialog(dialogs.keys.rootDialog, {utterance: ''});
});

Also, Is there any way to extract user text when sending it to rootDialog.

Conversation Update is sent by the direct line connector once when the bot joins the conversation, and once when the user joins the conversation.  In the emulator, these are both sent immediately.  Using WebChat, the bot's ConversationUpdate is sent when the conversation is created and the user's ConversationUpdate is sent when they first send a message.  When ConversationUpdate is sent, there isn't enough information in the message to construct the dialog stack... this means that prompts do not work correctly as a response to ConversationUpdate.  There is a workaround you can use here: https://github.com/Microsoft/BotBuilder/issues/4245#issuecomment-369311452

Sending an event is feasible for direct line channel. But if in future we get a need to support a new channel say Skype, then how should we handle this case?
For a workaround I am now sending only a message in on conversation update and then forwarding the response I receive in post to root dialogue.

Skype doesn't send conversationUpdate events.  You can use contactRelationUpdate, but it is only sent when the bot is added or removed as a skype contact.

That was something new I learned. I must have missed this in documentation. Is there any post/page that describes channel specific information about event and channel data?

There's this: https://docs.botframework.com/en-us/channel-inspector/channels/WebChat

The page doesn't tell which events are sent it not sent.
The gist of above comments is to only initialise dialogue stack when a activity of message type is received. For other, instead use connector.

I'm not aware of documentation that describes which channel sends which messages.
Have you reviewed https://github.com/Microsoft/BotBuilder/issues/4245#issuecomment-369311452 the suggestion for webchat and directline is to manually send an Event activity type using the backchannel.

I was aware of event activity, but the drawback of  it was that it was only usable in directline. I was seeking to find a way to write a universal code which could work on all channels, hence, I was trying to get a way around event activity.


Yaml parse error when volume are mounted via configmap or secret on kubernetes

Describe the bug
When I add env GATUS_CONFIG_PATH=/config as described in doc, this env point on directory, gatus tries to recursively read all yaml or yml files but in kubernetes when we mount a volume inside a container and this volume is provided by configMap or Secret Kubernetes mount a kind of symlink on the mountPath, the real data is on the same folder but in hidden folder with date as name. This is probably to have latest date of change of configMap or Secret, because if we change/update the values from configMap or Secret theses data are updated after a few seconds inside a container in pod.
What do you see?
2024/03/04 14:58:22 [config][LoadConfiguration] Reading configuration from /config/..2024_03_04_14_58_14.4259295514/config.yaml
2024/03/04 14:58:22 [config][LoadConfiguration] Reading configuration from /config/config.yaml
panic: error reading configuration from directory /config: error due to parameter with value of primitive type: only maps and slices/arrays can be merged, which means you cannot have define the same key twice for parameters that are not maps or slices/arrays
goroutine 1 [running]:
main.main()
/app/main.go:19 +0x1b1
What do you expect to see?
2024/03/04 15:00:04 [config][LoadConfiguration] Reading configuration from configFile=/config/config.yaml
2024/03/04 15:00:04 [config][validateAlertingConfig] Alerting is not configured
2024/03/04 15:00:04 [config][validateEndpointsConfig] Validated 7 endpoints
2024/03/04 15:00:04 [controller][Handle] Listening on <IP_ADDRESS>:8080
List the steps that must be taken to reproduce this issue
add env in kubernetes deployment GATUS_CONFIG_PATH=/config
Version
twinproduction/gatus:v5.7.0
Additional information
if I could I would have proposed a PR but I don't know how to code in Go.
The problem is probably because gatus tries to read all yaml files recursively in specified folder by env.
Some improvement may be to not just read all yaml files inside specified folder but keep the recursive read because there is a security improvement to be achieved by splitting security configs, alerting configs and endpoints configs.
For exemple in Kubernetes we can imagine to mount a secret as volume in /config/security/security.yaml and an alerting config which contains credentials from another secret on /config/alerting/alerting.yaml and developers can add monitoring endpoints from configMap on /config/endpoints/endpoints.yaml
In this scenario it would be great to read recursively folders in /config path but do not read file in folder starting by dot or a regex which excludes folders looking like "..2024_03_04_14_58_14"

Thanks for reporting this. I am experiencing the same problem. It means that Gatus configuration is Kubernetes is essentially broken. :(

PS: Issue persists in v5.10.0
A very ugly temporary workaround is to manually build the container image with the configfile, but that's hardly a solution!

Could either of you show me what your YAML looks like? I've been running Gatus on Kubernetes and I've never had this kind of issue.
I'm going to be honest here, if I saw a path that looked like /config/..2024_03_04_14_58_14.4259295514/config.yaml, I would have assumed that there's a bug somewhere as that folder name doesn't look very natural 😅

This is probably to have latest date of change of configMap or Secret, because if we change/update the values from configMap or Secret theses data are updated after a few seconds inside a container in pod.

What do you mean by "probably"? I had assumed the mechanism that generated a folder with the current timestamp would be something implemented on your end, because I've never seen Kubernetes do something like this.
There's an example here for how to deploy Gatus on Kubernetes: https://github.com/TwiN/gatus/blob/master/.examples/kubernetes/gatus.yaml

Could either of you show me what your YAML looks like? I've been running Gatus on Kubernetes and I've never had this kind of issue.
I'm going to be honest here, if I saw a path that looked like /config/..2024_03_04_14_58_14.4259295514/config.yaml, I would have assumed that there's a bug somewhere as that folder name doesn't look very natural 😅

This is probably to have latest date of change of configMap or Secret, because if we change/update the values from configMap or Secret theses data are updated after a few seconds inside a container in pod.

What do you mean by "probably"? I had assumed the mechanism that generated a folder with the current timestamp would be something implemented on your end, because I've never seen Kubernetes do something like this.
There's an example here for how to deploy Gatus on Kubernetes: https://github.com/TwiN/gatus/blob/master/.examples/kubernetes/gatus.yaml

Hello @TwiN, thank you for your quick response.
I've replicated the error with the example configuration that you've provided in your link.
I did some testing and have determined that this error actually seems to relate to circumstances where the GATUS_CONFIG_PATH env is used. If it is not set, and the configmap is mounted to the default location (/config, as defined by the commandline configFile= default values), then everything works as expected.
If you set GATUS_CONFIG_PATH, then it will break, and you will see weird paths like the one mentioned before (/config/..2024_03_04_14_58_14.4259295514/config.yaml). Note - yes, it looks bizarre, but mine look like that too.
So, the current fix is to just mount configfiles at /config. (Incidentally, my previous configmaps used the global.yaml and endpoints.yaml config files, but those didn't work either. I had to merge it all into a single config.yaml file.)

Hello,
I have the same issue, i mount a Kubernetes ConfigMap as directory to /config/endpoints.d and my ConfigMap contains multiple files with distinct endpoints config, eg:
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: gatus-endpoints
data:
  endpoint-1.yaml: |
    endpoints:
      - name: endpoint-1
        url: "https://github.com"
        interval: 5m
        conditions:
          - "[STATUS] == 200"
   endpoint-2.yaml: |
    endpoints:
      - name: endpoint-2
        url: "https://google.com"
        interval: 5m
        conditions:
          - "[STATUS] == 200"

The files as readed multiple times by Gatus due to the way Kubernetes mount ConfigMap as directory and induce Gatus config errors.
I do a patch for ignoring file with double dot in it because it's a simple patch and i only ever seen file starting with .. in Kubernetes.
I tested it on Kubernetes and it's working with no impact on hot reload, eg:
2024/06/16 12:55:59 [config.LoadConfiguration] Reading configuration from /config/config.yaml
2024/06/16 12:55:59 [config.LoadConfiguration] Ignore configuration from /config/endpoints.d/..2024_06_16_12_55_59.2521233544/endpoint-1.yaml
2024/06/16 12:55:59 [config.LoadConfiguration] Ignore configuration from /config/endpoints.d/..2024_06_16_12_55_59.2521233544/endpoint-2.yaml
2024/06/16 12:55:59 [config.LoadConfiguration] Reading configuration from /config/endpoints.d/endpoint-1.yaml
2024/06/16 12:55:59 [config.LoadConfiguration] Reading configuration from /config/endpoints.d/endpoint-2.yaml

@TwiN do you think it is ok ? If yes i can do a pull request for this.

I have the same issue..!

A simple solution to this can be that,
Gatus by default only checks only in the same directory and not in the subdirectories. And if someone has other config files in subdirectories they should tell gatus about those subdirectories somehow.


etcdserver/api: add 3.2 in capability

Fix https://github.com/coreos/etcd/issues/7152

@xiang90 Fixed. Now tests pass. PTAL.

i do not understand why we remove the 3.2 entry for rafthttp. i think we can remove the streamTypeMessage type if is not used anymore, but not remove the entire entry.

actually we still need that.

Yeah I see that we still have check stream version. rafthttp will also need 3.2 incase of 3.1 migrating to 3.2
PTAL.

lgtm


Fix change spring dir

Codecov Report

Merging #33 (3afd0d9) into master (cf96593) will increase coverage by 1.38%.
The diff coverage is 47.86%.

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   16.91%   18.29%   +1.38%
==========================================
  Files          57       57
  Lines        9881    10029     +148
  Branches       59       67       +8
==========================================
+ Hits         1671     1835     +164
+ Misses       8151     8127      -24
- Partials       59       67       +8

Impacted Files
Coverage Δ

src/clj/skylobby/fx/battle.clj
1.60% <0.00%> (-0.01%)
:arrow_down:

src/clj/skylobby/fx/map_sync.clj
2.46% <0.00%> (-0.04%)
:arrow_down:

src/clj/skylobby/fx/replay.clj
1.98% <0.00%> (-0.02%)
:arrow_down:

src/clj/skylobby/fx/server.clj
6.93% <0.00%> (-0.60%)
:arrow_down:

src/clj/skylobby/fx/settings.clj
3.36% <0.00%> (+0.02%)
:arrow_up:

src/clj/skylobby/fx/mod_sync.clj
2.36% <12.50%> (-0.03%)
:arrow_down:

src/clj/spring_lobby.clj
13.93% <21.27%> (+0.45%)
:arrow_up:

src/clj/skylobby/resource.clj
74.28% <28.57%> (-5.08%)
:arrow_down:

src/clj/skylobby/fx/welcome.clj
77.04% <82.00%> (+69.57%)
:arrow_up:

... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cf96593...3afd0d9. Read the comment docs.


Use a HashMap or something similar as a skeleton for storing chain state.

We will first be storing all chain state in memory only , and then be able to funnel that into on-disk storage later.

I think this might be a dup of https://github.com/ZcashFoundation/zebra/issues/136 ?

Closing as a dupe.


Ally X: FPS Limit Behavior with VRR enabled?

Describe the bug
Three things really...

When VRR is enabled, the FPS does not lock to the specified value.  For example, if "60" is chosen, is will hover in the low to mid 60's, like 62 to 65.

When VRR is enabled, I expected that I would be allowed to set FPS limits granularly instead of perfect divisions of the refresh rate. For example, if VRR is enabled, we should be allowed to set the FPS limit to, say, 48, on a 120Hz display.

When VRR is enabled, I would get awful frame pacing issues unless I disabled FPS limit. Even setting the FPS limit to the max refresh rate did not fix this issue, I had to disabled FPS limits entirely. THIS ONLY HAPPENS SOMETIMES

What did you expect to happen?

I expected the FPS to go no-higher than the specified value, but it was constantly between 2 to 4 FPS higher (fluctuating)

When VRR support is enabled, I expected I could set granular FPS limits and let the VRR do its magic from there.

When VRR and FPS limits are enabled at the same time, I was not expecting consistently bad frame timing.

Output of rpm-ostree status
No response
Hardware
ROG Ally X, VRAM set to 8GB
Extra information or context
I doubt the game matters, but I was testing this on Spyro Reignited Trilogy and Baldur's Gate 3

I think 2nd point is a Steam issue, Need to check with an external VRR-enabled device on Steam Deck if it allows granularity.

Describe the bug
Three things really...

When VRR is enabled, the FPS does not lock to the specified value.  For example, if "60" is chosen, is will hover in the low to mid 60's, like 62 to 65.
When VRR is enabled, I expected that I would be allowed to set FPS limits granularly instead of perfect divisions of the refresh rate. For example, if VRR is enabled, we should be allowed to set the FPS limit to, say, 48, on a 120Hz display.
When VRR is enabled, I would get awful frame pacing issues unless I disabled FPS limit. Even setting the FPS limit to the max refresh rate did not fix this issue, I had to disabled FPS limits entirely. THIS ONLY HAPPENS SOMETIMES

What did you expect to happen?

I expected the FPS to go no-higher than the specified value, but it was constantly between 2 to 4 FPS higher (fluctuating)
When VRR support is enabled, I expected I could set granular FPS limits and let the VRR do its magic from there.
When VRR and FPS limits are enabled at the same time, I was not expecting consistently bad frame timing.

Output of rpm-ostree status
No response
Hardware
ROG Ally X, VRAM set to 8GB
Extra information or context
I doubt the game matters, but I was testing this on Spyro Reignited Trilogy and Baldur's Gate 3

Same as me with black myth wukong.
Did you find workaround?

I think 2nd point is a Steam issue, Need to check with an external VRR-enabled device on Steam Deck if it allows granularity.

In SteamOS main branch, VRR was broken until around 48 hours ago, and now exhibits this behavior.

I think 2nd point is a Steam issue, Need to check with an external VRR-enabled device on Steam Deck if it allows granularity.

In SteamOS main branch, VRR was broken until around 48 hours ago, and now exhibits this behavior.
We're watching gamescope closely and will add fixes as they occur. For now if you want frame limiting turn off VRR or use another method like Mangohud via launch option.

I added MANGOHUD_CONFIG=fps_limit=60,no_display %command%  in launch option, disable frame limit, VRR enable, but it did not work, nothing change.

Not ROG Ally, I'm using a desktop PC hooked on a Samsung TV via HDMI, but I have the same problem when VRR is enabled.
I'd say this issue is still relevant.


Refactor import setup

I've started to prepare adding a new CLI command to import realized generation. This PR mostly refactors the first few lines of the two CLI imports we have already.
I've also added a date parser that defaults to yesterday rather than tomorrow.
Finally, I made changes to synchronize the recording times of values that are imported within execution of an import command (see https://github.com/SeitaBV/flexmeasures-entsoe/commit/b885842e081ab7011d9afb5ba82a244b35637bdf).

Couldn't the two date parsers not be one function, with a default argument that accepts "yesterday", "today" and "tomorrow" as values?

I started off with the same idea, but quickly realised I wasn't doing code legibility any favours. The reason is that the internal logic is somewhat switched around. The function that defaults to tomorrow starts off with setting to_date and then derives from_date. The other function does it the other way around. It is probably possible to refactor this, but I found it was too easy for new mistakes to slip in.


vagrant up: ssh connection fails

MacOSX 10.9.3
OpenSSH_6.2p2
Virtualbox 4.3.12
Vagrant 1.6.3
Coreos v343.0.0 and v349.0.0

$ vagrant up
Bringing machine 'core-01' up with 'virtualbox' provider...
==> core-01: Importing base box 'coreos-alpha'...
==> core-01: Matching MAC address for NAT networking...
==> core-01: Checking if box 'coreos-alpha' is up to date...
==> core-01: Setting the name of the VM: namics13-docker_core-01_1402992550344_61060
==> core-01: Clearing any previously set network interfaces...
==> core-01: Preparing network interfaces based on configuration...
    core-01: Adapter 1: nat
    core-01: Adapter 2: hostonly
==> core-01: Forwarding ports...
    core-01: 22 => 2222 (adapter 1)
==> core-01: Running 'pre-boot' VM customizations...
==> core-01: Booting VM...
==> core-01: Waiting for machine to boot. This may take a few minutes...
    core-01: SSH address: <IP_ADDRESS>:2222
    core-01: SSH username: core
    core-01: SSH auth method: private key
    core-01: Warning: Connection timeout. Retrying...
==> core-01: Machine booted and ready!
==> core-01: Setting hostname...
==> core-01: Configuring and enabling network interfaces...
==> core-01: Exporting NFS shared folders...
==> core-01: Preparing to edit /etc/exports. Administrator privileges will be required...
==> core-01: Mounting NFS shared folders...
==> core-01: Running provisioner: file...
==> core-01: Running provisioner: shell...
    core-01: Running: inline script

It stops for a few seconds at SSH auth method: private key. Then continues with Warning: Connection timeout. Retrying.... However it just goes on.
Happens on 'alpha' and 'beta' channels.
Subsequently vagrant ssh works though.
Out of curiosity I tested copied the output of vagrant ssh-config to my ssh config: ssh core-01 works too.
I don't know if this issue is of any consequence, however I just can't get the Docker TCP service to start via the cloud config (in user-data). Could this be related? The cloud config is copied successfully to /var/lib/coreos-vagrant/in the VM. I've opened new issue for that: #132

Moved to https://github.com/coreos/bugs/issues/1375


fix: add error handling in rest_api_query.execute for preprocessing

Summary of Changes
Allow ignore KeyError during execute if the record_dict does not contain the required keys.
Tests
Added test_rest_api_query_preprocessing_key_error
Documentation
No
CheckList
Make sure you have checked all steps below to ensure a timely review.

[x] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[x] PR includes a summary of changes.
[x] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[x] In case of new functionality, my PR adds documentation that describes how to use it.

All the public functions and the classes in the PR contain docstrings that explain what it does

[ ] PR passes make test

@jinhyukchang @dikshathakur3119

need to run git commit --amend --signoff in the local branch to sign the commit.

Codecov Report

Merging #320 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #320      +/-   ##
==========================================
+ Coverage   74.20%   74.25%   +0.05%
==========================================
  Files         105      105
  Lines        4451     4452       +1
  Branches      405      406       +1
==========================================
+ Hits         3303     3306       +3
+ Misses       1041     1038       -3
- Partials      107      108       +1

Impacted Files
Coverage Δ

...shboard/mode_analytics/mode_dashboard_extractor.py
0.00% <ø> (ø)

databuilder/rest_api/rest_api_query.py
80.76% <100.00%> (+2.84%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 55741f9...9ce0de5. Read the comment docs.

do you know what key is missing?

cc @jinhyukchang hey Jin, do you know if it is due to the API from mode is changed?

@milton0825 are you able to test your change on tars? It is same as python-lyft-etl which we could sync the library to tars for testing. Let me know if you need help.

I think the issue is due to this morning mode sev which the admin user is disabled and not able to access the API. I just cleared and the tasks running fine.


Rebuild project in TypeScript

Hi, just wanted to see what the community's interest would be in seeing this project rebuilt in TypeScript. Obviously this would come with a number of benefits including strong types, better static code analysis and clearer APIs. This would lead to higher developer productivity.
If enough people are interested I can go ahead and do it.

Interested! Thanks for doing this. I'll consider forking and doing it myself as homework too.

Ok.. I'm currently working on a TypeScript upgrade! I will convert the whole project to TypeScript since I believe this is the best way to get types in JS and I want it for my own side projects! Types in JS is a no-brainer, it makes developing and scaling code bases to be much easier

Hi all, the project is now built in TypeScript! 🎉


EmptyLinesAroundArguments vs. anonymous modules

Example file
# frozen_string_literal: true

module Test # :nodoc:
  def something(a, b)
    a && b
  end

  def anything(a, b)
    a || b
  end
end

Test.prepend(Module.new do
  def something(*)
    true
  end

  def anything(*)
    false
  end
end)

Expected behavior
Not sure about what should be expected. I mean, I'm not sure whether using anonymous modules this way is considered a bad practice. If not then we should allow blank lines between methods definitions.
Another problem here is the output:
spaces_test.rb:5:1: C: Layout/EmptyLinesAroundArguments: Empty line detected around arguments.
    a && b
^

It's definitely broken.
RuboCop version
Latest master ( a28c9b22) on ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16].
/cc @garettarrowood

This issue makes sense. Right now EmptyLinesAroundArguments does not consider the type of argument it receives. Adding a return if node.arguments.any?(&:block_type?) guard clause makes your example pass. But give we a little longer to make sure the cop still registers when an empty line comes somewhere before a block arg.


Feature branch

I created a profile page, and cart page with an add-to-cart functionality and also added a search bar, please check.
issue number: #52

@S7viks Please resolve conflicts

@Tejashri-Taral please check now

@Tejashri-Taral please check

Please make a new PR by pulling the new changes also mention issue no.


Add visualize to the Inst trait

@navalani, these couple of additional rules are sufficient to provide simple examples of objects of the other Inst subclasses.

Thanks Keith, I will modify the drawing to include those subclasses
On Mon, Feb 19, 2024 at 1:43 PM Keith Alcock @.***>
wrote:

External Email
@navalani https://github.com/navalani, these couple of additional rules
are sufficient to provide simple examples of objects of the other Inst
subclasses.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1953136515,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VMFG2HKUL6APDGBPD3YUO2OVAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJTGEZTMNJRGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

@navalani, hopefully the computer can soon make the visualizations itself.

Hey Keith,
I noticed in the code that we are currently visualizing the part of the
rule that is matched, i.e (B-Food), (I-Food), etc. but do we need to
visualize which part of the sentence that matches or is the next.getPosId
sufficient?
Nick
On Fri, Mar 8, 2024 at 9:50 PM Keith Alcock @.***>
wrote:

External Email
Merged #782 https://github.com/clulab/processors/pull/782 into
nick-avalani/odin-debugger.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#event-12062313492, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VOZFUBDH2ZJBYU2HNTYXKILBAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA3DEMZRGM2DSMQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi,
The first step is to show the B-Food or I-Food in a "visualization" so that
the user can understand which Inst is in question.  At this point we are
still not matching against any text like in a sentence.  The step after
that is to show what the B-Food or I-Food turned out to match (or failed to
match) in the sentence like the cake, pain au chocolat (or John eats).
Keith
On Fri, Mar 8, 2024 at 10:28 PM navalani @.***> wrote:

Hey Keith,
I noticed in the code that we are currently visualizing the part of the
rule that is matched, i.e (B-Food), (I-Food), etc. but do we need to
visualize which part of the sentence that matches or is the next.getPosId
sufficient?
Nick
On Fri, Mar 8, 2024 at 9:50 PM Keith Alcock @.***>
wrote:

External Email
Merged #782 https://github.com/clulab/processors/pull/782 into
nick-avalani/odin-debugger.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#event-12062313492, or
unsubscribe
<
https://github.com/notifications/unsubscribe-auth/BCCR2VOZFUBDH2ZJBYU2HNTYXKILBAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA3DEMZRGM2DSMQ>

.
You are receiving this because you were mentioned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1986737280,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACCHCOU3SRAP46UGULIHWH3YXKMZJAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG4ZTOMRYGA
.
You are receiving this because you modified the open/close state.Message
ID: @.***>

I see. Thanks for the clarification. Will work on that right now.
Nick
On Fri, Mar 8, 2024 at 11:09 PM Keith Alcock @.***>
wrote:

External Email
Hi,
The first step is to show the B-Food or I-Food in a "visualization" so
that
the user can understand which Inst is in question. At this point we are
still not matching against any text like in a sentence. The step after
that is to show what the B-Food or I-Food turned out to match (or failed
to
match) in the sentence like the cake, pain au chocolat (or John eats).
Keith
On Fri, Mar 8, 2024 at 10:28 PM navalani @.***> wrote:

Hey Keith,
I noticed in the code that we are currently visualizing the part of the
rule that is matched, i.e (B-Food), (I-Food), etc. but do we need to
visualize which part of the sentence that matches or is the
next.getPosId
sufficient?
Nick
On Fri, Mar 8, 2024 at 9:50 PM Keith Alcock @.***>
wrote:

External Email
Merged #782 https://github.com/clulab/processors/pull/782 into
nick-avalani/odin-debugger.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#event-12062313492, or
unsubscribe
<

https://github.com/notifications/unsubscribe-auth/BCCR2VOZFUBDH2ZJBYU2HNTYXKILBAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA3DEMZRGM2DSMQ>

.
You are receiving this because you were mentioned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1986737280,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ACCHCOU3SRAP46UGULIHWH3YXKMZJAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG4ZTOMRYGA>

.
You are receiving this because you modified the open/close state.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1986745456,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VKHRQQBMCBSL3T5X6LYXKRPTAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG42DKNBVGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

Do you have any suggestions on where to look for what matches the rule?
For example, for MatchToken, I traced down the classes that extend
TokenConstraint and StringMatcher but to no avail. They only hold [B-Food]
and/or [I-Food] and not where the rule matches.
Nick
On Sat, Mar 9, 2024 at 5:24 PM Nick Avalani @.***>
wrote:

I see. Thanks for the clarification. Will work on that right now.
Nick
On Fri, Mar 8, 2024 at 11:09 PM Keith Alcock @.***>
wrote:

External Email
Hi,
The first step is to show the B-Food or I-Food in a "visualization" so
that
the user can understand which Inst is in question. At this point we are
still not matching against any text like in a sentence. The step after
that is to show what the B-Food or I-Food turned out to match (or failed
to
match) in the sentence like the cake, pain au chocolat (or John eats).
Keith
On Fri, Mar 8, 2024 at 10:28 PM navalani @.***> wrote:

Hey Keith,
I noticed in the code that we are currently visualizing the part of the
rule that is matched, i.e (B-Food), (I-Food), etc. but do we need to
visualize which part of the sentence that matches or is the
next.getPosId
sufficient?
Nick
On Fri, Mar 8, 2024 at 9:50 PM Keith Alcock @.***>
wrote:

External Email
Merged #782 https://github.com/clulab/processors/pull/782 into
nick-avalani/odin-debugger.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#event-12062313492,
or
unsubscribe
<

https://github.com/notifications/unsubscribe-auth/BCCR2VOZFUBDH2ZJBYU2HNTYXKILBAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGA3DEMZRGM2DSMQ>

.
You are receiving this because you were mentioned.Message ID:
@.***>

—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1986737280,

or unsubscribe
<
https://github.com/notifications/unsubscribe-auth/ACCHCOU3SRAP46UGULIHWH3YXKMZJAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG4ZTOMRYGA>

.
You are receiving this because you modified the open/close
state.Message
ID: @.***>

—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1986745456,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VKHRQQBMCBSL3T5X6LYXKRPTAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBWG42DKNBVGY
.
You are receiving this because you were mentioned.Message ID:
@.***>

@navalani, you will eventually need the tok field of the Thread trait.  I believe this keeps track of what token (of a sentence) is being matched against which Inst (of the rule).  We might eventually keep a list of tokens that did or didn't match each Inst so that the user can verify that their rule is working as expected.  For the moment we're still wanting to make sure the user and computer understand the rule in the same way based on the visualization of the Insts before they even start working.  One thing that we're debugging is an incorrectly stated rule that doesn't mean what the rule writer thinks it does.  We're more or less showing the assembly language that their code (rule) produced with enough clues so that they can verify it or at least do a sanity check.

Understood. Thanks
On Sat, Mar 9, 2024 at 9:27 PM Keith Alcock @.***>
wrote:

External Email
@navalani https://github.com/navalani, you will eventually need the tok
field of the Thread trait. I believe this keeps track of what token (of a
sentence) is being matched against which Inst (of the rule). We might
eventually keep a list of tokens that did or didn't match each Inst so that
the user can verify that their rule is working as expected. For the moment
we're still wanting to make sure the user and computer understand the rule
in the same way based on the visualization of the Insts before they even
start working. One thing that we're debugging is an incorrectly stated rule
that doesn't mean what the rule writer thinks it does. We're more or less
showing the assembly language that their code (rule) produced with enough
clues so that they can verify it or at least do a sanity check.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1987081469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VL5OTBAJCHGS7A2C33YXPOKLAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGA4DCNBWHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

I just pushed some code that added a visualization that shows what B-Food
and B-Per match in MatchToken. Before I add visualization for the other
Inst classes, I wanted to make sure, the tok field in Thread gives the
index of the token in the sentence right? For example, tok = 0 in "John
eats cake" refers to John. The visualization I pushed works with that
understanding.
Nick
On Sat, Mar 9, 2024 at 9:44 PM Nick Avalani @.***>
wrote:

Understood. Thanks
On Sat, Mar 9, 2024 at 9:27 PM Keith Alcock @.***>
wrote:

External Email
@navalani https://github.com/navalani, you will eventually need the
tok field of the Thread trait. I believe this keeps track of what token (of
a sentence) is being matched against which Inst (of the rule). We might
eventually keep a list of tokens that did or didn't match each Inst so that
the user can verify that their rule is working as expected. For the moment
we're still wanting to make sure the user and computer understand the rule
in the same way based on the visualization of the Insts before they even
start working. One thing that we're debugging is an incorrectly stated rule
that doesn't mean what the rule writer thinks it does. We're more or less
showing the assembly language that their code (rule) produced with enough
clues so that they can verify it or at least do a sanity check.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1987081469,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VL5OTBAJCHGS7A2C33YXPOKLAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGA4DCNBWHE
.
You are receiving this because you were mentioned.Message ID:
@.***>

@navalani, it's cool to see the "B-FOOD matches cake".  That will give the user some indication of what is happening.   The new code in ThompsonVM.stepSingleThread will probably become relevant soon.  Things happening in that area are probably more complicated than OdinStarter would leave one to believe.  Try the sentence John eats cake and Jane eats pain au chocolat. for a preview of the complications.  That B-FOOD will end up matching pain and the record of cake will have been lost.  The val matchTokens = new HashMap[String, Int] will need to be a more complicated mechanism for recordkeeping.  It will additionally need to keep track of the sentence, because the one that is being worked on in stepSingleThread is not necessarily that one that is being used to make the visualization in OdinStarter (i.e., mentions.head.sentenceObj).  However, that's a worry for later.
In the very short term, can you adjust the recursion in OdinStarter so that the output does not keep repeating the name of the extractor (rule)?  Right now it is
There was an extractor: foods-from-lexicon - Inst: 1. SaveStart(--GLOBAL--)
1. SaveStart(--GLOBAL--)
There was an extractor: foods-from-lexicon (Next) - Inst: 2. MatchToken(B-FOOD matches pain) -> 3
2. MatchToken(B-FOOD matches pain) -> 3
There was an extractor: foods-from-lexicon (Next) (Next) - Inst: 3. Split.  Check out my LHS and RHS!
There was an extractor: foods-from-lexicon (Next) (Next) (LHS) - Inst: 4. MatchToken(I-FOOD matches chocolat) -> 3
4. MatchToken(I-FOOD matches chocolat) -> 3
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) - Inst: 5. Pass
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) (Next) - Inst: 6. SaveEnd(--GLOBAL--)
6. SaveEnd(--GLOBAL--)
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) (Next) (Next) - Inst: 0. Done

but it would be much more understandable like
There was an extractor: foods-from-lexicon
1. SaveStart(--GLOBAL--)
2. MatchToken(B-FOOD matches pain)
3. Split.  Check out my LHS and RHS!
    (LHS) 4. MatchToken(I-FOOD matches chocolat) -> 3
    (RHS) 5. Pass
    6. SaveEnd(--GLOBAL--)
    0. Done

There was an extractor: person-from-lexicon
1. SaveStart(--GLOBAL--)
etc.

or something similar.  Numbering, spacing, reference to other numbers would all be very useful.

Just pushed some code that has a more understandable visualization. I tried
"John eats cake and Jane eats pain au chocolat." and I see what you mean.
The record of cake is lost. Let me try using a HashMap with an array of
Integers as the value.
Nick
On Sun, Mar 10, 2024 at 10:22 PM Keith Alcock @.***>
wrote:

External Email
@navalani https://github.com/navalani, it's cool to see the "B-FOOD
matches cake". That will give the user some indication of what is
happening. The new code in ThompsonVM.stepSingleThread will probably become
relevant soon. Things happening in that area are probably more complicated
than OdinStarter would leave one to believe. Try the sentence John eats
cake and Jane eats pain au chocolat. for a preview of the complications.
That B-FOOD will end up matching pain and the record of cake will have
been lost. The val matchTokens = new HashMap[String, Int] will need to be
a more complicated mechanism for recordkeeping. It will additionally need
to keep track of the sentence, because the one that is being worked on in
stepSingleThread is not necessarily that one that is being used to make the
visualization in OdinStarter (i.e., mentions.head.sentenceObj). However,
that's a worry for later.
In the very short term, can you adjust the recursion in OdinStarter so
that the output does not keep repeating the name of the extractor (rule)?
Right now it is
There was an extractor: foods-from-lexicon - Inst: 1. SaveStart(--GLOBAL--)

SaveStart(--GLOBAL--)
There was an extractor: foods-from-lexicon (Next) - Inst: 2. MatchToken(B-FOOD matches pain) -> 3
MatchToken(B-FOOD matches pain) -> 3
There was an extractor: foods-from-lexicon (Next) (Next) - Inst: 3. Split.  Check out my LHS and RHS!
There was an extractor: foods-from-lexicon (Next) (Next) (LHS) - Inst: 4. MatchToken(I-FOOD matches chocolat) -> 3
MatchToken(I-FOOD matches chocolat) -> 3
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) - Inst: 5. Pass
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) (Next) - Inst: 6. SaveEnd(--GLOBAL--)
SaveEnd(--GLOBAL--)
There was an extractor: foods-from-lexicon (Next) (Next) (RHS) (Next) (Next) - Inst: 0. Done

but it would be much more understandable like
There was an extractor: foods-from-lexicon

SaveStart(--GLOBAL--)
MatchToken(B-FOOD matches pain)
Split.  Check out my LHS and RHS!
(LHS) 4. MatchToken(I-FOOD matches chocolat) -> 3
(RHS) 5. Pass
6. SaveEnd(--GLOBAL--)
0. Done

There was an extractor: person-from-lexicon

SaveStart(--GLOBAL--)
etc.

or something similar. Numbering, spacing, reference to other numbers would
all be very useful.
—
Reply to this email directly, view it on GitHub
https://github.com/clulab/processors/pull/782#issuecomment-1987654070,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BCCR2VPKNVDXDSEHELVX7JDYXU5QPAVCNFSM6AAAAABC6OFGN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBXGY2TIMBXGA
.
You are receiving this because you were mentioned.Message ID:
@.***>

@navalani, the updated formatting looks much better (IMO).  A novice rule writer can probably learn fairly quickly to follow it.  I do notice that some consecutive numbers are missing and that the Done has disappeared, so some logic is not yet quite right.  If this was less experimental, unit tests would be written to vouch for its correctness, but for now it's just eyeballs.
If you are already looking at the HashMap that is stored in the ThompsonVM, I would suggest moving it to the Debugger class instead.  It would also be good to take another look at #769.  You might notice that each Inst gets run/processed/visited numerous times.  I see debugDoc, debugLoop, debugExtractor, debugSentence, debugTokenInst.  These Doc, Loop, Extractor, Sentence, TokenInst form a context in which an Inst might match a token or not.  I am leaning towards making something like that essentially the key to your HashMap and performing queries on it.  It would be mini database.  After that extractorEngine.extractFrom(document) in OdinStarter, one would say to the Debugger, possibly for the sake of the visualization, but maybe more generally, "You just extracted from a document.  I'm interested in that 5th sentence.  There's that foods-from-lexicon rule that didn't seem to work right.  The B-FOOD Inst is acting up.  Which tokens did it match?"  This is similar to what happens in
  for (extractor <- extractors)
    visualize(extractor, sentence)

but for a more complex and realistic situation.  There's more to say about it, perhaps at a meeting.  @MihaiSurdeanu will likely have an opinion based on experience (while I'm just guessing :-)


Issues with HQQLinear compatability when quantized from bf16.

I am trying to integrate hqq as drop-in replacement for Bitsandbytes-4bit in Huggingface's TGI.
E.g. my approach is to quantize on the fly, similar to this line in bitsandbytes.
https://github.com/huggingface/text-generation-inference/blob/630800eed37b15c4b0c9eb8e6ab47212026720f7/server/text_generation_server/utils/layers.py#L317
elif quantize.startswith("hqq"):
    HQQLinear.set_backend(HQQBackend.PYTORCH)
    layer = nn.Linear(weight.shape[1], weight.shape[0], bias=bias is not None, dtype=weight.dtype)
        with torch.no_grad():
            layer.weight.data = weight
            if bias is not None:
                layer.bias.data = bias
    linear = HQQLinear(layer, BaseQuantizeConfig(nbits=4, group_size=64, quant_zero=True, quant_scale=False), del_orig=True)

Using a float16 model, this works, however with bfloat16, it fails.
Example model: TinyLlama/TinyLlama-1.1B-Chat-v0.3
Produces Error in Backend.PYTORCH
  File "../.venv/lib/python3.10/site-packages/hqq/core/quantize.py", line 217, in forward_pytorch
    out   = torch.matmul(x, W_est.t())
RuntimeError: expected mat1 and mat2 to have the same dtype, but got: c10::BFloat16 != c10::Half

Produces Error in Backend.PYTORCH_COMPILE
tgi/utils/layers.py", line 531, in forward
    rotary_emb.apply_rotary(x1, x2, cos, sin, x1, x2, False)
RuntimeError: Expected x1.dtype() == cos.dtype()

x1 is float32, cos is bfloat16 / same as unquantized layer.

Regarding the first error, that's expected because we have to cast the weights after bit-unpacking and by default it's using half.  The code snippet below should temporarily solve your problem. In the future, the user will be able to specify the dtype:
## Add this in the beginning before quantizing anything
import torch
from hqq.core.quantize import Quantizer

def dequantize_bfp16(cls, W_q, meta):
	W_q_p = Quantizer.unpack[meta['packing']](W_q).to(torch.bfloat16)
	if((meta['group_size'] is not None) and (meta['nbits']==3)):
		W_q_p = W_q_p[:meta['group_size']] if (meta['axis']==0) else W_q_p[:,:meta['group_size']]
	W_r = ((W_q_p - meta['zero'])*meta['scale']).reshape(meta['shape'])
	del W_q_p
	return W_r

def to_inplace_bfp16(cls, W_q, meta, device):
	W_q = W_q.to(device).contiguous()
	for key in meta:
		if(type(meta[key])==torch.Tensor):
			meta[key] = (meta[key].to(torch.bfloat16) if meta[key].dtype==torch.float32 else meta[key]).to(device).contiguous()
	return W_q, meta

Quantizer.dequantize = dequantize_bfp16
Quantizer.to_inplace = to_inplace_bfp16

## then replace linear = HQQLinear(layer,...);
## Re-cast bias after conversion
linear.bias = linear.bias.to(torch.bfloat16) if (linear.bias is not None) else None

Regarding the second error, I am not sure, that's related to the rotary embedding layer which is not quantized. The compile backend only compiles the forward pass of HQQLinear. Maybe this will be resolved with proper bfloat16 casting with the snippet above.
Let me know if that works!

You can now specify compute_dtype when quantizing models, setting it to torch.bfloat16 should fix this issue! Feel free to re-open if it doesn't work.


WebApiContrib.Formatting.Xlsx DLL is not on NuGet

I'd love to use this library but the DLL it requires isn't on NuGet. I found the DLL on another Github repo, but the DLL should be available as a nuget package. Also EPPlus should have a dependency on this DLL.

I can work on this tonight @jordangray. What's the starting version? 2.0.0?

So I pushed out a version that was a pre-release (1.0.0-pre), but it looked like it failed. The followup was missing the "pre" so it appears listed as 1.0.0. Let me know what you want for this and I can adjust @jordangray :
http://www.nuget.org/packages/WebApiContrib.Formatting.Xlsx

Many thanks, Chris! Things are a bit intense right now, just want to acknowledge that the version is fine for now, and I'll update the documentation when I get a chance. :)

I completely understand, thanks!


Cache group keys to minimize allocation during queries

Basically, groupKey allocates some temporary objects via the .map, .sort and .join calls, and that's showing up on the Firefox profiler. It's not a big deal, but I made it go away with this patch. It uses a WeakMap to avoid a memory leak when queryComponents is passed a new array every time.

Thank you @parasti :purple_heart:

2.3.1

That was lightning quick. Cheers!


068 d allow fractional fee charged to sender or receiver

Description:

Related issue(s):
Fixes #
Notes for reviewer:

Checklist

[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)

Reopened against develop branch.


add JSON_NUMERIC_CHECK to json encode options

linked to
https://github.com/codeigniter4/CodeIgniter4/pull/3286
This allows encoding to make numeric data more true to its type (not enclose them with "", making the receiving system identify
the types easier.
Note making the options variable configurable might be handy in the future depending on the needs of the users
people they interface with they might need additional options added here
Checklist:

[ ] Securely signed commits
[ ] Component(s) with PHPdocs
[ ] Unit testing, with >80% coverage
[ ] User guide updated
[ ] Conforms to style guide

Adding a numeric check just like that may potentially break someone's code. Developers may already use code like:
if ($foo->bar === '1')

But I like your idea of making this configurable. Would you like to work on this PR and add something like $formatterOptions array to the Config/Format.php file? We would use it like:
$config = new Filter();
$options = $config->formatterOptions['application/json'] ?? JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR

I'm not really sure about naming the keys for this new variable so if anybody has a different idea, I'm all ears.

Hi there @michalsn  , I will do this asap. Will look at the current names being used and see if I can add something that appropiate.

But I like your idea of making this configurable. Would you like to work on this PR and add something like $formatterOptions array to the Config/Format.php file? We would use it like:

@michalsn  I added the config value and also the code for XML and JSON Formatter, for XML I added the additional option to be added as per the php docs or default to the phpdocs default.
One thing to note is I did not make it to overwrite the default options but to add to it, the reason for this is if you look at
JSONFormatter the JSON_PARTIAL_OUTPUT_ON_ERROR is actually important for error checking afterwards in the same function, thus allowing a total override of default options might break actual logic for that reason I believed it saver to make it a add to current option only. The default for the settings are all null.

The whole sense of making it configurable is that we should have the ability to change default flags. So please add all current flags to the config file as default.
You can check later in the code if JSON_PARTIAL_OUTPUT_ON_ERROR is set via bitwise operator and add it if needed.
if (! ($options & JSON_PARTIAL_OUTPUT_ON_ERROR))
// add it to options

Actually I don't think that we have to check it at all (options) - we can just add it and it should work fine (even if it's already present).

Hi there. The logic I have is as follow, basically it will do what you suggest in your last post. But based on wanting to give control to the user to select the encoding options (basically if they want JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES )
I will move all but JSON_PARTIAL_OUTPUT_ON_ERROR  to be in the Config/Format.php , then  the result will be achieved what you are aiming for.
		$options = $config->formatterOptions['application/json'] ?? 0;
		$options = $options | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR ;

Actually I don't think that we have to check it at all (options) - we can just add it and it should work fine (even if it's already present).

Just update your code. If I will have any requests for changes I will let you know :)

Oops used my company account there :), will do the chagne now, just finished testing it and it seems to work :)

Just update your code. If I will have any requests for changes I will let you know :)

@michalsn  K changes made, should work now.

@michalsn changes made,will try and enforce the coding standard more with next changes.

@devorama No worries. Just one last change and I think we're good.

@michalsn  all done :)

@michalsn  and @paulbalandan  Made the changes as requested , sorry for the config slip up.


enhance not working since RC was released

Hello,
I am working on a project where we insert a view in a screen and I need to enhance this view to bind the data with it.
Everything seemed to work before I update to the last version
What's happen now :
If there is a single tag in the view, nothing happen  :

And when there is no tag :

Here is the code of the enhancement (find on the Internet)
import { inject, TemplatingEngine, createOverrideContext, ViewResources } from "aurelia-framework";

@inject(TemplatingEngine, ViewResources)
export class AureliaCompilationService{

 constructor(templatingEngine, viewResources) {
    this._templatingEngine = templatingEngine;
    this._viewResources = viewResources;
  }

  compileView(element, ctx) {
    if (element != null) {
      let view = $(element).data('viewInstance');
      if (element.querySelectorAll('.au-target').length === 0) {
        if (this._viewResources) {
          view = this._templatingEngine.enhance({
            bindingContext: ctx,
            overrideContext: createOverrideContext(ctx, ctx.$parent),
            element: element,
            resources: this._viewResources
          });
        } else {
          view = this._templatingEngine.enhance({
            bindingContext: ctx,
            overrideContext: createOverrideContext(ctx, ctx.$parent),
            element: element
          });
        }

        $(element).data('viewInstance', view);

      } else {
        if(view.bind) {
          view.bind(this, createOverrideContext(ctx, ctx.$parent));
        }
      }

      if(view.attached) {
        view.attached(); // attach it to the DOM
      }
    }
  }

}

Any idea ?

please create a reproduction of what you are seeing using https://gist.run/?id=7542e061bc940cde506b

Here it is :
https://gist.run/?id=2d00b06ba86c518db9f219ca917846f3
Clicking on the enhance button only bind the htmlSource1 but not the 2nd one

I found a solution to this problem : I used a reference (ref="htmlHolde2") and the aurelia binding ("innerhtml.bind='htmlSource2 ' ) at the same time. By removing the innerhtml.bind in the .html and writing " this.htmlHolder2.innerHTML = "" + "${toto}" + ""; " in the .js, it works correctly.


[PE-D][Tester A] Clear Command not showing in User Guide but works in app

Describe the bug
The clear command is not a valid command refered to the User Guide, however when input clear all data is lost
To Reproduce
type /clear and press Enter in the command box
Expected behavior
Referring to the User Guide, as it is not a valid command, an error message should be shown
Screenshots

Labels: type.FunctionalityBug severity.Medium
original: fy17ohhh/ped#13

Thank you for your feedback!


Non-nullish assertion over property of generic object not respected

Bug Report
I'm building a function that removes nullish-values from an object. In the code, that is generic over the object, TypeScript doesn't seem to respect my non-nullish assertion:
if (input[key] != null) result[key] = input[key]

It seems to think that input[key] could possibly be null in the assignment, even though the line is guarded by input[key] != null.
🔎 Search Terms
nullish assertion generics assignment
🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about: v4.4.0-dev.20210622, v4.3.4, v4.3.2, v3.3.33

⏯ Playground Link
Playground link with relevant code
💻 Code
type PartialNonNullable<T> = { [P in keyof T]?: NonNullable<T[P]> }

function withoutNullishValues<T extends object> (input: T): PartialNonNullable<T> {
  const result: PartialNonNullable<T> = {}

  for (const key of Object.keys(input) as (keyof T)[]) {
    if (input[key] != null) result[key] = input[key]
  }

  return result
}

🙁 Actual behavior
Type 'T[keyof T]' is not assignable to type 'NonNullable<T[keyof T]> | undefined'.
  Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'NonNullable<T[keyof T]> | undefined'.
    Type 'T[string]' is not assignable to type 'NonNullable<T[keyof T]> | undefined'.
      Type 'T[string]' is not assignable to type 'NonNullable<T[keyof T]>'.
        Type 'T[keyof T]' is not assignable to type 'NonNullable<T[keyof T]>'.
          Type 'T[string] | T[number] | T[symbol]' is not assignable to type 'NonNullable<T[keyof T]>'.
            Type 'T[string]' is not assignable to type 'NonNullable<T[keyof T]>'.

🙂 Expected behavior
no errors in type checking

I believe this may be the same as my issue, #44446.

If you're trying to narrow a generic type (we'll call it T), then TS can typically only represent the narrowing as T & NarrowerType (because within the generic function you don't know precisely what T is).  In your case the necessary representation would be T & NOT null, which could only be done if we had negated types.  See #4196.

Generics can only be narrowed if they're a union, and T[keyof T] is not a union (it's effectively opaque from the checker's perspective), so no narrowing occurs here.
The implied suggestion here is to produce the narrowed type NonNullable<T[keyof T]> for input[key] inside the if; this is something we've experimented with but it's not as straightforward as it initially seems (at minimum for example, you need a new built-in type for every kind of narrowing, with associated higher-order behavior)
See #22348


Sudbury, ON, CA

Good Morning Justin,
I'm passing your request along to the Coordinator of our GIS Department, she will be able to answer your question,

Dave

Krista Carre<EMAIL_ADDRESS>cc:	Kris Longston<EMAIL_ADDRESS>

they sent the data! Will upload to dropbox. can @iandees or @nvkelso please review these before we use?
Disclaimer: The information attached is provided “as is” and while the City of Greater Sudbury provides this information in good faith, the City does not warrant, convenant or guarantee, in an expressed or implied form, arising by law or otherwise, the completeness, effectiveness, accuracy and/or fitness or the information for any particular use.  The City does not assume responsibility nor accept any liability arising from any use of the information.
The City of Greater Sudbury shall not be liable in respect of any claim, demands and/or action, irrespective of the nature of the claim, demand and/or action alleging any loss, injury or damages, direct or indirect, which may result from the use of the City of Greater Sudbury information.  The City of Greater Sudbury shall not be liable in any way for loss of profits or contracts, or any other consequential direct or indirect loss of any kind resulting from the use of the City of Greater Sudbury information.
The user of the City’s information shall indemnify and save harmless the City of Greater Sudbury from and against any claims, demand, action, costs (including without limitations, legal fees, disbursements and administrative costs), losses, injuries, expenses, damages, fines, orders, and/or recoveries suffered by , made, brought and/or recovered against the City of Greater Sudbury, irrespective of the nature of the cause of the claims, demands, actions, alleged losses, costs, expenses, damages and/or injuries (including injuries resulting in death), including without limitations claims, demands, actions, costs, expenses, damages and/or injuries arising out of the City’s negligence, gross negligence, errors and omissions and/or willful misconduct, as pertaining to the provision and/or use of the City of Greater Sudbury information.

https://www.dropbox.com/s/n6bj7h6cz9risrj/Address_Points_May_8_2017.zip?dl=0

License looks good to me.

Thanks @iandees

yes, this is the raw data - do you want me to ask them for all fields if they have a different attribute table/ dataset?

Not yet, I'll take a crack at it, the regexes shouldn't be that bad, just weird formatting.

@trescube they just changed this to open data I think!!!!!!!  http://opendata.greatersudbury.ca/datasets/address-points-layer

Sweet!  I'll add to my to-do list for this afternoon.


Added favicon support for safari

As with favicon support before (#8, #9), safari was not supported. This pr should fix that.

This has been sitting waiting review for a while, which is my fault – I got into a bit of a rabbit hole on what exactly modern favicon support looks like, and in doing so even updated https://www.hackingwithswift.com to include the latest recommended approach. It's hard to get a great answer because so much just seems to be 10 years old, but from what I can see a good approach is:

Using an SVG for the main favicon
Using a 180x180 PNG for the Apple touch icon

I have no idea whether using 1 automatically makes 2 work, because if it doesn't it really ought to!
However, I'm wondering whether a better solution might work here: can we detect what favicon files they have in their Assets folder, and use that to generate all the correct tags automatically?

we can. I was looking at this as well and apple requires an extra metatag for safari. Thats what this pr is for. If you want me to, I can set it to auto look for favicon.png/svg/jpeg, and then people can override it if they choose.

apple requires an extra metatag for safari

Worth to mention that apple-touch-icon has been deprecated. Apple requires this only for Safari versions prior to 15.4
https://developer.apple.com/documentation/safari-release-notes/safari-15_4-release-notes#Web-API
https://developer.mozilla.org/en-US/docs/Web/Manifest/icons#browser_compatibility

@twostraws Do you want to merge this, or is it obsolete? I have been away from Ignite for a bit...

I am still using the original release (0.0.2) of Ignite and this line in the MySite struct in Site.swift works just fine for me in Safari and Edge:
var favicon = URL(string:"/images/favicon.png")

I guess that no further action is required?


MAX_BAND_SIZE is enormus.

MAX_BAND_SIZE is 2^16 * sizeof(int) = 262144 bytes most of the time is spend zeroing the band which makes the benchmark kind of pointless.

Yeah, that's true. Thanks for pointing it out!

I'll add a note about that to the blog post later one.


Select row programatically - v 0.9.0

How can I select a row programmatically in new v 0.9.0 ?
I did not see how to access Key object in directive or a select method.
In the previous version, I used to change the selected items array and it used to work.

It is possible but a little cumbersome. Currently you would have to find the table element and get the controller and then manually add the key.
var tableCrl = $element.find('table').controller('mdTable');

// assuming you are using an id prop on the item as a key
self.selected.push(item);
tableCrl.keys[item.id] = item;

I think instead I will add a companion md.table.select event that will allow you to select an item.
$scope.$broadcast(`md.table.select`, item, key);

I think that create a new function that supports (item, key) parameters is a better idea.
Another option is to expose "keys" array like "selected" array model.
<table md-table md-row-select ng-model="selected" md-keys-model="keys">

$scope.selected.push(item);
$scope.keys[item.id] = item;

or something like that.

I'm trying to think of the best way to do this. I'm not really a fan of the scope events because if you have multiple tables in the same scope it is impossible to communicate directly with one table.
Another thing I was thinking is, if someone is using a key for one item in the table they are most likely using keys for all items in the table so maybe I can force the developer to use an object for selected items instead of an array.
/// if not using keys
$scope.select = [itemOne, itemTwo];
// if using keys
$scope.selected = {
keyOne: itemOne,
keyTwo: itemTwo
};
This would allow the developer to freely add and remove items within their controller and it would be more efficient.

Sure. The question is the better way to do that.
But I liked your new suggestion. It could work really well.

Version 0.9.1 fixes de issue.
Thanks for the quick assistance.


Improve namespacing

These changes replace the isSVG flag with a namespace string. Namespacing is automatically triggered by using svg or math tags, and inherited by children. Namespacing can be explicitly triggered by adding a namespace to the props object passed to h. This is useful for e.g. embedding HTML inside SVG via the foreignObject tag.
Defined namespace URIs are added as a property of the h function, for convenience - saves having to look up and type them when doing explicit namespacing.
The other change is to always createElementNS even for html tags. There is no performance advantage to createElement
NB: my package.json and typescript definitions file are out of sync with the master - ignore please.

@w-mcilhagga Hyperapp currently picks up SVG automatically, how does this change affect that? 🤔

@w-mcilhagga Can you give it another shot at explaining what's happening here? This is going to add several more bytes to the dist bundle, so why do we want this?

Made some changes that reduce the build size by 0.05KB (the discussions around model=state+actions helped me understand the hyperapp mindset a little better, and I think the changes I've made make the pull request fit better with that)
But as to why hyperapp should do this?

It's the standard. hyperapp should handle the namespace property correctly. Users who want to give a namespace to an element shouldn't be told to go away, even if there are perhaps only a few of them.
The standard also says that the namespace can't be changed once element is created, so the update element code is changed to read the namespace rather than attempt to write it, and default to xhtml if null is returned. Returning null is only an issue with older browsers, according to MDN.
Since svg is the most common alternative to the xhtml namespace, it is automatically namespaced for convenience. (Dropped mathml automatic namespacing, since not that common outside of scientific/technical, which is my interest). This duplicates existing functionality.
Currently with hyperapp the svg namespace is a black hole that you can't escape once you are in it. The standard says you should be able to embed html, canvas, or video in svg with appropriate namespacing. This change lets you do that too.

@w-mcilhagga What's the total bundle size? This branch has unresolved conflicts, so I can't easily check myself without resolving the conflicts first. 😄

Yeah, I'm a bit out of sync. Windows says it is 3.07 KB (3,145 bytes). Used to be 3.12KB.

I mean, what is the bundle increase?

@w-mcilhagga Also can you explain how to use this? For example a mathml example or html embedded in svg.

Good questions - I have to catch the train right now but I'll get back to you when I'm at work

@w-mcilhagga Catch you later then! 😄

#678


Page not available for on-prem?

Page says it is not available for Azure Devops Server 2020 or 2019, but is linked from here:
https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/?view=azure-devops-2020
It was also previously available as I've been using this on-prem with this a reference for years.

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

ID: 9927683a-6fad-ab3d-4a28-1a9c101bda83
Version Independent ID: 7bccbe24-e106-1112-75a9-b093bb5ed012
Content: Download Build Artifacts task - Azure Pipelines
Content Source: docs/pipelines/tasks/utility/download-build-artifacts.md
Product: devops
Technology: devops-cicd-tasks
GitHub Login: @RoopeshNair
Microsoft Alias: ronai

@heoga Thank you for your feedback! I'm getting this updated shortly


[feat] Picker-based: subtitle

Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow DiDi's contributing guide.
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

Codecov Report

Merging #174 into dev will increase coverage by 0.08%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev     #174      +/-   ##
==========================================
+ Coverage   91.05%   91.13%   +0.08%
==========================================
  Files         108      108
  Lines        2358     2358
  Branches      348      348
==========================================
+ Hits         2147     2149       +2
+ Misses        111      108       -3
- Partials      100      101       +1

Impacted Files
Coverage Δ

src/components/picker/picker.vue
85.21% <ø> (ø)
:arrow_up:

src/components/time-picker/time-picker.vue
76.31% <ø> (ø)
:arrow_up:

src/components/segment-picker/segment-picker.vue
94.59% <ø> (ø)
:arrow_up:

src/components/cascade-picker/cascade-picker.vue
75% <ø> (ø)
:arrow_up:

src/components/date-picker/date-picker.vue
97.18% <ø> (ø)
:arrow_up:

src/components/slide/slide.vue
80.95% <0%> (+2.38%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2bdf04d...f3e6e36. Read the comment docs.

Travis tests have failed
Hey @AmyFoxFN,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4092) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
25 04 2018 12:08:53.150:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
25 04 2018 12:08:53.153:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
25 04 2018 12:08:53.167:INFO [launcher]: Starting browser PhantomJS
25 04 2018 12:08:57.835:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket HI93If0rffa5Gjn0AAAA with id 50870485
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✓ should trigger events

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✓ should validate & reset correctly
    ✓ should validate & reset correctly - async validate
    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should trigger pulling-up
      ✓ should trigger pulling-down
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly
    ✓ should trigger events

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should toggle by change v-model visible
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ should toggle by change v-model visible
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - update txt
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✗ should render correct contents
	Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✓ should render correct contents - invalid
      ✓ should reset correctly
      ✓ should not validate when disabled
      ✓ should trigger events
    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - max: number
      ✓ should be valid - len: string
      ✓ should be invalid - len: number
      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 202 of 202 (1 FAILED) (40.127 secs / 39.072 secs)
TOTAL: 1 FAILED, 201 SUCCESS

1) should render correct contents
     Slide.vue
     Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

=============================== Coverage summary ===============================
Statements   : 95.24% ( 2240/2352 )
Branches     : 82.76% ( 922/1114 )
Functions    : 95.24% ( 220/231 )
Lines        : 95.31% ( 2234/2344 )
================================================================================

npm ERR! Linux 4.14.12-041412-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.

Travis tests have failed
Hey @AmyFoxFN,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 6

     npm test

><EMAIL_ADDRESS>test /home/travis/build/didi/cube-ui
> npm run unit && npm run codecov

><EMAIL_ADDRESS>unit /home/travis/build/didi/cube-ui
> cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run

(node:4100) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
26 04 2018 03:16:39.497:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
26 04 2018 03:16:39.499:INFO [launcher]: Launching browser PhantomJS_mobile with unlimited concurrency
26 04 2018 03:16:39.555:INFO [launcher]: Starting browser PhantomJS
26 04 2018 03:16:40.199:INFO [PhantomJS 2.1.1 (Linux 0.0.0)]: Connected on socket Q4VQ7SyWkR4vJUPHAAAA with id 80988536
PhantomJS 2.1.1 (Linux 0.0.0) INFO LOG: 'You are running Vue in development mode.
Make sure to turn on production mode when deploying for production.
See more tips at https://vuejs.org/guide/deployment.html'

  ActionSheet
    ActionSheet.vue
      ✓ use
      ✓ should render correct contents
      ✓ should render correct contents - no data
      ✓ should render correct contents - picker style
      ✓ should trigger events
    ActionSheet API
      ✓ $createActionSheet API

  Button.vue
    ✓ use
    ✓ should render correct contents
    ✓ props
    ✓ events-called
    ✓ events-no-called

  CascadePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  CheckboxGroup.vue
    ✓ use
    ✓ should render correct contents (horizontal=false)
    ✓ should render correct contents (horizontal=true)
    ✓ should change v-model value

  Checkbox.vue
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  DatePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when configured startColumn and columnCount
    ✓ should render correct contents when configured format
    ✓ should trigger events
    ✓ should call methods
    ✓ $updateProps
    ✓ should add warn log when single is true

  Dialog
    Dialog.vue
      ✓ use
      ✓ should render correct contents - icon
      ✓ should render correct contents - title
      ✓ should render correct contents - alert
      ✓ should render correct contents - confirm
      ✓ should render correct contents - confirmBtn/cancelBtn
      ✓ should trigger events
      ✓ should not trigger events when btn is disabled
    Dialog API
      ✓ $createDialog API

  Drawer
    ✓ use
    ✓ should render correct contents
    ✗ should trigger events
	Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

  Form.vue
    ✓ use
    ✓ should render correct contents
    ✗ should validate & reset correctly
	TypeError: null is not an object (evaluating 'vm.show') (webpack:///test/unit/specs/drawer.spec.js:140:10 <- index.js:60999)

    ✓ should validate & reset correctly
	TypeError: null is not an object (evaluating 'vm.show') (webpack:///test/unit/specs/drawer.spec.js:140:10 <- index.js:60999)

    ✓ should validate correctly - trigger blur
    ✓ should validate correctly - debounce
    ✓ should trigger events

  IndexList
    IndexList.vue
      ✓ use
      ✓ should render correct contents
      ✓ should trigger events
      ✓ should trigger pulling-up
      ✓ should trigger pulling-down
      ✓ should fixed title
      ✓ should not have navbar when navbar prop is false
      ✓ run normal when group or item undefined
      ✓ should handle condition of unexpected param

  Input.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not show clear button when no text
    ✓ should show clear button when has text
    ✓ value should be empty when clear button clicked
    ✓ should support more native props
    ✓ should show password eye and work correctly
    ✓ should trigger events

  Loading.vue
    ✓ use
    ✓ should render correct contents - no size
    ✓ should render correct contents - with size

  Picker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents when use alias
    ✓ should toggle by change v-model visible
    ✓ should trigger events
    ✓ should refill correct
    ✓ should add warn log when single is true
    ✓ setData when picker is invisible
    ✓ setData when picker is visible

  Popup
    Popup.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents
      ✓ should toggle by change v-model visible
      ✓ events
    Popup API
      ✓ $createPopup API

  Radio.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - horizontal
    ✓ should toggle v-model value

  Rate.vue
    ✓ use
    ✓ should render correct contents
    ✓ should trigger change event
    ✓ should trigger change event with click

  Scroll
    ✓ use
    ✓ should correct by default
    ✓ should render correct contents
    ✓ should trigger pullingDown
    ✓ should not trigger pullingDown
    ✓ should trigger pullingUp
    ✓ should not trigger pullingUp
    ✓ should trigger click
    ✓ should trigger other events
    ✓ should call correct method

  SegmentPicker
    ✓ use
    ✓ should render correct contents
    ✓ should correct by default
    ✓ should trigger events
    ✓ $updateProps
    ✓ should add warn log when single is true

  Select.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - update txt
    ✓ should trigger events

  Slide.vue
    ✓ use
    ✓ should render correct contents
    ✓ should clone nodes if loop is true
    ✓ should trigger change event
    ✓ should go to right pageIndex if set initialIndex

  Swipe
    ✓ use
    ✓ should render correct contents
    ✓ should shrink if the swipe width not enough
    ✓ should shrink if the last moving direction is right
    ✓ should shrink and not moved if the duration is more than momentumLimitTime and moving distance is less than momentumLimitDistance
    ✓ should shrink and not moved if y-axis distance is more than x-axis distance
    ✓ should grow if the swipe width enough
    ✓ should grow if the duration is less than momentumLimitTime and moving distance is more than momentumLimitDistance
    ✓ should not swipe out of the boundaries when swiping left
    ✓ should not swipe out of the boundaries when swiping right
    ✓ should trigger events
    ✓ should shrink if another swipe item active
    ✓ should do nothing if active the same swipe item
    ✓ should call refresh if the btns prop has changed
    ✓ should use default props if do not pass any prop

  Switch
    ✓ use
    ✓ should render correct contents
    ✓ should toggle v-model value

  Textarea.vue
    ✓ use
    ✓ should render correct contents
    ✓ should not expand when blur
    ✓ should expand when focus, fold when blur
    ✓ should has remain when focus
    ✓ should change value
    ✓ should support more native props

  TimePicker
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents - no showNow
    ✓ should trigger events
    ✓ should add warn log when sigle is true

  Tip.vue
    ✓ use
    ✓ should render correct contents
    ✓ should render correct contents with offset[X]
    ✓ should be hidden after clicked content
    ✓ should be hidden after clicked close button

  Toast
    Toast.vue
      ✓ use
      ✓ should render correct contents - no type
      ✓ should render correct contents - time 0
      ✓ should render correct contents - with type
    Toast API
      ✓ $createToast API
      ✓ should trigger correct event

  Upload.vue
    ✓ use
    ✓ should render correct contents
    ✓ should add files & upload
    ✓ should remove file
    ✓ should start & pause upload
    ✓ should retry upload
    ✓ should trigger events

  Validator
    Validator.vue
      ✓ use
      ✓ should render correct contents - invalid
      ✓ should reset correctly
      ✓ should not validate when disabled
      ✓ should trigger events
    rules
      ✓ should be valid - no rule
      ✓ should be valid - unstated rule
      ✓ should be invalid - require: array
      ✓ should be invalid - type: string
      ✓ should be valid - type: string
      ✓ should be invalid - type: number
      ✓ should be valid - type: number
      ✓ should be invalid - type: array
      ✓ should be valid - type: array
      ✓ should be invalid - type: date
      ✓ should be valid - type: date
      ✓ should be invalid - type: email
      ✓ should be valid - type: email
      ✓ should be invalid - type: tel
      ✓ should be valid - type: tel
      ✓ should be invalid - type: url
      ✓ should be valid - type: url
      ✓ should be invalid - min: string
      ✓ should be valid - min: number
      ✓ should be valid - max: string
      ✓ should be invalid - max: number
      ✓ should be valid - len: string
      ✓ should be invalid - len: number
      ✓ should be invalid - notWhitespace
      ✓ should be invalid - pattern
      ✓ should be invalid - custom
    methods
      ✓ should add customized rule and message
      ✓ should rewrite raw type
      ✓ should change the language of default message

PhantomJS 2.1.1 (Linux 0.0.0): Executed 202 of 202 (2 FAILED) (35.821 secs / NaN secs)
TOTAL: 2 FAILED, 200 SUCCESS

1) should trigger events
     Drawer
     Timeout of 2000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.

2) should validate & reset correctly
     Form.vue
     TypeError: null is not an object (evaluating 'vm.show') (webpack:///test/unit/specs/drawer.spec.js:140:10 <- index.js:60999)

=============================== Coverage summary ===============================
Statements   : 94.86% ( 2231/2352 )
Branches     : 82.59% ( 920/1114 )
Functions    : 94.81% ( 219/231 )
Lines        : 94.97% ( 2226/2344 )
================================================================================

npm ERR! Linux 4.4.0-112-generic
npm ERR! argv "/home/travis/.nvm/versions/node/v6.14.1/bin/node" "/home/travis/.nvm/versions/node/v6.14.1/bin/npm" "run" "unit"
npm ERR! node v6.14.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR<EMAIL_ADDRESS>unit: `cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>unit script 'cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the cube-ui package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs cube-ui
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls cube-ui
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/travis/build/didi/cube-ui/npm-debug.log
npm ERR! Test failed.  See above for more details.


Script arguments not being fed to script in debug mode, sometimes causes error

I'm running PTVS with the WSL extension (not sure if this makes a difference). I can run my script fine without debugging, but when I try to run with debugging enabled the console window immediately closes and I get this message:
The operation could not be completed. Unspecified error
Upon closer inspection it seems that this crash only occurs when I have a script argument like "-r foo", and having just "foo" won't crash the program, but it won't feed it to my script either.
I can't really read the console output before it closes but I was able to make out "usage: ptvsd" which makes me think that the debugger is being fed the script arguments instead of my python script.

Are you passing interpreter arguments or script arguments?
And being on the WSL extension certainly does make a difference - it's nowhere near as robust as the core functionality. If you look in your %TEMP% directory at the latest created file after attempting to debug, you may be able to find the script we're launching. This will have the generated command line in it, which may help better diagnose what's going on.

Script arguments. It works as expected for non-debug mode. There are no relevant logs in my %TEMP% folder when I run "Start with debugging" (emptied the folder out, tried running several times, nothing new created). One thing to note: I added a command button from "Python/Start with debugging", which I've been using, but I'm not sure where in the menu this comes from. I noticed that if I run "start debugging" from the Debug menu, I get the same behavior as before, but the message says
Operation not supported. Unknown error: 0x80004005
I'm not sure why the message is different, but I'm getting the same results.

It won't be a log - it's a temporary .sh file that we create with a random name (including extension) to launch the process. However, for actual releases, the last line deletes itself, and depending on how it fails we are likely hitting that and removing it.
That "Operation not supported" error is known and occurs sometimes. Try launching again until it goes away - we never spent the time figuring it out properly (since we don't intend to keep this extension in its current form, and figured the eventual rewrite will either fix this issue or make it show up in new code).

Sorry if I wasn't clear; no temp files are being generated at all. As for the error, it only happens when I give a script argument that has a flag (i.e. "-r foo" causes error but "foo" allows script to run, albeit without being supplied the foo argument).

Okay, I'll mark this as a bug, but since it's a technical preview that we're not updating I wouldn't hold your breath for a fix.
If you like, you can grab the source code from our repo and build it yourself (just the Wsl project - shouldn't need any of the rest if you've got Python support installed).


IIS worker process profiling fails with "Unexpected error" message

I'm not sure whether this is totally outside the scope of this project or not, and I'm not clear whether it's intended for working with .NET Framework code or just .NET Core... so if I'm just using it wrong, please feel free to close this!
My use case would be attaching to a running IIS worker process (w3wp.exe) to profile a web application. However, when I try that by attaching to the PID, I get the following error:
Unexpected error: The requested resource is in use. (0x800700AA)

Is this a bug, or am I doing something wrong (or is Ultra just not really intended for profiling web apps)?

Is this a bug, or am I doing something wrong (or is Ultra just not really intended for profiling web apps)?

I don't think it is a bug with ultra but something else with ETW/Windows that would happen if you were using another ETW based profiler. Others have been experiencing this similar issue:

https://github.com/dotnet/BenchmarkDotNet/issues/2139
https://github.com/microsoft/perfview/issues/1726
https://github.com/microsoft/perfview/issues/1723

You could try the workaround described here and see if it solves your issue.

Yep, I can confirm that running the following in my elevated Powershell terminal allowed me to profile successfully:
Set-MpPreference -DisableTDTFeature $true

And ultra works really well! Looking forward to having a proper play with this tomorrow.
Incidentally (for anyone who stumbles across this), you can also re-enable the disabled feature easily enough after a profiling session:
# Re-enable TDT
Set-MpPreference -DisableTDTFeature $false

# Check the current status
Get-MpPreference | Select-Object -ExpandProperty IntelTDTEnabled


www.coffeedoc.info is currently stopped

Hi,
http://coffeedoc.info
returns >>  www.coffeedoc.info is currently stopped
Is this project dead ?
or
Just Web site is down ?

The website. And domain is no longer accessible.