Issue when focusing most recent window on a space

I have the following commands to create a new space and move there the focused window, and to focus a space:
alt + cmd - n : yabai -m space --create && \
                yabai -m window --space last && yabai -m space --focus last && yabai -m window --focus recent
alt - 1 : yabai -m space --focus 1 && yabai -m window --focus recent
alt - 2 : yabai -m space --focus 2 && yabai -m window --focus recent

I would expect --focus recent to focus the most recent window on a space, however sometimes that doesn't work. There are various situations where it doesn't work, but the simplest one that I've been able to reproduce is the following.
Start with 3 windows on space 1 (the only space for now), then issue the command bind to alt + cmd - n to create a second space, move the window there, focus the space and focus the window.
Now go back to space 1 with alt - 1, switch focus from one window to the other, then go back to space 2 with alt - 2. I find that the window is space 2 is now not focused, and if I go back to space 1 the focus switches between the two windows.
Am I using the wrong commands in the bindings or is this a bug? I'm on version 2.4.3.

The recently focused window id is just a global storage, and is not stored per space, but the lookup is only performed in the active space. This means that if you are on space 1 and have window A and B opened, moving the focus from A to B, will make A the recent window. Focusing the recent window will try to lookup A by ID in the active space, and in this case it will find and focus it, and make B the recent window. If you now switch to space 2, A will become the recent window, and if you try to focus recent now it will fail, because A is not located in the currently active space.
So I agree that this a bug. Now the question is if we want recent to be space specific or global. My initial implementation was for this to be a global thing, but I think maybe the most recent in a space itself is more valuable, since we already have recent as both a space and display selector already.

Is there a way to fix this with the tools available in version 2.4.3? If recent were to become space specific I'd need to upgrade to have that functionality, but I really don't want to lose window borders.

I don't think this is possible to do without code changes. For what it's worth I ported the yabai border functionality (with feature parity) into a standalone application: https://github.com/koekeishiya/limelight

Actually after thinking some more, I think the recent selector in yabai should work the way it does, but it should work across all spaces. macOS already does track the most recent focused within a space and will automatically focus that window when you activate said space.

For what it's worth I ported the yabai border functionality (with feature parity) into a standalone application: https://github.com/koekeishiya/limelight

Oh, didn't know that. I just built limelight and it works as expected, but how do I recover the option to specify border=off in yabai rules?
Btw, after upgrading to version 3.0.2 I'm having problems starting yabai as a service with homebrew. Even after installing the new scripting addition, I get a yabai-msg: failed to connect to socket error.
I tried removing yabai from the accessibility options hoping I'd get prompted to grant access again, but that's not happening. Any advice?

macOS already does track the most recent focused within a space and will automatically focus that window when you activate said space.

It doesn't for me, after focusing a space I have to manually focus a window in that space. That's why I added yabai -m window --focus recent to my space-switching bindings, I hoped it would solve that problem.

It doesn't for me, after focusing a space I have to manually focus a window in that space.

I found out the reason for that is I have unchecked the option When switching to an application, switch to a Space with open windows for the application in the mission control preferences.
That's Apple fault's though, there's a difference between not switching to a space with windows open for the focused application, and not focusing the most recent window when switching spaces.

but how do I recover the option to specify border=off in yabai rules?

You'd have to port the window rules system from yabai to limelight I guess.

Btw, after upgrading to version 3.0.2 I'm having problems starting yabai as a service with homebrew. Even after installing the new scripting addition, I get a yabai-msg: failed to connect to socket error.

Does it work if you run it directly from the terminal? Are there any crash logs (check Console.app > Crash Reports). Does brew work if you install the --head version?

Installing from head worked, but I think I just needed to manually add the yabai binary in the accessibility apps.

That's Apple fault's though, there's a difference between not switching to a space with windows open for the focused application, and not focusing the most recent window when switching spaces.

Is there a way to fix this? I'd like to leave that checked, but without losing the ability to focus the most recent window when I switch to a different space.

After the space switch has occurred, you can call yabai -m query --windows --space  and grab the id of the first entry in the list and pass it to yabai -m window --focus  to focus the most recently focused window in that space.

On 30 May 2020, at 14:56, n0ibe<EMAIL_ADDRESS>wrote:
Installing from head worked, but I think I just needed to manually add the yabai binary in the accessibility apps.
That's Apple fault's though, there's a difference between not switching to a space with windows open for the focused application, and not focusing the most recent window when switching spaces.
Is there a way to fix this? I'd like to leave that checked, but without losing the ability to focus the most recent window when I switch to a different space.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/koekeishiya/yabai/issues/544#issuecomment-636327367, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPDZVYY4EQSKNCRIJC34UDRUD7AHANCNFSM4NNPGMUQ.

I'm sorry to reopen this issue, but I'm still struggling with focusing the most recent window on a space when switching spaces. It's quite a bit annoying having to manually focus a window (with cmd-tab or the mouse) every single time I switch a space.
I tried the solution you suggested in your last reply, i.e.
alt - 1 : yabai -m space --focus 1 && yabai -m window --focus "$(yabai -m query --windows --space | jq .[0].id)"
alt - 2 : yabai -m space --focus 2 && yabai -m window --focus "$(yabai -m query --windows --space | jq .[0].id)"

but it doesn't seem to work. Btw, I still have When switching to an application, switch to a Space with open windows for the application unchecked in System Preferences -> Mission Control.

Note: fixed in #719


Shader error in 'Mirza Beig/GPU Fog (URP)'

Hi! Great work on this shader but I'm experiencing an error when importing this on an URP project. I can't change the material from Built-In to the URP shader version since it results into a compiling error.
Here's the full error:
Shader error in 'Mirza Beig/GPU Fog (URP)': redefinition of '_CameraDepthTexture_TexelSize' at line 1103 (on vulkan)
Compiling Subshader: 0, Pass: DepthOnly, Vertex program with <no keywords>
Platform defines: SHADER_API_DESKTOP UNITY_ENABLE_DETAIL_NORMALMAP UNITY_ENABLE_REFLECTION_BUFFERS UNITY_LIGHTMAP_FULL_HDR UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BLENDING UNITY_SPECCUBE_BOX_PROJECTION UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS
Disabled keywords: INSTANCING_ON SHADER_API_GLES30 UNITY_ASTC_NORMALMAP_ENCODING UNITY_COLORSPACE_GAMMA UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_HALF_PRECISION_FRAGMENT_SHADER_REGISTERS UNITY_HARDWARE_TIER1 UNITY_HARDWARE_TIER2 UNITY_HARDWARE_TIER3 UNITY_LIGHTMAP_DLDR_ENCODING UNITY_LIGHTMAP_RGBM_ENCODING UNITY_METAL_SHADOWS_USE_POINT_FILTERING UNITY_NO_DXT5nm UNITY_NO_FULL_STANDARD_SHADER UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 UNITY_PBS_USE_BRDF3 UNITY_PRETRANSFORM_TO_DISPLAY_ORIENTATION UNITY_UNIFIED_SHADER_PRECISION_MODEL UNITY_VIRTUAL_TEXTURING

There is a line in the GPU Fog (URP).shader at line 248.
the line says 'uniform float4 _CameraDepthTexture_Texelsize".
Just comment the line and save and it's fixed


Highly divergent samples classified as "other"

Whilst preparing last week's update, I noticed that some recent samples were classified as "other" (not a tracked VoC) but are clearly divergent from the baseline molecular clock, as illustrated by the following root-to-tip regression:

@murallcl suggested that these may represent BE/BF/BA.2.75 samples that were not annotated as such

Do we need to run a sequence QC prior to generating RTT plots?

Resolved due to resolution of a pangolin issue


Questions

First of all: very nice!
My questions:

(How) can I change the inside colour (currently white) of the wheel?
(How) can I influence the minimising/maximising of the wheel when the colour is activated? So can it by default start minimised, and appear by clicking, and/or can I prevent it from minimising at all?

Hey, Frank!

(How) can I change the inside colour (currently white) of the wheel?

It's not configurable, but you can work around it with some CSS:
.color-picker .palette::before {
    /* any color value works here; `transparent` as well if that's what you're after */
    background-color: gold;
}

Solution looks & feels clumsy, but it's a very unusual question/request I might say and configuring that part of the color picker is something I haven't thought about at all 😄
May I ask what's your use case? It would help me understand what your goal is and perhaps we can come up with a better solution.

(How) can I influence the minimising/maximising of the wheel when the colour is activated? So can it by default start minimised, and appear by clicking, and/or can I prevent it from minimising at all?

Unfortunately all of the options above are not something that's configurable yet and also don't have workarounds. Some weeks ago, during UI/UX testing some upcoming features a similar question was brought up. That is, is it possible to make the picker always open, so I guess you're not alone here.
Would you like to give it a shot and make a pull request for that? I'll help along if you get stuck or if you have further questions.

Sorry I did not respond earlier.
In the mean time I used your great work for a user interface for a word-clock project:

I was able to change the inside colour.
My next challenge will be to prevent the minimising.
I think I can find my way through your code, but I need some help to get started.
My current implementation depends on external sources through UNPKG.
But to change the code I need the sources on the webserver. So far I lack to knowledge to do so.
Can you give me some guidance to get this going?

I'm glad this is being looked into! it's a decent tool but I too would like an optional :expanded="true" prop or something to that effect! I'll grab a fork and have a look as I guess it probably isn't too tough to change :)

Hi @jaysaurus,
I modified following lines to keep the wheel from minimising.
To prevent the selection circle to be disabled, set following line to false:
https://github.com/radial-color-picker/vue-color-picker/blob/a1f61262936b63229e779b1f5896823c9dab4b36/src/ColorPicker.vue#L152
To prevent the wheel from minimising, set following line to true:
https://github.com/radial-color-picker/vue-color-picker/blob/a1f61262936b63229e779b1f5896823c9dab4b36/src/ColorPicker.vue#L161

Either 1. or 2. will do. Maybe option 2. allows for easier further extension in the future?

v1.1.0 is out! I'll update the docs tomorrow, but you can go ahead and start using it 🎉
<color-picker variant="persistent" v-model="color" />

Thanks. In the end I've decided to roll something out with canvas. It's a decent component but I think I need something slightly different :) by the way, it was throwing a runtime error when used with quasar framework. Probably just needs a trivial tweak but I thought I'd let you know for the sake of extensibility!

Oh, it did? That's a bummer... Would you mind opening a separate issue with some steps to reproduce? Quasar's scope is rather huge (SSR, Electron, etc...), but as you said - it may be something trivial to make it work there.

Perfect!
A very useful feature (at least for me).
One addition: the inside colour (original question 1) I had to make the same as the background colour.
Making it transparent produced this:


How to change selected date color

When I click on specific date, how to change color.? For example: if all my data color is white but I want on press select specific date and set blue color.How to do it? Thanks

You can use a DayViewDecorator. Please read the relevant section of the README


Generic inference seems broken when optional chaining is involved

TypeScript Version:  3.7.2

Search Terms: generic inference optional chaining
Code
interface Base {
    doBaseStuff(): void
}

interface Derived extends Base {
    doDerivedStuff(): void
}

function a<T extends Base>(arg: T | undefined): T {
    if (arg === undefined) {
        throw new Error('It was undefined')
    }
    return arg
}

function f(arg?: { foo: Derived }): Derived {
    return a(arg?.foo)
    // Note that the following is completely okay:
    // return a(arg?.foo as Derived | undefined)
}

Expected behavior: T is inferred to be Derived and type checking passes
Actual behavior: T is inferred to be Base and type checking fails
Playground Link: http://www.typescriptlang.org/play/#code/JYOwLgpgTgZghgYwgAgEJwM4oN4ChkHIAmA9ulgMpgCuMMAFAJQBcyAbicEbgL666hIsRCgAi0YGwhFkEAB6QQRDGkw58hUuKiTpVWgxbtO3PrhjUQCMMBIhkcADwAVWQohKV5CAD56cKABzVlcAH2RLIggYUGkjVzxCZGAYZH8g5ABebIilaNiiRmREpMIwAAsoEgB3ZBAIWoBRKCqoegBySPz6onbGDQI+JKgIGih7AMDefgsrGztkBkmAflZsRZISVm1dGR4jHakZEoIRsYn0wOWAOhhN-p4gA
Related Issues:

Duplicate #34579; PR for 3.7.3 #34988


feat(ui): Add statistics button

The present pull request provides a solution to #2607 (Add stats for nerds to UI (in the same way as YouTube)) by adding a new statistics button to the UI.
Example

How to preview
Initialize the client with a config that includes statistics on either the controlPanelElements or overflowMenuButtons sections and optionally, select the desired statisticsList to display, as follows.
const config = {
    'controlPanelElements': [... 'statistics', ...],
    'statisticsList': [... 'playTime', 'pauseTime', 'width', 'height', ...]
};
ui.configure(config);

Changelog

build/types/ui
Added the statistics_button.js path to the UI types file.

docs/tutorials/ui-customization.md
The statistics button was added to both controlPanelElements and overflowMenuButtons lists, and an aditional section was added to explain the list configuration.

shaka-player.uncompiled.js
Adds shaka.ui.StatisticsButton for the uncompiled version of the library.

test/ui/ui_unit.js
Adds tests to the button. On the second test, although there is a delay of 0.2, only a buffering time of 0.1 is expected (expect(bufferingTime).toBeGreaterThan(0.1);), this is due to the shaka.util.Timer on the button only ticking every 0.1.

ui/enums.js
Adds two additional Material Design Icons to be used in the statistics button.

ui/externs/ui.js
The new statisticsList is added, giving the option to select specific statistics for the button.

ui/less/container.less
A new .shaka-statistics-container class is created to declare the styles of the container.

ui/locales/en.json
The statistics button name is added to en.json as an example.

ui/locales/source.json
The statistics button name and description are added to the locales source.

ui/statistics_button.js
Using shaka.util.Timer, player.get_stats() is called periodically when the statistics container is displayed.

ui/ui.js
The default configuration of statisticsList is added, displaying almost all of the available statistics, with the exception of stateHistory and switchHistory. Additionally, they are displayed in alphabetical order with the exception of width and height, which were moved to the top.

Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code
[x] I have made the corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have run ./build/all.py and the build passes
[x] I have run ./build/test.py and all tests pass

Looks great, thank you!
An enhancement question: is it possible to show the "statistics" menu on right click instead of in the overflow menu / control menu, similar to Youtube?

Thank you Shaka Bot, this is an interesting edge case.
Due to the timer ticking every 0.1, I allowed the test to have a margin by assigning 0.2 seconds for the delay, but it appears to be that if run "fast" enough, getStatsFromContainer() is called before the container is updated by the timer for a second time. I ran the test multiple times locally, and rightfully so, it eventually failed.
Fixed it on my last commit!

Thank you Michelle and Theodab for the feedback - I refactored my approach to include a configurable right-click context menu and a new visual interface for the container on #3548!

Hi,
I put the snippet of code in the myapp.js in init() function.
The general error I get is 'Cannot read properties of undefined (reading 'configure')'

Heya, thanks I managed to set it up. I was wondering if it is possible to add some other custom variables into statistics. I believe it is JSON object of player.getStats(), but is it possible to forward the object which I previously edited.
The reason is for instance, the frame rate can be deduced from decoded frames and I would like to add some other dynamic strings which would give me better overview.


OPENAI_EMBEDDING_MODEL="text-embedding-3-small" not working?

My system is properly working when using:
OPENAI_EMBEDDING_MODEL="text-embedding-ada-002"
for ingest and server.
However, when I use:
OPENAI_EMBEDDING_MODEL="text-embedding-3-small"
I am always getting the message associated to NO_RELEVANT_CONTENT.
Log shows
{"level":"info","message":"No matching content found","reqId":"65cc405d974b84e18cac0060"}

Do I need to change any setting in the Config?

yes, the index is marked as "Active" with
Primary Node:
60 (100%) indexed of 60 total
created with
{
  "fields": [
    {
      "numDimensions": 1536,
      "path": "embedding",
      "similarity": "cosine",
      "type": "vector"
    }
  ]
}

I can also inspect the "embedded_content" collection's documents.
So, I can confirm that the ingestion script worked.

hmm, it's hard to help debug this without more information. would you be able to share the source code?
and just to confirm, do you have 2 vector search indexes, 1 for each collection containing embedded_content?

I cloned a brand new instance (from 'main' with commit 9ed093a), created new database/collection ('embedded_content'), new index ('vector_index') from new DB/collection, and ran the "quick start" example (from https://mongodb.github.io/chatbot/quick-start/).
the ingest is successfull: index shows: 78 (100%) indexed of 78 total
ran the default ui and server (from 'quick-start' folder as well),
and I got the same error: "message":"No matching content found".
config:
# MongoDB config
MONGODB_CONNECTION_URI="mongodb+srv://XXX:XXX@gardyn-XXX.XXX.mongodb.net/?retryWrites=true&w=majority"
VECTOR_SEARCH_INDEX_NAME="vector_index" # or whatever your index name is
MONGODB_DATABASE_NAME="gardyn-search-dev-4-32" # or whatever your database name is. must contain vector search index.

# OpenAI config
OPENAI_API_KEY="xxxxxx"
OPENAI_CHAT_COMPLETION_MODEL="gpt-4"
OPENAI_EMBEDDING_MODEL="text-embedding-3-small"

does it matter than the index name 'vector_index' is the same across several DB?

does it matter than the index name 'vector_index' is the same across several DB?

i believe this could be the issue. though it's hard to say without looking at your code and cluster config.
try setting up different index names in the atlas UI.
atlas vector search indexes are set at the cluster level, correlating to a specific collection in a specific database.

unfortunately, it did not work:
I created a brand new cluster (M0 Sandbox), used the 'quick-start' example out-of-the-box (with mongoDB doc as a source). I used the mongodb-ui and still got the "Unfortunately, I do not know how to respond to your message.".
I also tried with the "text-embedding-3-large" embedding model, but got error
vector field is indexed with 2048 dimensions but queried with 3072"

as the vector_index does not allow 3072:
Number of vector dimensions. Value can be between 1 and 2048, both inclusive.
Value is above the maximum of 2048.

I created a brand new cluster (M0 Sandbox), used the 'quick-start' example out-of-the-box (with mongoDB doc as a source). I used the mongodb-ui and still got the "Unfortunately, I do not know how to respond to your message.".

hard to say what's going on here without more visibility into your project, but i suspect it's an index config issue.
if you'd like i'd be happy to hop on a call and work through the problem with you. also curious to learn more about your experience using the framework 😄

vector field is indexed with 2048 dimensions but queried with 3072

this is due to Atlas Vector Search limiting the max number of dimensions to index to 2048. from the docs: You must specify a value less than 2049. You can set this field only for vector type fields."
this isn't related to the Chatbot Framework, but Atlas Vector Search itself, so it'd be hard to work around w/o using a different vector DB.

from troubleshooting session, it looks like for the 'text-embedding-3-small' embedding, the minScore value for the findNearestNeighborsOptions in the makeDefaultFindContent setup needs be set to lower than 0.9

thanks for posting that here. will add to the docs that the similarity score can vary depending on the vector embedding model you use.
closing this issue.


Fix confirmation button visibility on express payment

Codecov Report

Merging #1368 into feature/onetap_v2 will decrease coverage by <.01%.
The diff coverage is 0%.

@@                  Coverage Diff                   @@
##             feature/onetap_v2   #1368      +/-   ##
======================================================
- Coverage                 2.31%   2.31%   -0.01%
  Complexity                 124     124
======================================================
  Files                      434     434
  Lines                    16695   16699       +4
  Branches                  1414    1414
======================================================
  Hits                       386     386
- Misses                   16284   16288       +4
  Partials                    25      25

Impacted Files
Coverage Δ
Complexity Δ

...rnal/features/express/ExpressPaymentPresenter.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

...ernal/features/express/ExpressPaymentFragment.java
0% <0%> (ø)
0 <0> (ø)
:arrow_down:

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 a0de2da...dd0aeb0. Read the comment docs.


Document creation - nested fields - Validation error

Hello!
When we try to insert a document into an ArangoDB collection and that document has nested fields (fields populated with a dictionary) we get this error:
TypeError: argument of type 'Field' is not iterable
which is thrown by
if (not self.collection._validation['allow_foreign_fields']) and (field not in self.validators) and (field not in self.collection.arangoPrivates):
and that seems to happen because self.validators in DocumentStore.set is equal to
<Field, validators: ''>
Are we doing the insertion the wrong way or is there a bug in the library?
P.S. We have
_validation = {         'on_save': True,         'on_set': True,         'on_load': False,         'allow_foreign_fields': False     }
for this collection.

Hi,
I Add a similar issue, after looking closely to the class definition I've inadvertently put a ',' after the last field declaration of the dictionary.
Removing it, updating to the latest version and recreating all collections solved the issue for me.
Hope this helps.

I just ran into the same problem. It is caused by this code in document.py lines 112-118:
if isinstance(value, dict) :
    if field in self.validators :
        vals = self.validators[field]  # this line causes the error
    else :
        vals = {}
    self[field] = DocumentStore(self.collection, validators = vals, initDct = value, patch =
    self.patching, subStore=True, validateInit=self.validateInit)

You're checking here, if the current field is a dict and has validators. And then you are grabbing the Fieldobject and put it valswhich has not the type Field. But the property self.validators of a DocumentStore should be a a dictionary mapping field name to Fieldobject.
So I guess the follwoign line would fix it:
vals = {field: self.validators[field]}  # field is containing the name of the field

I'll will try this and submit a pull request.

I ran into this error as well. The problem for me was that pyArango implicitly expects nested fields to be validated as well. In the DocumentStore you find the following lines in the set() and __setitem__
methods:
if isinstance(value, dict) :
    if field in self.validators:
        vals = self.validators[field]
    else :
        vals = {}
    self.store[field] = DocumentStore(self.collection, validators = vals, initDct = value, patch =
    self.patching, subStore=True, validateInit=self.validateInit)

These lines check if the current value of the field is a dictionary and if that is the case, the validators of this fields are redirected into the sup DataStore. This is problematic if your field definition looks like this:
_fields = {
    "nested_something": Field()
}

If you now set nested_something to a some nested data, the value of the Field nested_somethingis a dict and the validators vals (from the code snippet above) has the value of a Field object. Unfortunately, the DataStoreexpects to get a dictionary mapping field name to Fieldobject, which results in the error message.
TypeError: argument of type 'Field' is not iterable

This code makes perfect sense if your field definition looks like this:
_fields = {
    "nested_string": {
        "some_string": Field([VAL.String()])
    }
}

In this case, the value of the validatorsvals, which get into the DataStore is a dictionary mapping field name to Fieldobject and the nested fields are getting validated as expected. But in our definition 1, we don't want to validate the subfields.
So the fix is to check if the field definition is actually a dict to and only then redirect the validators to the sub DataStore.
if field in self.validators and isinstance(self.validators[field], dict):

This way the validation runs as expected and if you allow allow_foreign_fields for your Collection you can use arbitrary nested data.
I fixed this and submitted a pull request: #117


Proxy authentication via NTLM for Rocket.Chat and Rocket.Chat+ apps

When using external storage for attachments or pasting links to external websites and you're running the RC+ app behind a corporate proxy that requires an authentication for resolving the URLs, the preview can't be rendered within the Rocket.Chat+ apps.
For this issue it would be great to see a proxy configuration within the apps, that supports NTLM based authentication for the corporate proxy.
The trello app supports exact this feature:

Thanks for the suggestion, we have had talks about this previously but just didn't have the chance to focus on this.

Dear all,
In our company this is really hurting the adoption of RocketChat, is there any step forward regarding this?

Need end-to-end domain user authorization (NTLM) what is the product for the corp segment, and there are no such functions?

Please test if the problem persists with our latest release. I will be closing the issue but if there is any problem yet, we will open it again.


 On my system, it goes from 75s to 233s (a roughly 3x slowdown).  The cause is #7042, or rather Windows' poor filesystem performance.  Using rm on the cit directory still takes about 40s (!), but 75+40 is still a factor of 2 away from 233.
I don't know if substantial improvements can be made, but I'm opening this issue to see if anyone can brainstorm some ideas. I'm wondering if remove_dir_all has a high performance hit, in which case maybe another solution would work better?
I'm also wondering if the slow removal is related to the properties of the files in the testsuite. For example, there are a bunch of NTFS junction points and read-only files (I think, at least the git pack files can't be deleted normally).
I also wonder if doing anything in parallel would help or hurt?

One potential improvement would be that instead of deleting the directory we simply move it out of the way. For example we could move it into a please-delete-everything-in-here directory. The start of the test suite could maybe spawn a background thread to delete that folder so it doesn't affect the rest of the test suite, and if it doesn't finish that doesn't matter too much since we'll pick up next time cleaning it up?


Fix a typo in documentation

The documentation should state expects instead of excepts in my opinion.

Great catch, thanks @vbasky!


Unsharded Vicuna: Fix Memory Error compiling mlir for lmsys/vicuna-7b-v1.3 fp16 with 64 GiB

Motivation
I get a Memory Error writing the combined MLIR file inside the Python text encoding IO code. Presumably an OOM since it heavily hits the page file with my 64GiB of system memory.
This is on Windows 10, run through the UI on, with lmsys/vicuna-7b-v1.3, fp16, and vulkan selected.
These changes get me all the way through to IREE compile which then falls over complaining about a constant redefinition.
Changes

in combine_mlir_scripts since we're writing a file anyway, read the file back in to get the return value, so we don't have to have another copy assembled in memory whilst writing the file.
In combine_mlir_scripts write the file out line by line from the individual source vars instead of writing everything at once to reduce memory pressure when python does text encoding,
In combine_mlir_scripts use del and gc.collect() more aggressively.
Outside combine_mlir_scripts add more del and gc.collect statements in the unsharded vicuna compile code to try and reduce memory pressure for when we call that function.

Problems Concerns

Do we even care about unsharded these days?
Probably slower if you have 128GiB of system memory, and its already slow.
Some of the additional dels and gc.collects probably aren't doing anything, they are all 'well that looks reasonable to me' placements, rather than having done any profiling.
Haven't tried with the TheBloke/vicuna version of the model. Don't know whether it had this problem.

There's more I think can do in this code to reduce memory usage, but it would involve shuffling around the statements that write the mlir, so that the file is written as we go along.
Since I don't know whether unsharded is even a thing we care about given that sharded exists, and I don't have a output mlir file that is correct to compare against, I didn't think that was sensible to try that just to get me past the error.

Thank you for the PR. We do care about unsharded. Ideally on a single GPU system we should run unsharded. Right now we run sharded until we workaround a large memory allocation issue in Vulkan with Sparse Memory. That is being worked on by @benvanik upstream.
@stellaraccident and @dan-garvey  probably are the best to chime in on the PR. But if you made it get to IREE compile without failing in a 64GB RAM system that is progress :D

Thanks for the PR. The failure at compile time is expected for fp16 currently. I will try to have a fix up for that in a few days.  Appreciate the help on the memory side!


Multiple-Cursor Line Select?

Hello,
First of all, this is a super helpful extension, so thank you for making it!
It would be nice to have multi-cursor line select, shown in the screencast below (editor is sublime)

If I have some free time maybe I'll learn how to code VS extensions and submit a PR.  Don't know how hard this is to add.

It took me a "little" while to find the time to implement this, but here we go. Thanks for the suggestion, @peterkrieg

Forgot I wrote this 🙂
Thanks so much @kaiwood,  it works great!


Fix broken links in the README

The /augur/packages prefix is all 404s. This PR fixes them

@jamiew Thank you very much for you pull request. We are in the midst of a migration to a monorepo. This commit points the links to the older individual repos which will diverge from this repo code-wise at some point in the future. After reviewing your PR, I updated the links to relative paths here #99.
Thank you for your help with this!

Great. Is there anywhere with more info on the migration to a monorepo?
Would like to update my various checkouts
On Sat, Nov 24, 2018 at 12:29 AM Justin<EMAIL_ADDRESS>wrote:

@jamiew https://github.com/jamiew Thank you very much for you pull
request. We are in the midst of a migration to a monorepo. This commit
points the links to the older individual repos which will diverge from this
repo code-wise at some point in the future. After reviewing your PR, I
updated the links to relative paths here #99
https://github.com/AugurProject/augur/pull/99.
Thank you for your help with this!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/AugurProject/augur/pull/97#issuecomment-441347198,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAHb81_D1y9plhzrU9sW4hGGf4E0524ks5uyOdcgaJpZM4Yv6wl
.

--
@jamiew https://twitter.com/jamiew | https://jamiedubs.com
https://www.jamiedubs.com/


Wrapper function required for implementing ringbuffer

To initialize ring buffer we will need a wrapper function. This could be something like InitRingBuf(), used by libbpfgo (https://github.com/aquasecurity/libbpfgo/blob/main/selftest/ringbuffers/main.go#L60)

@Ankurk99 thanks for raising this issue. I'll working on it.


system_time vs os_time and time drift

Steps to Reproduce
This one might be a little hard to reproduce exactly as some of the issues might be OS/machine dependent. But the steps seem to be:

Start a server, leave it running for an extended period of time(typically >12 hours)
Try to generate a token(I was doing is via exchange, but from what I can tell the issue is with the Guardian.timestamp function)
Token is generated, but already expired

I've written a bit more about it in this ElixirForum post: https://elixirforum.com/t/guardian-generating-an-expired-token-because-system-system-time-datetime-is-this-time-warp/56110/13
My system has some major drift between System.system_time and System.os_time, by about 97 minutes. I realize that this may not be a everyday common occurance for most people, and I'm not 100% sure of why it's happening locally, but it does seem that System.os_time will always return a more reliable timestamp, as will DateTime.utc_now() which seems to use os_time internally. I'm wondering if there's a reason for the use of System.system_time rather than os_time in this library, as system_time seems to at least sometimes have consistency issues that the other options don't seem to have.
Expected Result
A non expired JWT token
Actual Result
An expired JWT token.
iex(138)> {:ok, %{access_token: token}} = MyApp.Accounts.Guardian.sign_in(user)
iex(137)> MyApp.Accounts.Guardian.peek(token) |> Map.get(:claims) |> Map.get("exp") |> Kernel.<(DateTime.utc_now() |> DateTime.to_unix)
true

The code underlying the sign_in function:
def sign_in(%User{} = user) do
    with {:ok, refresh, _} <- refresh_token(user),
         {:ok, access} <- exchange_refresh(refresh) do
      {:ok, %{access_token: access, refresh_token: refresh, user: user}}
    end
  end

def refresh_token(resource) do
  encode_and_sign(resource, %{}, token_type: "refresh", ttl: MyApp.Config.token_refresh_ttl())
end

def exchange_refresh(refresh_token) do
  case exchange(refresh_token, "refresh", "access", ttl: MyApp.Config.token_access_ttl()) do
    {:ok, {^refresh_token, _}, {access_token, _}} -> {:ok, access_token}
    {:error, _err} = err -> err
  end
end

Call to system_time showing the time drift:
iex(138)> DateTime.to_unix(DateTime.utc_now()) - System.system_time(:second)
5782

~96 minutes, 1.6 hours. My access TTL is 60 minutes, hence the expiration immediately on creation.
It's harder to show here via code, so you'll have to trust me, but the DateTime call is in line with the true time, and the system_time call is behind the true time, rather than DateTime being ahead, and that's confirmed with my laptop's displayed time, my cell phones displayed time, and https://www.unixtimestamp.com/ time.
Happy to submit a PR for this, but wanted to first check if there was conscious decision to use system_time over os_time, or a reason not to use os_time/DateTime.

closed by #725


Add heating rate calculations

From @fvitt - Rather than adopting the changes in this PR, I propose implementing a separate method the the photolysis_rates class for calculating the chemical potential energy which could be invoked something like
cpe(:) = obj%chemPotEnergy('ReactionName',...)

These parameters could be be set in the json configuration file for the reactions that contribute to chemical potential heating:
  real(r8), parameter :: wc_o2_a     = 175.05_r8   ! (nm)
  real(r8), parameter :: wc_o2_b     = 242.37_r8   ! (nm)
  real(r8), parameter :: wc_o3_a     = 310.32_r8   ! (nm)
  real(r8), parameter :: wc_o3_b     = 1179.87_r8  ! (nm)

See https://github.com/fvitt/CAM/blob/e37cebbd4edc7a96b57a50e4d9332e84adba5b9d/src/chemistry/mozart/mo_tuvx.F90#L138
Calculations of the bond dissociation energies, as is done here
https://github.com/fvitt/CAM/blob/e37cebbd4edc7a96b57a50e4d9332e84adba5b9d/src/chemistry/mozart/mo_tuvx.F90#L485
could be done internal to the photolysis_rates, maybe at construction time.

@fvitt - is there a description I can include on the meaning of the a and b energy terms?

@fvitt - is there a description I can include on the meaning of the a and b energy terms?

Is this in reference to the wc_* parameters listed above?  Those are wavelength thresholds for jo2_a, jo2_b, jo3_a, and jo3_b reactions. The a and b indicate different dissociation channels.  Doug weigh in on this to clarify (don't know his github handle).


Stopping the process when no changes are found between runs. [190]

Description
Checks if there are any blob differences during the process. If there are no changes stop the process to avoid unnecessary sequence update / tar files with only the manifests in.
Fixes #190
Type of change
Please delete options that are not relevant.

[x] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[x] Unit tests updated
[x] Run yourself via two runs of oc-mirror --config imageset-config.yaml file://archives and oc-mirror --config imageset-config.yaml file://archives2. Note that in archives2 there are no tar files.

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

/ok-to-test

/approve

Very cool! It works as advertised. I only noticed one issue when I tested it mirror2mirror. The log output might be a bit confusing to users. Can you please configure it to exit without calling the publishing functions when using mirror2mirror?:
INFO no updates detected, process stopping
INFO Publishing image set from archive "./mirrortmp468199673" to registry "registry.test.com:5000"
DEBUG Unarchiving metadata into oc-mirror-workspace/images.178718783
Image Publish:
ERROR: publishing operation failed: no archives found in directory ./mirrortmp468199673
To retry this operation run "oc-mirror --from ./mirrortmp468199673 docker://registry.test.com:5000

@afflom good catch on the mirror2mirror error @ianwatsonrh Maybe instead of returning nil, you could return a custom error that can be handled by the caller since we use the Create function in multiple places.

@afflom good catch on the mirror2mirror error @ianwatsonrh Maybe instead of returning nil, you could return a custom error that can be handled by the caller since we use the Create function in multiple places.

Ack.
Custom error thrown instead of nil. Caller then handles the error.
New e2e-simple test case added to reflect.

Spot on. Give me the weekend to play with it and I'll get back to you.

Tested and everything works as expected
/lgtm


Added some Portuguese translations in the article.

[X ] I have read freeCodeCamp's contribution guidelines.
[ X] My pull request has a descriptive title (not a vague title like Update index.md)
[ X] My pull request targets the master branch of freeCodeCamp.
[ ]X None of my changes are plagiarized from another source without proper attribution.
[ X] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you for opening this pull request.
This is a standard message notifying you that we’ve reviewed your pull request and have decided not to merge it. We would welcome future pull requests from you.
Thank you and happy coding.


Appstudio update rhtap-demo-component-ufys

Pipelines as Code configuration proposal
To start the PipelineRun, add a new comment with content /ok-to-test
For more detailed information about running a PipelineRun, please refer to Pipelines as Code documentation Running the PipelineRun
To customize the proposed PipelineRuns after merge, please refer to Build Pipeline customization

Pipelines as Code CI has failed.There was an error creating the PipelineRun: rhtap-demo-component-ufys-on-pull-request-
creating pipelinerun rhtap-demo-component-ufys-on-pull-request- in namespace rhtap-demo-dev-vlxj-tenant has failed.
Tekton Controller has reported this error: the namespace of the provided object does not match the namespace sent on the request


Always update outputTimestamp

Current Behaviour
outputTimestamp value is only updated if versions:set has changed version value
Expected Behaviour
outputTimestamp value should be updated always if versions:set is executed or at least for -SNAPSHOT versions.

Maybe new parameters with values:

never
always
onchange

For SNAPSHOT I don't see benefit - in standard way project is always in snapshot version

A parameter would be awesome, however what's the disadvantage in always setting outputTimestamp?

In standard situation when nothing is changed also outputTimestamp should not be changed.
So my proposition is to add flags to preserve current behavior.

sound reasonable

thx


fix(skeleton-typescript-webpack): edit index.html and webpack.config.js

Fix 'npm run build' problem. Now 'npm run dev' and 'npm run build' can be used for the same index.html.
close issue #402

Ok, I merged this but it seems to completely have broken the app. I tried the same changes on the es2016 skeleton and the same bundle not found error happens. Can you explain what was wrong originally and how this should fix it? Also, can you see if there's something else missing from the config. A checkout of master, npm install and it results in failure when running npm run dev.

@EisenbergEffect Oops, I found the problem. There shouldn't be a . in publicPath: "./build/" in the webpack.config file. It should just be publicPath: "/build/".
I've uncovered another problem in this fix. If npm run prod has been run, then running npm run dev will serve bundle.js from disk and not from memory.
To fix this, I probably need to add an npm script within package.json to empty the /build directory before running the webpack dev server. I'm still trying to figure out how to do this as I'm still new to npm.
Thoughts?

I had to revert the PR, so we will need a new PR. I hadn't experienced any issues so it's still unclear to me what this is fixing. But, I don't know Webpack very well at all. Perhaps someone like @Vheissu can help out?

@jmojiwat I am a little confused, but it is quite early for me here (my 11 month old woke me up). I had no issues initially running the Webpack skeleton. What issue did you run into that required a publicPath option to be added? I have a .NET application running off of a child controller, so I actually do use publicPath in that app, but the base skeleton by itself I didn't need to make any changes.

@Vheissu I've gone through having to sleep 3 hours at a time. But a growing child is such a joy to have around. :)
I hope the problem I have isn't an imaginary one that only happens to me. Here's the steps I walked when I encountered the problem:

running npm run dev works because the bundle.js reference in index.html points to the root directory.

npm run build on the other hand is currently broken in my IIS Express because the bundle.js is now in the build directory and index.html can't find bundle.js.

My app doesn't make use of any controllers. (I am still using Web Api 2, not .Net core). I just keep the index.html in the root of my visual studio project.
My fix was to have index.html reference bundle.js at http://localhost:3000/bundle/bundle.js instead of 'http://localhost:3000/bundle.js`.
But by just doing this, bundle.js complains that it cannot find 1.bundle.js. That's the reason I added publicPath option in order to get it to work.


integrations: Add documentation for OpenShift.

Documentation for the OpenShift integration that was added in #3160.

Automated message from Dropbox CLA bot
@YagoGG, it looks like you've already signed the Dropbox CLA. Thanks!

There it goes. It believe that's as organised as we can go, with <pre> limitations.

Yeah, we need to figure out a better way to do the code blocks in these docs.  Possibly the right answer is converting them to markdown, which solves that issue for you...

Merged, thanks @YagoGG!


Fix FormatSnippetAsync to properly format C# snippets.

Prior to this C# snippets were wrapped/unwrapped at the endpoint layer. This means anyone trying to format a snippet would need to manually wrap/unwrap their own snippets. The logic fit well into the existing formatting service so I migrated the logic there.
Another aspect of this that's a little disconnected is that when applying formatted snippet edits I found that edits wouldn't get "minimialized" prior to collapsing which would result in unminified edits returning to the client. At completion time (what I will eventually be doing as part of #6618) this was highly troublesome because completion is sensitive to the "end of the edit" area. Meaning if you complete await and the await has a complex text edit that gets formatted the t in await needs to be the absolute last thing in the edit to not obstruct the cursor; however, without the minimal edit change that doesn't actually work properly. I imagine this was just an unintentional oversight and wasn't quite sure how to test this (although I do test it in the completion resolve tests that are coming latere) so I included it here.
Currently there's no direct tests of this method it looks like. Although in a follow up PR for #6618 I'll be formatting resolved completion items.

Part of #6618

As per my comment, and without tests, I don't think this is necessarily actually doing anything. Unless there was a bug in MergeEdits maybe?

Ahh in the other PR I have where I have a completion resolve test that remaps and formats an await completion item without this you get a lot of trailing unchanged content that then changes the completions cursor position. The await completion item doesn't use snippets in it's text edit


[oatpp] update to 1.2.5

Library name: oatpp
New version number: 1.2.5
Release notes can be found at https://github.com/oatpp/oatpp/releases/tag/1.2.5

@liujin001 ,Thanks for your pr,according to the error display of CI, the components port of oatpp also needs to be upgraded along with oatpp. could you upgrade all components together in one pr?

@autoantwort @JonLiu1993 When I attempt to link against liboatpp.a 1.2.5 built with vcpkg it fails with the following error:
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(Environment.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZN5oatpp4base11Environment25m_threadLocalObjectsCountE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(MemoryPool.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN5oatpp4base6memory27ThreadDistributedMemoryPool6obtainEvE5index' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(ChunkedBuffer.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZGVZN5oatpp10collection10LinkedListISt10shared_ptrINS_4data6stream13ChunkedBuffer5ChunkEEE14LinkedListNode20LinkedList_Node_Pool7getPoolEvE4pool' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/my_shared_lib.dir/src/Global.cpp.o(.text._ZZSt9call_onceIZN5quill6detail13BackendWorker3runEvEUlvE_JEEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv[_ZZSt9call_onceIZN5quill6detail13BackendWorker3runEvEUlvE_JEEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv]+0x1a): unresolvable R_X86_64_DTPOFF32 relocation against symbol `_ZSt15__once_callable@@GLIBCXX_3.4.11'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

"can not be used when making a shared object; recompile with -fPIC"
Does -fPIC need to be added to the port's compiler flags so that it's suitable for inclusion in shared libraries?

@autoantwort @JonLiu1993 When I attempt to link against liboatpp.a 1.2.5 built with vcpkg it fails with the following error:
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(Environment.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZN5oatpp4base11Environment25m_threadLocalObjectsCountE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(MemoryPool.cpp.o): relocation R_X86_64_TPOFF32 against `_ZGVZN5oatpp4base6memory27ThreadDistributedMemoryPool6obtainEvE5index' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /home/xander/dev/vcpkg/installed/x64-linux/debug/lib/oatpp-1.2.5/liboatpp.a(ChunkedBuffer.cpp.o): relocation R_X86_64_TPOFF32 against symbol `_ZGVZN5oatpp10collection10LinkedListISt10shared_ptrINS_4data6stream13ChunkedBuffer5ChunkEEE14LinkedListNode20LinkedList_Node_Pool7getPoolEvE4pool' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: CMakeFiles/my_shared_lib.dir/src/Global.cpp.o(.text._ZZSt9call_onceIZN5quill6detail13BackendWorker3runEvEUlvE_JEEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv[_ZZSt9call_onceIZN5quill6detail13BackendWorker3runEvEUlvE_JEEvRSt9once_flagOT_DpOT0_ENKUlvE0_clEv]+0x1a): unresolvable R_X86_64_DTPOFF32 relocation against symbol `_ZSt15__once_callable@@GLIBCXX_3.4.11'
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

"can not be used when making a shared object; recompile with -fPIC"
Does -fPIC need to be added to the port's compiler flags so that it's suitable for inclusion in shared libraries?

@xanderdunn ,Have you tried adding -fPIC to the port's compiler flag? I investigated your idea is feasible

I wasn't specific about my usage in my above post. When I'm linking an executable in CMAKE against oatpp it works, but here I'm trying to link a shared library against oatpp and thus I see the above error.
Thanks @JonLiu1993. I added this to ports/oatpp/portfile.cmake:
set(CMAKE_CXX_FLAGS "-fPIC")

Then I uninstalled and reinstalled:
$ vcpkg remove oatpp --recurse
$ vcpkg build oatpp
$ vcpkg install oatpp

This appears to have rebuilt oatpp, but I still get the error when linking a shared library that links to oatpp.


Is westasia actually a region for Azure Arc for servers (preview)?

The article says the preview is available in westasia, but I don't think that's actually an Azure region based on the list here https://azure.microsoft.com/en-us/global-infrastructure/geographies/  Should it be Southeast Asia or East Asia or somewhere else?

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

ID: f4debb68-9d24-ec7e-dd09-0ea02e150265
Version Independent ID: 477928d8-2c58-297f-28aa-6c93b535d2a1
Content: Azure Arc for servers (preview) Overview
Content Source: articles/azure-arc/servers/overview.md
Service: azure-arc
Sub-service: azure-arc-servers
GitHub Login: @MGoedtel
Microsoft Alias: magoedte

@bajmming Thanks for your comment! We will review and provide an update as appropriate.

@bajmming - Thanks for bringing this to our attention.  It should be Southeast Asia.  I've already responded to @kiazhi, who opened a PR for this to correct the region.  #in-progress.

Thanks that's good to know :)


Fix nop-copy in code generation

What type of PR is this?
/kind bug

What this PR does / why we need it:
Fix nop-copy in code generation
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

/lgtm


Support ping/pong

https://stackoverflow.com/questions/23238319/websockets-ping-pong-why-not-tcp-keepalive

No idea what I meant by preventing it from becoming a wrapper around net.Conn.

Given browsers don't implement ping/pong, I'm thinking its unnecessary. If someone else has a good argument otherwise, I'd be happy to implement default ping/pong if I'm convinced.

See https://bugs.chromium.org/p/chromium/issues/detail?id=706002 and https://groups.google.com/a/chromium.org/forum/#!topic/net-dev/2RAm-ZYAIYY
The consensus has been its not worth the expense and TCP keep alives are enough, which I agree with.

It also wouldn't really make sense over HTTP/2

Given browsers don't implement ping/pong

This isn't quite accurate, browsers do respond to ping with pong, the links you gave are about implementing automatic ping from the browser-side.
Websocket ping/pong implementations are typically designed around the server pinging clients/browsers.
TCP keepalive is not end-to-end and doesn't inform you of the client still being alive, simply that a possible proxy still exists.

This isn't quite accurate, browsers do respond to ping with pong, the links you gave are about implementing automatic ping from the browser-side.
Websocket ping/pong implementations are typically designed around the server pinging clients/browsers.

That is true, but I'd argue most WebSocket servers do not send ping/pongs and just use TCP keep alive and things work fine. HTTP/1.1 persistent connections also just use TCP keep alive without major issues. I could be wrong but I believe net/http's HTTP/2 server also does not use HTTP/2 keep alives because TCP keep alives are cheaper and enough.
Its not end to end but most in between proxies also use TCP keep alives because they do not want to keep unnecessary connections up as well.
The other issue I have with this feature is I don't think I should give it an option because most of the time, TCP keep alives will be enough and it won't make sense over HTTP/2 as HTTP/2 has protocol level pings and wouldn't work at all with WASM. I also do not want to make it automatic as it can be expensive.
We can always revisit this later.

Although, I'm not 100% sure. I'll reopen this for now for further discussion.

For my use case, we are running a few IoT devices connected through websocket. We can't guarantee the quality of the connection at all times, so we deal with a fair number of reconnects. Using the ping/pong on the server allow us to free the resources allocated to the connections and be aggressive with ping/pongs. The whole point is we want our server to know in a timely manner if a device got disconnected. Not sure if KeepAlive helps with that purpose.

TCP keep alive is exactly for that purpose, it should be good enough for what you're doing.

No one has commented on this in a while so going to close assuming the lack of a ping/pong API is all fine.

TCP Keepalive only operates on connections specifically marked "idle" and has no user application level, it only has a kernel level.
It may report to the kernel that a TCP connection still exists, but it cannot in any way tell you that the application is still responding/connected and not deadlocked.  Keepalive also only reports every 2 hours, which cannot be changed on many operating systems.
There's a good reason why TCP software implements ping/pong even though Keepalive has existed for decades.
Not to mention analytics for latency between server and client collected from ping/pong.

It may report to the kernel that a TCP connection still exists, but it cannot in any way tell you that the application is still responding/connected and not deadlocked.

Not necessarily true. E.g. with this library, your application could be deadlocked but you'd still respond to pings because this library spawns a readLoop goroutine.
One also ought to have maximum time spent waiting for the next message anyway. So if the application is not responding/connected, the connection will be dced. In this library, this would correspond with the timeout on the context passed to c.Reader. E.g. a reasonable timeout might be 15 minutes which would bound the time between message reads to max 15 minutes.

Keepalive also only reports after 2 hours, which cannot be changed on many operating systems.

With Go at least, by default net/http sets a keep alive of 3 minutes so it shouldn't report after 2 hours.

Not to mention analytics for latency between server and client collected from ping/pong.

Solid point, I didn't think about this. Will reopen.

Could add an API like:
type Conn struct {
    // Receive on Pongs to receive WebSocket pongs.
    // The library will never block on sending to Pongs.
    // As such, it has a buffer of 1. If Pongs are not read
    // further pongs will just be dropped.
    // The string is the pong payload.
    Pongs <-chan string
    ...
}

// Ping will send a WebSocket ping to the remote end with the given
// payload.
func (c *Conn) Ping(ctx context.Context, payload string) error {
}

Could also take the HTTP/2 approach: https://github.com/c3mb0/net/commit/780a5ddf025bf4f15f69eb353d4945142231a84c


Adding a parameter that ends trial only after the stimulus_duration is over

Background
I propose to add a paramater that I would call response_ends_trial_after_stimulus_duration that as the name says ends a trial when a response is given and the provided stimulus_duration elapsed. Currently, the parameter response_ends_trial ignores stimulus duration that can be fine in a lot circumstances but can be problematic for certain types of experiments.
For instance in the field of memory research, we typically want our stimulus to be presented for the same duration during a learning phase regardless whether a response is given. This is important as we want to be able contrast conditions that might come with different RTs. My proposed feature would ensure that even if Condition A is faster than Condition B, stimuli in both conditions are displayed for the same duration allowing me attribute a subsequent memory effect to something other than shorter presentation times in one of the conditions. At the same time, we also often want the possiblity to end a trial when a response is given.
Implementation
I've started adding this feature to my fork  and create an example. So far, I've only added this parameter to /jspsych-html-keyboard-response.js.
Crucially, I made a change that automatically sets response_ends_trial  to true because it would otherwise conflict with response_ends_trial_after_stimulus.
@becky-gilbert  thankfully gave some advice to improve my original modification. The discussion can be found here.
PS
I am happy to make the changes to the other plugins as well depending on the feedback here.

Thanks for this @JAQuent!
@jodeleeuw would you be happy with this as a new parameter for the keyboard/button/slider response plugins? The audio-* and video-* plugins already have the response_allowed_while_playing parameter, but that is slightly different because it ignores/disables the response method during the media playback. Whereas this response_ends_trial_after_stimulus would accept a response during playback, but then wait until playback is finished before ending the trial.

I'm wondering if we can generalize this to something like minimum_trial_duration or something like that? It could potentially cover more use cases and is maybe more intuitively named?

I like the idea so you would for instance set minimum_trial_duration to the same time as stimulus_duration to get the behaviour that I propose.
So essentially we'd only need to change the lines in the end_trial  function. I am happy to add this nextg weekend.

@JAQuent yes I think that's exactly right - setting the minimum_trial_duration to be the same as the stimulus_duration, along with repsonse_ends_trial: true, should give you the behavior that you propose. I think that the minimum_trial_duration should just cause the trial to end after that amount of time has passed AND a response has been made. So this parameter shouldn't have any effect when response_ends_trial is false, right?
Thanks very much for agreeing to make this change!

That is a good point.  I've notice one potential issue and that is what happens if the user by accident specifies a minimum_trial_duration  that is longer than trial_duration?
Since debugging is a bit difficult and throwing an error should probably avoid I thought it might be useful to choose whatever is longer minimum_trial_duration   or trial_duration.
As you will see end_trial() is no completely unchanged, which might be better than the previous solution.
Here is the change plugin and the example to showcase the feature.
Link to the fork .
Once you give green light to particular solution I am happy to go through the other plugins that need to be changed.

Great! Thanks very much for the update. We'll look at this ASAP and get back to you.
And as far as dealing with invalid/inconsistent parameter values, this can be a bit tricky and we don't expect plugins to catch everything. But one option is to just show a warning in the console, something like this:
if (trial.minimum_trial_duration !== null && trial.trial_duration !== null && trial.minimum_trial_duration > trial.trial_duration) {
  console.warn("Warning in html-keyboard-response: minimum_trial_duration is greater than trial_duration, "+
    "so minimum_trial_duration will be used as the trial duration and the trial_duration parameter will be ignored.");
}

Good idea :)


Simplest FitLoop customization doesn't work

🐛 Bug
Setting trainer.fit_loop to default FitLoop causes error
To Reproduce
Take any trainer and model, and add one line that sets trainer.fit_loop to default FitLoop causes error
... code before
from pytorch_lightning.loops import FitLoop
trainer.fit_loop = FitLoop()
... code after

Exception has occurred: AttributeError       (note: full exception trace is shown but execution is paused at: <module>)
'NoneType' object has no attribute '_results'
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/loops/fit_loop.py", line 145, in _results
    return self.epoch_loop._results
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 2143, in _results
    return active_loop._results
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py", line 308, in reset_results
    if self.trainer._results is not None:
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1174, in _run
    self.logger_connector.reset_results()
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 682, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/home/whao/.virtualenv/mixedclassify/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 736, in fit
    self._fit_impl, model, train_dataloaders, val_dataloaders, datamodule, ckpt_path
  File "/home/whao/whao/MultiHead/multihead/cli.py", line 153, in run_active_learn
    trainer.fit(model)

Expected behavior
Nothing should change since we set fitloop to default FitLoop

Environment
pl==1.5.0
cc @tchaton @carmocca @justusschock

Hi @whaowhao
Thanks for checking out the loop features.
The reason you see the error is because the FitLoop requires some subloops to function properly. This is the default configuration that the trainer uses:
fit_loop = FitLoop()  # optionally pass max_epochs
epoch_loop = TrainingEpochLoop()  # optionally pass max_steps
batch_loop = TrainingBatchLoop()
optimizer_loop = OptimizerLoop()
val_loop = EvaluationLoop()

batch_loop.connect(optimizer_loop=optimizer_loop)
epoch_loop.connect(batch_loop=batch_loop, val_loop=val_loop)
fit_loop.connect(epoch_loop=epoch_loop)

trainer.fit_loop = fit_loop

Any specific customization you have in mind?

Thanks @awaelchli ! So I am trying to custom the Loop such that after each fit loop, trainer.predict runs on an arbitrary file based on model.hparams

you mean after each epoch? @whaowhao

Yes

Hey @whaowhao,
You could do the following:
class CustomTrainingEpochLoop(TrainingEpochLoop):

    def on_run_end(self):
        super().on_run_end()
        self.trainer.predict_loop.run()

fit_loop = FitLoop()  # optionally pass max_epochs
epoch_loop = CustomTrainingEpochLoop()  # optionally pass max_steps
batch_loop = TrainingBatchLoop()
optimizer_loop = OptimizerLoop()
val_loop = EvaluationLoop()

batch_loop.connect(optimizer_loop=optimizer_loop)
epoch_loop.connect(batch_loop=batch_loop, val_loop=val_loop)
fit_loop.connect(epoch_loop=epoch_loop)

trainer.fit_loop = fit_loop

Still doesn't work with cryptic errors:
fit_loop = FitLoop()
training_epoch_loop = TrainingEpochLoop(min_steps=0, max_steps=-1)
fit_loop.connect(epoch_loop=training_epoch_loop)
trainer.fit_loop = fit_loop

@btseytlin I just tried it and it's working well for me. What errors are you seeing?

Code
import os

import torch
from torch.utils.data import DataLoader, Dataset

from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.loops import TrainingEpochLoop, FitLoop

class RandomDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return self.data[index]

    def __len__(self):
        return self.len

class BoringModel(LightningModule):
    def __init__(self):
        super().__init__()
        self.layer = torch.nn.Linear(32, 2)

    def forward(self, x):
        return self.layer(x)

    def training_step(self, batch, batch_idx):
        return self(batch).sum()

    def configure_optimizers(self):
        return torch.optim.SGD(self.layer.parameters(), lr=0.1)

def run():
    train_data = DataLoader(RandomDataset(32, 64), batch_size=2)

    model = BoringModel()
    trainer = Trainer(
        default_root_dir=os.getcwd(),
        limit_train_batches=1,
        limit_val_batches=1,
        limit_test_batches=1,
        num_sanity_val_steps=0,
        max_epochs=1,
        enable_model_summary=False,
    )

    fit_loop = FitLoop()
    training_epoch_loop = TrainingEpochLoop(min_steps=0, max_steps=-1)
    fit_loop.connect(epoch_loop=training_epoch_loop)
    trainer.fit_loop = fit_loop

    trainer.fit(model, train_dataloaders=train_data)

if __name__ == "__main__":
    run()

You could also use:
training_epoch_loop = TrainingEpochLoop(...)
trainer.fit_loop.connect(epoch_loop=training_epoch_loop)

or
trainer.fit_loop.replace(epoch_loop=TrainingEpochLoop(...))

@carmocca I don't have the logs anymore, but it was complaining about other loops missing: validation, test evaluation and something else. I had to manually initiate and connect all possible loops for it to work, like in this comment.
I believe your example does not produce errors because it has no validation loop.
The problem I see is that it's not explained anywhere, and the interdependencies between different loops are very obscure.

I just tried the same script but passing validation data and it still worked as expected. If you are able to reproduce it, I will be interested in checking out what's the problem.
The loop docs are available here: https://pytorch-lightning.readthedocs.io/en/stable/extensions/loops.html

I am unable to get this code working, see final comments here (after instead of using Callbacks I try switching to loops):
https://github.com/Lightning-AI/lightning/discussions/16258

I am unable to get this code working, see final comments here (after instead of using Callbacks I try switching to loops):
https://github.com/Lightning-AI/lightning/discussions/16258

Hello,
I am trying to implement a custom validation loop (EvaluationLoop) that iterates several times in a row over the validation dataloader.
However, once I implement it on top of the code given above, I get an error when I try to log in the pl.validation_step.

File ~/.conda/envs/all_in_one/lib/python3.10/site-packages/pytorch_lightning/core/module.py:390, in LightningModule.log(self, name, value, prog_bar, logger, on_step, on_epoch, reduce_fx, enable_graph, sync_dist, sync_dist_group, add_dataloader_idx, batch_size, metric_attribute, rank_zero_only)
384     raise MisconfigurationException(
385         "You are trying to self.log() but the loop's result collection is not registered"
386         " yet. This is most likely because you are trying to log in a predict hook,"
387         " but it doesn't support logging"
388     )
389 if self._current_fx_name is None:
--> 390     raise MisconfigurationException(
391         "You are trying to self.log() but it is not managed by the Trainer control flow"
392     )
394 on_step, on_epoch = _FxValidator.check_logging_and_get_default_levels(
395     self._current_fx_name, on_step=on_step, on_epoch=on_epoch
396 )
398 # make sure user doesn't introduce logic for multi-dataloaders
MisconfigurationException: You are trying to self.log() but it is not managed by the Trainer control flow
The code used can be found below
import os

import torch
from torch.utils.data import DataLoader, Dataset

from pytorch_lightning import LightningModule, Trainer
from pytorch_lightning.loops import TrainingEpochLoop, FitLoop

class RandomDataset(Dataset):
    def __init__(self, size, length):
        self.len = length
        self.data = torch.randn(length, size)

    def __getitem__(self, index):
        return self.data[index]

    def __len__(self):
        return self.len

class BoringModel(LightningModule):
    def __init__(self):
        super().__init__()
        self.layer = torch.nn.Linear(32, 2)

    def forward(self, x):
        return self.layer(x)

    def training_step(self, batch, batch_idx):
        loss = self(batch).sum()
        self.log("loss_train", loss, on_step=True, on_epoch=True, logger=True, prog_bar=True)
        return loss

    def validation_step(self, batch, batch_idx):
        loss = self(batch).sum()
        self.log("loss_val", loss, on_step=True, on_epoch=True, logger=True, prog_bar=True)
        return loss

    def configure_optimizers(self):
        return torch.optim.SGD(self.layer.parameters(), lr=0.1)

class CustomValidationLoop(EvaluationLoop):
    def __init__(self, n_loops):
        super().__init__()
        self.n_loops = n_loops

    def run(self, *args, **kwargs):
        self.reset()
        self.on_run_start(*args, **kwargs)

        for i in range(self.n_loops):
            print("in here")
            res_dict_arr = []
            for j, batch in enumerate(self.dataloaders[0]):
                print("\ndoing this\n")
                res_dict_arr.append(self.advance(batch.to(self.trainer.lightning_module.device), j))

        return res_dict_arr

    def advance(self, batch, batch_idx):
        return self.trainer.lightning_module.validation_step(batch, batch_idx)

def run():
    train_data = DataLoader(RandomDataset(32, 64), batch_size=2)
    val_data = DataLoader(RandomDataset(32, 64), batch_size=2)

    model = BoringModel()
    trainer = Trainer(
        default_root_dir=os.getcwd(),
        limit_train_batches=1,
        limit_val_batches=1,
        limit_test_batches=1,
        num_sanity_val_steps=0,
        max_epochs=1,
        enable_model_summary=False,
    )

    fit_loop = FitLoop()

    training_epoch_loop = TrainingEpochLoop(min_steps=0, max_steps=-1)
    fit_loop.connect(epoch_loop=training_epoch_loop)

    custom_val_loop = CustomValidationLoop(n_loops=5)
    fit_loop.epoch_loop.connect(val_loop=custom_val_loop)

    trainer.fit_loop = fit_loop
    trainer.fit(model, train_dataloaders=train_data, val_dataloaders=val_data)

if __name__ == "__main__":
    run()

What should be done to fix this issue ?


chore: run noir CI

Learning about the circleCI setup

Ok, chucking my understanding of what needs to be done to be able to run clippy in aztec-packages CI:

Main issue currently is that noir/Dockerfile defines an entrypoint which screws with runnings scripts on it as it thinks we're passing arguments to nargo.
noir/Dockerfile needs to be split into noir/Dockerfile.base which just runs ./scripts/bootstrap_native.sh and noir/Dockerfile which then sets up the entrypoint.
The clippy script could then be run with cond_spot_run_container noir-base 32 . on the base dockerfile.


Untagged resources route integration

@cruffinoni
TODO:

[ ] Split this PR into multiple PRs based on comments

[ ] 1. Untagged resources feature (costs/tags/tags.go, costs/tags/tags_untagged.go, errors/errors.go, errors/shared_account.go)
[ ] 2. odToRi feature (onDemandToRI/ec2/es_request_constructor.go, onDemandToRI/ec2/report.go)
[ ] 3. odToRi spreadsheet feature (db/schema.sql, db/migration/0041_od_to_ri_ec2_into_spreadsheet_reports.sql, reports/od_to_ri_ec2.go, reports/report_generation.go)

[ ] Update library for ElasticSearch

Closing this pull request. Its content has been split between:

https://github.com/trackit/trackit/pull/261
https://github.com/trackit/trackit/pull/263


Duplicate a whole Neo field? Possible "Field Manager" support?

A field has to be unique within a section in Craft right? So it's not possible to have a Neo field in a "main content" tab, and then another instance of the same field in a "sidebar" or "footer" tab on the same section.
I tried cloning a Neo field with Field Manager. While the clone was successfully created, all the fields were removed from the original Neo field (silly me should have done a DB backup right before trying this, but I'm sure I can work out how to reassign them back to the original in the DB).
So my question is - how might I go about reusing a Neo field on the same section?

Is there an easy way I'm unaware of perhaps? Is duplication the only way?
Could Neo work with Field Manager? Would that be handled on your end, or Josh Crawford's?
Or could a duplicate/clone option be added to the Neo field settings page? Probably a pretty extreme option?

Thanks

Hey Bryce,

how might I go about reusing a Neo field on the same section?

Unfortunately due to how Craft is built, there's no way you can do this. One field per field layout, since fields are referenced using their handles, you'd have clashes with multiples of the same field.

Is there an easy way I'm unaware of perhaps? Is duplication the only way?

Duplication really is the only way to use the "same" field multiple times in a single field layout.

Could Neo work with Field Manager? Would that be handled on your end, or Josh Crawford's?

I haven't used Field Manager before, and I'm not sure how it works under the hood, so I can't say for sure if I'll be able to add support on my end or not. My educated guess is Josh would need to add support for it in his own plugin.
The issue with the original losing all it's fields after duplication leads me to believe the Field Manager plugin simply copies a field's settings object when duplicating it. Because Neo fields rely on multiple tables of data for single field, there's a lot of linked data in a field's settings. So what probably happened is that the block types and field layouts were being pointed to from now two fields, and the newer field won out over the older one. As a side note, I'm fairly sure if you had removed the newly created Neo field's row from the craft_fields table (and make sure to ignore any constraints, so deletion cascades wouldn't run, deleting all your block types, field layouts and content) everything would have gone back to normal.
Duplicating a Neo field would require duplicating not just the field itself, but also all it's block types, groups and field layouts. This would probably need to be handled by the Field Manager plugin using a special case for Neo fields.

Or could a duplicate/clone option be added to the Neo field settings page? Probably a pretty extreme option?

I think this is something that's a bit outside the scope of Neo. Ideally, Craft could implement as "Save as new" button for fields like they do with entries, which would accomplish this. It might actually be a decent idea for a small plugin... hmm...
Personally I think Neo fields are pretty quick to create as they are, considering it's mostly just composing field layouts of existing fields. Duplicating even a large Neo field manually wouldn't take any more than a couple of minutes, and it's not something that you would be doing very often anyway.
Phew, sorry about the wall of text!

Actually, I should point out this plugin, which can do what you're after (albeit in a roundabout way): https://github.com/Pennebaker/craftcms-thearchitect
It supports Neo fields, so what you can do is run an export on your current site, isolate the Neo field JSON declaration, give it a new handle (and name if you want), and re-import it back into the site.

Woh, thanks for the quick and detailed reply.

Yeah I made a DB backup and then deleted the cloned field rows and all is well.
I'll give Josh a holler to see what he thinks about supporting Neo fields, but yeah it would be quite extreme to clone all it's block types, groups and field layouts.
I had seen The Architect plugin and have been meaning to try it out, so I'll give it a go.
Cheers


[feature] #2611: Derive TryFromReprC and IntoFfi for generic opaque structs

Description of the Change
Derive TryFromReprC and IntoFfi for generic opaque structs.

Issue
Resolves #2611.

Benefits
Make possible to define ffi functions with generic struct parametrized with concrete type as argument or return value.

Possible Drawbacks
None.

Usage Examples or Tests
cargo test --package iroha_ffi --test generics -- return_generic --exact --nocapture

Would probably make sense to document somehow that #[ffi_export] can accept generics, but monomorphized only, but I'm not yet aware where such description could fit.

Would probably make sense to document somehow that #[ffi_export] can accept generics and monomorphized only, but I'm not yet aware where such description could fit.

@ilchu, i agree that good documentation won't hurt, however work on ffi conversion lib is kinda in progress, so maybe we can document supported items when lib would be more stable.
What do you think?

@ilchu, i agree that good documentation won't hurt, however work on ffi conversion lib is kinda in progress, so maybe we can document supported items when lib would be more stable. What do you think?

Certainly, I'm in no way pushing for it right now, just thinking towards posterity.


Issues with zip file missing dependencies

Having a similar issue to what @ThaWeatherman outlined in https://github.com/miguelgrinberg/slam/issues/9 where the output of slam build (zipfile) does not have the project dependencies.
I looked for similar issues within the lambda-uploader issue tracker and saw this https://github.com/rackerlabs/lambda-uploader/issues/129. I tried to recreate my local project virtualenv, but only install slam instead of my full requirements.txt but that didn't help resolve the issue.
I'm using Python 3.6.2 via pyenv on OSX if that matters.
Here is my project repo: https://github.com/CT-Data-Collaborative/birth-data-api
Thanks in advance.

Having the same problem too. The dependencies are not generated at all and no error in slam_error.log file. Using Python 2.7 and 3.6, do you know what could be the problem?

Well, I was never able to reproduce this myself. What platform are you doing this on? Can you share the output of pip freeze?

I'm running the code on Fedora 26. Here is the output of pip freeze:
(slamenv) [fariq@fariqlocalhost clarestapi]$ pip freeze
Babel==2.3.4
boto3==1.4.3
botocore==1.4.93
click==6.6
climax==0.3.1
Delorean==0.6.0
docutils==0.13.1
Flask==0.12
Flask-HTTPAuth==3.2.1
futures==3.0.5
humanize==0.5.1
itsdangerous==0.24
Jinja2==2.8.1
jmespath==0.9.0
lambda-uploader==1.2.0
MarkupSafe==0.23
merry==0.2.0
pynamodb==2.0.3
python-dateutil==2.6.0
pytz==2016.10
PyYAML==3.12
s3transfer==0.1.10
six==1.10.0
slam==0.6.0
tzlocal==1.3
virtualenv==15.1.0
Werkzeug==0.11.15
Inside .slam/venv folder, the dependencies are all there but none in the generated zip file:
ls .slam/venv/lib/python3.6/site-packages/
...
flask
Flask-0.12.dist-info
Flask_HTTPAuth-3.2.1.dist-info
flask_httpauth.py
...


Leaderboard- add styling

In this PR, I Improved the look and feel of the application and kept the general layout of the wireframe

[ OPTIONAL ] Good job :+1:, your project is complete :100:. But I think it would be better to update your README.md file by adding a command to run the app locally after cloning(npm start). So, your README will look more professional :smile:


Trojan Virus?

I'm getting a virus when I try to download this.

No, It's just an alert from Windows when you try to open a program from unknown source, to avoid that just enable developer mode is settings (Windows Settings -> Update and Security -> For Developers -> Developer Mode).  Alternatively you can just press more info and Allow anyway. Or compile source code on your own computer.


Unable to launch Main.py or Voicing.py on Mac

Describe the bug
Main.py says it is missing TTS.utils and Voicing.py is unable to find IPython after everything has been downloaded as told in the wiki
To Reproduce
Steps to reproduce the behavior (Both):

Go to 'MonikA.I'
Click on 'Main.py' or 'Voicing.py'
Expected behavior(Main.py)
Unknown as it would not open
Expected behavior(Voicing.py)
Monika would be voiced
Screenshots
If applicable, add screenshots to help explain your problem.
N/A
Desktop (please complete the following information):

OS: MacOS 13.3.1
Browser [e.g. chrome, safari] N/A
Version [e.g. 22] 1.6.1

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.

Another thing please make the install process be a bit more explained as I could not tell if I should something or not

DId you download the sourcecode.zip or did you clone the repository (better option).
To install TTS libs, did you clone the concerned repository as indicated on the Wiki and install them as instructed?
Be careful also to use the requirements.txt for MacOS as there are some tricky modules for it.

I downloaded the 'sourcecode.zip' and did use 'requirements_macos.txt` and downloaded tortise-TTS

Try launching one of the two scripts from within a command prompt to get the exact error traceback and submit it here.

Below is main.py

Below is Voicing.py

Did you clone the repository TTS and run pip install -e . inside it without errors? Can you also run the command pip list and send the list of the modules installed?

I cloned both TTS's and here is the pip list

Here is a pip list not restricted by folder

TTS is not present, be sure to have not messed up with which python you are using and which pip is linked to it. To avoid errors, you can use python -m pip or py -m pip to install modules relatively to the python you are using.

Alright thanks for the help

I have tried doing the python3 -m pip which did nothing but brought up the pip commands

Your installation of modules is broken, document yourself on how to install libraries on python with the right python you are using. In your case, it was not linked to another python which is not the one used by your PC by default.


Add two Node.js books

By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 🖖
⬆⬆⬆⬆⬆⬆⬆⬆⬆⬆
I have added a couple of books to the list.
Full disclaimer: I am co-author of Node.js design patterns. I hope you don't mind this.

Thanks!


Display 'Create Snapshot for selected blob' not 'Create Snapshot' for blobs

Storage Explorer Version: 1.2.0
Platform/OS Version: Win10RS4
Architecture: ia32
Build Number:20180619.1
Commit: 3b2233d5
Regression From: Not a Regression
Steps to Reproduce:

Select one blob, then check the tooltip of 'Create Snapshot' button.

Expect Experience:
Display 'Create Snapshot for selected blob'.
Actual Experience:
Display 'Create Snapshot'.

@jinglouMSFT, thoughts? My thinking here is that a toolbar implicitly acts on the selected items in the list below, so it's unnecessary to modify the tooltip text.


Adding build own readme and linking in main readme

I am adding the instructions on how to build your own image that Yashashree added to the blog post here to reference

Can one of the admins verify this patch?


ArrayInterface handler for cuDF DataFrame cannot yet handle Boolean columns

Since the ArrayInterface class in XGBoost does not yet support Boolean columns, it throws an error
/workspace/src/c_api/../data/array_interface.h:500: Boolean-1 is not supported.

whenever Boolean columns are passed in. The error is only relevant for cuDF DataFrames, since the handler for Pandas DataFrame converts Boolean columns into float type.
Context. I encountered this error while working on #10175. Starting from Pandas 2.0, pd.get_dummies() returns Boolean type, instead of uint8 (https://github.com/pandas-dev/pandas/pull/48022).

We need to use the bit mask for accessing boolean columns.


Custom strategy of keeping checkpoints

Hello team,
I setup checkpointing every 10 steps.
But I need to store 1 last checkpoint multiple of 100 and 1 last checkpoint multiple of 1000 together with 2 last checkpoints multiple of 10 steps.
For example
On step 2575 I want to have checkpoints from steps: 2000 (1 checkpoint multiple of 1000), 2500 (1 checkpoint multiple of 100) and 2570, 2560 (2 previous checkpoints multiple of  10 steps)
Can you please tell how can I have this custom logic?

Probably easiest to just subclass CheckpointManager and override the should_save method. That will allow you to control custom behavior for saving on particular steps.


Allow dot_graph to accept filename=None

Closes #611. Behaves like below.

filename=something: return Image with creating a file
filename=None: return Image without creating a file

Thanks, fixed to avoid re-computations. Shall we change default?

Merging soon if no comments


TFT model has no attribute "attention_weights"

Description
According to the docs I should be able to produce XAI plots with feature importance and attention weights after training TFT model. However, the documented attributes seems to not exist
Link
https://nixtlaverse.nixtla.io/neuralforecast/models.tft.html#1-1-mean-attention

Hey. That was added in 1.7.5, are you using that version?


Export CSV Feature

Sync'd upstream changes and re-added feature. Ready for sync.

I don't think we need any changes to the TOC file at all. Can you take those out?

I think I may need to delete this fork and make a new one. The TOC changes came from downloading from the main repo and syncing up the changes. I probably should've done it in two steps.


Karpenter unable to provision nodes

Description
Observed Behavior:
I have installed karpenter 1.0.1 and karpenter crd 1.0.1 .
Karpenter is unable to create any nodes , Pods are in pending state .
{"level":"INFO","time":"2024-08-24T13:15:21.850Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.Pod ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.851Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.Node ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.851Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.NodeClaim ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.851Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.CSINode ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.851Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.EC2NodeClass ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.852Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.Lease ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.852Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.VolumeAttachment ended with: an error on the server ("unable to decode an event from the watch stream: context canceled") has prevented the request from succeeding","commit":"62a726c"}
{"level":"INFO","time":"2024-08-24T13:15:21.853Z","logger":"controller","caller":"cache/reflector.go:365","message":"k8s.io/client-go@v0.30.3/tools/cache/reflector.go:232: watch of *v1.NodePool ended with: an error on the
Expected Behavior:
Nodes should be provisioned
Reproduction Steps (Please include YAML):
Install karpenter 1.0.1 and karpenter crd 1.0.1
Versions:

Chart Version: 1.0.1
Kubernetes Version (kubectl version): 1.29

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment

This matches what I expect to see when the Karpenter pods are terminated, not a failure state when the pods are running. What capacity are you running the Karpenter controller on? Are you using the vended Karpenter helm chart? Are there any additional logs you can provide?

I am using all the default setting provided with the karpenter helm chart provided here
There is nothing much in the logs except what i have provided .Earlier version of karpenter works fine but i need to install 1.0.1.
Are there any commands which i can execute and provide the output which may help debug the problem.

issue resolved as per comment
https://github.com/aws/karpenter-provider-aws/issues/6300#issuecomment-2142765327
after setting   isolatedVPC: true
Thanks.


srv.cluster.local and ec2.internal suffixed when resolving DNS

I am running a file based Ethsigner using Besu as a down stream node. Every time I attempt to send a transaction to ethsigner  it fails to communicate with Besu. I am looking at the logs and I see that the DefultDNSQuestion has the Besu host but it appends a svc.cluster.local
Example Log
DefaultDnsQuestion(https://BESU-HOST.com.cluster.local . IN CNAME)
DefaultDnsRawRecord(cluster.local. 60 IN SOA 68B)
2022-02-11 13:06:39.660-05:00 | vert.x-eventloop-thread-0 | DEBUG | DnsQueryContext | [id: 0x251bb0a8] WRITE: UDP, [42171: /xx.xx.xxx.xx:53], DefaultDnsQuestion(https://BESU-HOST.com.ec2.internal . IN A)
2022-02-11 13:06:39.670-05:00 | vert.x-eventloop-thread-0 | ERROR | VertxRequestTransmitter | Transmission failed
io.netty.resolver.dns.DnsResolveContext$SearchDomainUnknownHostException: Search domain query failed. Original hostname: 'https://BESU-HOST.com'  failed to resolve 'https://BESU-HOST.com'  after 2 queries

The same issue presists when attempting to use a hashi corp vault signer.
DefaultDnsQuestion(https://vault-host.com.cluster.local/ . IN CNAME)
DefaultDnsRawRecord(cluster.local. 60 IN SOA 68B)
2022-02-11 13:06:39.660-05:00 | vert.x-eventloop-thread-0 | DEBUG | DnsQueryContext | [id: 0x251bb0a8] WRITE: UDP, [42171: /<IP_ADDRESS>:53], DefaultDnsQuestion(https://vault-host.com.ec2.internal/ . IN A)
2022-02-11 13:06:39.670-05:00 | vert.x-eventloop-thread-0 | ERROR | VertxRequestTransmitter | Transmission failed
io.netty.resolver.dns.DnsResolveContext$SearchDomainUnknownHostException: Search domain query failed. Original hostname: 'https://vault-host.com/' failed to resolve 'https://vault-host.com/' after 2 queries
This will cause the pod to crash as it cannot construct a signer with keys from vault

Thank you for reporting @tena4881. Looks like you are facing this issue in a kubernetes cluster? I am trying to reproduce it in local lab and will revert back for more information.

Can you provide cli options/config file options where you are defining values for downstreamHost? Can you use fully qualified name instead of just hostname?

@usmansaleem
Here is the current config file. The besu node is running in an ec2. Im using the vpce url my infrastructre team provided me as the downstream-http-host.
No Vault
chain-id=1337
downstream-http-host="https://vpce-Besu-Host.com"
downstream-http-port=8545
http-listen-host="<IP_ADDRESS>"
http-listen-port=8596
tls-allow-any-client="true"
tls-keystore-file="/opt/cert/CERT.pfx"
tls-keystore-password-file="/opt/cert/certpassword_dev.key"
file-based-signer.key-file="/opt/ethsigner/bin/keyfile_dev.key"
file-based-signer.password-file="/opt/ethsigner/bin/passwordfile_dev.password"
With Vault
chain-id=1337
downstream-http-host="https://vpce-Besu-Host.com"
downstream-http-port=8545
http-listen-host="<IP_ADDRESS>"
http-listen-port=8596
tls-allow-any-client="true"
tls-keystore-file="/opt/cert/CERT.pfx"
tls-keystore-password-file="/opt/cert/certpassword_dev.key"
hashicorp-signer.auth-file="/var/run/secrets/kubernetes.io/serviceaccount/token"
hashicorp-signer.host="https://vault-pdc-.xxx.xxx.com"
hashicorp-signer.port=443
hashicorp-signer.signing-key-path="/v1/vault/data/xxx/xxx/xxx"
hashicorp-signer.tls-known-server-file="/opt/ethsigner/bin/knownHashicorpServers"

@tena4881  When specifying value of downstream-http-host, you don't need to specify the url scheme i.e. https. Only hostname/ip address is required. For example, downstream-http-host="vpce-besu-host.com". If Besu has TLS enabled, then you need to specify downstream-http-tls-enabled=true. See documentation  for more information for other downstream TLS related options that you may need to set.
Similarly, for hashicorp-signer.host, you must not specify https url scheme, only specify the hostname. (Our documentation is at mistake here). Use hashicorp-signer.tls_enabled=true to indicate that you want to establish a TLS connection with Hashicorp. See documentation for more details.
If after making above hostname/TLS changes you are still facing issue, try using kubernetes specific fully qualified domain name (especially if you services are defined across namespace), for example podname.namespace.ec2.internal or podname.namespace.svc.cluster.local (assuming you are deploying besu in its own namespace and EthSigner in its own namespace and Hashicorp in its own namespace). See k8 documentation for more details.
Let us know if above helps.

Closing due to inactivity. Please reopen the ticket if more information is required.


Minor wording changes needed for readability

I am proposing some minor wording changes to the Style Guide to improve readability.  According to the Development Guidelines, I am creating this issue and will make the proposed changes for your review.

I requested permission to participate in this project.  I am done with the changes and ready to commit.  Please assign me to this issue.

Can you not use pull request workflow?

Yes, I will do that.  Thanks.


Minor fixes to Makefile and release script

This change calls make reason-parser in reason-parser first to
generate correct package.json and opam files for reason-parser.
@tekknolagi

Looks good. Can't wait to test this!