Any estimate on when the source implementation will be out ?

Hi,
I really like Tony McMapface, it has a really great behavior and I have it currently integrated in my engine. However I'm starting to want to combine some effects (notably LUT based color grading) with it.
So I was wondering @h3r2tic if you had an estimate on when you plan to provide the source code implementation ? This would also make its adoption easier. ;)

Ohai! I'm glad that you like Tony :D Regarding the source code... I don't have a timeline for that just yet, but I also don't suppose it would necessarily change much for you. The LUT version is what you'd likely want to use anyway -- unless of course you fancy integrating a dozen header files of utils, and the very slow shader code used for the LUT derivation :sweat_smile: But if that's the case anyway, I'd be curious to hear why!
 There's also a bunch of nonsense in it, which I wouldn't want spreading too far and wide. Meanwhile a LUT can hide some of the dust bunnies :P
There's one element that's I'm particularly unsatisfied with, and that's a custom Helmholtz-Kohlrausch approximation, which is currently a crappy Catmull-Rom fit-on-top-of-a-fit -- Tony has a variant of this code. To clean it up, I need to first construct a bit of an app to let me eyeball equivalent luminance for a bunch of colors, then gather more samples, document the process, and make a better LUT... sort of in the spirit of "G0 Revisited as Equally Bright Reference Boundary".

Thank you for the links, I had noticed some of that stuff already in some updates of Kajiya but I didn't had the courage to look into it yet.
As for why:

Well, it's always nice to have access to the source, either as a way to be able to regenerate it or to learn stuff. :smile:
I was assuming the code wouldn't be to complex in order to combine for grading and Tony inside a single LUT in order to cache the color transformation. But given what you described, I guess I will find another method (maybe just chaining LUTs).
I would have liked to fiddle a bit with the code to adjust its behavior (with my limited knowledge, but I like tinkering). Main reason right now is that I found the path to white a bit odd compared to an implementation of mine, I mostly wanted to adjust the shoulder of the tone curve. Here is a comparison between my own cooked stuff and Tony, notice the "halo" around the sphere. Adding AGX as well for comparison.

Custom:

Tony:

AGX:

While my own recipe and AGX show the issue with the blue turning purple, Tony shows that noticeable halo which I dislike. I would have expected a longer tail/transition (a bit like AGX).

I'm in a pretty weird/rare situation where I don't have c++ access to bind a texture to my shader, so I'm unable to use a 3D Lut. So I would be interested in trying my hand at doing a source-code level integration (if possible).

Can you perhaps bind a 2D texture with the depth slices side-by side? You really wouldn't want to be using the generator code directly 😅

I can't even bind a 2D textures.
Currently I'm looking into trying to approximate the LUT using multivariate polynomials, which is looking like it might be promising.
Hopefully that approach works, but if not, I'm not really sure what other approach I can take. I was hoping that maybe I can do some amount of approximation to speed up the generator if it is that slow.

To get it working with my setup, I ended up training a neural network to memorize a compressed representation of the LUT, and then converted the neural network to a shader. It's a suboptimal & complex approach, but I was able to get it working and see what it looks like in engine. I was really impressed by just how well it works!
I would really like to perform a better integration, because at the moment I am running into a lot of difficulties.
I could do a much better job of optimizing my integration if I had access to the sourcecode of the generator.
There are also some modifications that I would like to make in order to perform the integration as best as I can:
My engine gives me the color in AP1 gamut, and I would ideally like to use that gamut directly when tonemapping (because I'm not just tonemapping to SRGB or Rec709, but I'd also like to tonemap to other colour spaces.
I'm worried that I might be distracting from the main topic of this issue.
If that's the case, perhaps it would be more appropriate to shift this conversation to private messages. Could you please let me know the preferred method to contact you?
Thanks!

Is there still a plan to release the full source code? It would be also useful to expand the tonemapper to use different color space and ranges (e.g. HDR output support), and increase the quality of the LUT, given it's just 16px now.


yask: TypeError: in method 'yk_grid_set_elements_in_slice'

Code attached.
Output:
(devito) [timb@pnod0334 bug_20171114_yask_setelements]$ KMP_DUPLICATE_LIB_OK=TRUE DEVITO_BACKEND=yask DEVITO_LOGGING=DEBUG DEVITO_ARCH=intel KMP_AFFINITY=compact DEVITO_OPENMP=1 OMP_NUM_THREADS=256 ./bug.py
YASK: Backend initialization...
YASK: Backend successfully initialized!
DSE: extract_time_invariants [flops: 47, elapsed: 0.04] >>
     eliminate_inter_stencil_redundancies [flops: 47, elapsed: 0.04] >>
     eliminate_intra_stencil_redundancies [flops: 47, elapsed: 0.08] >>
     factorize [flops: 47, elapsed: 0.15] >>
     finalize [flops: 62, elapsed: 0.02]
     [Total elapsed: 0.33 s]
YASK: Specializing a Devito Operator for YASK...
OMP: Warning #181: OMP_PLACES: ignored because KMP_AFFINITY has been defined
YASK: Context successfully created!
YASK: Missing handler in Devito-YASK translation
YASK: Unable to offload a candidate tree.
YASK: Specialization successfully performed!
DLE: avoid_denormals [elapsed: 0.00] >>
     ompize [elapsed: 0.06]
     [Total elapsed: 0.06 s]
YASK: Context successfully created!
YASK: Allocating YaskGrid for vp ((1001, 301, 500))
YASK: YaskGrid: Setting block to given scalar via index [slice(None, None, None)]
YASK: YaskGrid: Setting full-array/block via index [slice(None, None, None)]
Traceback (most recent call last):
  File "./bug.py", line 69, in <module>
    fvp.data[:] = vp.resample(box_xy, box_z)
  File "/d/home/timb/2017/devito/devito/yask/wrappers.py", line 98, in __setitem__
    self.grid.set_elements_in_slice(val, start, stop)
TypeError: in method 'yk_grid_set_elements_in_slice', argument 2 of type '(void* buffer_ptr, SIZE)'

bug.py.txt

So I'm pretty sure I could work around this by providing a simple numpy array of the right size - but that's actually what resample should have been returning in this case anyway.
Was going to close it, but I'll investigate further.

YASK backend currently passing all tests. If it is still failing then resubmit with failing tests.


Os specific require string format

Back to the same problem... Unfortunately i've found that in some specific setups os (osx, linux) + (combination of packages/versions), users can get an error like file "file:///...." cannot be found.... Thus I think we need to keep pathToFileURL().toString() solution for windows only... Please consider.

Can you make the tests pass?

Please ignore this pr. I’ve created new one. #99


MigPlan validations are slow. PV discovery should be more responsive

Describe the bug
After reconcile starts, it takes several seconds for PV discovery to even begin. We should look at how to optimize this.
User directly experiences this lag in MigPlan wizard. MigPlan should return as quickly as we can manage when PV discovery is requested, so we should look at how to make this run faster.

Will be resolved by #1037


Specify IP addresses for vlans

Hello,
I recently switched to homebridge-tuya-lan from homebridge-tuya since that plugin has been deprecated. I had that plugin working fine with my vlans because I was able to specify the IP addresses of my devices.
The auto discovery doesn't seem to find any outlets which was the same with homebridge-tuya until I added the ip option.
It is possible for this field to be added?
Thanks,
AdmiralMichael

With the latest update, you can explicitly define an ip for a device. To get the latest version before a release is made, run npm i -g AMoo-Miki/homebridge-tuya-lan.
The plugin prefers to discover devices on its own because there is some more information it can obtain during discovery so it waits for a minute. If the device doesn't reply to a discovery request, the ip will be used to connect to it.


Update Raspberry Pi 4 EEPROM to pieeprom-2021-07-06

Select the latest, stable bootloader EEPROM release which supports NVMe.
Update start4.elf (USB MSD firmware) to top-of-tree.

@peterharperuk @dp111
Updated rpiboot with latest usb.elf
https://github.com/timg236/usbboot/tree/pieeprom-2021-07-06

Just gave it a quick test - seems to work for me.


Autocomplete parameters window missing.

Make sure you have done the following

[X] I have updated to the latest version of blink.cmp
[X] I have read the README

Bug Description
When accepting a choice from the autocomplete menu with ctrl-y it places () and the end and autocomplete menu is missing. Even, if I delete the () and type ( still not autocomplete. I'm on the latest version v0.8.0 and followed the setup as per this video and then also following the README file, which is very similar.
Relevant configuration
No response
neovim version
NVIM v0.10.3 Build type: Release LuaJIT 2.1.1734355927
blink.cmp version: branch, tag, or commit
v0.8.0

OK, I found it... I needed to enable signatures. 🤦🏻♂


unable to connect to mysql

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Unsatisfied dependency expressed through method 'dataSource' parameter 1: Error creating bean with name 'jdbcContainerConnectionDetailsForContainer': Error creating bean with name 'container' defined in class path resource [org/springframework/samples/petclinic/MysqlTestApplication.class]: Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration

wrong issue

closed


Use rollup-plugin-typescript2 for TS transpilation

Fix duplicate comments in type declaration files.
Close #141
Signed-off-by: Jérôme Benoit<EMAIL_ADDRESS>
PR Checklist

[x] Please add a description of your changes.
[ ] We need your changes to come with unit tests in order to keep this project in quality and easy to maintain.
[ ] Please add a link to the open issue or task that this pull request will resolve.
[ ] Add a note to the changelog to indicate the change.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

If yes please indicate it and migration info into the CHANGELOG.md file.

Thanks @jerome-benoit  for your contribution, could you please just explain which benefits we have introducing those changes?
I am sorry I really need a crash course on TS

Thanks @jerome-benoit for your contribution, could you please just explain which benefits we have introducing those changes?
I am sorry I really need a crash course on TS

It fixes a bug reported by @Shinigami92

@jerome-benoit  which one please? Do we have an open issue?
Is just to better understand the change :) Thanks in advance

@jerome-benoit which one please? Do we have an open issue?
Is just to better understand the change :) Thanks in advance

The link to the issue is in the PR description.

Oh okok, good to go then :)

Thanks


🐛 [Bug] Last decay is 2h in the future

🐛 Bugreport

The last decay value is to high since it is calculated towards local time not server time - this is a error!

Currently I cannot find it anymore, maybe it occure only shortly after creating decay block.
It could occure only as long as user hasn't made a transaction after decay block.

It still have the problem on live

Okay it occure only on live.
I have changed the defaultTimezone for community server to From Berlin to UTC and now it seems to work.
On staging defaultTimezone is UTC.
I had tested it with CEST but than the vue frontend don't show the transactions

@Mogge @einhornimmond  Have you solved this? What is with cross-time-zone communities? Do we use a worldwide standard time like GMT+0? What is with winter/summer time? How does this effect the decay?

I think we have solved the timezone issue. Though it is not implemented in the transactions details yet. I expect to receive UTC from the server and translate this to the timezone of the browser.

@Mogge So the diplay issues are solved
@einhornimmond Changed Servertimes - how is the decay calculation affected? Is this all save now?

Decay between transactions is calculcated with the time difference between the transactions.
For saving the transaction time timestamp will be used. So it is a absolute point in time.
So the differences between timestamp are independent from timezones.


HDR Rendering

Adds the ability to render with high dynamic range.

Scene.highDynamicRange will enable disable HDR rendering when supported. Defaults to true
Scene.gamma will change the gamma correction. Defaults to 2.2.

Auto-exposure was added but is hard-coded to be disabled. Most built-in primitives still render LDR values so the average luminance of the scene is normally < 1.0 which would make everything much brighter.
The sun, sky atmosphere, ground atmosphere, and potentially specular highlights from PBR models use the higher range.
Requires #6877 and #6943 to be merged first.
TODO:

[x] Fix issue when toggling HDR (There is no issue when set before the first render).
[x] Fix tests.
[x] Add tests.
[ ] Update CHANGES.md

Future:

Update all primitives to output HDR values.
Enable auto-exposure
Update auto exposure to use linear sampling
Add different bloom algorithm if floating-point texture linear interpolation is supported.
Expose different tone mapping algorithms.
Re-add lens flare not just when in space.

Thanks for the pull request @bagnell!

:heavy_check_mark: Signed CLA found.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

I am a bot who helps you make Cesium awesome! Contributions to my configuration are welcome.
:earth_africa: :earth_americas: :earth_asia:

I know we are starting to plan IBL, but can we also push this one over the finish line before we start coding for IBL unless we think we need to knowledge from IBL to help this one.

It's a little harder to see ground primitives in some cases. The red ground primitive is fine, just looks slightly different.

These images are both from the hdr branch, but showing night and day. It's hard to tell if there is any shading. The globe shading may need to be stronger when hdr is enabled.

Some geometries appear faded compared to master. A lot of other geometries seemed fine so maybe this is just affecting batched primitives?

The globe and atmosphere colors seem to lose some vibrancy. This might be a matter of tweaking the ground atmosphere to look better for HDR.

That includes lowering the night time fade out distance because the change in the lit/dark side is less noticeable.

Some labels look different in the hdr branch:

glTF 1.0 models often look washed out

I'm also seeing some washed out point clouds

The scene's background color looks too different in the hdr branch:

In general imagery looks good with hdr. One example is the Natural Earth imagery.

The composite material in the Materials demo looks faded in hdr

Imagery contrast adjustment looks too strong

Some bugs I noticed:

Shadows aren't working (or aren't visible)
Clamp to 3D Model demo is not clamping when paused
Clamp to 3D Tiles demo seems to be ignoring objectsToExclude
Depth of Field might not be working, the blur is too strong
Globe Materials crashes
Picking and drill picking seem to be broken

I wouldn't be surprised if a few of these are related to the recent Scene cleanup changes.

Now that I've looked at the code most of the screenshots in #7017 (comment) are probably just missing gamma correction in some area or need slight tweaks.

Yes, most were missing gamma correction. I think I've addressed all of the comments where you posted images.

Ran through the Sandcastle demos again. Mostly everything looks good now. These are the only things I noticed:
The label background color is lighter:

Point clouds look better now but the classification volumes look a bit faded:

The composite material in the Materials demo looks faded in hdr

@lilleyse Updated.

Thanks the recent updates look good. Hopefully we've caught all of the areas that need gamma correction. I'll merge soon after the release.

Billboards seems to disappear when I toggle hdr off in the KML example. Is toggling hdr on and off sufficiently tested?
Local example

Billboards seems to disappear when I toggle hdr off in the KML example.

For the KML example, Sandcastle.reset is removing the data source. If you comment out that line and toggle HDR, it'll be fine.

Is toggling hdr on and off sufficiently tested?

I haven't tested it exhaustively for all of the primitives, but I shouldn't need to since all it does is switch the derived command executed. If it works for one, it should work for all of them.

Sorry to hold this up with more side by sides, but I think it's worth improving how ground atmosphere looks before we merge.

There's not much I can do about that. It's the result of tonemapping. I like the way it looks since you can get views like at the bottom of this post: https://cesium.com/blog/2018/08/23/siggraph-2018-trip-report/
If you think it should change, perhaps @ggetz could take a look.

I added a bit of saturation and modified the darkness falloff of the globe. HDR vs. non-HDR still have a different "feel" but I'm happy enough with the way it looks now.

For the KML example, Sandcastle.reset is removing the data source. If you comment out that line and toggle HDR, it'll be fine.

Ahh that's my bad.

Did a final sweep and noticed just a couple issues:
The power plant tileset was updated to be glTF2 + KHR_techniques_webgl and doesn't seem to be gamma corrected properly anymore.

I'm seeing a crash when loading any demo in IE.

Firefox, Edge, and Chrome all work fine. I haven't tried Safari.

@lilleyse Updated.

I think it would be better to apply the gamma correction in the Model layer since https://github.com/AnalyticalGraphicsInc/cesium/pull/7017/commits/4c33a68d12e034603eb209d5d4f8c989f7e29e83 will only work for 3D Tiles. In the same way that we detect a source model is gltf 1.0 here can we detect if the source model uses KHR_techniques_webgl?

@lilleyse Yes, thanks. Updated.

@bagnell this breaks glTF 2.0 PBR models because even they use KHR_techniques_webgl after PBR shaders are generated. The model will need to store whether it originally used the extension, like what sourceVersion does.

@bagnell as we discussed offline, please test performance - given the increased memory bandwidth - and suggest if this should default to true in general and for mobile in particular - or if we should default to false and/or encourage mobile to turn it off.

@pjcozzi There are two fullscreen framebuffers that increased in size. If the half-float extension is available, they'll be 2x as big. If not and float textures are supported, they'll be 4x as big. I didn't see a performance difference on a Pixel. On the iPad and iPhone, HDR wasn't enabled by default.
@lilleyse Updated. Is there anything else?

Thanks @bagnell, that model issue was the last thing.

Note for everyone: if you see any colors that look more faded than before make sure to open an issue. This usually means something is missing gamma correction. See some of the side-by-sides for examples of what this would look like.
We went through all the demos pretty carefully but it's possible there are areas we missed.


random_token_example error

Hi,
I have pulled the latest repo and compiled the package.  When running the random_token_example/distill.py, I run into an issue as shown below.  I am not clear how to fix it, as it doesn't seem distill.py takes any user input, and so it should be running without any problems.

AttributeError                            Traceback (most recent call last)
 in
29 with distiller:
30     distiller.train(optimizer, dataloader, num_epochs=num_epochs,
---> 31                     scheduler_class=scheduler_class, scheduler_args=scheduler_args, callback=callback_fun)
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in train(self, optimizer, dataloader, num_epochs, scheduler_class, scheduler_args, scheduler, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
281             self.train_with_num_steps(optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
282         else:
--> 283             self.train_with_num_epochs(optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor, **args)
284
285
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in train_with_num_epochs(self, optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor, **args)
244                     if (global_step%train_steps_per_epoch in checkpoints)
245                             and ((current_epoch+1)%self.t_config.ckpt_epoch_frequency==0 or current_epoch+1==num_epochs):
--> 246                         self.save_and_callback(global_step, step, current_epoch, callback)
247
248             logger.info(f"Epoch {current_epoch+1} finished")
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_general.py in save_and_callback(self, global_step, step, epoch, callback)
63             self.model_T._forward_hooks = OrderedDict()
64
---> 65         super(GeneralDistiller, self).save_and_callback(global_step, step, epoch, callback)
66
67         if self.has_custom_matches:
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in save_and_callback(self, global_step, step, epoch, callback)
36         if callback is not None:
37             logger.info("Running callback function...")
---> 38             callback(model=self.model_S, step=global_step)
39             self.model_S.train()
40
 in predict(model, eval_dataset, step, device)
49         with torch.no_grad():
50             logits, _ = model(input_ids=input_ids, attention_mask=attention_mask)
---> 51             cpu_logits = logits.detach().cpu()
52         for i in range(len(cpu_logits)):
53             pred_logits.append(cpu_logits[i].numpy())
AttributeError: 'str' object has no attribute 'detach'

Hi,
is your transformers version >= 4.0?
I think this problem is caused by the breaking change between transformers 4 and transformers 3.
In transformers 4, the output of the model is a dict-like object by default, rather than a tuple.
The solution is

to call the model with the argument return_dict=False (line 50 in your program):

 logits, _ = model(input_ids=input_ids, attention_mask=attention_mask, return_dict=False)

or
2. unpatch the output correctly:
 output = model(input_ids=input_ids, attention_mask=attention_mask)
logits = output[’logits’]

or
3. using transformers 3.
Hope it helps.
On 09/16/2021 @.***> wrote：
Hi,
I have pulled the latest repo and compiled the package. When running the random_token_example/distill.py, I run into an issue as shown below. I am not clear how to fix it, as it doesn't seem distill.py takes any user input, and so it should be running without any problems.
AttributeError Traceback (most recent call last)
in
29 with distiller:
30 distiller.train(optimizer, dataloader, num_epochs=num_epochs,
---> 31 scheduler_class=scheduler_class, scheduler_args=scheduler_args, callback=callback_fun)
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in train(self, optimizer, dataloader, num_epochs, scheduler_class, scheduler_args, scheduler, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
281 self.train_with_num_steps(optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
282 else:
--> 283 self.train_with_num_epochs(optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor, **args)
284
285
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in train_with_num_epochs(self, optimizer, scheduler, tqdm_disable, dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor, **args)
244 if (global_step%train_steps_per_epoch in checkpoints)
245 and ((current_epoch+1)%self.t_config.ckpt_epoch_frequency==0 or current_epoch+1==num_epochs):
--> 246 self.save_and_callback(global_step, step, current_epoch, callback)
247
248 logger.info(f"Epoch {current_epoch+1} finished")
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_general.py in save_and_callback(self, global_step, step, epoch, callback)
63 self.model_T._forward_hooks = OrderedDict()
64
---> 65 super(GeneralDistiller, self).save_and_callback(global_step, step, epoch, callback)
66
67 if self.has_custom_matches:
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py in save_and_callback(self, global_step, step, epoch, callback)
36 if callback is not None:
37 logger.info("Running callback function...")
---> 38 callback(model=self.model_S, step=global_step)
39 self.model_S.train()
40
in predict(model, eval_dataset, step, device)
49 with torch.no_grad():
50 logits, _ = model(input_ids=input_ids, attention_mask=attention_mask)
---> 51 cpu_logits = logits.detach().cpu()
52 for i in range(len(cpu_logits)):
53 pred_logits.append(cpu_logits[i].numpy())
AttributeError: 'str' object has no attribute 'detach'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Thanks for your reply and help.
Tanya
On Wed, Sep 15, 2021 at 6:00 PM Ziqing Yang @.***>
wrote:

Hi,
is your transformers version >= 4.0?
I think this problem is caused by the breaking change between transformers
4 and transformers 3.
In transformers 4, the output of the model is a dict-like object by
default, rather than a tuple.
The solution is

to call the model with the argument return_dict=False (line 50 in your
program):

logits, _ = model(input_ids=input_ids, attention_mask=attention_mask,
return_dict=False)

or
2. unpatch the output correctly:
output = model(input_ids=input_ids, attention_mask=attention_mask)
logits = output[’logits’]

or
3. using transformers 3.
Hope it helps.
On 09/16/2021 @.***> wrote：
Hi,
I have pulled the latest repo and compiled the package. When running the
random_token_example/distill.py, I run into an issue as shown below. I am
not clear how to fix it, as it doesn't seem distill.py takes any user
input, and so it should be running without any problems.
AttributeError Traceback (most recent call last)
in
29 with distiller:
30 distiller.train(optimizer, dataloader, num_epochs=num_epochs,
---> 31 scheduler_class=scheduler_class, scheduler_args=scheduler_args,
callback=callback_fun)
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in train(self, optimizer, dataloader, num_epochs, scheduler_class,
scheduler_args, scheduler, max_grad_norm, num_steps, callback,
batch_postprocessor, **args)
281 self.train_with_num_steps(optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
282 else:
--> 283 self.train_with_num_epochs(optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor,
**args)
284
285
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in train_with_num_epochs(self, optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor,
**args)
244 if (global_step%train_steps_per_epoch in checkpoints)
245 and ((current_epoch+1)%self.t_config.ckpt_epoch_frequency==0 or
current_epoch+1==num_epochs):
--> 246 self.save_and_callback(global_step, step, current_epoch, callback)
247
248 logger.info(f"Epoch {current_epoch+1} finished")
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_general.py
in save_and_callback(self, global_step, step, epoch, callback)
63 self.model_T._forward_hooks = OrderedDict()
64
---> 65 super(GeneralDistiller, self).save_and_callback(global_step, step,
epoch, callback)
66
67 if self.has_custom_matches:
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in save_and_callback(self, global_step, step, epoch, callback)
36 if callback is not None:
37 logger.info("Running callback function...")
---> 38 callback(model=self.model_S, step=global_step)
39 self.model_S.train()
40
in predict(model, eval_dataset, step, device)
49 with torch.no_grad():
50 logits, _ = model(input_ids=input_ids, attention_mask=attention_mask)
---> 51 cpu_logits = logits.detach().cpu()
52 for i in range(len(cpu_logits)):
53 pred_logits.append(cpu_logits[i].numpy())
AttributeError: 'str' object has no attribute 'detach'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/airaria/TextBrewer/issues/81#issuecomment-920493937,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHMA5SI7KHBDBNS772PPEP3UCE6RDANCNFSM5EDMXCRA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

Hi Ziqing,
I have another question on the msra notebook. I was able to run it to the
point of training, however, when I started the training, I repeatedly saw
this error and the notebook finally froze:
[I 07:37:39.289 NotebookApp] Saving file at
/examples/notebook_examples/msra_ner.ipynb
[E 07:37:39.302 NotebookApp] Notebook JSON is invalid: {'version_major': 2,
'version_minor': 0, 'model_id': '2a114915871b4c7988a94fa7a633b646'} is not
valid under any of the given schemas
Failed validating 'oneOf' in

display_data['properties']['data']['patternProperties']['^(?!application/json$)[a-zA-Z0-9]+/[a-zA-Z0-9\-\+\.]+$']:
On

instance['cells'][7]['outputs'][0]['data']['application/vnd.jupyter.widget-view+json']:
{'model_id': '2a114915871b4c7988a94fa7a633b646',
'version_major': 2,
'version_minor': 0}
Is there an issue on my end?
Thanks,
Tanya
On Thu, Sep 16, 2021 at 7:50 AM Tanya Roosta @.***> wrote:

Thanks for your reply and help.
Tanya
On Wed, Sep 15, 2021 at 6:00 PM Ziqing Yang @.***>
wrote:

Hi,
is your transformers version >= 4.0?
I think this problem is caused by the breaking change between
transformers 4 and transformers 3.
In transformers 4, the output of the model is a dict-like object by
default, rather than a tuple.
The solution is

to call the model with the argument return_dict=False (line 50 in your
program):

logits, _ = model(input_ids=input_ids, attention_mask=attention_mask,
return_dict=False)

or
2. unpatch the output correctly:
output = model(input_ids=input_ids, attention_mask=attention_mask)
logits = output[’logits’]

or
3. using transformers 3.
Hope it helps.
On 09/16/2021 @.***> wrote：
Hi,
I have pulled the latest repo and compiled the package. When running the
random_token_example/distill.py, I run into an issue as shown below. I am
not clear how to fix it, as it doesn't seem distill.py takes any user
input, and so it should be running without any problems.
AttributeError Traceback (most recent call last)
in
29 with distiller:
30 distiller.train(optimizer, dataloader, num_epochs=num_epochs,
---> 31 scheduler_class=scheduler_class, scheduler_args=scheduler_args,
callback=callback_fun)
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in train(self, optimizer, dataloader, num_epochs, scheduler_class,
scheduler_args, scheduler, max_grad_norm, num_steps, callback,
batch_postprocessor, **args)
281 self.train_with_num_steps(optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_steps, callback, batch_postprocessor, **args)
282 else:
--> 283 self.train_with_num_epochs(optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor,
**args)
284
285
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in train_with_num_epochs(self, optimizer, scheduler, tqdm_disable,
dataloader, max_grad_norm, num_epochs, callback, batch_postprocessor,
**args)
244 if (global_step%train_steps_per_epoch in checkpoints)
245 and ((current_epoch+1)%self.t_config.ckpt_epoch_frequency==0 or
current_epoch+1==num_epochs):
--> 246 self.save_and_callback(global_step, step, current_epoch, callback)
247
248 logger.info(f"Epoch {current_epoch+1} finished")
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_general.py
in save_and_callback(self, global_step, step, epoch, callback)
63 self.model_T._forward_hooks = OrderedDict()
64
---> 65 super(GeneralDistiller, self).save_and_callback(global_step,
step, epoch, callback)
66
67 if self.has_custom_matches:
~/opt/anaconda3/lib/python3.7/site-packages/textbrewer/distiller_basic.py
in save_and_callback(self, global_step, step, epoch, callback)
36 if callback is not None:
37 logger.info("Running callback function...")
---> 38 callback(model=self.model_S, step=global_step)
39 self.model_S.train()
40
in predict(model, eval_dataset, step, device)
49 with torch.no_grad():
50 logits, _ = model(input_ids=input_ids, attention_mask=attention_mask)
---> 51 cpu_logits = logits.detach().cpu()
52 for i in range(len(cpu_logits)):
53 pred_logits.append(cpu_logits[i].numpy())
AttributeError: 'str' object has no attribute 'detach'
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/airaria/TextBrewer/issues/81#issuecomment-920493937,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHMA5SI7KHBDBNS772PPEP3UCE6RDANCNFSM5EDMXCRA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


issue with fetch while using adapter-cloudflare-workers

Describe the bug
I am using supabase-js with sveltekit and cloudflare-workers. While using adapter-cloudflare-workers, I get hit with following issue when I do wrangler dev.
Uncaught
ReferenceError: require is not defined
    at node_modules/node-fetch/lib/index.js (worker.js:59:18)
    at __require (worker.js:9:44)
    at node_modules/cross-fetch/dist/node-ponyfill.js (worker.js:1099:21)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:1152:41)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:1442:19)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:2149:39)
    at __require (worker.js:9:44)

This issue happens because supabase-js is using cross-fetch as its fetch-polyfill. I found a workaround by applying following patches

changing platform from node to browser in the esbuild options inside adapter-cloudflare-worker.
patching cross-fetch to export native fetch for browser polyfill.

node may have been chosen as a platform of choice for esbuild, since cloudflare has started supporting node libraries for its workers platform.
However, cloudflare provides a hybrid of browser(service-worker) and node environment with native fetch support. Hence, if I keep node as a platform, then I face issues with browser's native object such as fetch, websocket that are also available under cloudflare's service-worker environment.
I have couple of questions here

Would it make sense to change the platform from node to browser. This will essentially conform to intrinsic nature of service-worker environment supporting many of the browser's native objects.
Is there a way to customise esbuild options used for a given adapter?
As per esbuild team, to override any external dependency, one way is to write a custom plugin such as esbuild-plugin-external-global. Is there a way to pass custom plugin or 3rd party plugin to esbuild config used during adapter build?

Logs
I have provided the error logs in my issue above
To Reproduce
Here's a sample repo.
supabase url + apikey and cloudflare account_id + zone_id will be required to reproduce issue
Expected behavior
cloudflare-worker adapter should allow options to customise esbuild so that third party libraries using cross-fetch can be integrated to cloudflare environment.
Stacktraces
If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

Stack trace

Uncaught
ReferenceError: require is not defined
    at node_modules/node-fetch/lib/index.js (worker.js:59:18)
    at __require (worker.js:9:44)
    at node_modules/cross-fetch/dist/node-ponyfill.js (worker.js:1099:21)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:1152:41)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:1442:19)
    at __require (worker.js:9:44)
    at<EMAIL_ADDRESS>(worker.js:2149:39)
    at __require (worker.js:9:44)

Information about your SvelteKit Installation:

Diagnostics

System:
    OS: macOS 11.4
    CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
    Memory: 21.73 MB / 16.00 GB
    Shell: 3.2.1 - /usr/local/bin/fish
  Binaries:
    Node: 16.3.0 - ~/.local/share/nvm/v16.3.0/bin/node
    npm: 7.15.1 - ~/.local/share/nvm/v16.3.0/bin/npm
  Browsers:
    Chrome: 91.0.4472.101
    Chrome Canary: 93.0.4539.0
    Edge: 91.0.864.41
    Firefox: 86.0.1
    Safari: 14.1.1
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.114
    svelte: ^3.34.0 => 3.38.2

Severity
This is hampering me from running supabase together with sveltekit on cloudflare. I believe that this issues goes beyond supabase. If not supabase, many other libraries use cross-fetch to access their apis. Hence, they may potentially face this issue.
Additional context

CC @halfnelson

Would it make sense to change the platform from node to browser?

I haven't used Cloudflare workers, so am not sure. Perhaps @halfnelson would know more. I think the issue I'd be most worried about is getting packages that expect things like document to be defined

Is there a way to customise esbuild options used for a given adapter?

The options are set on a per-adapter basis. Right now they're hardcoded, but I would imagine that the platform should be constant, so that's fine
https://github.com/sveltejs/kit/blob/9a7195bf5c24a7b3859710296f725baecb9bbe55/packages/adapter-cloudflare-workers/index.js#L37

Thanks @benmccann. I understand the need for keeping the platform value constant. I too am new with cloudflare and would love to hear from @halfnelson about his thoughts.
What I have learned so far is that poly-fills such as node-fetch, websocket etc. requires node libraries such as http, stream etc. Cloudflare workers environment does not provide any of those libraries. It is not a node environment. It works more like a service-worker bubble on a server.
Again @halfnelson may be a better person to clarify this understanding.

The original version didn't do any bundling and relied on cloudflare to do the webpack build. Although I am not sure what impacts changing esbuild platform from node -> browser would have, I am not sure browser is the right choice. Cloudflare themselves are trying to support a more "node" like environment while having browser as the default could drag in modules assuming the presence of window, document etc.
There is a third option called "neutral" although I am not sure that helps

looking at it, cross-fetch should import the global fetch, but it looks like it has been temporarily disabled:
https://github.com/lquixada/cross-fetch/blob/main/rollup.config.js#L49

related issues on their repo
https://github.com/lquixada/cross-fetch/issues/69
https://github.com/lquixada/cross-fetch/issues/78

Thanks @halfnelson.
lquixada/cross-fetch#78 occurs when cross-fetch picks up browser based build browser-ponyfill. It did not occur in my case since it picked up node-ponyfill. Hence these two issues are slightly different.
Like what is done in lquixada/cross-fetch#69, even if I override "cross-fetch", I start facing issues with other browser native object/classes such as websocket. So with "node" platform we may have to override couple of this objects.
I get your concern related to window and document object. But with node, similar issues occurs with built-in node modules such as http, url, stream etc.  In case of window and document, it will probably error out like what it is currently doing with node built-ins. But thats probably how cloudflare-workers was meant to function. It seems to me that cloudflare workers are browser-type sandbox  running on a server. Hence not sure if they will ever support node built-ins. You will be a better judge here though.
platform=neutral seems to build esm build with no externalisation. So in that case, the build may try to bundle all the built-in node modules, which may not work with cloudflare environment.
As per their doc, platform=browser seems to also bundle up commonjs modules.

This fixed it for me:
{
  fetch: (...args) => fetch(...args),
}

Source: https://github.com/supabase/postgrest-js/pull/235

Closing since there's a viable workaround. Hopefully libraries will stop bundling things like cross-fetch, now that more and more runtimes expose it natively


ML-420: ML.Tests.Explanatory.Cluster--Cannot find the import data

Clean and update the test code for Cluster.ecl
Add back the test code for KMeans().
Update the test code for YinyangKMeans().

The bug# is ML-402.  You may need to do rebase -i to fix the commit messages and then push again to origin

Lily, the only thing left is to squash these two commits into a single commit and push the single commit to your origin.  Let me know if you need help on having a single commit for your pull request.

Lily, it looks like your last push brought in a lot of stuff and now you have 10 commits in your pull request.

That is OK by me.  You might need to start with a fresh branch though.


Feature: Landing Page enhancement

Subject: Proposal for Landing Page Enhancement and Updates
Hi @rishicds,
I’d like to address a couple of important issues regarding the GDG RCIIT website, specifically the landing page layout and the content updates for events and projects.
1. Landing Page Enhancement:
Currently, the event and project sections on the landing page are horizontally stacked, which may not provide the best visual appeal or user experience. I can easily reformat this section to display the stacks horizontally, making the layout more engaging and modern.
2. Updating Events and Projects:
Additionally, I’ve noticed that the events and projects by GDSC RCIIT have not been updated. Keeping this information current is essential for user engagement and transparency. I can take care of these updates to ensure that our community stays informed about our latest activities.
By addressing these issues, we can significantly improve the website’s functionality and user experience. I look forward to your feedback on these proposals.

I can make it look better.

@dev129  update your forked repo

@Shariq2003 I have updated that even before running the server but this is what I saw .

@Shariq2003 I have updated that even before running the server but this is what I saw .

No bro

You have to update the forked repo, then take a pull from main into your local main repo

Oh ok , thanks @Shariq2003 , also how are you doing so many PR and managing everything so swiftly ?

Oh ok , thanks @Shariq2003 , also how are you doing so many PR and managing everything so swiftly ?

Bro, actually I have continuously worked from the start and given almost 15-20 hrs, as a result currently suffering from bad health due to bad sleep cycle and now you can see that my contributions getting down since 2 days.
😥

Bro you are on 2nd position! What more is needed (I still am on trailblazer) also itne ideas , itne contributions, itna time dena thinking ke liye, and then here's me with no idea on how and what to contribute to ?


fix small grammatical error

Fixes small grammatical error

Pull Request Test Coverage Report for Build 1775

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 67.056%

Totals

Change from base Build 1769:
0.0%

Covered Lines:
3969

Relevant Lines:
5646

💛  - Coveralls


fix: diff output error for yaml output

Description
There was an implementation bug that resulted in DiffBreakingChange error even where there were no breaking changes. This happened when the output format was yaml. This PR fixes it.
Related issue(s)

None

@aayushmau5 let me know if we can merge this.

@Souvikns yeah, it's ready to be merged!

/rtm


Cloudmin: Status creating server not visible

Hi,
During creating a virtual machine within Cloudmin there is no output visible on the screen during the process. On the end the whole output is visible. It would be preferable to see it as well during creating, because you want to see the progress. That is the only withdrawal to use the theme.
Thanks,
Before posting an issue, please search through README.md and closed/opened issues to make sure that the answer to your questions hasn't been answered/discussed already.
Please make sure that you have latest theme (18.40) and Webmin (1.831) versions installed.
Provide the following information:

What is your server-side OS and its version?
What is your client-side OS, browser and its versions?
What are the steps to reproduce the issue

What is your theme version?

:up:

What is your theme version??

It's already fixed in #45770

Hello version 18.32
From: Ilia Rostovtsev<EMAIL_ADDRESS>Reply-To: qooob/authentic-theme<EMAIL_ADDRESS>Date: Friday 24 March 2017 at 20:12
To: qooob/authentic-theme<EMAIL_ADDRESS>Cc: Mario Mieldijk<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [qooob/authentic-theme] Cloudmin: Status creating server not visible (#690)
🆙
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/qooob/authentic-theme/issues/690#issuecomment-289118335, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEB4eg_Yy7ZfRIhJYxbllfkhuBG_c9VLks5rpBWYgaJpZM4MmtO2.


collectionView(_:layout:referenceSizeForHeaderInSection:)

Description
Would be nice to define collectionView(_:layout:referenceSizeForHeaderInSection:) in the same way we define supplementaryViewFactory
Why
By default collectionView(_:layout:referenceSizeForHeaderInSection:) returns (0,0) as described [here] (https://developer.apple.com/library/ios/documentation/UIKit/Reference/UICollectionViewDelegateFlowLayout_protocol/#//apple_ref/occ/intfm/UICollectionViewDelegateFlowLayout/collectionView:layout:referenceSizeForHeaderInSection:) unless the user either implements the delegate or defines headerReferenceSize property of the UICollectionViewFlowLayout link. When the size in the appropriate scrolling dimension is 0, no header is added.
Issue
I was trying to use a custom header registered using the method registerNib(_:forSupplementaryViewOfKind:withReuseIdentifier:) and I couldn't figured out why it was not working. Then, I realised it was the size but to define I had to implement the delegate which is annoying because I use RxDataSources for the view and the UICollectionViewDelegateFlowLayout for the size of the same view.
In the project Example2 everything work because the header is defined in the Storyboard inside the collection view, in that case the UICollectionViewDelegateFlowLayout inherits the headerReferenceSize property, but defining custom header is a common use case

Hi @serluca ,
I'm not sure what is the suggestion here.
collectionView(_:layout:referenceSizeForHeaderInSection:) is part of delegate and not data source, so we can't implement this on data source.
I think that RxDelegate should report collectionView(_:layout:referenceSizeForHeaderInSection:) wasn't implemented in case delegate isn't implementing it because it has void return type, so little confused it returns (0, 0). Why do you think it does?
What we could theoretically do is for data source to also implement delegate methods, and then create an extension rx_itemsWithDataSourceAndDelegate.

Hi @serluca ,
would

What we could theoretically do is for data source to also implement delegate methods, and then create an extension rx_itemsWithDataSourceAndDelegate.

even help in this case. According to this, it sounds like not.

Hi @kzaher
What I'm suggesting here is to have a method  that looks like
dataSource.supplementaryViewFactory = { (dataSource, collectionView, kind, indexPath) in
}

But for the delegate method collectionView(_:layout:referenceSizeForHeaderInSection:) something like
dataSourceAndDelegate.referenceSizeForHeaderFactory = { { (dataSource, collectionView, section)
}

Having this method, we can customize the header size and keep the same syntax that we use for the dataSource.
Right now my code looks like this (and I think is ugly):
class MyClass {
	func skinCollectionView() {
		dataSource.supplementaryViewFactory = { (dataSource, collectionView, kind, indexPath) in
			...
		}
	}
}

extension MyClass : UICollectionViewDelegateFlowLayout {

    func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize {
        ....
        return Size
    }
}

Can you make a PR?

I'll try :)


Enforce new authentication

Blocked by #2012 or #3784.

@b1ron We should research what commands require authentication. find clearly requires it, saslStart clearly doesn't, but what about commands like hello, ping, etc?

What should be done?
When new authentication is enabled, it should be checked at the beginning of every command handler, not in the backend.
When new authentication is not enabled, it should be checked by backends as before.
With SCRAM-SHA-1/256 implemented, we should also add integration tests (for new authentication only).
Where?
Handler, backends.
Definition of Done

handler updated;
all backends updated;
integration/compatibility tests added/updated;
spot refactorings done;
user documentation updated.

Commands that do not require authentication are:

hello
ping
whatsmyuri
buildInfo
authenticate
connectionStatus
isMaster


Turn on the flash

Is there any simple code to turn on the flash using this library?

I took and modified the code from here:
https://github.com/journeyapps/zxing-android-embedded/blob/master/sample/src/main/java/example/zxing/CustomScannerActivity.java

how to applicate this activity please could you explain it

You can use key vol + and -. It is a solution i finded.

@guimax thank you very much


[UX] Graduate - Color Picker

Describe the problem

Review feature, example scene, docs
Design polish pass

We appreciate your feedback and thank you for reporting this issue.
Microsoft Mixed Reality Toolkit version 2 (MRTK2) is currently in limited support. This means that Microsoft is only fixing high priority security issues. Unfortunately, this issue does not meet the necessary priority and will be closed. If you strongly feel that this issue deserves more attention, please open a new issue and explain why it is important.
Microsoft recommends that all new HoloLens 2 Unity applications use MRTK3 instead of MRTK2.
Please note that MRTK3 was released in August 2023. It features an all-new architecture for developing rich mixed reality experiences and has a minimum requirement of Unity 2021.3 LTS. For more information about MRTK3, please visit https://www.mixedrealitytoolkit.org.
Thank you for your continued support of the Mixed Reality Toolkit!


Lectures: Correctly put and get competencies for attachment units

Checklist
General

[x] This is a small issue that I tested locally.
[x] Language: I followed the guidelines for inclusive, diversity-sensitive, and appreciative language.
[x] I chose a title conforming to the naming conventions for pull requests.

Server

[x] Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
[x] I strictly followed the principle of data economy for all database calls.
[x] I strictly followed the server coding and design guidelines.
[x] I added multiple integration tests (Spring) related to the features (with a high test coverage).
[x] I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).
[x] I documented the Java code using JavaDoc style.

Motivation and Context

Fixes this issue: https://github.com/ls1intum/Artemis/issues/9666
Description

Added the competencyLinks field to attachment-units GET-Request
Added the competencyLinks field to attachment-units PUT-Request (Updates the attachment unit)

Steps for Testing

Prerequisites:

1 Instructor
1 Demo Course with at least one lecture and competency

Log in to Artemis
Navigate to the demo lecture’s units
Create a new attachment unit
Try to edit the created attachment unit, add the test competency and press "Submit"
After pressing edit again find the added competency in the attachment unit

Testserver States

[!NOTE]
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.

Review Progress

Performance Review

[ ] I (as a reviewer) confirm that the client changes (in particular related to REST calls and UI responsiveness) are implemented with a very good performance even for very large courses with more than 2000 students.
[ ] I (as a reviewer) confirm that the server changes (in particular related to database calls) are implemented with a very good performance even for very large courses with more than 2000 students.

Code Review

[ ] Code Review 1
[ ] Code Review 2

Manual Tests

[ ] Test 1
[ ] Test 2

Exam Mode Test

[ ] Test 1
[ ] Test 2

Performance Tests

[ ] Test 1
[ ] Test 2

Screenshots

Summary by CodeRabbit

New Features

Enhanced functionality for updating attachment units, including competency link updates and improved file handling.
Retrieval of attachment units now includes associated slides and competencies for better data visibility.

Bug Fixes

Improved error handling to ensure attachments are present during updates and to validate file types.

Documentation

Updated method signatures to reflect changes in functionality and parameters.

Welcome to Artemis 👋
Thanks for the PR, the changes look good.
Can you also add some server tests to check for this behaviour?

Thank you for your help with fixing the issue. Since we want to fix the bug quickly, I adapted the tests in a new PR and incorporated your changes in this PR: #9739 Feel free to assign yourself as well in this PR.
As our readme states (https://github.com/ls1intum/Artemis#communication), we also use Slack for communication. If you want to contribute more in the future, feel free to sign up so we can better communicate and easier collaborate on PRs in the future.

Closed in favor of https://github.com/ls1intum/Artemis/pull/9739

Closed in favor of https://github.com/ls1intum/Artemis/pull/9739


Caching of le_admin routes

@FlxAlbroscheit I'm currently struggling with the aggressive caching in the le_admin routes for authenticated users.
Drupal is caching node displays and breadcrumbs. Disabling cache using the route option no_cache: true and using #max-age => 0 in the controller code does not help as the node and breadcrumb level cache hits here.
I guess the solution is to add a cachable context to the breadcrumb and to somehow disable the caching of the nodes at least in the backend_teaser view modes.

I never really dealt with drupal caching in custom modules :( Have you been able to solve the problem?

Currently I wasn't able to fix the caching issues. I will now try to adjust caching for the views used, however the breadcrumb caching requires a caching context.

fixed it in https://github.com/Leipziger-Ecken/drupal/commit/2ea840057b5fa1900acf703467f6db45ee8700d9


Slimes no longer laugh / scream from Nitrous Oxide

About the PR

Title.
Why / Balance

Slimes are already immune to every other effect of N2O and this would cause them to constantly be laughing when inside a locker.

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog

:cl: Lank

fix: Slimes are fully immune to Nitrous Oxide again.

(i would like it to stay as feature cuz it's kinda funny)

canaries
(obscure reference)

canaries (obscure reference)

coal mines?

canaries (obscure reference)

coal mines?

yes


Feature: Python API/implementation

I am reporting:

[ ] a bug or unexpected behavior
[ ] general feedback
[x] feature request
[ ] security issue

Is it possible to have a DAT Python API or implementation such that Hydrus can use it to share images and tag databases? Hydrus is written in Python.

There's work being done for a Rust implementation, and an effort starting with Kotlin.
Nobody's undertaken Python yet, but you could potentially get that started by looking at the existing JS or Rust work.
Alternately, you can wait for Rust to be finished and use FFI bindings from Python into it.
Either approach is a big undertaking and I'm not sure if any of the core Dat people are going to have time to work on it in the near future.

I don't think anyone is going for a Go implementation yet. 😅
Would this python wrapper be wrapping over a Node.js CLI? That would probably be doable.
Would you be interested in leading the effort on that front? I could help give you tips on how the Dat side works if that'll help. 😁

@RangerMauve I am one of the end user of Hydrus, and I have a close relationship with this Python developer, he is not really keen on handling multiple languages at once.


Added sample for DLP : De-identify data using table bucketing

Implemented sample for De-identify data using table bucketing
Added test cases for the same
Reference: https://cloud.google.com/dlp/docs/examples-deid-tables.md#transform_a_column_without_inspection

Combined this PR into https://github.com/GoogleCloudPlatform/php-docs-samples/pull/1837


[TACKLE-9] Bulk copy of Application assessments

WHAT
Once an application has been assessed , this assessment can also correspond to several applications.

WHY
In order to avoid the user to assess a bunch of applications with the same values
HOW
Operation to send a source ApplicationId and a List of ApplicationIds where the assessment has to be copied.
SCOPE
The source application needs to be assessed and not deleted.
The target applications need to be not-assessed
The response will be a list of : applicationId, assessmentId, status ( Success/Error )

Links to have a better perspective on async apis :
https://adidas.gitbook.io/api-guidelines/rest-api-guidelines/execution/batch-operations
https://itnext.io/bulk-with-restfull-apis-7c5e6be84ed3
https://www.mscharhag.com/api-design/rest-asynchronous-operations

Finally Opt-A is chosen.
This implies the creation of the AssessmentBulkOperation entity that will provide an ID on the response of the first operation, and allows the consumer to check the status of the different processes.


add supports for react-native

add new environment to support react native.
the webrtc library use https://github.com/oney/react-native-webrtc
and websocket uses react-native's polyfill.

Hmm...
I don't know why Travis build failed.
The react-native column in package.json is used to tell react native packager.

Hi @zxcpoiu,
Once the Travis check is passing for this PR and the later one (#314) we will consider them.
Thanks,
James

yeah, I will do that, thanks!

React Native support is an exciting prospect, but I'm curious whether this is the best way to go about it, as you can see in my code comment above.
For what it's worth, you should be able to add React Native support at runtime as outlined in https://github.com/onsip/SIP.js/pull/108, and you could even create a separate package (say, react-native-sip.js) that wraps everything up cleanly into a single module.

a different module is a way to go, but it looks a bit odd which just have a index.js wrapper and a package.json to specify sip. js and react-native-webrtc deps and also harder to maintain issues.
the think I'm not sure about is it lacks support of global.open function which used in follow_refer()
does node user have to install wrtc manually? if yes, I don't see any bad would happen. it won't touch neither environment_browser.js nor environment. js because the react-native field in package. json.
Sorry, I have limited knowledge about these.
How about we merged it as a experiment comment and I can provide a README section?

the think I'm not sure about is it lacks support of global.open function which used in follow_refer()

That's not really a big deal, as it's used only when the Refer-To URI is not sip: or sips:, which is rather uncommon.

does node user have to install wrtc manually?

One of the server-side sip.js use cases is: for signaling only, without any media handling. That, along with undeveloped media-handling support in Node.js, is partially why sip.js doesn't depend on server-side media module. In fact, wrtc dropped MediaStream support, so it doesn't even work for audio anymore (and I had only ever gotten it to work for receiving audio anyway). At any rate, I don't think it would be appropriate to list as a dependency and force users to download, especially since most of our users are browser-based. Of course, this is also the case with react-native-webrtc (especially given its size). I was really just more curious about how all the dependencies were handled. I think it's totally appropriate to ask users to install react-native-webrtc manually if these changes were merged in.

a different module is a way to go, but it looks a bit odd which just have a index.js wrapper and a package.json to specify sip. js and react-native-webrtc deps and also harder to maintain issues.

I don't think wrapper modules like this are all that uncommon (AngularJS wrappers for various modules come to mind, as do React Native wrappers, for that matter). Whether they're a good idea is a separate question, of course. You have a good point about issue maintenance, for one. I can see how it would be a pain to have to "forward" sip.js issues to this repo, while keeping the react-native ones elsewhere.
On the other hand, supported another platform like this implies that other developers would need to do extra testing to avoid accidentally breaking compatibility with react-native. Given the small scope of this change, I imagine that's relatively unlikely, but I could definitely imagine someone changing environment_browser.js (from which environment.js extends), and forgetting about  environment_react_native.js. You could reduce this possibility by having environment_react_native.js also extend from one of the other two environment files.

Sorry, I have limited knowledge about these.

No problem, I've been learning things from this thread too 😄

How about we merged it as a experiment comment and I can provide a README section?

I think that adding a section to the README demonstrating how to set up a "Hello World" project would definitely help here, as it would allow the repo collaborators to try it out and see how it works, as well as guiding future users, and providing a reminder for why the react-native code is here in the first place.
Personally, I'm curious to see how this would work out, and I'd be excited to give it a try if you provided instructions (even better, a premade "Hello World" project I could clone and run). I hope this helps!

you are right, this may cause some confusions and add complexity for maintaining.
and yes, to have hardcoded dependencies of an specific implementation doesn't feel right.
and it seems there are no way for user to specify a dependence via tag when npm install currently.
react-native-webrtc is the only one implementation on react-native AFAIK, and there is another implementation for mobile webrtc called openwebrtc by Ericsson. it can run on Cordova but has not porting to react-native yet. maybe I will do that when I have time to experiment.

You could reduce this possibility by having environment_react_native.js also extend from one of the other two environment files.

I am not exactly understand what you mean about extend from one of the other two.
doesn't it environment_react_native.js replaced environment.js if we have field  react-native in package.json?
like environment_browser.js, how can I extend from it if I'm the replacer environment? 😕
anyway, it is not an easy work for sure.
especially react-native is in it‘s youth and it is commonly to have to manually tweaking your setup (android/iOS library paths, permissions and so on) after npm install, not to mention you don't have audio/video tag like in browser, so you need to control media in react-native way. 😵
FWIW, there is rnpm, it is a npm for react-native , maybe it helps.
alright, let's leave this PR for a while here for further discussion.
I will make an easy repo for you guys to play around and see what we will get.
in the mean time, I will eat more documens and try to level-up in order to discuss with you. 😱
thanks for your time and patiences and of course all the decent works.

@zxcpoiu Hey, can i use sip.js with react native now? Or we should wait till your PR gets merged?
In the mean time, any suggestion d be great for implementing sip with react native.
Thanks

@alioguzhan yes of course, sip.js is mature enough, but react-native still stands on the blooding-edge. My scenario is audio only, and reaching to semi-production stage, but still figuring out what is the best practice and some unclear issues to be fixed. I will create a demo once these things are done.
how to use:
once you have all react-native modules setup, just manually patch this PR, and you can use sip.js.
you may want to check/patch #314 as well.
below is some point I can tell:

If you want to use video, you may have lot more pains than audio only, since you need to dealing with view rendering.
the connection-handling / life-cycle in mobile world is much more painful than in PC's browser.
you may need to adjust lots of logic flow depends on your scenario, this is my dirty works
you would need a stable sip/turn server compatible enough with sip.js

@zxcpoiu Thanks for detailed explanation! Looks like it is almost impossible using sip.js with proper and native ways. But what about webviews?
What if we put a webview includes only  and some  elements. I can write all logic in a html file with some javascript. Can we make it work? Sure, i will try this. Asking just for a brainstorm :)

oh, sorry for the misleading.
sip.js is mature enough and handled sip signals well, the problems is in native side ( react-native/react-native-webrtc/native limitations ) no matter used in webview or native view.
The point is all based on what features you want to implement.
if you want just a "click to call" feature, then it is fairly easy to implement, in webview/chrome/react-native.
but if to refers to "receiving calls"/"support audio routing to vary devices"/"permissions and system call priority"/"push notification wake up", then it would be complex. ( that's my case )
because PC's browser doesn't have this conflict environments and mostly handles all for you well.
so, sip.js itself is absolutely can be used in mobile without problems, the blooding part is react-native and react-native-webrtc which acts differently than PC's browser. you don't have to worry about sip.js much.
I was successfully got sip.js running in android chrome with pure html and js, but the limitations of native accessibility forced me to go with native app.
I don't have experiences in webview, but I think it's worthy a try if you just have to implement something like click to call
my two cents.

@zxcpoiu got it. I need exactly same features as in desktop/browser environments. Like receiving and sending video&audio calls based on users' sip account credentials. Since my app will be a launch screen app, I don't interested about wake on push notifications part.  Because app will be always open.
Looks like i need to implement one of those native sip libraries written in Java. And try to use them as native modules from react native side.
Can you suggest anything else?

Because app will be always open.

I have doubt with it.
Both Google and Apple tends to put more and more restrictions on persistent connections and clearly recommends that voip apps should use push notification to wake app up.
The app live or not, the decision all owned by the system, eventually. But it is only my bet based on my observation.
If you have to use react-native, currently, your best bet is: sip.js + react-native-webrtc (of course, or I won't use them )
you need to decide:

you want to handle sip signaling in js or native
use persistent connection to register or wake up by push notification
license
do you really need react-native

for another options:

( signal functions on js, media functions on native ) porting openwebrtc to a react-native module. but you still need sip.js to handle sip signals in js.

( both signal and media functions on native ) porting linphone to react-native

( both signal and media functions on native ) porting pjsip to react-native  there is a repo react-native-pjsip tring to porti from pjsip, but still in development.

that's what I can tell. and this topic is way beyond the scope of sip.js
it's never been easy to make a decent sip app, good luck

zxcpoiu
I have a doubt on the options passed to the accept method of InviteClientContext:
with this object
{
media: {
constraints: {
audio: true,
video: false,
},
render: {
local: this.containerLocal,
remote: this.containerRemote,
}
},
};
Where the local and remote are ref's to  .
I have to do this ?
Because on this scenario i'm not getting audio and asterisk place the call on hold because of this "c=IN IP4 <IP_ADDRESS>"
Any idea ?
Thanks.

There is no video nor audio elements in react-native like in browser. ( maybe there are some modules   do the polyfill that I didn't notice.  )
This different behavior is one of the main reason that this PR can't be merged smoothly.
react-native-webrtc use different way to render media stream,
for audio, controlled via Stream.getTrack() directly, and you don't have to render on a audio element, it's done by webrtc itself automatically.
for video, react-native-webrtc use a react native View to render, you can check the source code for the implementation.

about questions to react-native-webrtc, please go to https://github.com/oney/react-native-webrtc for helps.

At this point, I feel this is more of a discussion topic than something we will accept as a PR.  react-native-webrtc is also a very active project, so it's likely what's necessary has changed since the time this PR was opened.
Please feel free to continue this as an issue or in the google group.
Thanks,
James


Add sorting keys to model_dump_json

Initial Checks

[X] I have searched Google & GitHub for similar requests and couldn't find anything
[X] I have read and followed the docs and still think this feature is missing

Description
I may be missing something, I do apologize in advance.
From reading the docs, it appears that the .model_dump_json() method of the BaseModel does not support the sorting of the keys when serializing objects to json.
Would it be possible to add a boolean of some sort to enable recursive sorting of the keys, as follows: .model_dump_json(sort_keys=True)
Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[X] Data serialization - .model_dump() and .model_dump_json()
[ ] JSON Schema
[ ] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[ ] Generic Models
[ ] Other Model behaviour - model_construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

I think this is a good feature request, as it is nice to get JSON dumped in a way that doesn't depend on the order of fields etc. (Not to mention sometimes it's just nice to have it sorted.)
I personally would welcome a PR adding this though I would defer to @samuelcolvin if he felt it was better not to.
Either way, adding the feature would need to happen in the implementation of model_dump_json in pydantic-core. @davidhewitt is it hard to get serde to dump JSON with keys in sorted order? It feels like something there might be an existing option for, or maybe not.

I'd be more than happy to contribute to this awesome project however I do not have any experience in Rust (yet).

Hi guys,
Would you mind giving us an update on this please?
I tried to look around with the aforementioned issues and open PR and could not make sense of it 😢
Thank you for your time :)

I'm sorry I did not understand the message.

What are you (@antazoey) suggesting, and what should I do?

What are you (@antazoey) suggesting, and what should I do?

Here is the docs in the standard JSON library for dump: https://docs.python.org/3/library/json.html#basic-usage
Notice it has a kwarg sort_keys. It's doc is:
If sort_keys is true (default: False), then the output of dictionaries will be sorted by key.

This kwarg also works in Pydantic V1 in a model's .json() method.
This kwarg DOES NOT working on Pydantic v2 in a model's model_dump_json() method.
My feature request here is to add support for the sort_keys kwarg to Pydantic v2 the same way the standard JSON has and the same way Pydantic v1 has.
I have never contributed to Pydantic directly so I am not super aware of the technical challenges necessities in order to achieve this feature.

Hey everyone, sharing this snippet that's been a lifesaver for me 🚀:
instance_dict = {**instance.model_dump()}
json_str = json.dumps(instance_dict, sort_keys=True)

Hope it helps anyone in the same boat!

It works but it is very slow for most of the use cases I have...

Hey everyone, sharing this snippet that's been a lifesaver for me 🚀:
instance_dict = instance.model_dump()
json_str = json.dumps(instance_dict, sort_keys=True)

Hope it helps anyone in the same boat!

Great snipper but this sadly doesn't work if you're using some of the custom PyDantic validators, like DirectoryPath for inst.

👍 to this and adding that it'd be nice to control this from the ConfigDict, e.g.
class MyModel(pydantic.BaseModel):
    model_config = pydantic.ConfigDict(sort_keys="asc")

This workaround is working for me:
https://gist.github.com/TweedBeetle/f56125de214318dc644fe5868bf5cd84

Just to note some technical details on this:
pydantic-core uses the preserve_order feature of serde_json:

https://github.com/pydantic/pydantic-core/blob/6472887b3ad3e865e494b46efb66a71e87ceb1cf/Cargo.toml#L36
https://github.com/serde-rs/json/blob/2ccb5b67ca34a5e53b42fa608d756e25e57f91a3/Cargo.toml#L56-L59

to "break" that ordering, I guess one would need to call https://docs.rs/serde_json/latest/serde_json/value/enum.Value.html#method.sort_all_objects or https://docs.rs/serde_json/latest/serde_json/map/struct.Map.html#method.sort_keys somewhere in the serialisation code


Allow users to disable certain reboot checks

I had an issue where my Azure VM went into a reboot loop after I applied a Powershell DSC script that included xPendingReboot.
Basically, there was a stale file rename operating pending, so every time the DSC script ran, it would detect that, reboot the VM, and we got in a loop.
The case is, I did not want to check for pending file rename operations - I was only looking for a reboot that could have been triggered by a Windows Update package I installed.
So I've created this pull request that allows the user to specify for which 'reboot sources' (s)he wants to check. For example, if you want to bypass the pending file rename operations, you could just set SkipPendingFileRename = $True.

Hi @qmfrederik, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@qmfrederik, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

It is required that you provide adequate test coverage for the code you change. Contribution Guidelines -Adding test coverage for DSC resources  Please work with us to come up with a plan to cover this code.

If there is no update of the pull request within 7 days, we will close the pull request.  After that, if you have an update, feel free to reopen the pull request or a new pull request.

Please update the readme with the details of the changes and include a summary of changes in an unreleased version change per the contribution guidelines

Please fix the resource designer test failures.  In the details

It is required that you provide adequate test coverage for the code you change. Contribution Guidelines -Adding test coverage for DSC resources  Please work with us to come up with a plan to cover this code.
Example, Please write a unit test that we test-targetresource actually returns false when you say to skip a reboot check, but the reboot check is positive.

Hi @TravisEz13 ,
I think I addressed most of your feedback; let me know if something is missing.
Regarding the tests: I added a first test; however, it seems my mocks are not working (correctly).
I have to admit I'm now to Pester and there were no tests in the repository which I could base my test off.
Would be great if you could provide some guidance here,
Thanks.

There are still 2 test failures.  For the first issue, I have fixed this issue in the template, but it has not been merged
This error should read.
File C:\projects\xpendingreboot\DSCResources\MSFT_xPendingReboot\MSFT_xPendingReboot.schema.mof contains 0x00 bytes. It's probably uses Unicode and need to be converted to ASCII. Use Fixer 'Get-UnicodeFilesList $pwd | ConvertTo-ASCII'

You can find the updated code here:
https://github.com/PowerShell/DscResource.Tests/tree/TravisEz13-patch-1

I've figured out this issue with the second error.  I recommend this update to the test:
You are I should file an issue to refactor the resource not to use invoke-command and activate the test.
        Mock Invoke-WmiMethod {
            return New-Object PSObject -Property
                @{
                    ReturnValue = 0
                    IsHardRebootPending = $false
                    RebootPending = $true
                }
        } -ModuleName MSFT_xPendingReboot

        # The test is pending because you cannot mock into a command that is invoked by Invoke-Command
        It "A reboot should have been triggered" {
            $result = Test-TargetResource -Name "Test"

            $result | Should Be $false
            Assert-MockCalled -CommandName Invoke-WmiMethod -ModuleName MSFT_xPendingReboot
        } -Pending

Hi @TravisEz13 ,
Have a look at the updated code:

Test-TargetResource is based off Get-TargetResource; the tests for Test-TargetResource now mock the values of Get-TargetResource
I've added tests for Get-TargetResource as well

Looks like something went wrong with the mocking of Get-WmiObject; it would be great if you could have a look at that and let me know if there's something I missed.
Cheers

For the failing test case, I don't think there is an easy fix.  I recommend something like the example below.  I cannot get a pester mock to work when the function being mocked is invoked inside invoke-command.  I'd also file an issue that the resource should be refactored to use invoke-command less and remove this pending test case.
        Mock Invoke-WmiMethod {
            return New-Object PSObject -Property
                @{
                    ReturnValue = 0
                    IsHardRebootPending = $false
                    RebootPending = $true
                }
        } -ModuleName MSFT_xPendingReboot

        # The test is pending because you cannot mock into
        # a command that is invoked by Invoke-Command
        It "A reboot should have been triggered" -Pending {
            $result = Test-TargetResource -Name "Test"

            $result | Should Be $false
            Assert-MockCalled -CommandName Invoke-WmiMethod -ModuleName MSFT_xPendingReboot
        }

Hi @TravisEz13 ,
Actually, I took care of refactoring the code so that Invoke-Method is no longer used by the PowerShell module.
The test now fail because it seems like I can't get Pester to mock Get-WmiObject.
Any thoughts?

I sync'ed your latest code and fixed all the test issues (described bellow.)  I put the file in a Gist, here, as much of the file was changed.
Issue 1 -  If you are calling the mocked function in a different module, you need to say what module you are calling the mock from when declaring it.
Issue 2 - It was difficult to debug the test case, because you combined many 'should's into one it.  I separated them out so when something fails, you can tell what is failing.
Issue 3 -  In you mocks for 'No Reboots Are Required' context.  You were not returning an object and the product code was failing.
I believe this is all resolve in the GIST above.
I hope this helps.
Thanks,
Travis

Hi @TravisEz13 ,
Cool, thanks! Looks like we're all set now?
Frederik.

Thanks for your contribution and all your patients with the the feedback.


Item Click does not working

Item click does nothing. For example :
materialSearchView.setOnItemClickListener((adapterView, view, i, l) -> {
DataModel dataModel = recList.get(i);
System.out.println("NAME " + dataModel.getName());
});

It works for me.
mSearchBox.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                Log.e("test", "test");
            }
        });

And it works with custom interface too :/

already tried that way, also with
searchView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.d("test","comeOnPleaseDoIt");
}
, but doesnt work :(

Set Adapter for SearchView, OnItemClick will work
mSearchView.setAdapter(new SearchAdapter(this, results));

OK...maybe I know why....
you may call the "setSuggestions()" method after you set the "OnItemClickListener", and this is the reason.
In "setSuggestions()" method, it will do:
setOnItemClickListener(new AdapterView.OnItemClickListener() {                 @Override                 public void onItemClick(AdapterView<?> parent, View view, int position, long id) {                     setQuery((String) adapter.getItem(position), submit);                 }             });
this listener is uesd to change the "query text" and will cover your listener. so if you have set a listener and want to update your suggestions, you should call "setAdapter(new SearchAdapter(this, results));" instead of "setSuggestions()"

I fixed this issue by implementing additional interface and calling it but can't remember what exactly I did.


Create uploader handler for artifact type "helmChart" to Helm repositores

What would you like to be added:
Similar to what exists for other artifact types, there should be an upload handler for Helm charts to Helm repositories.
Why is this needed:
Although newer Helm clients allow Helm charts to be pushed as OCI artifacts to OCI registries, it is common practice to store Helm charts in (HTTP) Helm repositories. Therefore we require an new upload handler for this.

Helm Repositories by default do not offer uploading capabilities and it is the recommended way to do something like static hosting. As such all we can do is upload them into a repository folder and then have the index updated: see https://helm.sh/docs/topics/chart_repository/#managing-chart-repositories for details


Can not download ocb binary tool

When I try to download the ocb binary tool as the document fallow:

I just get a 404 response:

So when I try to find it in the github release assets, I can't.

The actual URL is this: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/cmd%2Fbuilder%2Fv0.108.0/ocb_0.108.0_linux_amd64
Here's the release page for ocb: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/cmd%2Fbuilder%2Fv0.108.0
Note that OTel Core is 0.108.1 but the actual binary is 0.108.0.

ok,thanks.
it is the latest document using the wrong version.
https://opentelemetry.io/docs/collector/custom-collector/#step-1---install-the-builder

Likely. Let me transfer this to the docs repo.


How to pass php vars from module php, to frontend.js

Problem Description
I need to diplay dinamically some texts ( configured inside visual buidler modal window ) in a module ,
I can not find any proper way to pass these  variables except adding a straight

You can pass props values to the rendered element using the html attribute data.
Like so data-variable="{$this->prop['variable']}"
Then use JS to read the value and do what you want with it.


ARROW-369: [Python] Convert multiple record batches at once to Pandas

Modified Pandas adapter to handle columns with multiple chunks with ConvertColumnToPandas.  This modifies the pyarrow public API by adding a class RecordBatchList and static method toPandas which takes a list of Arrow RecordBatches and outputs a Pandas DataFrame.
Adds unit test in test_table.py to do the conversion for each column with typed specialization.

ping @wesm.  I still need to check that the RecordBatch schemas are equal and add some negative unit tests, but I wanted to check with you if the approach so far looks good.  Could you please take a look when you get a chance?  Thanks!

Thanks for the review @wesm , I fixed the issues you pointed out and added a check that the schema in each batch is equal.

@wesm, hopefully this is good to go now.  Please take another look when you can, thanks!

Thanks for the reviews @xhochy and @wesm!

I was thinking a better API for this would be:
table = pa.Table.from_batches(batches)
df = table.to_pandas()

what do you think?

yeah, it would be more flexible that way.  I can go ahead and make a PR for it.


Stability handling

second attempt )

By the way, this is exceptional work: :+1:

By the way, this is exceptional work:

thank you, this means a lot to me

some links that were used:

https://semver.org/
https://blog.gopheracademy.com/advent-2015/semver/
https://en.wikipedia.org/wiki/Software_versioning

semver is of course the main source

@slash3b one last thing I'd need is to ask you to check if there's any diff in the generated composer.json file. Patch should be good to go otherwise :+1:

Also: I owe you a beer for all this effort :beers:

hey it would be an honor for me to have that beer :D Some day I will get to one of your presentations ^^
As to the patch:
I did built composer.json and saved it
~/P/SecurityAdvisoriesBuilder (stability_handling|✔) $ php build-conflicts.php
~/P/SecurityAdvisoriesBuilder (stability_handling|✔) $ cp build/composer.json  composer_and_stability.json

then I switched to the master and did the same thing
~/P/SecurityAdvisoriesBuilder (stability_handling|…) $ git checkout master
~/P/SecurityAdvisoriesBuilder (master|…) $ git pull origin master

and final diff
~/P/SecurityAdvisoriesBuilder (master↑30|…) $ diff -uw build/composer.json composer_and_stability.json
--- build/composer.json 2019-05-16 21:52:25.542792192 +0300
+++ composer_and_stability.json 2019-05-16 21:51:27.905539960 +0300
@@ -25,7 +25,7 @@
         "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4",
         "cartalyst/sentry": "<=2.1.6",
         "codeigniter/framework": "<=3.0.6",
-        "composer/composer": "<=1.0.0-alpha11",
+        "composer/composer": "<=1-alpha.11",
         "contao-components/mediaelement": ">=2.14.2,<2.21.1",
         "contao/core": ">=2,<3.5.39",
         "contao/core-bundle": ">=4,<4.4.39|>=4.5,<4.7.5",
@@ -57,7 +57,7 @@
         "fuel/core": "<1.8.1",
         "gree/jose": "<=2.2",
         "gregwar/rst": "<1.0.3",
-        "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1",
+        "guzzlehttp/guzzle": ">=4-rc.2,<4.2.4|>=5,<5.3.1|>=6,<6.2.1",
         "illuminate/auth": ">=4,<4.0.99|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.10",
         "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.42|>=5.6,<5.6.30",
         "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29",
@@ -92,7 +92,7 @@
         "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5.0.10,<5.6.3",
         "phpwhois/phpwhois": "<=4.2.5",
         "phpxmlrpc/extras": "<0.6.1",
-        "propel/propel": ">=2.0.0-alpha1,<=2.0.0-alpha7",
+        "propel/propel": ">=2-alpha.1,<=2-alpha.7",
         "propel/propel1": ">=1,<=1.7.1",
         "pusher/pusher-php-server": "<2.2.1",
         "robrichards/xmlseclibs": ">=1,<3.0.2",
@@ -143,7 +143,7 @@
         "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7",
         "tecnickcom/tcpdf": "<6.2.22",
         "thelia/backoffice-default-template": ">=2.1,<2.1.2",
-        "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2",
+        "thelia/thelia": ">=2.1-beta.1,<2.1.3",
         "theonedemon/phpwhois": "<=4.2.5",
         "titon/framework": ">=0,<9.9.99",
         "truckersmp/phpwhois": "<=4.3.1",

and yeah we strip trailing zeroes for the main version, should I return those zeroes back? :thinking:

Looks awesome! :ship:

Trailing zeroes removal is 👍

Thanks @slash3b!

oh nice!
thank you : )


issue #7216

Issue Reference
#7216
Description
Now on adding configurable product the minimum quantity of the configurable product is showing on the user side

@jitendra-webkul
As we discuss. i am putting this PR on hold

@rachana-webkul
Not working, please find the screenshot Here

@rachana-webkul
Any update?

@rachana-webkul
The space should be according to the card content on the home page.

@rachana-webkul
Please resolve the conflicts

@rachana-webkul
Not working, The configurable product's price should be visible like: $10.00 As low as

@Sanjaybhattwebkul  now price-lable add

@Sanjaybhattwebkul
Conflicts resolved, please verify

@devansh-webkul
resolved issue, please verify.

@rachana-webkul
Not working, please find the screenshot Here

@Sanjaybhattwebkul
product label added, please verify

@devansh-webkul
spaces resolved ,please verify

@Sanjaybhattwebkul
configuration price fixed,please verify

@devansh-webkul
changes done,please verify

@rachana-webkul
Not fixed, the product is wrong on the home page,

@Sanjaybhattwebkul
conflict resolved, please verify

@Sanjaybhattwebkul
configurable variant price changed,please verify

@Sanjaybhattwebkul
product price fixed for configurable products,please verify

@Sanjaybhattwebkul
lowest variant price of configurable product is visible, please verify

@Sanjaybhattwebkul  conflicts resolved,please verify

@rachana-webkul
Still getting the same issue. please find the screenshot Here

@Sanjaybhattwebkul  it's working please verify

@rachana-webkul
This is working fine.

@rachana-webkul
with the tax on the Product page tax message layout is not set.Here

@rachana-webkul with the tax on the Product page tax message layout is not set.Here After deleting a variant product. It is not adding products to the cart. Here

Is this reproducible in master, if so then we will fix in the new issue as this pull request scope is to get the min price from all variants.

@devansh-webkul
The above issues are not replicated in the master.


fix bug: p.pendingTracksLock.Unlock() when mid is empty

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


Coder: add new method dropdown is out of bounds

The "new method" dropdown is not fully visible:

The "add new method" dropdown position is exemplified:

and properly positioned inside of the space bounds:


Suggestion to improve the view parser

The way you parse the views currently is quite buggy, it can fail if comments or parens are present in strings.
A better strategy would be to use a single regex that matches strings, comments and the /l\s*(/, and ignore the strings/comment matches.
Something like this would do:
L_MATCHER = /((?:^|[^\w\d$])l\s*\()|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\/|\/\/.*?\n/g

function findL(str, i) {
  var match;
  L_MATCHER.lastIndex = i;
  while (match = L_MATCHER.exec(str)) if(match[1] != null) {
    return match.index + match[1].length;
  }
}

You could also use a similar strategy to match parentheses.
PAREN_MATCHER = /[()]|"(?:\\.|[^"\n])*"|'(?:\\.|[^'\n])*'|\/\*[\s\S]*?\*\/|\/\/.*?\n/g
then ignore cases where match[0] is not a parenthesis.

Thanks! Will look into this

Note that the above RegExps code doesn't take template literals into account. Parsing them properly is even more complex since you have to ballance {/} within interpolated expressions...

I'm not sure this approach is worth pursuing further at all. The function call regex/replace will break non-local variable references. Here's a simple test case:
const { r, l: x, mount, component } = radi;

const counter = component({
  view: function() {
    return (
      r('button', {onclick: this.up}, 'Click me ', x(this.counter))
    )
  },
  state: {
    counter: 0
  },
  actions: {
    up() {
      this.counter += 1;
    },
  }
});

mount(new counter(), document.body);

const input = document.getElementById('0');

So if l is renamed (which may happen, for example, if a bundler or a minifier renames it), things break.
Using any library will also break:
const { r, l, mount, component } = radi;

function format(date) {return date.toString();}

const counter = component({
  view: function() {
    format(new Date());
    return (
      r('div', format(new Date))
    )
  },
  state: {
    counter: 0
  },
  actions: {
    up() {
      this.counter += 1;
    },
  }
});

mount(new counter(), document.body);

const input = document.getElementById('0');

I came here to report similar findings to lhorie above.
I do not feel the current approach is sustainable.

Yes this approach is not great, but as a prototype it somewhat works for now.
I had plans of doing stuff like this in jsx (that would remove that clunky l() bind) or separate compiler (what could allow radi to modify js syntax as pleased) for radi, I just have not yet decided which approach to take.

One argument against introducing odd/non-official js syntax with a separate compiler to put it all back together could be that every extra tool necessary for building something with radi other than the community standards like babel/webpack/npm/..., would hinder adoption efforts in the future.
If l() can be eliminated, all the better of course. Although I do like the explicit binding.

@ambewas I agree. The purpose of that compiler would not be to replace js syntax, but to introduce better syntax for radi's clunky stuff only.
For example one wild idea for replacing l():
...

   My name is { this.person.name } {{ this.person.lastname }}

...

{ .. } - could be static
{{ .. }} - could be dynamic, like l() is right now
This is just an idea, don't take this as a proposal tho. 😄
Just wanted to explain what I mean by creating a "new syntax".

Would it not work to have l be a true export and trigger dynamic binding through calling it?
Currently the only reason to import l is to prevent variable undefined lint errors.

I implemented a dynamic l function here. It's far from done but it's dynamic.

With the current setup, I do not believe it is even possible to compose elements or accept props.
Am I missing something?
const Counter = component({
  view () { return
<button />{ l("0") }<button/>
 }
})

const Main = component({
  view () { return <Counter /> }
})
// ERROR: Counter is undefined

@schtauffen Lack of documentation currently makes testing of actual framework a bit hard, but it is possible.
Currently you need to register component globally with register function like so
...

register( component({
   name: 'Counter',
   view () { return
<button />{ l( this.count ) }<button/>
 },
   props: {
      count: 0   // Sets default value
   }
}) )

...

const Main = component({
  view () { return <Counter count={0} /> }
})

Altho I did not test this current code right now. But this is how it should work now.

Maybe check Surplus for inspiration, looks a bit similar concept wise but requires a compilation step... which Radi probably needs for removing that new Function (eval) stuff.
https://github.com/adamhaile/surplus

With merging refactor into master, this is no longer relevant