Error in dump software versions

Description of the bug
When testing the small test dataset I got this error.
Aug-09 22:46:16.934 [Task monitor] ERROR nextflow.processor.TaskProcessor - Error executing process > 'NFCORE_PLANTPATHSURVEIL:PLANTPATHSURVEIL:CUSTOM_DUMPSOFTWAREVERSION

Caused by:
  Process `NFCORE_PLANTPATHSURVEIL:PLANTPATHSURVEIL:CUSTOM_DUMPSOFTWAREVERSIONS` terminated with an error exit status (1)

Command executed [/nfs7/BPP/Chang_Lab/paradarc/nf_brady_N120/scripts/nf-core-plantpathsurveil/./workflows/../modules/nf-core/custom/dumpsoftwareversions/templates/dumpsof

  #!/usr/bin/env python3

  import platform
  from textwrap import dedent

  import yaml

  def _make_versions_html(versions):
      html = [
          dedent(
              """\

                           Process Name
                           Software
                           Version

              """
          )
      ]
      for process, tmp_versions in sorted(versions.items()):
          html.append("
")
          for i, (tool, version) in enumerate(sorted(tmp_versions.items())):
              html.append(
                  dedent(
                      f"""\

  for process, process_versions in versions_by_process.items():
      module = process.split(":")[-1]
      try:
          if versions_by_module[module] != process_versions:
              raise AssertionError(
                  "We assume that software versions are the same between all modules. "
                  "If you see this error-message it means you discovered an edge-case "
                  "and should open an issue in nf-core/tools. "
              )
      except KeyError:
          versions_by_module[module] = process_versions

  versions_by_module["Workflow"] = {
      "Nextflow": "23.04.2",
      "nf-core/plantpathsurveil": "1.0dev",
  }

  versions_mqc = {
      "id": "software_versions",
      "section_name": "nf-core/plantpathsurveil Software Versions",
      "section_href": "https://github.com/nf-core/plantpathsurveil",
      "plot_type": "html",
      "description": "are collected at run time from the software output.",
      "data": _make_versions_html(versions_by_module),
  }

  with open("software_versions.yml", "w") as f:
      yaml.dump(versions_by_module, f, default_flow_style=False)
  with open("software_versions_mqc.yml", "w") as f:
      yaml.dump(versions_mqc, f, default_flow_style=False)

  with open("versions.yml", "w") as f:
      yaml.dump(versions_this_module, f, default_flow_style=False)

Command exit status:
  1

Command output:
  (empty)

Command error:
    File ".command.sh", line 59
      versions_by_process = {**yaml.load(f, Loader=yaml.BaseLoader), **versions_by_process}
                                                                                ^
  TabError: inconsistent use of tabs and spaces in indentation

Work dir:
  /nfs7/BPP/Chang_Lab/paradarc/nf_brady_N120/scripts/nf-core-plantpathsurveil/work/27/8b6f3ed6a6cbe122d597022cb5c159

Command used and terminal output
No response
Relevant files
I ended it up fixing the script by replacing the line that gave the error with:
 versions_by_process = {**yaml.load(f, Loader=yaml.BaseLoader), **versions_by_process}
This actually worked. But I am not experienced with python.
System information
No response

I think this has been fixed. Can you confirm?

This should be fixed now


add an option to only search in current project folder

Hi,
I'm the kind of guy who always have at least ten project folder opened (one for school, one for personal project, ...) and Todo (the package) search todos (the markers) in every project, but I only want the ones from the active project, because it make the search time long even for project with 20-30 files.
Is it possible to have an option for this kind of things ?

It currently searches the "workspace."  If there's something in the API to get the current project, it should be easy to add.

You could probably leverage getDirectories to do this.  Any interest in submitting a PR, @jonatjano?

Well I never done or even looked at atom plugin (nor coffee-script) so I don't know how it works.
I'll see if I can find how it works but it is possible that it will take some time.

I haven't done it in a while, so I don't recall of the top of my head!  I don't have Atom on this machine, so I can't say specifically what you need to do.  This may help.
https://stackoverflow.com/a/37930815/1319850
https://blog.github.com/2016-08-19-building-your-first-atom-plugin/

Thank you I'll look at it when I get home ;)

memo for me : https://atom.io/docs/api/v1.26.0/Workspace#instance-getTextEditors

some interesting thing I just found :grinning:

while src/server and src/github.com are in two totally different package :smile:
their absolute path are :

/home/jonatjano/Documents/git/gameController/src/server
/home/jonatjano/go/src/github.com

Feeling like my PR will also solve issues #37 and #33

memo (again) : some files are always ignored:
'.git', 'CVS', '.svn', '.hg', '.lock-wscript', '.wafpickle-N', '..swp', '.DS_Store, ._', 'npm-debug.log', '.npmrc', 'node_modules', 'config.gypi', '*.orig', 'package-lock.json'
I'm adding an option to ignore them by default with a checkbox :smile:

Thanks you @jonatjano!  I'll try and follow up with this stuff later tonight.


Deprecation fix

This PR:

Adds/changes/removes...

Testing

[ ] Fresh install works.
[ ] Upgrade from previous version works.

Checklist

[ ] Update changelog in CHANGELOG.md.
[ ] Make sure values.yaml is valid.

opened in error - sorry


No-swipe (animation) isn't working

Hi, I'm working with this beautiful code, but now I was wondering that the no-swipe class isn't working.
I only want people to swipe it up and down, and don't swipe it away.
I really don't know how to fix this animation.
Thanks!

I don't understand what do you mean.


1 leaked semaphore objects to clean up at shutdown

Describe your environment

GPU: [cuda/amd/mps/cpu] M1 Max 64 GB 32 GPU
CPU arch: [x86/arm] arm
OS: [Linux/Windows/macOS] Mac OS 12.6
Python: miniforge3/bin/python3  3.9
Branch:  main,  v2.0.0

Describe the bug
I could not resist and tried generating image in larger resolution.
There appear to be 1 leaked semaphore objects to clean up at shutdown
Please see the console log below:

Image generation requested: {'prompt': 'dreamy landscape', 'iterations': 1, 'steps': 5, 'cfg_scale': 7.5, 'threshold': 0, 'perlin': 0, 'height': 2048, 'width': 1024, 'sampler_name': 'k_lms', 'seed': 953554622, 'seamless': False, 'progress_images': False, 'variation_amount': 0}
ESRGAN parameters: False
GFPGAN parameters: False
Generating:   0%|                                                                                | 0/1 [00:00<?, ?it/s]>> Sampling with k_lms starting at step 0 of 5 (5 new sampling steps)
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [01:45<00:00, 21.05s/it]
/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:705: failed assertion `[MPSTemporaryNDArray initWithDevice:descriptor:] Error: product of dimension sizes > 2**31'
zsh: abort      python3 ./scripts/invoke.py --web
(ldm) michaelezra@Michaels-MBP stable-diffusion % /Users/michaelezra/miniforge3/envs/ldm/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
warnings.warn('resource_tracker: There appear to be %d '

Seems to be a problem when saving the file (?)

Sampling with k_lms starting at step 0 of 5 (5 new sampling steps)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [01:56<00:00, 23.21s/it]

I managed to get to 100% (max 27GB RAM) but it crashed afterwards.

Tried with if psutil.virtual_memory().available / (1024**3) < 24: vs. if psutil.virtual_memory().available / (1024**3) < 12: which made me go to the else route -initially there for @Vargol and 8GB RAM- as I had<PHONE_NUMBER>8 available at that point, but still, it failed.
else:
            print(psutil.virtual_memory().available)
            if psutil.virtual_memory().available / (1024**3) < 24:
                slice_size = 1
            else:
                slice_size = min(q.shape[1], math.floor(2**30 / (q.shape[0] * q.shape[1])))

This time RAM did not jump above 20GB even after 100% on Activity Monitor, but the error remains the same.
It'd be interesting to test vs. an older version, to see if some change was introduced, or the error was always there.
PS: 1024x1024 worked fine.

Good news, I was able to render 1920x1920px image!

@michaelezra I could generate a 1920x1920 too.

Do we need a PR?

1920x1920 works, while 2048x1024 fails, which is a bit odd, since the larger one (1920x1920) works. It seems 2048 > 1920 has more importance than size.
In general, I'm pretty sure most (reasonably) large size combinations work, so I don't think a PR is urgently needed.
Nevertheless, it'd be interesting to see if this problem has always been there or was introduced recently.

1920x1920 works, while 2048x1024 fails,

Just out of interest does 1024x2048 work, perhaps something based on row size ?

I think the problem is here
slice_size 2048                                                                                | 0/1 [00:00<?, ?it/s]
slice_size 2048
slice_size 2048
slice_size 2048
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 8192
slice_size 2048
slice_size 2048
slice_size 2048
slice_size 2048
slice_size 2048
slice_size 2048
100%|| 1/1 [00:20<00:00, 20.94s/it]
slice_size2 32768

slice_size is in attention.py and slice_size2 model.py

Actually, no, the error is not there.

@Vargol In what file did you see this?

At some point the code wants to create a temporary tensor with more than 2,147,483,648 values
note if the values are 32bit floats that would be 64 GB tensor.

@Vargol In what file did you see this?

At some point the code wants to create a temporary tensor with more than 2,147,483,648 values
note if the values are 32bit floats that would be 64 GB tensor.

Sorry this wasn't in a file as such just the  deduction, its what the error message means in none technical language

return h3 this line runs in model.py.
But I'm not sure what gets called next.

It'll return to whence it came, where that call to model.forward came from , if you don't know where that is
you could print the backtrace before the return.
import traceback
traceback.print_stack()
return h3

Awesome! I learn something new every day in this repo :)
I think here's where it's failing
for i_level in reversed(range(self.num_resolutions)):
            for i_block in range(self.num_res_blocks+1):
                h = self.up[i_level].block[i_block](h, temb)
                if len(self.up[i_level].attn) > 0:
                    h = self.up[i_level].attn[i_block](h)
            if i_level != 0:
                h = self.up[i_level].upsample(h)

It gets to i_level 3 2 1 and then fails
Error: product of dimension sizes > 2**31

In particular, it fails on
h = self.up[i_level].upsample(h) when i_level is 1.

Here's some extra info.
h tensor sizes before and after
h = self.up[i_level].upsample(h)
-W2048 -H1024 (fails)
in torch.Size([1, 512, 128, 256])
out torch.Size([1, 512, 256, 512])
in torch.Size([1, 512, 256, 512])
out torch.Size([1, 512, 512, 1024])
in torch.Size([1, 256, 512, 1024])
fails

-W1920 -H1920 (succeeds)
in torch.Size([1, 512, 240, 240])
out torch.Size([1, 512, 480, 480])
in torch.Size([1, 512, 480, 480])
out torch.Size([1, 512, 960, 960])
in torch.Size([1, 256, 960, 960])
out torch.Size([1, 256, 1920, 1920])

okay, that seems to call
class Upsample(nn.Module):
def init(self, in_channels, with_conv):
super().init()
self.with_conv = with_conv
if self.with_conv:
self.conv = torch.nn.Conv2d(in_channels,
in_channels,
kernel_size=3,
stride=1,
padding=1)
def forward(self, x):
    x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest")
    if self.with_conv:
        x = self.conv(x)
    return x

specifically forward if I'm getting the hang of nn.Modules, I assume torch.nn.functional.interpolate scales the size of the tensor x by two, interpolating the new values.
Worth sticking print of the tensor shape before and after the call to torch.nn.functional.interpolate ?

Darn too slow :-)

1,  256, 512, 1024
so that would come out
512 x 1024 x 2048 =<PHONE_NUMBER>
so 1 G values, half of the 2 G values it fails at. I wonder if the conv function doubles it again while calculating
1, 256 x 1920x 1920 is just under 1G,  943,718,400 values

Following
-W1920 -H1920 (succeeds)
in torch.Size([1, 512, 240, 240])
out torch.Size([1, 512, 480, 480])
in torch.Size([1, 512, 480, 480])
out torch.Size([1, 512, 960, 960])
in torch.Size([1, 256, 960, 960])
out torch.Size([1, 256, 1920, 1920])

wouldn't this come out
-W2048 -H1024 (fails)
in torch.Size([1, 512, 128, 256])
out torch.Size([1, 512, 256, 512])
in torch.Size([1, 512, 256, 512])
out torch.Size([1, 512, 512, 1024])
in torch.Size([1, 256, 512, 1024])
in torch.Size([1, 256, 1024, 2048]) <--- prediction

instead of 512 x 1024 x 2048 =<PHONE_NUMBER>?

Yep, sorry for some reason I thought it was doubling the last  three values.

It's weird because 1920x1920 is larger than 2048x1024. And it's not like there's something special about 2048.
-W2048 -H512 (succeeds)
in torch.Size([1, 512, 64, 256])
out torch.Size([1, 512, 128, 512])
in torch.Size([1, 512, 128, 512])
out torch.Size([1, 512, 256, 1024])
in torch.Size([1, 256, 256, 1024])
out torch.Size([1, 256, 512, 2048])

torch.Size([1, 256, 512, 2048]) is exactly 2^28 and succeeds
torch.Size([1, 256, 1024, 2048]) is exactly 2^29 and fails
Since we're approximating 2^31 I wonder if there's some operation as you say that makes it scale even more and fails for exact powers of 2.
torch.Size([1, 256, 1920, 1920]) works and it's larger but it's not an exact power of 2.
I tried -W4096 -H512 and it failed, so it behaves the same way as -W2048 -H1024. Both exact powers of 2.

I've dumbed it down...
import torch

mps_device = torch.device("mps")

ix = torch.zeros(1, 256, 960, 960, device=mps_device)
iy = torch.nn.functional.interpolate(ix, scale_factor=2.0, mode="nearest")

print(str(iy.device))
print(str(iy.shape))

ix = torch.zeros(1, 256, 512, 1024, device=mps_device)
iy = torch.nn.functional.interpolate(ix, scale_factor=2.0, mode="nearest")

print(str(iy.device))
print(str(iy.shape))

Which crashes
% python test.py
mps:0
torch.Size([1, 256, 1920, 1920])
/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSCore/Types/MPSNDArray.mm:705: failed assertion `[MPSTemporaryNDArray initWithDevice:descriptor:] Error: product of dimension sizes > 2**31'
zsh: abort      python test.py

Unsurprisingly works on the CPU
(Dev_InvokeAI) davidburnett@Davids-Mac-mini InvokeAI % time python test.py
cpu
torch.Size([1, 256, 1920, 1920])
cpu
torch.Size([1, 256, 1024, 2048])

@Vargol maybe we can check if perfect power of 2 and >= 2^29 and then send to CPU (or always send to CPU -depending on performance)

Yep, I'm beginning to think that might be a solution
Just tried a few sizes and its only powers of two that break so far.
I think there's a issue raised on the torch GitHub for this, so similar I'm dig it out tomorrow and add this to the list.

https://github.com/pytorch/pytorch/issues/84039#issuecomment-1238777659

Thanks @Birth-san
I've added
https://github.com/pytorch/pytorch/issues/84039#issuecomment-1275804368

class Upsample(nn.Module):
    def __init__(self, in_channels, with_conv):
        super().__init__()
        self.with_conv = with_conv
        if self.with_conv:
            self.conv = torch.nn.Conv2d(in_channels,
                                        in_channels,
                                        kernel_size=3,
                                        stride=1,
                                        padding=1)

    def forward(self, x):
        x_size = x.size()
        if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available() and (x_size[0] * x_size[1] * x_size[2] * x_size[3]) % 2**27 == 0:
            x = torch.nn.functional.interpolate(x.to('cpu'), scale_factor=2.0, mode="nearest")
            if self.with_conv:
                x = self.conv(x).to('mps')
        else:
            x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest")
            if self.with_conv:
                x = self.conv(x)
        return x

But there is still Error: product of dimension sizes > 2**31 later on.

So basically this is the code to reproduce it.
def forward(self, x, temb):
        x_size = x.size()
        if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available() and (x_size[0] * x_size[1] * x_size[2] * x_size[3]) % 2**29 == 0:
            x = x.to('cpu')
        h = self.norm1(x) # <- fails

Additionally to
class Upsample(nn.Module):
    def __init__(self, in_channels, with_conv):
        super().__init__()
        self.with_conv = with_conv
        if self.with_conv:
            self.conv = torch.nn.Conv2d(in_channels,
                                        in_channels,
                                        kernel_size=3,
                                        stride=1,
                                        padding=1)

    def forward(self, x):
        x_size = x.size()
        if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available() and (x_size[0] * x_size[1] * x_size[2] * x_size[3]) % 2**27 == 0:
            x = torch.nn.functional.interpolate(x.to('cpu'), scale_factor=2.0, mode="nearest")
            if self.with_conv:
                x = self.conv(x)
            x = x.to('mps')
        else:
            x = torch.nn.functional.interpolate(x, scale_factor=2.0, mode="nearest")
            if self.with_conv:
                x = self.conv(x)
        return x

Note below it's 2^27 because we've yet to upscale 2 items by 2. Above, we already have the tensor with size 2^29

Got it to work.

def forward(self, x, temb):
        if hasattr(torch.backends, 'mps') and torch.backends.mps.is_available():
            x_size = x.size()
            if (x_size[0] * x_size[1] * x_size[2] * x_size[3]) % 2**29 == 0:
                self.to('cpu')
                x = x.to('cpu')
            else:
                self.to('mps')
                x = x.to('mps')
        h = self.norm1(x)
        h = silu(h)
        h = self.conv1(h)

After patch:
"beautiful landscape" -s 15 -S<PHONE_NUMBER> -W 2048 -H 1024 -C 7.5 -A k_lms
1 image(s) generated in 770.19s

"beautiful landscape" -s 50 -S<PHONE_NUMBER> -W 512 -H 512 -C 7.5 -A k_lms
1 image(s) generated in 30.70s

 "beautiful landscape" -s 15 -S<PHONE_NUMBER> -W 1024 -H 1024 -C 7.5 -A k_lm
1 image(s) generated in 111.11s

It is working. Only weird thing is that my small image is different...
Without patch 2048x1024 crashed on semaphore after more than hour.

Created PR https://github.com/invoke-ai/InvokeAI/pull/1081, this time for correct branch

Yeah, sorry, copied the wrong seed!

Well, this is looking good! I'll wait for @Vargol still because he has 8GB, just it make sure it also works there.
@skurovec Btw, do you have 32 or 64GB M1?

32GB

Damn, your Mac is fast! Maybe M2?

M1 Max 32GB
At this time I have problem only with textual inversion, so slow...

Oh, I remember. We routed 32GB - 64GB - 128GB M1 to use the code in attention.py, so that's why our times are so similar. Awesome!
Maybe open a new issue with the TI problems and we can compare performance there. It's code that has not been optimised for RAM size like attention.py has been, so maybe that's why it performs considerably worse.

Thank you!:)

hmoss on discord pointed out that it is still doing it on 64x64 images, which i can confirm on patched branch

Maybe we do it for all powers of two?

64x64 fails <--
128x64 works
128x128 works
256x128 works
256x256 works
512x256 works
512x512 works
1024x512 works
1024x1024 works
2048x1024 works

I don't know if it related, but small images on mac are just colorful noise, smallest somewhat meaningful image on mac I can produce is 320x192
128x128 banana sushi

Not just that. If I specify 128x128
"upper body photo of a gorgeous young woman in the style of stefan kostic, realistic, sharp focus, 8k high definition, insanely detailed, intricate, elegant, art by stanley lau and artgerm"   -C7.5 -Ak_lms -S1448898012 -W128 -W128
I get
128x512

ok, maybe we should try someone with cuda, if it is issue on mac or that model was trained on 512x512 and can't create such small images

If it really behaves this bad and it's not a fixable bug, maybe just do a 512x512 and then scale down the image to the desired size would be a fix.

"upper body photo of a gorgeous young woman in the style of stefan kostic, realistic, sharp focus, 8k high definition, insanely detailed, intricate, elegant, art by stanley lau and artgerm" -C7.5 -Ak_lms -S1448898012 -W128 -H128
also I have different image with same seed, again

I have also sd 1.4, just double checked, but full ema

Do you have self.sigmas = self.karras_sigmas?

ksampler 101? self.sigmas = self.karras_sigmas

Yep, in ksampler.py
Well this looks interesting. Would a third M1 produce a third different result, or do we have a different codebase?

pruned model is same as yours, interesting

Oh, interesting.
Is it the same for 512x512?

all images I have produced in this issue are from full ema and are same as yours

So at 512x512 both behave the same way, but at lower sizes they don't?

I'll try, give me a sec

No, they are different all the time, just the differences are so small that nobody noticed
Just more visible in smaller images
512x512 448x448 256x256

I match @Any-Winter-4079 's and I'm using the pruned model cos the full ema one won't fit in my memory :-)

Someone with cuda, let us know if you see bad quality on e.g. 128x128

I don't know if it related, but small images on mac are just colorful noise
128x128 banana sushi

think this is a known problem. @justinpinkney has a fine-tuned model for small images:
https://twitter.com/Buntworthy/status/1580575210641960961

Not public yet, right?

Any updates on this issue? I just upgraded to 2.3.0 from 2.2.5 and the error appears if one of the dimensions is greater than 704. With 2.2.5 it was working well. I'm on a Mac M1 with 64GB ram.

Hey everyone, I recently got this same error.
Did anyone find a fix to it yet?


feat(quantic): Fix Breadcrumb values for screen readers

https://coveord.atlassian.net/browse/SVCC-2271
https://coveord.atlassian.net/browse/SVCC-2276
https://coveord.atlassian.net/browse/SVCC-2284
The breadcrumb values are now accessible when pressing TAB (before you couldn't tab to each of these values and pressing enter was not doing anything either):

And the text that is said when reaching this value with screen readers has been fixed:
It was : facetValue facetValue being said
Now it is: facetValue facetName clear button that is being said.
To be able to do that I added 2 new attributes to the quanticPill a groupName used for the facet name, and an actionName for screen readers.
I added a few parts in the tests where we check for the value of the slds-assistive-text that gets passed down to the quanticPill and I made sure the cypress selectors were not broken either.

can the reader system tell you how many breadcrumb buttons you have in total?
Don't forget about 1 more, 2 more buttons when you have too many facets, and it collapses into X more button...

While I was at it I also fixed the "x more..." button and the "clear all filters" which were also not made correctly:

The "x more..." now says: x more button while the clear all says: clear all filters button.

Don't forget about 1 more, 2 more buttons when you have too many facets, and it collapses into X more button...

yup thanks I realized I had forgotten about those ;)

can the reader system tell you how many breadcrumb buttons you have in total?

The windows reader doesn't tell me this, but the way the HTML is structured it respects the requirements to be able to do that, one parent ul element and only li elements under it.

While I was at it I also fixed the "x more..." button and the "clear all filters" which were also not made correctly:

Correction: they were not "not made correctly" they were just discriminatory and should have been made differently. /s

Ok, kk, I will check it later, thanks!

Don't forget about 1 more, 2 more buttons when you have too many facets, and it collapses into X more button...

yup thanks I realized I had forgotten about those ;)

can the reader system tell you how many breadcrumb buttons you have in total?

The windows reader doesn't tell me this, but the way the HTML is structured it respects the requirements to be able to do that, one parent ul element and only li elements under it.


BEM compliant grid naming

The grid component currently is not following BEM naming.
mdl-cell should be mdl-grid__cell for example.
mdl-cell--hide-{whatever} when refactored should become mdl-grid--hide-{whatever} as per issue #1159 and #1162.

Closing; superseded by #4498


Ignite 12841 Test PR to verify codestyle check is actually working

This PR is associated with a resolved ticket. Closing the PR, please reopen it if you still need it.


model_json_schema should not serialize the corresponding value or provide a json_encoder option

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
The object returned by model_json_schema is a dict, but the value in the dict is serialized, which is very strange.
In this scenario, when one of the extra parameters is a Python object, it causes the model_json_schema execution to fail, e.g:
from pydantic import BaseModel, Field, version

class Faker(object):

    def __str__(self):
        return 1

class Demo(BaseModel):
    aaa: int = Field(example=Faker())

print(version.VERSION)
print(Demo.model_json_schema())

Under normal circumstances model_json_schema should not serialize the returned dict, if you must do so, you should provide a json_encoder option.
Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[ ] Data serialization - .model_dump() and .model_dump_json()
[X] 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.

Hi @so1n,
Thanks for adding this feature request.
the model_json_schema function returns a jsonable dict of python data.  As mentioned in your related issue #7772, I'll add a docs update today to make this behavior more clear, as it has confused a few people.
You can see other examples of where this comes into play on these issues:
#7042
#7609
If you desire to customize the json schema generation, you can reference this section of the docs regarding how to do that (I think this fits your request for a custom json encoder, effectively).
Let us know if you have any questions 😄.

Also, as you mentioned in your comment here, you can sort of game the json_schema_extra with a callable to inject the value you're desiring.
Just note, you're violating the json serializable nature then of the result:
import json
from pydantic import BaseModel, Field

class Faker(object):
    value = 1

class Demo(BaseModel):
    aaa: int = Field(json_schema_extra=lambda v: v.update({"example": Faker()}))

print(json.dumps(Demo.model_json_schema()))
"""
TypeError: Object of type Faker is not JSON serializable
"""

@sydney-runkle
The model_json_schema returns a serialized dict, which is a very strange thing to do.
I think model_json_schema should return a serialized json string and add a new model_json_schema_dict method to return a dict that will not be serialized.

Hey @so1n,
Thanks for following up. I've added a docs update to clarify the nature of the value returned from model_json_schema here.
Modifying the behavior of model_json_schema in such a way would be a pretty significant breaking change, so that isn't something we can do at the moment. However, as shown with the workarounds above, if you need to, you should be able to inject python objects in your schema where desired.
We discuss the different JSON Schema related functions in the docs in more detail.


Not able to start route53 srevice.

Server version - Build from master
Try to launch route53 service from catalog.
Container - route53_route53_1 keeps restarting.
Following exception is seen in container logs:
1/13/2016 1:09:51 PMtime="2016-01-13T21:09:51Z" level=fatal msg="Error reading stack info: json: cannot unmarshal object into Go value of type string"
1/13/2016 1:10:00 PMtime="2016-01-13T21:10:00Z" level=fatal msg="Error reading stack info: json: cannot unmarshal object into Go value of type string"
1/13/2016 1:10:09 PMtime="2016-01-13T21:10:09Z" level=fatal msg="Error reading stack info: json: cannot unmarshal object into Go value of type string"

New template v0.2.1 was released for DNS. @sangeethah could you test following use cases:

fresh deploy using the latest version
Upgrade existing erroring out service to the new version

1.Deploying v0.2.1 version of "Route 53" works fine. Able to see the record sets getting programmed as expected.
2.Deployed v0.1.7 version of "Route 53"  where route53_route53_1 keeps restarting. Upgrade to v0.2.1 version of "Route 53" . After upgrade , "Route 53" service works fine. Able to see the record sets getting programmed as expected.


Failed to download Windows x64 JDK 16 via api

Summary
When Gradle tries to provision JDK 16 for Windows x64 - it fails with "Read timeout"
Steps to reproduce
Create a new Gradle 7.1 project with following setup in build.gradle:
java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(16))
    }
}

And try to run the build on Windows machine without JDK 16 installed. Note that Gradle, in this case, still calls to deprecated adoptopenjdk.net api.
Expected results
JDK is provisioned by Gradle
Actual results
Unable to download toolchain matching these requirements: {languageVersion=16, vendor=any, implementation=vendor-specific}
     > Could not GET 'https://objects.githubusercontent.com/github-production-release-asset-2e65be/372925054/7885caaf-2f2b-4c90-9cde-c9c0ea8c567a?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20211103%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20211103T214726Z&X-Amz-Expires=300&X-Amz-Signature=cb16d04bbcc571d59c70051437f465275955b1c5b73d259b52f4eef8a782559a&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=372925054&response-content-disposition=attachment%3B%20filename%3DOpenJDK16U-jdk_x64_windows_hotspot_16.0.2_7.zip&response-content-type=application%2Foctet-stream'.
        > Read timed out

Triaging info
Operating system: Windows Server 2019 10.0
Java runtime: Amazon.com Inc. OpenJDK Runtime Environment 1.8.0_272-b10
Java VM: Amazon.com Inc. OpenJDK 64-Bit Server VM 25.272-b10 (mixed mode)
Did it work before? - yes
Did you test with other Java versions? - no

Can you see what the call to the AdoptOpenJDK API looks like?  This might be a bug on Gradle's end.

Unfortunately no - could get it as issue is flaky on our CI agents. Seems it is rather problem with Github itself then with API.


Fix some resolutions, upgrade types packages, and fix typos

What:

Fix React package resolution
Fixed and upgrade react types package versions
Fixed method name typo

@apoorv1316 can you run a smoke test on this?

Working fine locally. Reran the checks. Can merge on green


Fix build for MSVC.

Add missing headers to the 'helpers.hpp'.

Hi @SergeySeroshtan Thanks for the Pull request. What version of MSVC did you compile against? Also maybe it would be a good idea to add a continuous build with appveyor to compile against MSVC?

Used toolchain:

cmake 3.2.2
nmake of MSVC 2015

Add continuous build with appveyor to compile against MSVC is a good idea, but it will take some time due to libcurl dependency.

I will merge this Pull Request and I can create an issue about appveyor support so it can be tracked there.
Thanks

#1


[Bug] Terminate on long runtime

Describe the bug
When running the client overnight it was terminated without dumping to a panic log.
To Reproduce
Steps to reproduce the behavior:

Run client for a long duration eg; 24 hours.

Expected behavior
All exceptions currently terminate the application, this is to be expected to force a lot of debug info to be provided so we can catch our issues rather then letting these go unnoticed, however a panic dump should be created at all times with terminations.

can not be reproduced with 0.3.0 if reproduced we will need additional log/panic info, closing for being unable to act upon further.

can not be reproduced with 0.3.0 if reproduced we will need additional log/panic info, closing for being unable to act upon further.


StopWatch does not login to my instance

Running latest Jira cloud version, after I install the application there is no popup to prompt for username and password and the app does not seem to login to my jira instance

Try to click on the padlock. Then you can add your username and password.

When clicking on the padlock it says: "Jira StopWatch could not connect to your Jira server. Error returned:"
the configured jira base url is: "https://tremend.atlassian.net"

You are not clicking on the padlock - you are clicking on the text next to the padlock. Try to click on the padlock.

works. 10x
On Mon, Feb 6, 2017 at 11:46 AM Carsten Gehling<EMAIL_ADDRESS>wrote:

You are not clicking on the padlock - you are clicking on the text next to
the padlock. Try to click on the padlock.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/carstengehling/jirastopwatch/issues/52#issuecomment-277632386,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AQ_7wtut1bfwr70kFue6Htzo7InJAuCNks5rZuvigaJpZM4LyzC8
.

--
[image: Tremend Logo]
Dan Dorneanu
QA Manager
[image: Mobile] +40740471901   [image: Phone] +40-212-237-700
<0040212237700>
[image: Email]<EMAIL_ADDRESS> [image: Website] www.tremend.com
[image: Facebook] https://www.facebook.com/TremendSoftware  [image:
LinkedIN] https://www.linkedin.com/in/dan-dorneanu-8128a0116  [image:
Skype] https://is.gd/DtQDiJ
Fastest growing Romanian company in Deloitte Fast 50 CE

Great!


Feature Request: Check for unused returned RxJS Subscription objects

IMO, the following is the best way to unsubscribe from Rx subscriptions you create in your components. It uses the very simple chained IDisposable-esque interface of a Subscription for exactly its intended purpose.
destroy = new Subscription();
 ...
this.destroy.add(someObservable$.subscribe(() => {
    // ...
}));
...
ngOnDestroy() {
    this.destroy.unsubscribe();
}

Unlike other methods (think destroy = new Subject(); takeUntil(destroy$).subscribe(...)), it's not hard to statically check if the subscription will eventually be unsubscribed. It would be awesome if Codelyzer could check for the anti-pattern:
someObservable$.subscribe(() => { ... });
// or
const subscription = someObservable$.subscribe(() => { ... });
// where there is a warning: unused variable subscription

This would likely catch more bugs than all other codelyzer rules combined. I don't think you would need to check for used-but-not-unsubscribed, this is good enough. I don't know if it's possible or not, though. Can anyone comment on feasibility?

@cormacrelf TypeScript 1.6 will warn you if you are not reading a private variable, which handles the second case. The first one should be easy to catch by codelyzer, although without type checking it'll be more of a guess rather than a proof.

Do you get type checking in Tslint? It may be more broadly applicable to implement there instead, come to think of it.

On 29 Nov 2017, at 12:59 pm, Minko Gechev<EMAIL_ADDRESS>wrote:
@cormacrelf TypeScript 1.6 will warn you if you are not reading a private variable, which handles the second case. The first one should be easy to catch by codelyzer, although without type checking it'll be more of a guess rather than a proof.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Yes, you can use the type checker in tslint rules but this has a price:

Slower linting
VSCode doesn't support type checking in their tslint extension

Ok. I’d want this in any Rx project, so I’ll file on tslint and maybe have a go. Thanks for the help!


Allow user to search public short links & the private short link they created

User should be able to search the public and the private short links they created. This involves

Add a search box in the header in React
Add search service in React
Create RESTful search API in Go

Please create a separate issue for each litem listed here and link them back to this one.

@byliuyang can I pick Create RESTful search API in Go part?

Hi @lucifercr07, could you please discuss your design here?

@byliuyang can you please assign this issue to me? I am going through the project currently, will layout design in upcoming week.

Hi @lucifercr07 , can you leave a comment at #260 so that I can assign it to you?


Add RBACK for rbd provisioneer

Please add rbac example for  rbd provisioneer. I'm getting:
E1114 11:46:10.392866       1 reflector.go:201] github.com/kubernetes-incubator/external-storage/lib/controller/controller.go:412: Failed to list *v1.PersistentVolume: persistentvolumes is forbidden: User "system:serviceaccount:default:default" cannot list persistentvolumes at the cluster scope

on k8s 1.8 and  adding admin caps for system:serviceaccount:default:default doesn't looking reasonable.
@cofyc, @rootfs ?

those used by gluster block should work
https://github.com/kubernetes-incubator/external-storage/tree/master/gluster/block/deploy


Updates to the README

The readme.md is fixed according the Commonmark standard.
I also added a new Up and running section to inform the users about the development releases which should be used.

Should I make any changes here? @sharkwouter


Fixes styling in bootstrap environment

Fixes #1588 thanks to @smajl
May need additional work.

+1

@gandarez Please create a new ticket if this is still affecting you in 3.5.2 or 4.0.0.

sorry @kevin-brown it's working. I'd say thank you.


OneNote-tab in Microsoft Teams asks to accept cookies

We added a OneNote-File as a new tab in a channel. Everything is fine when I open the tab. But a colleague gets the message displayed above the OneNote, that the website uses cookies and by using the website he accepts their usage. The problem is he can't get rid of the message and it uses quite some space on the screen.

Dokumentdetails
⚠ Bearbeiten Sie diesen Abschnitt nicht. Er ist für die Verknüpfung von docs.microsoft.com zum GitHub-Artikel erforderlich.

ID: 8d33f55c-db55-923e-544f-fccb97f3c7a3
Version Independent ID: 9cb02e00-311e-ec7d-c422-ae1cb9e6d31e
Content: Verwenden von integrierten und benutzerdefinierten Registerkarten in Microsoft Teams
Content Source: Teams/built-in-custom-tabs.md
Service: msteams
GitHub Login: @LolaJacobsen
Microsoft Alias: lolaj

@foriamkate Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

@foriamkate
thank you for submitting feedback.
I think the best way forward is if you open a service ticket in your tenant so this can get resolved ASAP. Based on the outcome let me know if it is something that can be called out in the docs.
Please follow this link to contact support for business products:https://docs.microsoft.com/office365/admin/contact-support-for-business-products
Please keep us posted here on the resolution so we can feed whatever information you discover into the content.


--client-id --> --extension-id

Good catch! We should make sure that this doesn't happen elsewhere


Doc: Rustdoc for the crate/uopool

Created the Rustdoc for the uopool crate

It seems there are some problems with CI. @zsluedem do you know maybe what's the problem?

Very wired. Sometimes I could reproduce it locally. Very strange bug. None production codes are changed.

@da-bao-jian We fixed the the problem. But you need to rebase and push again.

@da-bao-jian We fixed the the problem. But you need to rebase and push again.

@da-bao-jian we also merged the db reputation PR, which changes some things in this crate (sorry for that). if you want, you can add docs for db reputation as well, or I can add it later, as you wish

@da-bao-jian We fixed the the problem. But you need to rebase and push again.

@da-bao-jian we also merged the db reputation PR, which changes some things in this crate (sorry for that). if you want, you can add docs for db reputation as well, or I can add it later, as you wish

Sounds great.
I'll add the doc


Fixed calculation of oauth_body_hash, issue #2792

PR Checklist:

[x] I have run npm test locally and all tests are passing.
[x] I have added/updated tests for any new behavior.
If this is a significant change, an issue has already been created where the problem / solution was discussed: [N/A, or add link to issue here]

PR Description
FIxes https://github.com/request/request/issues/2792

@mikeal any thoughts when this can be addressed?

Thanks @dvishniakov :+1:

@simov Can we get the latest version published to NPM please?

Sure, I've published 2.84.0 with the fix.


more helpful error when /groups are POSTed to /apps

Here's a common first-time user error:

User POSTs a new app to /v2/apps and gets it working. Hurray.
User creates an app group in JSON and POSTs it to /v2/apps. An error is returned saying that the AppDefinition is wrong.
User spends 1hr examining JSON before rereading the docs and realising you're meant to switch over to /v2/groups for this.

Actions

In the /v2/apps endpoint, if the POSTed JSON looks like a groups definition, then add to the error message some guidance: JSON contains a 'groups' element - maybe you meant /v2/groups? or similar.
Add a note in the doc to point out that /groups and /apps are separate.

Example of groups definition:
{
  "id": "/bananas",
  "groups": [
  ...

Generally, I like the idea of providing useful error message. So thanks for your suggestion.
Yet, the consequence would be that we check for every requests that contains a malformed body if that body would be suitable for another endpoint. We should not burden our code with this complexity for a class of user error for which we even do not know how often it is a problem.
Since I do not see discussion of this issue, I will close it for now.  If anyone disagrees, please reopen with an explanation.


API can accept more than one format of Request body

Hi there,
Our API endpoint can accept multiple formats of JSON request body (via JSON Schema / anyOf).  Is there a way of instructing this validator (using @ValidateJson Annotations) to test an incoming body against multiple schemas & only trip if none of them are satisfied?
Thanks!

We got around the issue by bringing the validator in to the class and testing the body against multiple schemas - but that means bringing the validation inside the controller rather than "bolting it on to the front with an annotation".  Hey ho.


Add support for inviting/deleting users via Zitadel

Describe your changes
This fixes the "Invite User" button in Dashboard v2.0.0 and enables the usage of the --user-delete-from-idp flag for Zitadel.
Unlike the NetBird SaaS solution, we rely on Zitadel to send the emails on our behalf.
Issue ticket number and link
Refs: #855
Checklist

[ ] Is it a bug fix
[ ] Is a typo/documentation fix
[ X] Is a feature enhancement
[ ] It is a refactor
[ ] Created tests that fail without the change (if possible)
[ ] Extended the README / documentation, if necessary

 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.

FWIW, I realize the invite button was disabled in dashboard v2.0.1... sadly UI work is very much not my thing and I don't see an obvious way to detect the backend IDP or I'd make a PR there as well.

@synfinatic we can work on a dashboard support for it in a few weeks.
Can you fix the linter notes?


feat: Add Create Project menu to application menu

This PR...
Changes

Add Create project menu to application menu

Fixes

How to test it

Screenshots

Checklist

[x] tested locally
[ ] added new dependencies
[ ] updated the docs
[ ] added a test

If I have a project selected and I am not in the Start project pane, when I try to open a new project with Select folder it does nothing and if I go to the start project pane it automatically opens the folder explorer. Maybe we should show only a New project option that takes the user to the start project pane and from there he can select one of the options so it's consistent with the New project option from the project selector dropdown?

Thank you @topliceanurazvan for reporting - I think I have test it for this case but double-checking and fixing now

If I have a project selected and I am not in the Start project pane, when I try to open a new project with Select folder it does nothing and if I go to the start project pane it automatically opens the folder explorer. Maybe we should show only a New project option that takes the user to the start project pane and from there he can select one of the options so it's consistent with the New project option from the project selector dropdown?

I think that's an unnecessary step for the user - would prefer for these actions to work "directly".. @tommywhitehead  ?

I get the same issue as reported by @topliceanurazvan

I get the same issue as reported by @topliceanurazvan

yeah me too - fixing


add navPath from inside of WEditor

something that was on my todo-list for some time =)
very useful to tweak the options in a easy way.
http://forums.torque3d.org/viewtopic.php?f=12&t=161&start=10#p1498
http://forums.torque3d.org/viewtopic.php?f=12&t=161&start=20#p1547

PIC! :) This PR add this.


Use one port for the server and its config

It would be easier if we could deploy the server endpoint (the websocket) and the config endpoint under one URL, as now we need to deploy two hostnames, two TLS certs, etc.
The server could run under /ws for the websocket path (as it does now) and /config for the config server, instead of two different ports.

I'm a little confused by this - are you referring to the Willow Application Server endpoints?
If so, the UI currently uses Streamlit because @stintel and I don't have any frontend experience. The Streamlit UI should generally be considered a minimum PoC interface. Our goal is to work with the community to reimplement the Streamlit UI with a modern TS/JS framework that interacts with the existing WAS API.
With this approach we can mount the output HTML+JS+CSS path using FastAPI and eliminate Streamlit and the additional listening socket it uses.

@kristiankielhofner I am, yes. Does Streamlit prevent you from listening to the websocket URL in the same server?
Basically, my ideal workflow would be that the Streamlit UI is served under http://localhost:8501, and the websocket under ws://localhost:8501/ws. Is this possible right now?
Also, I think that a modern JS framework for a simple configuration interface might be a bit too heavy, especially for a resource-strapped OSS project. Do you absolutely need to be changing the settings over the WAS API? If not, you could write a very simple UI with some ready-made template with Flask and HTMX in a few hours and call it a day.

As best as we can tell, yes. We also didn't spend that much time investigating it because Streamlit has a variety of other issues that make it less than ideal for the WAS use case.
Yes, the API is necessary because another goal is to integrate WAS with Home Assistant and any other platforms to provide functionality and tighter integration with those platforms similar to esphome (in the case of Home Assistant).

As best as we can tell, yes. We also didn't spend that much time investigating it because Streamlit has a variety of other issues that make it less than ideal for the WAS use case.

That makes sense, thanks.

Yes, the API is necessary because another goal is to integrate WAS with Home Assistant and any other platforms to provide functionality and tighter integration with those platforms similar to esphome (in the case of Home Assistant).

Having the API is necessary, but do you need to be changing the settings over it (rather than writing to the database directly, for example)? It would be much simpler to write one or two views with plain HTML than have to maintain an entirely separate TS/JS codebase, but I guess it also depends on how much fancy you want the config UI to get.

Generally we build for where we're going, not where we are.
WAS is very much in its infancy. Long term we plan to implement a dedicated protocol utilizing websockets for all Willow functions to enable all kinds of interesting functionality (for things like your ChatGPT use case) where the flow looks more like:
Willow websocket to WAS -> speech to any STT platform -> interception of transcription -> any command platform/API/etc -> TTS of your choice -> output to Willow.
This has the benefit of not only being significantly more flexible but also reducing the complexity of the various command implementations (HA, OpenHAB, REST, etc) running on the Willow device.
Hopefully this helps to better understand our approach - the UI for this functionality will be significantly more complex and the API backend is an obvious requirement.

That makes sense, thanks for the info!


Could not find a valid element for given id or className

I'm using a react version of 16.13.1, while rendering EmailEditor of version 1.1.1, I'm getting the above issue.
Can someone help me it.
Thanks in advance

@adeelraza the issue still exists and you closed the issue without giving further answer or reference? Can we get an answer on why we're getting this error at least so we don't have to dig into the code.
There's only a PR but no solution, we're using the latest version and it seems to be broken.
Thank you!


Missing hyphens

Hello,
when creating a man page out of an ArgumentParser, the starting hyphen is not rendered.
So the option --yes is shown as -yes in the man page.
Similarly, a -y is shown as y.
I can reproduce the issue with the following code:
cd /tmp
rm -rf WORKDIR
mkdir WORKDIR
cd WORKDIR

sphinx-quickstart $PWD --extensions sphinxarg.ext --sep -p option_bug -a author -r 0.1 -l en --no-batchfile --makefile

cat >>source/conf.py <<EOF

man_pages = [
    ('cmd_main', 'tmpmain', 'tmpmain Documentation',
     ['name of author'], 1)
]

import sys
import os
sys.path.insert(0, os.path.dirname(os.getcwd()))

EOF

mkdir pymodule
touch pymodule/__init__.py
cat >pymodule/tmpmain.py <<EOF
#!/usr/bin/env python3
import argparse
def my_func_that_returns_a_parser():
    parser = argparse.ArgumentParser()
    parser.add_argument('foo', default=False, help='foo help')
    parser.add_argument('bar', default=False)
    parser.add_argument('--general', '-G', default=False, help='General option')

    subparsers = parser.add_subparsers()

    subparser = subparsers.add_parser('install', help='install help')
    subparser.add_argument('ref', type=str, help='foo1 help')
    subparser.add_argument('--upgrade', action='store_true', default=False, help='foo2 help')
    subparser.add_argument('-U', action='store_true', default=False, help='foo3 help')

    return parser
if __name__ == '__main__':
    p = my_func_that_returns_a_parser()
    p.parse_args()
EOF
chmod a+x pymodule/tmpmain.py

cat >source/index.rst <<EOF

Welcome to pymodule's documentation!
====================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   cmd_main
EOF

cat >source/cmd_main.rst <<EOF
.. argparse::
   :module: pymodule.tmpmain
   :func: my_func_that_returns_a_parser
   :prog: fancytool
EOF

make man

man build/man/tmpmain.1

This also happens to me.
It appears that in the generated man page the lines start with
.B\-\-foo

If I manually edit this to add a space after the B and before the first \- it looks good when viewed with man:
.B \-\-foo

yep, same here, first hyphen of --option gets lost as well as single hyphen of short form option. leaving manpage rendering unusable. Pretty frustrating as sphinx-argparse appeared to be a promising module for my needs. Found any workaround @lucc except manually editing the generated manpage file? Any other usable results with other tools? I am playing around with sphinxcontrib-autoprogram at the moment - this works a little better but does not have as much additional editing options as sphinx-argparse (like adding additional restructured text before or after certain sections in the generated manpages/html pages.
sorry, maybe this is not the right place to share experience with autogenerating manpage tools but as it's frustrating enough already I don't see another option :-)
and I really do hope that taking over maintenance of this repo as discussed in #135 works out in the end and bugs like this get fixed. Is there a PR open for a fix yet?

I had a look at the code yesterday but noticed that I don't have any idea how sphinx works and how a plugin can integrate with that (it is by no means a small script which you read through and understand the gist of it at a glance :smile: ).
I found this line: https://github.com/alex-rudakov/sphinx-argparse/blob/master/sphinxarg/ext.py#L152 but I did not look into running sphinx with a local checkout of this extension. Maybe we just have to add a space in from of term in case it is non empty. I was to lazy to dig into sphinx internals to test this hypothesis.


Row Focus Order Does Not Match Visible Order

The Tab key can be used to change the focused cell. If the final cell of a row is focused, the focus will move to the next row.
If the TreeDataGrid contains enough rows to be scrolled and the user scrolls up/down, or if the source collection is modified (e.g. items being inserted), using Tab to change the focus to the next row will often make the focus switch to a seemingly random row instead of the next row visible to the user.
After inspecting the visual children of the TreeDataGridRowsPresenter during runtime, the focus order of the rows seems to match the order these rows appear in the AvaloniaList<Visual>, which won't always match the order the user sees the rows.
The expected behavior is that the row focus order matches the visible order.
Environment:
TreeDataGrid Version: 11.0.2
Avalonia Version: 11.0.6
Operating System: Windows 10

Adding a video to see the issue more clearly:
Row Focus Issue.webm


[SMALLFIX] Fixing broken HTTP links

This PR fixes HTTP links that were broken after adding the "documentation" component to the URL path for most Tachyon project pages. Also, for consistency this PR changes instances of tachyonproject.org to tachyon-project.org.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/4610/
Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/Tachyon-Pull-Request-Builder/4613/
Test PASSed.

LGTM


Preventing overlaps or 2 schedules ?

Hi,
I would like to use this library to create multiple schedules that also have a time to run (TTR),
I would like to detect if somebody creates a schedule that overlaps with an already one that has been created.
Does this support it ?
Thanks in advance.

package main

import (
	"fmt"
	"github.com/robfig/cron/v3"
	"time"
)

// Job represents a cron job with its start time and duration
type Job struct {
	Spec     string
	StartTime time.Time
	EndTime   time.Time
}

// Scheduler that stores scheduled jobs and checks for overlaps
type Scheduler struct {
	c          *cron.Cron
	scheduledJobs []Job
}

// Create a new scheduler
func NewScheduler() *Scheduler {
	return &Scheduler{
		c:            cron.New(),
		scheduledJobs: []Job{},
	}
}

// Add a new job to the scheduler and check for overlaps
func (s *Scheduler) AddJob(spec string, duration time.Duration) error {
	// Check if there are overlapping jobs before adding this one
	nextRunTime, err := s.getNextRunTime(spec)
	if err != nil {
		return err
	}

	// Calculate the job's end time based on the duration
	endTime := nextRunTime.Add(duration)

	// Check for overlaps with existing jobs
	for _, job := range s.scheduledJobs {
		if (nextRunTime.Before(job.EndTime) && nextRunTime.After(job.StartTime)) || (endTime.After(job.StartTime) && endTime.Before(job.EndTime)) {
			return fmt.Errorf("job overlaps with an existing job scheduled from %v to %v", job.StartTime, job.EndTime)
		}
	}

	// Add the job to the cron scheduler
	_, err = s.c.AddFunc(spec, func() {
		fmt.Println("Running job at", nextRunTime)
	})

	if err != nil {
		return err
	}

	// Store the job's timing info
	s.scheduledJobs = append(s.scheduledJobs, Job{
		Spec:     spec,
		StartTime: nextRunTime,
		EndTime:   endTime,
	})

	fmt.Printf("Job scheduled from %v to %v\n", nextRunTime, endTime)
	return nil
}

// Get the next run time for a cron spec
func (s *Scheduler) getNextRunTime(spec string) (time.Time, error) {
	nextRunTime, err := s.c.Parse(spec)
	if err != nil {
		return time.Time{}, err
	}
	return nextRunTime.Next(time.Now()), nil
}

func main() {
	// Create a new scheduler
	scheduler := NewScheduler()

	// Add some jobs to the scheduler
	err := scheduler.AddJob("*/1 * * * *", 10*time.Minute) // Every minute for 10 minutes
	if err != nil {
		fmt.Println("Error adding job:", err)
		return
	}

	err = scheduler.AddJob("*/5 * * * *", 5*time.Minute) // Every 5 minutes for 5 minutes
	if err != nil {
		fmt.Println("Error adding job:", err)
		return
	}

	// Start the scheduler
	go scheduler.c.Start()

	// Keep the application running
	select {}
}


"BEGIN TRUSTED CERTIFICATE" is expected

Hi, I got this issue:
nginx: [emerg] cannot load certificate "/etc/nginx/ssl/": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
Found the solution here:
https://stackoverflow.com/questions/51899844/nginx-ssl-no-start-line-expecting-trusted-certificate/52085885
put -trustout into params of le.sh but still no luck.
Can anybody check and maybe update scripts?

I can't reproduce the issue. Can you share your compose pls and the part of nginx.conf related to ssl

can it be caused by 2 level domain? I'm trying to certify mydomain.mooo.com

Impossible to say without your docker-compose.yaml and nginx configuration. I have multiple domains including the second level ones and have no problems with them.

There wasn't much changes. Here I just put domain and email.
`version: '2'
services:
nginx:
    build: .
    image: umputun/nginx-le:latest
    hostname: nginx
    restart: always
    container_name: nginx

    logging:
      driver: json-file
      options:
          max-size: "10m"
          max-file: "5"

    volumes:
        - ./etc/ssl:/etc/nginx/ssl
        - ./etc/service-example.conf:/etc/nginx/service.conf
        # - ./etc/service-example-2.conf:/etc/nginx/service2.conf # more services, should be service*.conf
    ports:
        - "80:80"
        - "443:443"

    environment:
        - LETSENCRYPT=true
        -<EMAIL_ADDRESS>        - LE_FQDN=mydomain.mooo.com
        #- SSL_CERT=le-crt.pem
        #- SSL_KEY=le-key.pem
        #- SSL_CHAIN_CERT=le-chain-crt.pem

`
`user  nginx;
worker_processes  1;
error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;
events {
worker_connections  1024;
}
http {
include       /etc/nginx/mime.types;
default_type  application/octet-stream;
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                  '$status $body_bytes_sent "$http_referer" '
                  '"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

sendfile        on;

keepalive_timeout  65;
server_tokens off;

limit_conn_zone $binary_remote_addr zone=perip:10m;
limit_conn_zone $server_name zone=perserver:10m;

client_body_buffer_size  4K;
client_header_buffer_size 4k;
client_max_body_size 4k;
large_client_header_buffers 2 4k;

ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparams.pem;
ssl_stapling on;
ssl_session_cache shared:SSL:50m;
ssl_stapling_verify on;
ssl_ecdh_curve secp384r1;
resolver <IP_ADDRESS>;

gzip on;
gzip_types text/plain application/json text/css application/javascript application/x-javascript text/javascript text/xml application/xml application/rss+xml application/atom+xml application/rdf+xml;
gzip_min_length 1000;
gzip_proxied any;

add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";

server {
    listen 80;
    server_name mydomain.mooo.com;

    root   /usr/share/nginx/html;

    location /.well-known/ {}  # do not redirect requests letsencrypt

    location / {  # the default location redirects to https
        proxy_pass  http://<IP_ADDRESS>:8123/;
    }
}

include /etc/nginx/conf.d/*.conf;

}
stream {
include /etc/nginx/stream.d/*.conf;
}
`

i'm sorry there are symbols that brake format

do you see a good-looking certificate in your ./etc/ssl?  I suspect some kind of permission issue for this directory

yes, i see files:
le-key.pem
le-crt.pem
le-chain-crt.pem
dhparams.pem
I can't open them when docker is up. But when it's down, i can read write them.

Can you show the contents of a ssl-directory? ls -la ssl/ or somethink like that

I can't open some of them when docker is up. But when it's down, I can read write them.

This is an important detail. Does it mean you run this container on windows?

no, i'm trying do make it work on aws linux machine

Can you show the contents of a ssl-directory? ls -la ssl/ or something like that

isn't it /etc/ssl dir with pem files which i already provided? or you talking about sizes?

[ec2-user@ip ssl]$ ls -la
total 16
drwxr-xr-x 2 root     root       86 Sep 22 18:53 .
drwxrwxr-x 3 ec2-user ec2-user   45 Sep 22 18:35 ..
-rw------- 1 root     root      424 Sep 22 18:52 dhparams.pem
-rw-r--r-- 1 root     root     1647 Sep 22 18:53 le-chain-crt.pem
-rw-r--r-- 1 root     root     3574 Sep 22 18:53 le-crt.pem
-rw------- 1 root     root     1704 Sep 22 18:53 le-key.pem

isn't it /etc/ssl dir with pem files which i already provided? or you talking about sizes?

I wanted to look at directory permissions, looks correct...

there is something with your setup we don't see. I'm not sure what is this, but smth is not right. The fact, you "can't open some of them when docker is up" is odd. As you container up and running you should be able to read files, at least on linux.
You can  try to do docker exec -it nginx cat /etc/nginx/ssl/le-crt.pem to see if cert is even readable/accessible from your container.
Another direction - do you use the latest version of nginx-le? Try to do docker pull umputun/nginx-le:latest or change your compose's image directive to nginx-le:1.3.0

do you use the latest version of nginx-le
yes, just did docker-compose pull

docker exec -it nginx cat /etc/nginx/ssl/le-crt.pem
it worked fine.

it worked fine.

What exactly "worked fine" means? Did you see the certificate printed and the first line is -----BEGIN CERTIFICATE----- ?
Also, pls confirm - is this correct and repeatable "I can't open some of them when docker is up. But when it's down, I can read write to them."
See, we are guessing here and trying to figure out what the possible reason can be. Whatever it is, this is (most likely) something with your local system. Based on the info you provided my best guess is some sort of special docker configuration or some sort of permissions control. This is why I have asked about "can't open some of them when docker is up". Another theory is some kind of encoding issue, but I can't think of any scenario of how it can happen.

Did you see the certificate printed and the first line is -----BEGIN CERTIFICATE----- ?

yes, sure, i meant that.

is this correct and repeatable "I can't open some of them when docker is up

sorry, that was just matter of sudo. cat le-key.pem and  le-chain-crt.pem  wasn't possible, but it works with sudo.

something with your local system

doubt that, because it quite fresh aws machine.
In your working servers there're no TRUSTED word in header of crt? Isn't it a config issue?

TRUSTED is not supposed to be in. I just installed a fresh instance (on Digital Ocean) and nginx-le got certs just fine, works with nginx as expected. Neither le-crt.pem or le-chain-crt.pem have TRUSTED in the header.

is this config file you provided the only one you have? Your proxy_pass to http://<IP_ADDRESS>:8123/; implies another part you omitted.

To prevent playing ping-ping in this chat, @sergentum can you please post all Nginx configuration in single gist (it can contain multiple files) on  gist.github.com?
Also, do I understand correctly that after the message nginx: [emerg] cannot load certificate ... in the log nginx stops and the container fails to start? Can you post the complete log of the container start alongside configuration, please?

I was able to reproduce the issue (by accident). As expected it has nothing to do with "TRUSTED CERTIFICATE". Something went wrong with certificates substitution and I see this inside of nginx config:
ssl_certificate         /etc/nginx/ssl/;
ssl_certificate_key     /etc/nginx/ssl/;
ssl_trusted_certificate /etc/nginx/ssl/;

@paskal - I think this was yours change to support multiple FQDNs? Could you pls take a look? In my case, it happens with - LE_FQDN=safesecret.info,feedmaster.umputun.com,umputun.com,umputun.feed-master.com
@sergentum - a simple workaround is to change your nginx's service with and with the absolute paths to the certificate, i.e.
    ssl_certificate         /etc/nginx/ssl/le-crt.pem;
    ssl_certificate_key     /etc/nginx/ssl/le-key.pem;
    ssl_trusted_certificate /etc/nginx/ssl/le-chain-crt.pem;

I have this in service-example.conf
    ssl_certificate         SSL_CERT;
    ssl_certificate_key     SSL_KEY;
    ssl_trusted_certificate SSL_CHAIN_CERT;

I thought these placeholders will be replaced later...
Looks like example conf wasn't formed from template to actual config at all

those are placeholders, the final file in conf.d

@sergentum could you please checkout current master version and see if the problem replicates? If it does, please share docker log after start of the container, first ~20 lines would be enough.

@sergentum does the current version in master works for you?

@paskal i'm sorry, I had no time to set it up again. I certainly will check from scratch and report here, but can't say when exactly.

ok, finally i checked once again and looks like it works, but i have few unclear moments.
    ssl_certificate         SSL_CERT;
    ssl_certificate_key     SSL_KEY;
    ssl_trusted_certificate SSL_CHAIN_CERT;

Still the same, I thought that was the reason, but now I see that it works with theese placeholders fine.

Don't understand why default location of service-example -   location /api/ {
Also I don't understand why map files as volumes to nginx?
Why don't use whole folder mapping to docker and user will just add file for new site, without need to add mapping for each file?

Re replacement: SSL_CERT and others are replaced in a copy of the original file you provide to the container.
Re default location: it's just an example, you are not supposed to use it as-is, package assumes that you are already familiar with Nginx configuration.
Re files as volumes instead of a folder: good question, I can't think of any reason aside from historical reasons. @umputun?

I'm not sure how you plan to map the folder unless you are going to provide all files in /etc/nginx.

You could provide something like /etc/nginx/sites-enabled.d/ instead of listing individual files, that's the idea.
Actually, I have a list of ~8 files in my biggest setup, and it sounds sane to have a directory mapping instead.

i propose change that line
./etc/service-example.conf:/etc/nginx/service.conf
to
./etc/:/etc/nginx/
and that's it. If there is nothing interesting happening with config files like lines replacement or smth like that.

That's not good, Nginx provides other configuration files and files structure we're not interested in destroying.

sorry, that's mistake. I meant the same you proposed earlier - map folder:
sites-enabled:/etc/nginx/sites-enabled.d/

@sergentum I'll think about how to implement it properly.

@sergentum it will be done in #49. I wonder if you have any other issues aside from that or this issue can be resolved?

This one can be closed I guess, thanks.


added text typing effect and other changes

yeah sure

https://user-images.githubusercontent.com/103199408/214845416-7a216393-1bd3-43d1-b792-928fd9df3a48.mp4


[Question] How to do documentation between GitHub and Yuque

I have see some of the docs of Hypercrx on Yuque: https://xlab2017.yuque.com/me1x4f/fg8ngy

So I am wondering how to coordinate between these two tools.
For example, as Hypercrx become more and more mature, how about all the documentation hosted in the GitHub ? @zhuxiangning @tyn1998

One of the concern maybe the user design experience and Chinese language convionce while using Yuque,
In that way, we can use links to link the documentation together.

In my view, Hypercrx is an open source project hosted on GitHub so we should make the best of features provided by GitHub. For normal users, they get information through README, GitHub Pages(#316 ), Issues and Discussions. For developers, they can get extra info from Wiki(#315 ).
Let's leave yuque alone as an inner communication media by which we can casually and quickly document anything using our mother tongue. If we want to let the community know something, we will extract and arrange info from yuque and then translate them into English to put on GitHub.

Thanks for your explain. I think this strategy is reasonable and useful. From inner source to open source, the best practice carried out is very promissing~


Add option to create Say and Menu Dialogs with TextMeshPro instead of Text

It'd be great to be able to add a TextMeshPro version of Say and Menu Dialogs.

@stevehalliwell could you let me know if this is something I can hope would happen please?

Once Fungus moves past supporting Unity 2017, I'll be considering this more closely. That won't be until at least Fungus 3.14 though.

I've replaced all Text components of all MenuDialog and SayDialog objects, and it all works perfectly fine, no errors or any issues. It's a little bit of an inconvenience that one can't just make a TMP Menu/SayDialog object, but I think the workaround is fine.

Closing this as I believe supporting TMPro is in the plans, and this workaround is suitable until then.


Incompatibility with 5eSheet-resourcesPlus

Currently the module doesn't play nicely with the 5e Sheet-Resources-Plus module.
Expected behavior:

This is on sdenec's branch. On the current Kgar's rebuild, it looks like this:

Regardless of the sheet config's resource value (0-20) the sheet will display the global maximum for the resources + module.
Currently the bug shows no errors on the console, just the behavior on the sheet.
Environment settings:

Foundry Virtual Tabletop: Version 11 Stable, 11.313
Game System: dnd5e, 2.3.1
Active Modules: 5
Performance Mode: 0
OS: Windows 10
Client: Brave Browser [Version 1.60.110 Chromium: 119.0.6045.105 (Official Build) (64-bit)
GPU: ANGLE (NVIDIA, NVIDIA GeForce RTX 3060 (0x00002487) Direct3D11 vs_5_0 ps_5_0, D3D11)
Max Texture Size: 16384

After an initial review, I think this will require some collaboration on my part with the module developer.
I'm putting some notes here also for future me so I can refer back to them:
For the short term, these are the two problems:

The new character sheet has a different constructor name: "Tidy5eCharacterSheet"
The new character sheet resource blocks have scoped styles, so their classes need to be preserved when the module dev is applying a "hidden" class.

In the long term, using an API-driven approach will ensure that this feature can work with other sheet layouts in the coming year(s) without the need for more patches and churn.
I think a short term fix during alpha testing is probably going to be fine, and we can worry about the long term fix later. I can submit a PR to the target repo soon.

Release 0.1.16 has the necessary compatibility changes on Tidy's side:
https://github.com/kgar/foundry-vtt-tidy-5e-sheets/releases/tag/v0.1.16
Awaiting pull request results from the integrating module: https://github.com/ardittristan/5eSheet-resourcesPlus/pull/36
A world script is available for anyone who wishes to have compatibility sooner: https://github.com/kgar/foundry-vtt-tidy-5e-sheets/blob/main/compatibility/world-scripts/5esheet-resourcesPlus.js
Realistically, if everything looks good, let's give the module author some time to respond. If you test with the world script and find something is different than it would be in the default sheets, go ahead and post that here.

The author has just yesterday published a release with my changes and some changes of their own within it. When able, give the latest version of the module a test and see if it is working as expected, without a world script.

I did some testing. It looks like there's an error occurring before we get to the compatibility sheet wiring up part: https://github.com/ardittristan/5eSheet-resourcesPlus/issues/37
I will test again after this is resolved.

Because of the dnd5e 3.0.0 situation, it's time to leave this one behind.
In 3.0.0, Tidy will be providing a way to add a varying number of resources that are not just favorites.
Closing as completed with the "World Script" level of compatibility.


[Feature Request] Provide better diff for string syntax

Currently, even a small change in a string will cause difftastic thinking that they are totally different. For example, in the following example, the only change is KB -> MB:

If we can detect such a situation and run a cheaper diff algorithm like some word-based or char-based algorithm on it, and mark the difference (e.g., make them bold), the diff result will be better. This can be optional.

A variant of this is in #382.

Also #376, #178, #312.

I think this is a duplicate of #178. I agree it would be really nice to do better here.


Erroneous and missing technologies for user

comment from a recent user of ours.  note his issues on not listing SASS or CSS for him and that Ember and React are listed but he never used them.
https://sourcerer.io/adnanrahic

Great! Yeah, the process was very simple and straightforward. Only thing I'd see as an improvement in the CLI is autocompletion for directories. It was a bit of a pain to enter 15 repos by hand, one at a time, having to type out the absolute path for every one of them. :)Regarding the profile, it's spot on. But I can't seem to figure out why it's not showing any SASS. I use SASS for 3 of the largest repos I've contributed to. So it was a bit strange not to see any SASS or CSS at all.
And, it's a bit strange I see Ember and React among the technologies. I've never used any of those. :D |

Fixed


Should the tf.nn.sigmoid be replaced with tf.nn.sotfmax

Thx for your code!
I am confused with some source code.
https://github.com/ailias/Focal-Loss-implement-on-Tensorflow/blob/master/focal_loss.py
focal_loss.py  line 22
sigmoid_p = tf.nn.sigmoid(prediction_tensor)
zeros = array_ops.zeros_like(sigmoid_p, dtype=sigmoid_p.dtype)

I think here we use tf.nn.sigmoid to calculate the probability is not suitable.
This is the sigmoid function:

And this is the softmax function:

Usually, we use softmax layer as the last layer to get the probability, so the sum is 1 and the margin between the output is increased.

No, you'd better not. I have tested it and the loss cannot convergent. By the way, you can have a try.

Hi @mzhaoshuai , I have the same thought with you, and I use softmax and "reduce_mean" but my result is very bad (my model always predict 0 for all input data after several iterations). Perhaps my data are severely imbalanced (foreground and background classes 1:100000 or worse), but I'm not sure the reason. Can you share your experience for setting its hyperparameter alpha, gamma or something?
By the way, I read the focal loss paper and I was wondering the following code:
per_entry_cross_ent = - alpha * (pos_p_sub ** gamma) * tf.log(tf.clip_by_value(sigmoid_p, 1e-8, 1.0)) \
                          - (1 - alpha) * (neg_p_sub ** gamma) * tf.log(tf.clip_by_value(1.0 - sigmoid_p, 1e-8, 1.0))

Should "pos_p_sub" and "neg_p_sub" be "1.0 - sigmoid_p" and "sigmoid_p"?

Hi @peter850706 ,
I think the author other code is right.
line  28
pos_p_sub = array_ops.where(target_tensor > zeros, target_tensor - sigmoid_p, zeros)

line 32
neg_p_sub = array_ops.where(target_tensor > zeros, zeros, sigmoid_p)

The two lines do the same thing as 1.0 - sigmoid_p and sigmoid_p respectively
I do not have much experience for setting its hyperparameter.
gamma=2 is the original paper's recommoned number.
The main purpose of focal loss is to down-weight the easy classified samples.
And when alpha is larger, you may think this is not a easy positive sample, so you enlarge the alpha to ensure when this sample is classified wrongly, you will get a larger loss(relatively).
When you think this is not a easy negative sample, you enlarge the alpha.
But I think the simplest way is to try alpha=0.25,'alpha=0.5' and alpha=0.75.
And I think there maybe something wrong when your model always predict 0, setting parameter may do not help.

@mzhaoshuai, thanks for your replies!

Actually I had test softmax and reduce_mean, but the result is not good because of the extreme small loss, so I have to change to sigmoid and reduce_sum, the paper "focal loss" explained the reason.
And, you can have a try for them.

I think we may misunderstand the cross entropy loss.

https://pytorch.org/docs/master/nn.html?highlight=crossentropyloss#torch.nn.CrossEntropyLoss

The cross entropy is come from the KL divergence.

https://rdipietro.github.io/friendly-intro-to-cross-entropy-loss/
https://datascience.stackexchange.com/questions/20296/cross-entropy-loss-explanation

For a multi classification problem. maybe the implement of the focal loss is like

https://github.com/clcarwin/focal_loss_pytorch/blob/master/focalloss.py

The original paper do say that sigmoid operation is more stable:

Recently I am busy.  Sorry for my late reply.


Payload format in Handler, CayenneLPP support

This pull request adds an explicit payload format to the application registry in the Handler. Formerly, only JavaScript payload functions are supported, now referred to as custom payload format. Now, we can support builtin payload formats, for example CayenneLPP that's included in this pull request (cayennelpp).
This sets the base for other builtin payload formats, payload formats that require native code (e.g. protobufs) or even a device:<manufacturer>:<model> payload format that refers to a specific device's binary payload.
Addresses #519

Coverage increased (+0.4%) to 74.343% when pulling f8fef74a6cc5f4719ab14c0a74e2bac723d0a324 on feature/payload-formats into 8e7c3053ccedb88f0980cb96514426ff8be65548 on develop.

Coverage increased (+0.4%) to 74.343% when pulling bdde256a7eea26233179f2d7b41ff60266f08835 on feature/payload-formats into 8e7c3053ccedb88f0980cb96514426ff8be65548 on develop.

Coverage increased (+0.4%) to 74.343% when pulling ad4ff99f75892b8d6240215d9b96ce06cd44daac on feature/payload-formats into 8e7c3053ccedb88f0980cb96514426ff8be65548 on develop.

Changes Unknown when pulling 64063d2490b0436cd837619eb3e856556ade310d on feature/payload-formats into ** on develop**.


Make attach command (now exec) more flexible

Rename the command to exec for consistency with docker/compose
Support for more than type of shell (sh, ash, bash)
Allow for a command to be passed to exec. This will execute the command exit automatically. This helps with situations where a user wants to get the status of a running container with a ps for example.

Resolves #54

LGTM!!


Perform some clean up

I did some hacking to see if we can get rid of explicit handles in NamedPipes and while working on it I figured this crate could use a refresh so here it is!
Not feeling particularly strong about any of the changes, feel free to skip some if you don't believe it's a good direction.

Rebased and bumped rand to 0.7. I tried to get rid of explicit dependency on tokio_uds but it seems we're using tokio_uds::Incoming which is not directly exposed in tokio under uds feature so I left it as is.
One thing we could do is drop futures and move to std::future::Future but IIUC that requires a coordinated switch along with parity/jsonrpc.


Will more node modules be supported?

For some commonly used third-party libraries, they need to rely on some modules that llrt does not currently support in order to run
undici
'node:assert',
'node:http',
'node:stream',
'node:net',
'node:buffer',
'node:util',
'node:querystring',
'node:events',
'node:zlib',
'node:perf_hooks',
'node:util/types',
'node:crypto',
'node:diagnostics_channel',
'node:tls',
'node:http2'

inquirer
'os',
'tty',
'stream',
'node:async_hooks',
'node:readline'

These modules do not seem to be necessary for the use of llrt, such as readline and tty modules, so it seems that the best solution is to collect these common modules together? https://github.com/awslabs/llrt/issues/430
These libraries only use some simple APIs. Will llrt accept PRs to add these modules?

Hi @ahaoboy.
Undici would make little sense in LLRT as the http client we’re supporting is fetch and uses a native implementation in Rust. Undici is also very node specific.
Similarly inquirier depends on readline and standard input which is not supported (unless reading from /dev/stdin). This is because LLRT is mainly built for serverless and ephemeral environments where stdin is not commonly used.


Permission denial: starting intent

Hi guys, I have this kind of problem in some devices with android version 5.1 - 5.1.1 ((

Hello,
Did you add the permissions in the manifest?

Yes I added, everything works perfectly in other devices! In this kind of devices there is no activity in the settings!

#Olddevice


Add ZipCode Service

In this PR, we add an service that wraps the ZipCode API from http://api.zippopotam.us/us/{zipcode};
Closes #16

LGTM


Integration test idempotency

Problem(s)
Two tests were reliably failing when re-running integration tests on the same database following an unsuccessful previous run. This is mitigated by simply destroying and re-initalizing the database, but that didn't appear to be the intention in documentation or code.

tests.test_user.test_create_user was failing if the user already existed as the "A user with that username already exists." text was not within a 'success' type field.
tests.test_user.test_user_notifications_change was failing if the test had already run as the checkboxes were already selected, when clicked again they were un-selected and the test only validated they were 'checked'.
docker/entrypoint-integration-tests.sh attempts to run tests/user_standard_test.py which does not exist. This run also sets the value Frue in local_settings.py which is not a valid value causing parse errors.

Solution(s:

The or case on tests.test_user.test_create_user now correctly checks that the "A user with that username already exists." message exists within an element with the help-block class. A helper method was added for this similar to success/fail message checks.
The test now checks the current state and validates that the state has changed after save. This was based on the 'changed' name of the test. I'm open to setting a desired state before executing and ensuring we go from 0 to 1 for example instead of just seeing the bit flipped.
The test setup for the missing file was removed and the unused reload function was removed. I believe based on the lack of this test in GitHub actions for integration tests and the existence of read-only vs editable user tests in test.test_user this is not necessary. Please let me know if that is not the case and I can remove this edit for this PR.

Looking into that test failure.


where is stable-diffusion/pipelines

hi, where is stable-diffusion/pipelines?
Besides, what's the usage of prompt_embeds and negative_prompt_embeds in the images generation?

Apologies for the earlier mistaken update. The subsequent updates have removed the original file. You can find it in the earlier versions or the most recent version.

Thank your quick reply. Here are some points I am still confused about:
(1) FedKTL is agnostic to the semantics of the images produced by the generator, which means the generated images make no sense to humans.

Yes, the generated clear images are only used to improve the extraction ability of clients' feature extractors.

Hi, I ask a question: Can it be applied into CLIP Finetuning? @TsingZ0


[feature] API needs "import list of URLs" functionality

All versions
Would be super nice if there was an import method in the API, but where it can accept text/plain as a list and ?tag=tag-id as a parameter
curl http://localhost:4000/api/v1/watch -H"x-api-key:813031b16330fe25e3780cf0325daa45" -H "Content-Type: text/plain" -d 'https://nice-site.com/page1.html'

(or curl -d from a text file as a list too)
also de-duplicated

and then a watch could parse and add its own results as more searches (with a tag)


If lovr.update is slow, lovr.audio.setPose() will conflict with default loop's setPose and create distorted audio

If I move the listener in lovr.update, and my update function is slow, it seems that the audio jumps between headset location and my inputted location rapidly :S
maybe the audio module should store the listener location at the beginning of the loop, and only set it at the end of the loop, so that user-inputted position is the one that is actually applied to OpenAL :S otoh that'd introduce some positional audio lag... Not sure what the best solution is :S
Repro

function lovr.load()
    sound = lovr.audio.newSource("bwomp.ogg", "static")
    matrix = lovr.math.newMat4(
        lovr.math.vec3(-2, 0, 0)
    )
end

function lovr.update(dt)
    if sound:isPlaying() == false then
        sound:play()
    end
    lovr.timer.sleep(0.05)
    lovr.audio.setPose(matrix:unpack())
end

Then turn around until the hard-coded offset is a strong mismatch to your actual headset pose.

This needs to be retested on the miniaudio branch, but I think the race condition will still exist, since the listener pose is still being set twice in a frame.
One possibility is to close this as wontfix and have people modify boot.lua, but I don't think that's very friendly.  Something slightly more friendly would be to add a conf.lua flag that disables the automatic call to lovr.audio.setPose.  Another option would be to simply not synchronize the listener pose with the head pose.  That last option actually feels like the most "lovely" approach.  I am reminded of this quote from rude:

It's really easy to create a high level component which seems nice, but in reality is too inflexible for many cases, leaving lovers to develop their own e.g. tilemap component anyway, feeling sad that the built-in component is just uselessly standing there.

LOVR trying to be helpful by setting the listener pose for you seems like it is causing lovrers to feel sad.  If you already have to set the poses for all your Source objects, you may as well set the listener pose too and have full control over it, without any of the problems that come from someone else trying to do it for you.
The final "bombard the problem with technology" solution would be to add some system for "committing" or "presenting" audio changes.  This would have a lot of benefits, and with some clever atomic sparkles this may even allow the mutex in the audio callback to be removed.

Yeahh, the argument that you have to set the source pos anyways is a strong one. Might as well set listener too. (Which is annoying, I really like having good defaults)

LOVR can only set listener pose in simple roomscale projects. As soon as one uses teleporting or any other mechanics that decouples VR world origin from headset tracking origin the pose that is set by LOVR will not be correct. Sure the conf flag would work but I'd prefer simpler model where updating source and listener poses is always user responsibility.
As for "commiting" changes, this is I think more of underlying mechanism and shouldn't impact the API. It makes sense to only set pose once per update so all setters can be cached and applied (flushed) at end of update. Maybe I misunderstood this part?

Okay, the listener pose is no longer automatically set.
The committing system likely wouldn't impact the API, but there may need to be a secret lovr.audio.commit function similar to lovr.math.drain for it.


Re-organise folders/files.

Reduce size and complexity of files.
To do on the beacon folder first:

create files with types only, e.g. AttestationsTypes.dfy
create files with functions (if possible no lemmas), e.g Attestations.s.dfy
create files with proofs, e.g. Attestations.p.dfy
try to split functions and group them meaningfully (e.g. in Helpers, split epoch and other stuff)
create subfolders of beacon (e.g. epoch, generalProofs)

The re-org was performed in master and goal1 branches.


feat(helper/toc): more flexible class name (hexojs/hexo#5010)

ref: hexojs/hexo#5010
Check List
Please read and check followings before submitting a PR.

[ ] I want to publish my theme on Hexo official website.

[ ] I have read the theme publishing doc.
[ ] name is unique.
[ ] link URL is correct.
[ ] preview URL is correct.
[ ] preview URL web site is rendered correctly.
[ ] Add a screenshot to source/themes/screenshots.
[ ] Screenshot filename is same as value of name.
[ ] Screenshot size is 800 * 500.
[ ] Screenshot file format is png.

[ ] I want to publish my plugin on Hexo official website.

[ ] I have read the plugin publishing doc.
[ ] name is unique.
[ ] link URL is correct.

[x] Others (Update, fix, translation, etc...)

Languages:
[x] en English
[ ] ko Korean
[ ] pt-br Brazilian Portuguese
[ ] ru Russian
[ ] th Thai
[x] zh-cn simplified Chinese
[ ] zh-tw traditional Chinese

This pull request could be merged after https://github.com/hexojs/hexo/pull/5043.


Use more sugar

In the default variant, lui uses Object.assign instead of {...} and removeChild instead of remove which is pointless and does not look as cool.
Also, in legacy variants, Object.assign is called instead of the cached one, wasting valuable bytes. :sob:

The spread thing is blocked by: https://github.com/google/closure-compiler/issues/4098


Image border seems to be considered as a quiet zone (Interleaved 2of5)

When trying to detect this Interleaved 2of5 barcode, which has no quiet zones in the image

I get the correct result<PHONE_NUMBER> using [1].
When trying to scan this barcode with a camera and moving the camera from left to right, wrong results are produced, which have truncated the the last digit pairs, eg. 301262 or 30126273.
The reason for this seems to be, that the shape of the stop code itself is occurring in the barcode and the stop-code is only distinguishable if there is a quite zone after it, which seems to be assumed if there is the right image border instead of a real quiet zone/white space.
Is there a way to enforce real quiet zone to be enforced?
[1] https://zxing-cpp.github.io/zxing-cpp/demo_reader.html
[2] https://zxing-cpp.github.io/zxing-cpp/demo_cam_reader.html

There is currently no option to enforce this. If you can compile the code, you can try a quick workaround by removing those characters. If this works for you, let me know.

If you can compile the code, you can try a quick workaround by removing those characters. If this works for you, let me know.

Did the mentioned change in ODITFReader.cpp and compiled wasm and tested it using mobile Safari.
The issue could not be reproduced, as seen in the screen recording.
https://github.com/user-attachments/assets/5427f646-2967-4b24-b872-848461da6189

The acceptance of a symbol with missing whitespace at the image border is to support the relatively common situation where people try to scan a cropped image or a generated one with no or very small quiet zones. A possible solution could be to accept a truncated quiet zone only when truncated on both ends.
Is the workaround you tested sufficient for you needs at the moment?

The acceptance of a symbol with missing whitespace at the image border is to support the relatively common situation where people try to scan a cropped image or a generated one with no or very small quiet zones. A possible solution could be to accept a truncated quiet zone only when truncated on both ends.

Sounds like an interesting approach to solve this problem.
On the one hand, I think changing the behavior would break many user applications, on the other hand, I think it should at least be possible to have the information about the presence of quiet zones in the result object.

Is the workaround you tested sufficient for you needs at the moment?

Yes, but do you mean that I should fork this project with the workaround and then also build my own version of https://github.com/Sec-ant/zxing-wasm?

think it should at least be possible to have the information about the presence of quiet zones in the result object.

That is an interesting idea. I would consider this to be one those niche applications that fit the JSON channel idea discussed in #862.

but do you mean that I should fork this project

Only in the short term... I'll come up with a heuristic along the line of what I wrote above (sometime next week). I expect that to to actually break hardly any user code if at all.

Glad to hear there is a plan for all these issues in #862. Will link this issue as a comment there.
Something like
"endQuietZoneDetected": "true",
"fullIsoCompliant: "true",
"endQuietZoneLength": "10" or
"cropped": "true".
Thanks for all your efforts btw.


Install the latest versions of terraform and terraform docs

🗣 Description
This pull request:

Updates the role to install the latest versions of terraform and terraform-docs
Adds a test to ensure that terraform and terraform-docs can actually run

💭 Motivation and context

The versions of terraform and terraform-docs being installed were ancient.
The new test gives a little more confidence that the tools we are installing can actually be used.

🧪 Testing
All automated tests pass.
✅ Pre-approval checklist

[x] This PR has an informative and human-readable title.
[x] Changes are limited to a single goal - eschew scope creep!
[x] All relevant type-of-change labels have been added.
[x] I have read the CONTRIBUTING document.
[x] These code changes follow cisagov code standards.
[x] All relevant repo and/or project documentation has been updated to reflect the changes in this PR.
[x] Tests have been added and/or modified to cover the changes in this PR.
[x] All new and existing tests pass.

@jsf9k As a note this version of Terraform directly conflicts with the version we have pinned to elsewhere.

@jsf9k As a note this version of Terraform directly conflicts with the version we have pinned to elsewhere.

Good point.  Please see #31.


Use Logger instead of calls to System

In https://github.com/CDOT-CV/jpo-ode/pull/119/files#diff-583d9abf8efa985791228afa3fa148fd79e29dac10d9a7be83b0c7593df24f95R117 the calls to System.out and System.err were found to propagate up into the generated code. We don't want any bare calls to System.out or System.err in our production code, so this will help prevent the reintroduction of these calls into our code should we need to use this repo to regenerate the j2735 models in the future

Good catch, thanks.