Debugging issues

I'm having trouble using a debugger with sacred. For simplicity, I'm running 01_hello_world.py but with an error thrown in in main().
If I try python 01_hello_world.py -D, which is supposed to start a pdb client, then the following happens:
WARNING - hello_world_01 - No observers have been added to this run
INFO - hello_world_01 - Running command 'main'
INFO - hello_world_01 - Started
ERROR - hello_world_01 - Failed after 0:00:00!
Traceback (most recent call last):
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.py", line 242, in run_commandline
    return self.run(cmd_name, config_updates, named_configs, {}, args)
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.py", line 187, in run
    run()
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/run.py", line 190, in __call__
    self.result = self.main_function(*args)
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/config/captured_function.py", line 47, in captured_function
    result = wrapped(*args, **kwargs)
  File "hello_world_01.py", line 31, in main
    print('Hello world!' + 1)
TypeError: coercing to Unicode: need string or buffer, int found

(And at this point python takes input and outputs nothing until I kill it.)
If I instead ipdb 01_hello_world.py -d, I get the following error (after I continue):
> /home/mirrormodel/janos/hello_world_01.py(20)<module>()
     18 If you want to learn more about the command-line interface try
     19 ``help`` or ``-h``.
---> 20 """
     21 from __future__ import division, print_function, unicode_literals
     22 from sacred import Experiment

ipdb> c
INFO - hello_world_01 - Running command 'main'
INFO - hello_world_01 - Started
ERROR - hello_world_01 - Failed after 0:00:00!
Traceback (most recent call last):
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/ipdb/__main__.py", line 168, in main
    pdb._runscript(mainpyfile)
  File "/usr/local/anaconda2/lib/python2.7/pdb.py", line 1233, in _runscript
    self.run(statement)
  File "/usr/local/anaconda2/lib/python2.7/bdb.py", line 400, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "hello_world_01.py", line 20, in <module>
    """
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.py", line 130, in automain
    self.run_commandline()
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.py", line 242, in run_commandline
    return self.run(cmd_name, config_updates, named_configs, {}, args)
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.py", line 187, in run
    run()
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/run.py", line 190, in __call__
    self.result = self.main_function(*args)
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/config/captured_function.py", line 47, in captured_function
    result = wrapped(*args, **kwargs)
  File "hello_world_01.py", line 31, in main
    print('Hello world!' + 1)
TypeError: coercing to Unicode: need string or buffer, int found
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /home/mirrormodel/janos/hello_world_01.py(31)main()
     27
     28 # This function should be executed so we are decorating it with @ex.automain
     29 @ex.automain
     30 def main():
---> 31     print('Hello world!' + 1)

Traceback (most recent call last):
  File "/home/mirrormodel/.local/bin/ipdb", line 11, in <module>
    sys.exit(main())
  File "/home/mirrormodel/.local/lib/python2.7/site-packages/ipdb/__main__.py", line 184, in main
    pdb.interaction(None, t)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/core/debugger.py", line 289, in interaction
    OldPdb.interaction(self, frame, traceback)
  File "/usr/local/anaconda2/lib/python2.7/pdb.py", line 210, in interaction
    self.cmdloop()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/terminal/debugger.py", line 65, in cmdloop
    line = self.pt_cli.run(reset_current_buffer=True).text
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 399, in run
    self._redraw()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 346, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/renderer.py", line 398, in render
    size = output.get_size()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 359, in get_size
    rows, columns = _get_size(stdout.fileno())
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 317, in _get_size
    fcntl.ioctl(fileno, termios.TIOCGWINSZ, buf, True)
IOError: [Errno 25] Inappropriate ioctl for device

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at<EMAIL_ADDRESS>
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

Similarly, if I ipython -i 01_hello_world.py -- -d:
Python 2.7.12 |Anaconda 4.2.0 (64-bit)| (default, Jul  2 2016, 17:42:40)
Type "copyright", "credits" or "license" for more information.

IPython 5.1.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
INFO - hello_world_01 - Running command 'main'
INFO - hello_world_01 - Started
ERROR - hello_world_01 - Failed after 0:00:00!

TypeErrorTraceback (most recent call last)
/home/mirrormodel/janos/hello_world_01.py in <module>()
     27
     28 # This function should be executed so we are decorating it with @ex.automain
---> 29 @ex.automain
     30 def main():
     31     print('Hello world!' + 1)

/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.pyc in automain(self, function)
    128                                    'interactive mode. Use @ex.main instead.')
    129
--> 130             self.run_commandline()
    131         return captured
    132

/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.pyc in run_commandline(self, argv)
    240
    241         try:
--> 242             return self.run(cmd_name, config_updates, named_configs, {}, args)
    243         except Exception:
    244             if not self.current_run or self.current_run.debug:

/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/experiment.pyc in run(self, command_name, config_updates, named_configs, meta_info, options)
    185         run = self._create_run(command_name, config_updates, named_configs,
    186                                meta_info, options)
--> 187         run()
    188         return run
    189

/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/run.pyc in __call__(self, *args)
    188                     self._start_heartbeat()
    189                     self._execute_pre_run_hooks()
--> 190                     self.result = self.main_function(*args)
    191                     self._execute_post_run_hooks()
    192                     if self.result is not None:

/home/mirrormodel/.local/lib/python2.7/site-packages/sacred/config/captured_function.pyc in captured_function(wrapped, instance, args, kwargs)
     45     start_time = time.time()
     46     # =================== run actual function =================================
---> 47     result = wrapped(*args, **kwargs)
     48     # =========================================================================
     49     stop_time = time.time()

/home/mirrormodel/janos/hello_world_01.py in main()
     29 @ex.automain
     30 def main():
---> 31     print('Hello world!' + 1)

TypeError: coercing to Unicode: need string or buffer, int found

Traceback (most recent call last):
  File "/usr/local/anaconda2/bin/ipython", line 6, in <module>
    sys.exit(IPython.start_ipython())
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/__init__.py", line 119, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/traitlets/config/application.py", line 653, in launch_instance
    app.start()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 348, in start
    self.shell.mainloop()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 440, in mainloop
    self.interact()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 423, in interact
    code = self.prompt_for_code()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 333, in prompt_for_code
    pre_run=self.pre_prompt, reset_current_buffer=True)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 399, in run
    self._redraw()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 346, in _redraw
    self.renderer.render(self, self.layout, is_done=self.is_done)
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/renderer.py", line 398, in render
    size = output.get_size()
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 359, in get_size
    rows, columns = _get_size(stdout.fileno())
  File "/usr/local/anaconda2/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_output.py", line 317, in _get_size
    fcntl.ioctl(fileno, termios.TIOCGWINSZ, buf, True)
IOError: [Errno 25] Inappropriate ioctl for device

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at<EMAIL_ADDRESS>
You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    %config Application.verbose_crash=True

What can I do to successfully debug my experiments?

I'm having trouble properly reproducing this behavior. From my attempts so far it seems that it is always working fine under python 3.
The freeze with python 01_hello_world -D under python 2.7 seems to be connected to stdout capturing, and I'm still trying to find out what goes wrong (debugging the debugger is tricky...).
However doing ipdb 01_hello_world.py -d works fine for me under both python 2 and python 3 and so does for example the classic python -m pdb 01_hello_world.py -d
ipython -i 01_hello_world.py -- -d for me does run without the second error, but somehow yields scrambled symbols in the command prompt.
I'll dig further into the python 2.7   python 01_hello_world -D problem. Meanwhile you could maybe try python 3, python -m pdb 01_hello_world.py -d, or maybe updating ipdb.

Hi Klaus,
Thanks for getting back!
When I look further into what happens if I do ipdb 01_hello_world.py -d ,
the problem occurs at utils.py:146, where tee_output() tries to os.dup2
ipython's stdout and stderr into some subprocesses, and ipython doesn't
like that. However, python -m pdb 01_hello_world.py -d seems to work fine.
:) Thanks for the tip!
Janos
On Tue, Jan 31, 2017 at 7:41 PM, Klaus Greff<EMAIL_ADDRESS>wrote:

I'm having trouble properly reproducing this behavior. From my attempts so
far it seems that it is always working fine under python 3.
The freeze with python 01_hello_world -D under python 2.7 seems to be
connected to stdout capturing, and I'm still trying to find out what goes
wrong (debugging the debugger is tricky...).
However doing ipdb 01_hello_world.py -d works fine for me under both
python 2 and python 3 and so does for example the classic python -m pdb
01_hello_world.py -d
ipython -i 01_hello_world.py -- -d for me does run without the second
error, but somehow yields scrambled symbols in the command prompt.
I'll dig further into the python 2.7 python 01_hello_world -D problem.
Meanwhile you could maybe try python 3, python -m pdb 01_hello_world.py -d,
or maybe updating ipdb.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/IDSIA/sacred/issues/134#issuecomment-276469458, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAxtDO__QrwSrQDEoZzD-XjsdxsFrO58ks5rX457gaJpZM4LvVu3
.

I am having similar problems, but with pudb.
What works for me is disabling the tee_output entirely when self.unobserved.
Wouldn't that be a good idea in any case?
Or are there reasons to capture the output when there's no chance of storing it anywhere anyway?

I have encountered an issue using ipdb.set_trace() with FileStorageObserver (possibly other observers, haven't tested that).
01_hello_world.py works fine as-is.
If I modify it to include the observer, and include an ipdb.set_trace() statement, as follows:
from __future__ import division, print_function, unicode_literals
from sacred import Experiment
from sacred.observers import FileStorageObserver
import ipdb

# Create an Experiment instance
ex = Experiment()
ex.observers.append(FileStorageObserver.create('my_runs'))

# This function should be executed so we are decorating it with @ex.automain
@ex.automain
def main():
    print('Hello world!')
    ipdb.set_trace()

... then when I do ipython 01_hello_world.py I get this:
INFO - 01_hello_world - Running command 'main'
INFO - 01_hello_world - Started run with ID "63"
Hello world!
ERROR - 01_hello_world - Failed after 0:00:00!
Traceback (most recent calls WITHOUT Sacred internals):
  File "redacted/01_hello_world.py", line 39, in main
    ipdb.set_trace()
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/ipdb/__main__.py", line 67, in set_trace
    p = _init_pdb(context).set_trace(frame)
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/ipdb/__main__.py", line 48, in _init_pdb
    p = debugger_cls(def_colors, context=context)
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/IPython/terminal/debugger.py", line 17, in __init__
    self.pt_init()
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/IPython/terminal/debugger.py", line 43, in pt_init
    self.pt_cli = CommandLineInterface(self._pt_app, eventloop=self.shell._eventloop)
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/interface.py", line 80, in __init__
    self.output = output or create_output()
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py", line 124, in create_output
    ansi_colors_only=ansi_colors_only, term=term)
  File "/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/terminal/vt100_output.py", line 424, in from_pty
    assert stdout.isatty()
AssertionError
---------------------------------------------------------------------------
AssertionError                            Traceback (most recent call last)
/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/experiment.py in run_commandline(self, argv)
    259         try:
--> 260             return self.run(cmd_name, config_updates, named_configs, {}, args)
    261         except Exception:

/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/experiment.py in run(self, command_name, config_updates, named_configs, meta_info, options)
    208                                meta_info, options)
--> 209         run()
    210         return run

/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/run.py in __call__(self, *args)
    220                 self._execute_pre_run_hooks()
--> 221                 self.result = self.main_function(*args)
    222                 self._execute_post_run_hooks()

/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/config/captured_function.py in captured_function(wrapped, instance, args, kwargs)
     45     # =================== run actual function =================================
---> 46     result = wrapped(*args, **kwargs)
     47     # =========================================================================

redacted/01_hello_world.py in main()
     38     print('Hello world!')
---> 39     ipdb.set_trace()

/Users/stephanie/anaconda3/lib/python3.6/site-packages/ipdb/__main__.py in set_trace(frame, context)
     66         frame = sys._getframe().f_back
---> 67     p = _init_pdb(context).set_trace(frame)
     68     if p and hasattr(p, 'shell'):

/Users/stephanie/anaconda3/lib/python3.6/site-packages/ipdb/__main__.py in _init_pdb(context, commands)
     47     try:
---> 48         p = debugger_cls(def_colors, context=context)
     49     except TypeError:

/Users/stephanie/anaconda3/lib/python3.6/site-packages/IPython/terminal/debugger.py in __init__(self, *args, **kwargs)
     16         self._ptcomp = None
---> 17         self.pt_init()
     18

/Users/stephanie/anaconda3/lib/python3.6/site-packages/IPython/terminal/debugger.py in pt_init(self)
     42         )
---> 43         self.pt_cli = CommandLineInterface(self._pt_app, eventloop=self.shell._eventloop)
     44

/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/interface.py in __init__(self, application, eventloop, input, output)
     79         # Inputs and outputs.
---> 80         self.output = output or create_output()
     81         self.input = input or StdinInput(sys.stdin)

/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/shortcuts.py in create_output(stdout, true_color, ansi_colors_only)
    123             stdout, true_color=true_color,
--> 124             ansi_colors_only=ansi_colors_only, term=term)
    125

/Users/stephanie/anaconda3/lib/python3.6/site-packages/prompt_toolkit/terminal/vt100_output.py in from_pty(cls, stdout, true_color, ansi_colors_only, term)
    423         """
--> 424         assert stdout.isatty()
    425         def get_size():

AssertionError:

During handling of the above exception, another exception occurred:

NameError                                 Traceback (most recent call last)
redacted/01_hello_world.py in <module>()
     34
     35 # This function should be executed so we are decorating it with @ex.automain
---> 36 @ex.automain
     37 def main():
     38     print('Hello world!')

/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/experiment.py in automain(self, function)
    135                                    'interactive mode. Use @ex.main instead.')
    136
--> 137             self.run_commandline()
    138         return captured
    139

/Users/stephanie/anaconda3/lib/python3.6/site-packages/sacred/experiment.py in run_commandline(self, argv)
    269             else:
    270                 print_filtered_stacktrace()
--> 271                 exit(1)
    272
    273     def open_resource(self, filename, mode='r'):

NameError: name 'exit' is not defined

Other info: running this on macOS High Sierra 10.13.5, which is probably my problem, but I figured I'd report it anyway.
(also, hi Klaus!)


Add sonarcloud integration components

The AppSec team is creating this pull request to add the necessary components for the integration with Sonarcloud to all Gympass's active repositories.
Please allocate it to some Jira tasks on your squad to keep track of it, and let us know if you have any questions.

Hey @rm-gp this is a open-source project, I think the SonarCloud implementation doesn't makes sense in this case, right?

You're right @caiofralmeida , in this case we will not use Sonar.


Startup flutter faster (use app-jit snapshot)

This PR makes flutter (as measured with flutter test directly in the flutter directory which has no test directory, thus just writing "there's no test directory) startup faster by caching git calls.
Currently when running flutter for the first time or after being on a new git hash, it is compiled to a kernel/dill file. Subsequent calls then just run this compiled file, and thus avoids having to compile flutter_tools again and again. This is good.
We also have the option to compile to to an app-jit snapshot though, which is better in the sense that it loads faster.
This PR does exactly that.
Note that this stacks with #111392.
The startup changes as measured on my machines is this:
Linux

Before
This PR alone
This PR stacked with #111392

0.583
0.307
0.158

0.583
0.287
0.16

0.574
0.296
0.171

0.593
0.308
0.164

0.589
0.297
0.177

0.618
0.305
0.164

0.579
0.301
0.164

0.59
0.295
0.167

0.604
0.301
0.16

0.572
0.295
0.161

I.e. this PR alone:
Difference at 95.0% confidence
        -0.2893 +/- 0.0102548
        -49.1589% +/- 1.74253%
        (Student's t, pooled s = 0.0109141)

And stacked with #111392:
Difference at 95.0% confidence
        -0.4239 +/- 0.0100685
        -72.0306% +/- 1.71087%
        (Student's t, pooled s = 0.0107158)

Windows (Google issued with whatever security software)

Before
This PR alone
This PR stacked with #111392

3.2045302
2.7633213
1.7806395

3.2686755
2.7909508
1.8164078

3.2457845
2.7613864
1.7898207

3.1958543
2.8141012
1.8039282

3.1954143
2.7816646
1.7866668

3.2369129
2.7448754
1.8005397

3.2849415
2.7315453
1.8290792

3.2987666
2.7639699
1.7882604

3.2835086
2.7211788
1.8032152

3.2308832
2.7489684
1.8420157

I.e. this PR alone:
Difference at 95.0% confidence
        -0.482331 +/- 0.0315589
        -14.866% +/- 0.972681%
        (Student's t, pooled s = 0.0335877)

And stacked with #111392:
Difference at 95.0% confidence
        -1.44047 +/- 0.0287394
        -44.3969% +/- 0.885781%
        (Student's t, pooled s = 0.030587)

The cost is the compilation taking ~7% longer (less than a second longer).
This seems like a good trade-off to me.
We can technically make it load even faster by using an aot-snapshot, but then the compilation time will increase from something like 10 seconds to something like 30 seconds, and I'm not sure that's a good trade-off.
A more detailed analysis is available internally at go/FlutterStartupTimeAnalysis (which also discussed future PRs).

I think I had tried this a few years ago, but I found that the increased compilation time was really quite noticeable. Has performance of app-jit generation improved in recent years?
I definitely don't mind trying this out though

Ahh ok, I remember you tried this but I forgot why it got reverted. Tool compilation should only be an issue either during flutter upgrade, or for the first time after a user checks out a new commit. Is this not reasonable?

Maybe the answer is we should also benchmark tool compilation?

I don't really think that makes sense to track, unless we want to also track the time it takes to download all of the binaries. It only needs to be tolerable for folks that regularly contribute to the tool

I don't really think that makes sense to track, unless we want to also track the time it takes to download all of the binaries. It only needs to be tolerable for folks that regularly contribute to the tool

I didn't mean adding a skiaperf benchmark, but at least compiling it both ways n times and documenting on this PR

I did that (on my Linux machine):
Kernel and app-jit is done basically as-is (i.e. --snapshot= and --snapshot-kind= flags to dart), whereas exe is done via dart compile exe.
Runtimes for snapshotting as measured via time.
| kernel | app-jit | exe
-- | -- | -- | --
  | 10.035 | 10.44 | 32.967
  | 9.622 | 10.302 | 33.132
  | 9.435 | 10.253 | 33.231
  | 9.462 | 10.287 | 32.831
  | 9.49 | 10.186 | 32.535
  |   |   |
Average | 9.6088 | 10.2936 | 32.9392
  | 100.00% | 107.13% | 342.80%

I think the time increase is OK with me. WDUT @christopherfujino ?

Awesome, this looks great to me!

Lets wait until we get the startup benchmarks running: https://github.com/flutter/flutter/issues/111748

Benchmarks are running: https://flutter-flutter-perf.skia.org/e/?queries=test%3Dflutter_tool_startup__linux

I think I had tried this a few years ago, but I found that the increased compilation time was really quite noticeable. Has performance of app-jit generation improved in recent years?

Previously: https://github.com/flutter/flutter/issues/30102. It was reverted due to a crash in the VM, and it looks like we didn't follow up =(. Presumably in the intervening years, the crasher has been fixed.

No. This failed to. I fixed it in https://github.com/flutter/flutter/pull/111879.

Oh, okay, that particular error I didn't see. Lets hope that was fixed :)


Add clarification about using Mason in Neovim

This is an attempt to add some clarification for those that are getting started with Gleam in Neovim.
Mason recommended almost everywhere now days to get started with Neovim and its LSP integration. Because of this, new users see the "deprecated" message in Mason about Gleam which adds friction and confusion to the getting started process.
I have also added a PR to Mason to direct people to this page to get more information https://github.com/mason-org/mason-registry/pull/5904

That mason package is the bane of my existence atm. Is there a way to remove it?

Is there a way to remove it?

🤔 I'm not sure. I can look a little deeper and see if I can change the PR in the mason-registry to remove it!

I didn't see any information about removing a package, but I tried it locally and it seemed to work just fine. So I created a new PR to remove it from the registry completely
https://github.com/mason-org/mason-registry/pull/5911
It probably wouldn't hurt for you to pop in there and give your endorsement, as some random guy deleting things from a registry may not be well received :)
If there is any follow-up work, I'd be happy to work with them after they know this is a legitimate request.

Hey hey! It looks like they merged it in this morning, and I just checked it out. I no longer see gleam in the list of LSPs for Mason!
I am wondering if a clarification like this still may be nice, considering many people use Mason and may no understand why it is not in the list?

Awesome! I don't think we need to make a comment about Mason, we don't for the others and we say how to install the LS just above.

Sounds good! Closing the PR!
🥳


Tiled images jump when zoomed out

I am not sure whether there is something we can do about it.
Here is a video showing the effect: https://drive.google.com/file/d/0BzAcRIdakTF0dFFndmFHZkh2djg/view

At first I thought I introduced that with #927 but it happens on master as well.

I'm not sure what I'm looking at there... is it a little stutter or something? Hard to tell if that's from the screen capture or your mousing or OSD.

Tiled images seem to be jumping back and forth by 1 pixel.
Similar to the issue we had with edge smoothing.

Interesting. Looks like rounding, like it used to look before we had Canvas. Can you narrow down when it happens? Is it only at certain zoom levels? Does it happen on the last release, or was it introduced since then?

Some discoveries:
-Happens in Chrome, not Firefox
-Happens with the latest release as well
-Happens at all zoom levels except when edge smoothing is on (on master)
Repro: http://codepen.io/avandecreme/pen/reRgQm

It turns out that it is a known issue with chrome not doing subpixel rendering when rescaling an image: https://bugs.chromium.org/p/chromium/issues/detail?id=7508
Here is a codepen reproducing our particular issue: http://codepen.io/avandecreme/pen/WwBXPo
Note how the image jumps from one pixel to another (not even keeping a constant width) in Chrome but not in Firefox.

Interesting! That's unfortunate of Chrome, especially considering that bug dates back to 2009! I mostly use Firefox, so I guess that's why I haven't noticed.
Anyway, I guess there's nothing we can do. Shall we close this issue? Thank you for digging into it!

Yeah I didn't find any good workaround.
This is a minor issue anyway. It just get noticeable when zoomed out a lot (because the images size change).


⚠ Bofrost.de has degraded performance

In 985208a, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1239 ms

Resolved: Bofrost.de performance has improved in f528de7 after 1 hour, 46 minutes.


Update gallery

Fix some broken links.
Add 6 example plots to the gallery.
Made template for additional contributions to the gallery.

Great Work! Looks very good. Just one small thing. If possible, could you shrink scatterplot_merged_training_data_SHL.png a bit from 5277x2836 pixels to something more reasonable for a website? Other than this, I think this is ready to be merged.


SVG  and head::[xy][Min|Max]

The glyf, CFF , and CFF2 glyphs all update the bounds in the head table, but it looks like SVG  glyphs are not currently considered. Some SVG  fonts will have a glyf table with a .notdef and maybe a few other entries, so the head bounds end up being the size of these few glyf entries. The union of the bounds of the SVG  glyphs should be determined and also unioned into the head bounds.

Hm, parsing SVG is notoriously tricky, and I suspect our current parser in fontTools.svgLib may not work reliably on any arbitrary svg glyph. picosvg, among other things, can compute the bounding box of svg shapes (we use it in nanoemoji to compile COLRv1 fonts from SVGs), however I'm not sure that we want to pull that in as a dependency.
By the way, does the OT spec say anything about head bounds needing to include SVG glyphs?

It looks like the specification addresses the question of individual glyph bounding boxes in Coordinate Systems and Glyph Metrics,

The “ink” bounding box of the rendered SVG glyph should be used if a bounding box is desired; this box may be different for animated versus static renderings of the glyph.

However, it doesn't specify anything about the head table bounds. I suppose it's difficult since in theory the SVG could be animated. I'll just have to remember to mark any font which may draw a glyph out of SVG  that the head table bounds can't be used. Considering the difficulty with this, I think it's fine for SVG  to make the font slow for damage and clipping purposes


Remove docker-machine.rb

Closes https://github.com/caskroom/homebrew-cask/issues/17015.
Refs https://github.com/caskroom/homebrew-cask/issues/15603 (check off).

Merged as 766450d39a6b599ec7642c64ee6fbbce2f4995ff.


[Kraken-Streaming] fixing invalid session issues

From an email I exchanged with Kraken support:

Thank you for contacting us regarding the Kraken WebSocket API. In theory WebSocket authentication tokens can last indefinitely, but in reality they do sometimes expire causing an invalid session error. As an example, during a recent WebSocket API upgrade, many authentication tokens became invalid (for no apparent reason to the token owners), causing unexpected invalid session errors upon reconnecting/resubscribing after the upgrade. The solution to the invalid session error is simply to request a new authentication token via the REST API GetWebSocketsToken endpoint, and then use the new token for all new connections/subscriptions.

Based on this a few points come up that I attempt to address in this review:

In KrakenStreamingTradeService.java subscribeChannel(channelName, renewToken().getToken()) is called with a token upon subscription so the instance of the token called here is reused for the duration of this process run (this sounds reasonable given that once a token is used to subscribe to a private feed a token will remain valid as long as a subscription remains active) Kraken Documentation. I see the code has renewToken() logic but given the fact that the token instance is passed directly into the subscription I am under the impression that this is never called during reconnects.

The scenario where the token becomes invalid due to something on their side and given our logic for token renewal we attempt to subscribe with a bad token before we our token lifespan has us consider the token invalid. This will cause a Session Invalid on our end and we won't attempt reconnect, rendering the websocket channel dead.

Edit:

I added an check for session invalid message coming back from Kraken which would indicate despite our efforts we still sent an invalid token, which would protect against the extremely unlikely situation where between us requesting a token and the submission the token became invalid. This removes all race conditions from our code.

Addresses what I investigated following https://github.com/knowm/XChange/issues/3683

@mdvx
@badgerwithagun

hi wanted to bump this back up, was hoping to get it looked at

@timmolter how would would you feel about looking at this review?

I'll look at this today. Been busy with work, sorry for the delay.

Nice job! @earce


enforce the validity of NIR graphs on creation

PR #59 introduces code to check the consistency and "defined-ness" of input and output types across a NIR graph (also pointed out in #4). This is currently not enforced.
However, NIR, as an intermediate representation, would do well to enforce the correctness of all created NIR graphs. Otherwise, we end up with potentially many invalid NIR graphs that will effectively be un-parseable.
This PR enforces the validity of NIR graphs, as defined by the NIRGraph._check_types() method. If the graph types are undefined or inconsistent, a warning is printed and an attempt is made to infer them with NIRGraph.infer_types(). If this fails, an error is thrown.
TODO:

fix tests

Note: this can also be merged only after our paper deadline.

Good idea, I've added a flag as NIRGraph parameter (ensure_validity). I've also put a strict flag into the read and write functions for NIRGraphs. This is turned on by default (since people should be using this), but can be turned off.
Many tests are failing now, because we had a lot of inconsistent graph types defined in the tests..


update to v5.0.0 and add hdf5

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.
I do have some suggestions for making it better though...
For recipe:

License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

@conda-forge-admin, please rerender

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [34, 41]

For recipe:

License is not an SPDX identifier (or a custom LicenseRef) nor an SPDX license expression.

Documentation on acceptable licenses can be found here.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

no job running. not sure why.

Linux
Linux builds ok, but recon_test_pack fails with
./simulate_data.sh: line 33:  7441 Aborted                 (core dumped) calculate_attenuation_coefficients --ACF my_acfs$suffix.hs ${atten_image} ${template_sino} forward_projector_proj_matrix_ray_tracing.par > my_create_acfs.log 2>&1
ERROR running calculate_attenuation_coefficients. Check my_create_acfs.log

Windows
Windows gets further in the recon_test_pack but I see lots of messages
ERROR: find_STIR_config_file could not open D:/bld/stir_1648052327299/_h_env/Library/share/stir/config/radionuclide_info.json
---- This test seems to be ok !

This is despite https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=479788&view=logs&j=5be07ae1-d8ba-5406-47b6-8e3a3a12f825&t=0bf03e01-0bec-5b85-5316-b1633322e895&l=14916
--- Installing: D:/bld/stir_1648052327299/_h_env/Library/share/stir/config/radionuclide_info.json

It is of course also weird that the tests claim to be ok, after a call to error. That might be a problem with lines like this
https://github.com/UCL/STIR/blob/master/recon_test_pack/run_tests.bat#L46
We end with
----------- tests on stir_math and correct_projdata ---------
first make up some randoms (just a projdata full of 1)
now make up a normalisation file (just projdata full of 2)
now run correct_projdata that will subtract randoms and then normalise
now do the same using stir_math
finally, compare the 2 results. should be identical:

ERROR: ProjData::read_from_file: error opening file my_correct_projdata_test_CR.hs
-- This test seems to be ok !

--------------- End of tests -------------

Everything seems to be fine !

So the ERRORLEVEL stuff in run_tests.bat isn't working, but these Windows issues aren't a conda recipe problem anymore.

Windows Appveyor tests don't use nlohmann_JSON so find_STIR_config_file is never called there.

Hi! This is the friendly automated conda-forge-linting service.
I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.
Here's what I've got...
For recipe:

Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [34]

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

I tried to remove HDF5 but the Linux version still found it, presumably because ITK depends on it. If the linux jobs still fail, I'll submit another change telling STIR not to add HDF5 support. Let's first see how the Windows jobs are doing now.

I've given up on Windows, but Linux keeps crashing in calculate_attenuation_coefficients. Essentially impossible to find out why by running this remotely.

@conda-forge-admin, please rerender

The problem seems to have been the new config-dir capability. conda builds/installs in a certain place, and runs the test in another, and a user does conda install it will again be somewhere else. In the first step, we set STIR_CONFIG_DIR as a preprocessor variable to where CMake installs it, but that is not related to where the recipe is tested, nor where the user installs. Hence everything fails.
I've now added activate.* scripts that set the STIR_CONFIG_DIR environment variable from using CONDA_PREFIX. This seems to have done the trick for Linux.
I've re-enabled the Windows and OSX builds now to check.

For future ref, activate scripts are (somewhat) described at https://docs.conda.io/projects/conda-build/en/latest/resources/activate-scripts.html


Fix bug #86

Closed #86

Thanks for the PR @levkush - I need to test this on my Arch environment. If everything looks good I'll approve and will merge


Fix language selector

When multilanguage are enabled in the app, in the language switcher the selected language's button has the same color as the selectable one(s). This quick-fix solves this.

I'm not sure this is the right solution.  Where did you get the colors for your CSS changes?


PrimeChecker

PrimeChecker
added O(sqrt(n)) java code to check if a number is prime or not
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[x] This change requires a documentation update

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generates no new warnings

First, get an issue assigned then make a PR


np.linalg.solve is slow

To my surprise, np.linalg.solve is extremely slow running on J-cluster.
conda 4.5.11
numpy                     1.15.0          py36_blas_openblashd3ea46f_200  [blas_openblas]  conda-forge
numpy-base                1.14.3           py36h0ea5e3f_1
numpydoc                  0.8.0                    py36_0

That was going to be my next question ( if something about the matrix made it hard to solve - its a random matrix which should be fine most of the time).
It seems likely then, that its something about the cluster machines.

The blas library? That is the reason I put conda and numpy info as your references.

I'll try to reproduce.

I get
slow time: 4.5670485496521
fast time: 3.658784866333008

with this environment:
    blas:            1.1-openblas                          conda-forge
    bzip2:           1.0.6-h470a237_2                      conda-forge
    ca-certificates: 2018.8.24-ha4d7672_0                  conda-forge
    certifi:         2018.8.24-py36_1                      conda-forge
    libffi:          3.2.1-hfc679d8_5                      conda-forge
    libgcc-ng:       7.2.0-hdf63c60_3                      conda-forge
    libgfortran:     3.0.0-1                               conda-forge
    libstdcxx-ng:    7.2.0-hdf63c60_3                      conda-forge
    ncurses:         6.1-hfc679d8_1                        conda-forge
    numpy:           1.15.0-py36_blas_openblashd3ea46f_200 conda-forge [blas_openblas]
    openblas:        0.2.20-8                              conda-forge
    openssl:         1.0.2p-h470a237_0                     conda-forge
    pip:             18.0-py36_1                           conda-forge
    python:          3.6.6-h5001a0f_0                      conda-forge
    readline:        7.0-haf1bffa_1                        conda-forge
    setuptools:      40.2.0-py36_0                         conda-forge
    sqlite:          3.24.0-h2f33b56_1                     conda-forge
    tk:              8.6.8-0                               conda-forge
    wheel:           0.31.1-py36_1                         conda-forge
    xz:              5.2.4-h470a237_1                      conda-forge
    zlib:            1.2.11-h470a237_3                     conda-forge

So, yea, linsolve isnt that much faster, but it also isn't taking 40 seconds!!
My laptop used mkl, that could be making the difference...

it is not my point to compare np.linalg.solve across different BLAS. MKL or OpenBlas.
I mean it should not be called as a faster solver if it is improved little comparing to np.linalg.inv. This is just misleading.

it is not my point to compare np.linalg.solve across different BLAS. MKL or OpenBlas.

I'd say "incomplete" rather than "misleading."  There was no subtlety in the lecture, that's for sure, but I maintain that solve is better than inv in most cases.  If you need the inverse matrix, then ya, by all means, use inv.
I know you're mathematically savvy, and I'm happy to talk details if you're interested (to the best of my ability).  I have a Numerical Analysis book you can borrow if interested.


Copy web dir to a dir on host before jekyll build

Resolves #186

LGTM, works as expected.
Admittedly, I haven't been able to consistently reproduce the NULL char character problem at the same time to compare.


Fix TF Lite Windows build.

Fix TF Lite Windows build.

TF Lite was failing to compile on Windows as math constants like
_M_PI were used but _USE_MATH_DEFINES was not defined. This
adds the definition _USE_MATH_DEFINES to the tensorflow-lite
target on Windows.
Also, fixed use of C99 / C++20 in
lite/delegates/external/external_delegate.cc.

Fixes #55745

Hi, it has been a couple of weeks any progress on reviewing this?

Hi @JunyoungLim Can you please review this PR ? Thank you!

Hi @stewartmiles Can you please resolve conflicts? Thank you!

Happy to as long as I get a quick review :) I'll do this now.

@gbaned or @JunyoungLim any chance someone could take a look at this? It's a tiny PR.

Hi, just checking in again. This pull was opened in April, I'm a Xoogler so I can be trusted (kinda), it's tiny .. can someone take a look?

Hi @stewartmiles, Sorry for the delay. Can you please resolve conflicts? Thank you!

@gbaned conflicts resolved.

At a glance the AMD ROCm build looks nothing to do with this patch, looks like an issue with the bazel / blaze config:
ERROR: An error occurred during the fetch of repository 'local_config_rocm':

   Traceback (most recent call last):

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 869, column 38, in _rocm_autoconf_impl

		_create_local_rocm_repository(repository_ctx)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 547, column 35, in _create_local_rocm_repository

		rocm_config = _get_rocm_config(repository_ctx, bash_bin, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 395, column 30, in _get_rocm_config

		config = find_rocm_config(repository_ctx, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 373, column 41, in find_rocm_config

		exec_result = _exec_find_rocm_config(repository_ctx, script_path)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 369, column 19, in _exec_find_rocm_config

		return execute(repository_ctx, [python_bin, "-c", decompress_and_execute_cmd])

	File "/workspace/third_party/remote_config/common.bzl", line 230, column 13, in execute

		fail(

Still waiting for a review ... 😒

@JunyoungLim as I mentioned before the failing presubmits are not related to this commit.
AMD ROCm is failing due to a missing TensorFlow runtime archive:
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/d08733f7ecc1e3ed5d75655fe47671b392f5b3a4.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found

Loading: 0 packages loaded

Loading: 0 packages loaded

Loading: 0 packages loaded

Loading: 0 packages loaded

Loading: 0 packages loaded

WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/2c3ca3b684bb2b188d977d47548e79dc559fb8ad.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found

Loading: 0 packages loaded

INFO: Repository local_config_rocm instantiated at:

  /workspace/WORKSPACE:15:14: in <toplevel>

  /workspace/tensorflow/workspace2.bzl:878:19: in workspace

  /workspace/tensorflow/workspace2.bzl:97:19: in _tf_toolchains

Repository rule rocm_configure defined at:

  /workspace/third_party/gpus/rocm_configure.bzl:888:33: in <toplevel>

ERROR: An error occurred during the fetch of repository 'local_config_rocm':

   Traceback (most recent call last):

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 869, column 38, in _rocm_autoconf_impl

		_create_local_rocm_repository(repository_ctx)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 547, column 35, in _create_local_rocm_repository

		rocm_config = _get_rocm_config(repository_ctx, bash_bin, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 395, column 30, in _get_rocm_config

		config = find_rocm_config(repository_ctx, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 373, column 41, in find_rocm_config

		exec_result = _exec_find_rocm_config(repository_ctx, script_path)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 369, column 19, in _exec_find_rocm_config

		return execute(repository_ctx, [python_bin, "-c", decompress_and_execute_cmd])

	File "/workspace/third_party/remote_config/common.bzl", line 230, column 13, in execute

		fail(

Error in fail: Repository command failed

ERROR: Specified ROCM_PATH "/opt/rocm-5.2.0" does not exist

ERROR: /workspace/WORKSPACE:15:14: fetching rocm_configure rule //external:local_config_rocm: Traceback (most recent call last):

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 869, column 38, in _rocm_autoconf_impl

		_create_local_rocm_repository(repository_ctx)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 547, column 35, in _create_local_rocm_repository

		rocm_config = _get_rocm_config(repository_ctx, bash_bin, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 395, column 30, in _get_rocm_config

		config = find_rocm_config(repository_ctx, find_rocm_config_script)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 373, column 41, in find_rocm_config

		exec_result = _exec_find_rocm_config(repository_ctx, script_path)

	File "/workspace/third_party/gpus/rocm_configure.bzl", line 369, column 19, in _exec_find_rocm_config

		return execute(repository_ctx, [python_bin, "-c", decompress_and_execute_cmd])

	File "/workspace/third_party/remote_config/common.bzl", line 230, column 13, in execute

		fail(

Error in fail: Repository command failed

ERROR: Specified ROCM_PATH "/opt/rocm-5.2.0" does not exist

ERROR: Skipping '//tensorflow/tools/pip_package:build_pip_package': no such package '@local_config_rocm//rocm': Repository command failed

ERROR: Specified ROCM_PATH "/opt/rocm-5.2.0" does not exist

WARNING: Target pattern parsing failed.

ERROR: no such package '@local_config_rocm//rocm': Repository command failed

ERROR: Specified ROCM_PATH "/opt/rocm-5.2.0" does not exist

Seems like ROCm version error. I will get back to this once the issue is resolved.

Sent an internal patch to upgrade the ROCm version. Hopefully this will fix the issue. Once it gets approved, I will LYK.

Thanks @JunyoungLim ! BTW it looks like "Code Check - Changed Files" and "Py+CPP Test Suite - Ubuntu CPU, Python 3.9" have been stuck in a queue for hours.

Hi Stewart, I just checked that AMD ROCm error has been happening in other PRs as well. Although we might need to fix this eventually, for now the ROCm check failure is not blocking the PR to be submitted.
To unblock this PR, can you try pushing an empty commit to this PR so that we can re-trigger the builds in CI?
https://stackoverflow.com/a/58190576/6096472

Just rebased and pushed an empty commit as requested.

@JunyoungLim I'm now back to waiting on "Code Check - Changed Files" and "Py+CPP Test Suite - Ubuntu CPU, Python 3.9" to run but they look like they're hung. Is it possible those other two workflows depend upon AMD ROCm completing successfully?

@gbaned @JunyoungLim any update on getting these workflows working or perhaps pushing on my behalf without the presubmit?

This AMD ROCm build failure and "Waiting for status to be reported" blockers seem to be ubiquitous across all the PRs at the moment. I will try it internally if it works.

I submitted this change internally to bypass all the GitHub CI checks. There doesn't seem to be any issue.
Once the internal change gets synced with the GitHub repo, could you try pulling it?
We can close this PR and issue after confirming that it works.

@JunyoungLim sounds great, what's the internal change message so that I can poll the repo to see when it appears?

Oh cool, you merged it for me in https://github.com/tensorflow/tensorflow/commit/b00661ef3be7aeae01b524b17ecedbc9efbd46b5 much appreciated!

Hi Stewart, the post submit check has some failures in MacOS, so the change got reverted. I will take a look at what's causing this issue.

The breakage is fixed, and the change is re-submitted. Hope it works now :)

@JunyoungLim cool thanks again!


Add support for automated testing.

Feature to support automated testing.

Fixed in v0.2.0 release


Mechanism for proposal ID generation

Location
[client]
Problem
Currently, we use the following mechanism for generating the proposal ID:

Encode all the parameters of the proposal, using perunio encoding into a binary format.
Hash the encoded data.

In #233, we have abstracted out the wire encoding component, so that different encoding formats can be used.
We also need to update the mechanism for generating proposal IDs, so that it is not dependent on a particular wire encoding format.
Proposal
There are two possible options:

We could add an interface in the wire package, that exposes methods for encoding proposals.
These functions, will in turn use the wire serialization format that is set by the user. This can be perunio or any other protocol.
type ProposalEncoder {
    LedgerChannelProposal(p LedgerChannelProposal) ([]byte, error)
    SubChannelProposal(p SubChannelProposal) ([]byte, error)
    VirtualChannelProposal(p VirtualChannelProposal) ([]byte, error)
}

Implications of this approach:
In case of protocol buffers (the second wire serialization protocol, that we want to support), the serialized output is not canonical across different languages. Hence, serializing the proposal, could result in different binary outputs, when using  implementations of protocol buffer library in different languages: Say, c and golang.
References: 1, 2
This would mean that, perun clients implemented in different languages, might generate different proposal IDs for the same proposal.

Looking at the fields in the channel proposals (here), most of the fields are already byte arrays. Apart from that, we have only one field of uint64 type and few fields of big.Int type.
a. For the byte array types, we could directly hash them.
b. For uint64, we could convert them to their binary representation (big/little endian), which is easy to do, consistently across programming languages.
c. For big.Int or multi-precision integers, we could convert them to their decimal representation, strip the leading zeros and hash the resulting string.
Implications of this approach:
As we directly use the byte arrays and define custom canonical formats for the other types (uint64, multi-precision integer), this mechanism will generate the same ID for a given proposal, across different programming languages.
However, this introduces a small overhead of having to implement this across different implementations and maintain them.

Resulting properties:
In case of 1: Since, different language implementations could produce different outputs, it may not be possible for a receiving party to verify if the proposal ID was generated correctly. The receiving party will have to trust the sender.
In case of 2: It is possible for the receiving party to verify.

@matthiasgeihs, I have summarized both the approaches that I had proposed for generating proposal ID. You can have a detailed look into them. Depending upon what security properties are desirable for proposal ID, we can choose one of them.

A few comments.
If we choose to go for approach 1, I suggest the following encode interface.
type ProposalEncoder {
    Encode(p ChannelProposal) ([]byte, error)
}

I checked the protocol and source code. It is not necessary for the ProposalID to be reproducible on the receiving end. Its main purpose is to let the proposer identify a response to its proposal. The proposal receiver can simply copy this ID to its proposal response and does not need to care about the value itself.
We could replace the proposal ID generation with a random nonce. This would eliminate the disadvantages of the methods proposed above (1) artificially exposing additional encoding methods, 2) having to implementing a custom encoding for ProposalID).

@matthiasgeihs Okay. If is not necessary for the proposal ID to be reproducible on the receiving end, I think, the alternate approach (of just using a nonce) that you have suggested looks like a better one.


A player should not be able to click on other's player attack cards

Seems the roll buttons are not grayed out to player who should not be able to roll on other's people cards.

Fixed. an error message now gets displayed if a user does try to roll something (s)he's not allowed to.  GM is allowed to roll everything.
maybe in some future release i'll change the style for non owned rolls, but atm i decided against it.


People automatically paired on Out of Office board

If I put someone on the Out of Office board, and then hit Recommend Pairs, Parrit will pair people with the people who aren't in the office. It'd be great if Parrit would treat my OOO people as though they were ineligible for pairing.
Or am I just doing it wrong?

You are not doing anything wrong- the functionality just isn't built into Parrit yet. I'm currently putting together a CLI for Parrit, but I'll break from that and see how easy this task is.

Thanks! Our team is really excited about Parrit, and this is one of the features that would make using it over Pairtrix or a big whiteboard an easier decision.

Hey @taavo, just wanted to give you an update on this. I'm basically feature complete, just need a way to give every project an 'exempt' board. Ideally this would be some kind of migration and I'm still pretty unskilled at SQL- I expect to have this feature launched by the end of the week if my struggles prove successful

Feature merged b9ef926fcd9bfafb4309df950a73526511ac5879


Data Shape vs resize:

This is mostly related to the usage of mxnet, than reporting any issue. I am not sure if this is the place to ask this question.
I'd like to know the differnece between 'resize' (during conversion to rec format) and 'data_shape' in during data_iter process. Are they both different things? I have images size originally of ~800X300 order.
Should I resize it to 256 during creation of .rec format or may I change the value to (3, 256, 256) kind of value later on, during data_iter method?
Any help appreciated!

If you use the default image iterator, you need to resize the images.
If you wrote your own data_iter, you can do either. Depending on your use case.

Ok, Thanks!


Ansatz cleanup

Clean up ansatz naming
Now all ansatz is available with parity mapping. The most gate-efficient circuits will be picked by the code based on the mapping, i.e. JW --> efficient circuits, other mappings --> trotterized fermionic.
The trotterized fermionics now have their pauli strings ordered to minimize the number of gates used. This can be done without approximation since all the Pauli strings from a single fermionic operator commute.
The conventional code and the qiskit implementation are now also parameter compatible with parity mapping.

Be aware of PR79. I dont know what happens if you merge this without first merging (or declining) PR79.


'cargo web' generated unexpected JS suffix!

I received this error
error: 'cargo web' generated unexpected JS suffix! This means it's updated without 'cargo screeps' also having updates. Please report this issue to https://github.com/daboross/screeps-in-rust-via-wasm/issues and include the last ~30 lines of /home/nathan/repos/screeps-starter-rust/target/wasm32-unknown-unknown/release/screeps-starter-rust.js

Last ~30 lines, as requested by the error
    if( __load_asynchronously ) {
        return WebAssembly.instantiate( __wasm_module, __imports )
            .then( instance => {
                __instantiate( instance );
                console.log( "Finished loading Rust wasm module 'screeps_starter_rust'" );
                return Module.exports;
            })
            .catch( error => {
                console.log( "Error loading Rust wasm module 'screeps_starter_rust':", error );
                throw error;
            });
    } else {
        const instance = new WebAssembly.Instance( __wasm_module, __imports );
        __instantiate( instance );
        return Module.exports;
    }
}

    if( typeof window === "undefined" && typeof process === "object" ) {
        const fs = require( "fs" );
        const path = require( "path" );
        const wasm_path = path.join( __dirname, "screeps-starter-rust.wasm" );
        const buffer = fs.readFileSync( wasm_path );
        const mod = new WebAssembly.Module( buffer );

        return __initialize( mod, false );
    } else {
        return fetch( "screeps-starter-rust.wasm", {credentials: "same-origin"} )
            .then( response => response.arrayBuffer() )
            .then( bytes => WebAssembly.compile( bytes ) )
            .then( mod => __initialize( mod, true ) );
    }
}));

Thanks for reporting this!
As mentioned this is due to cargo-web updating and my fragile transform not yet being updated. I'll push an update today!

Released as cargo-screeps 0.1.3.


Enhance 'getting started' text

The initial screen is somewhat terse. This can probably be enhanced, specifically with regard to
3. change the root to point to your model's index action by modifying
 public/.htaccess.passenger_fix and public/.htaccess

This should probably be expanded to say why we're doing this since it's not part of a traditional railsy workflow.

Opened separate issue. https://github.com/OSC/ood_appkit/issues/29


Also add link to CVMFS client install to the Data/CVMFS section of the TOC

I found it confusing that the CVMFS section of the docs did not have instructions on installing the CVMFS client.

Since the CVMFS client is for WNs, I'd prefer if we just renamed HTTP & CVMFS to HTTP

How about "HTTP and OASIS"?

Sure, either way works for me


Allow including ACTIVE image versions for rampup apart from NEW versions.

Apart from creating rampup for versions with state NEW, this change would allow to include ACTIVE version as well. Below are the different combination of version selection while creating rampup.

All versions with state NEW - typically rampup must be done for all new new versions.
NEW and ACTIVE version - this scenario is very useful and common. There is already one or more active version and we want to do slow rampup of  the new versions along with already existing active versions.
All ACTIVE versions - this one is an exceptional or rare scenario. But will be useful in cases like redoing rampup for old stable active version or while rolling back to the previous old active version. We could use rampup for all such active versions.

Pull Request Test Coverage Report for Build 5850

0 of 18 (0.0%)  changed or added relevant lines in 2 files are covered.
3 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.01%) to 43.372%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageVersionDaoImpl.java
0
7
0.0%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageRampupDaoImpl.java
0
11
0.0%

Files with Coverage Reduction
New Missed Lines
%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageRampupDaoImpl.java
1
2.1%

azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
2
76.36%

Totals

Change from base Build 5849:
-0.01%

Covered Lines:
16017

Relevant Lines:
36929

💛  - Coveralls

Pull Request Test Coverage Report for Build 5850

0 of 18 (0.0%)  changed or added relevant lines in 2 files are covered.
3 unchanged lines in 2 files lost coverage.
Overall coverage decreased (-0.01%) to 43.372%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageVersionDaoImpl.java
0
7
0.0%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageRampupDaoImpl.java
0
11
0.0%

Files with Coverage Reduction
New Missed Lines
%

azkaban-common/src/main/java/azkaban/imagemgmt/daos/ImageRampupDaoImpl.java
1
2.1%

azkaban-exec-server/src/main/java/azkaban/execapp/JobRunner.java
2
76.36%

Totals

Change from base Build 5849:
-0.01%

Covered Lines:
16017

Relevant Lines:
36929

💛  - Coveralls


Please merge pull request #18-345 from LaudateCorpus1/bump+automation

Library and Curse Bumps, updates to functionality #^
New Bump!
Just me and a couple of bots, bumping already updated software needed for better functionality. Like schema, parso, googleapis-common-protos, mypy, pytest, and hundreds others.

new push, closing for historic take. Omitting capitalization on (.^) whithst (.*).


Failed to Install PyCairo

Hi, I followed all the steps but this happens when I was trying to install Cairo. It would be great if someone could help me. Thanks!
ERROR: Command errored out with exit status 1:
command: 'd:\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"'; file='"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\13179\AppData\Local\Temp\pip-wheel-c3jy5r0i'
cwd: C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo
Complete output (18 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\cairo
copying cairo_init_.py -> build\lib.win32-3.8\cairo
copying cairo_init_.pyi -> build\lib.win32-3.8\cairo
copying cairo\py.typed -> build\lib.win32-3.8\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -Id:include -Id:include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win32-3.8\Release\cairo/device.obj
device.c
C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe' failed with exit status 2
ERROR: Failed building wheel for pycairo
Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo
Running setup.py install for pycairo ... error
ERROR: Command errored out with exit status 1:
command: 'd:\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"'; file='"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\13179\AppData\Local\Temp\pip-record-mwud0_3\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:Include\pycairo'
cwd: C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo
Complete output (18 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
creating build\lib.win32-3.8\cairo
copying cairo_init.py -> build\lib.win32-3.8\cairo
copying cairo_init_.pyi -> build\lib.win32-3.8\cairo
copying cairo\py.typed -> build\lib.win32-3.8\cairo
running build_ext
building 'cairo._cairo' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\cairo
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=19 -DPYCAIRO_VERSION_MICRO=1 -Id:include -Id:include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tccairo/device.c /Fobuild\temp.win32-3.8\Release\cairo/device.obj
device.c
C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x86\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"'; file='"'"'C:\Users\13179\AppData\Local\Temp\pip-install-22assx9t\pycairo\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\13179\AppData\Local\Temp\pip-record-_mwud0_3\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:Include\pycairo' Check the logs for full command output.

I had the same issue too. Manually installing PyCairo worked for me. Download pycairo-1.19.1-cp38-cp38-win32.whl here and then run pip3 install C:\path\to\wheel\pycairo‑1.19.1‑cp38‑cp38‑win32.whl

For those who are on Mac, there is a similar issue (which I believe to be the same). PyCairo requires some headers to be installed, therefore you need to run brew install cairo pkg-config and then pip install manim should be working fine (source: https://pycairo.readthedocs.io/en/latest/getting_started.html).

I had the same issue too. Manually installing PyCairo worked for me. Download pycairo-1.19.1-cp38-cp38-win32.whl here and then run pip3 install C:\path\to\wheel\pycairo‑1.19.1‑cp38‑cp38‑win32.whl

gives an error: ERROR: Invalid requirement: 'C:\path\to\wheel\pycairo-1.19.1-cp38-cp38-win32'
Hint: It looks like a path. File 'C:\path\to\wheel\pycairo-1.19.1-cp38-cp38-win32' does not exist.
and if I don't include the path it gives: ERROR: Could not find a version that satisfies the requirement pycairo-1.19.1-cp38-cp38-win32 (from versions: none)
ERROR: No matching distribution found for pycairo-1.19.1-cp38-cp38-win32

The C:\path\to\wheel\ is a placeholder to the actual path to your file on your computer. It might be at C:\Users\Oneyedeagle\Downloads for you, but it varies for everyone. Find the path to the file on your computer, and use that instead.

I changed the directory and from there I entered the command pip install pycairo-1.19.1-cp38-cp38-win32
it gave an error and when I tried what you mentioned
it gave an error: C:\Users\ASUS>pip3 install C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32
ERROR: Invalid requirement: 'C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32'
Hint: It looks like a path. File 'C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32' does not exist.
thankyou for replying to my earlier comment

Find the path to the file on your computer, and use that instead.

I changed the directory and from there I entered the command pip install pycairo-1.19.1-cp38-cp38-win32
it gave an error and when I tried what you mentioned
it gave an error: C:\Users\ASUS>pip3 install C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32
ERROR: Invalid requirement: 'C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32'
Hint: It looks like a path. File 'C:\Users\Asus\pycairo-1.19.1-cp38-cp38-win32' does not exist.
thankyou for replying to my earlier comment


fix(snapshot): properly display snapshot allocated space

Currently snapshot descriptor provides total replica size rather than amount of storage allocated for snapshot data. This fix uses Lvol usage statistics to return allocated_bytes for snapshots to denote storage space used by snapshots.

bors try

bors try

bors merge


Split Arithmetic Functions Registration

Compiling a single ArithmeticFunctionsRegistration.cpp consumes a lot of memory.
Split the functions into three: MathematicalFunctions, MathematicalOperators, ProbabilityTrigonometricFunctions.
These categories are inspired by the Presto documentation and split the functions equally.
I see a 1/3 memory reduction on my local setup.

@kgpai any conflicts from this change?


Create Layout Component

We need a Component that wraps the pages and automatically loads withSentry so that we don't repeat that on every page.

resolved by #57


[uprev] Roll Closure Compiler to 20220104

Update the pinned third-party dependency on Closure Compiler to the
version 20220104. No local patches were necessary.

This is a mechanical change - only README.google files were edited, and the rest is just overwritten as-is.


Task List: Tests that need to be written

The reason for this list
As Mezzanine grows and expands to cover more and more use cases, every new commit has the potential of inadvertently breaking something somewhere in the code base.
This issue keeps track of the tests that need to be written to ensure certain features are not broken. The goal is to have a comprehensive test base to avoid nasty surprises on new releases.
If you contribute a new feature or fix a bug, please run the current tests, write some for your contributions and comment on this issue to have your tests added as completed. If you can't write the test, comment on this issue to have it added as pending. Lastly, you can contribute by tackling some of the pending tests of this list.
The list
Core

[x] In the admin, the site drop-down must always be present when multiple sites exist.<PHONE_NUMBER>df560cea5b517317ef2a620005ee5d
[ ] In the admin, the language drop-down must always be present when i18n settings have been defined.

Blog

[ ] BlogPostForm must set the hidden fields' initial values and widgets.
[ ] BlogPost model's get_absolute_url method must build the correct url_name.
[ ] blog_post_list view must filter posts based on tag, date, category and author.
[ ] BlogCategoryAdmin's in_menu should return True only if the BlogCategory model is in the ADMIN_MENU_ORDER.
[ ] PostsRSS class should use the correct title and description based on the Page's existence.
[ ] PostsRSS's must filter blog posts based on tag, category and author.
[ ] blog_tags template tag should work correctly.

Twitter

[ ] Test all variations of Twitter queries. ASCII only and non-ASCII, User, Search, List, settings defined in Python vs the DB, Python 2 and Python 3. By my count that's 24 different paths that can occur - historically at least one of these is broken, and when fixing it, another will break.

Generic

[ ] Ensure comment values are correctly persisted through cookies and remain intact when pre-populating the comment form.

@stephenmcd having a mezzanine coverage report added on repo will be helpful

Would you like to make that happen? That'd be great.

@stephenmcd: Does that coverage report still need to be added to the repo? If so I can make that happen.

@afs2015 Looks like it to me. I'm guessing you mean Coveralls.io support? Because I'd wager the repository owner or a collaborator would have to activate the repo on Coveralls. Although you could get the travis.ci end setup.

For a lot of Mezzanine functionality, the testing tools provided by Django are inadequate. In particular, tests that use more than one HTTP request. The Django test client is basically useless for this - it doesn't simulate what browsers do closely enough to be of value.
For example, to test the login form changes I did in https://github.com/stephenmcd/mezzanine/pull/1737 you need to:

Load the login page
'Click' the 'site' radio button
Attempt to log in (with failed password)
Ensure that the 'site' radio button is still active.

The tests need to be written at the same high level - otherwise if we use the Django client we have the double pain of tests that are very verbose, and are a very poor indicator that the code actually works.
For this kind of use case, I think you should look into django-webtest, and for anything that needs Javascript, Selenium. You could also use django-functest which attempts to wrap both of these into a usable API. (Disclaimer - django-functest is mainly my work, but has worked well for me on various projects, and has very high test coverage itself).

@spookylukey reading your comment and exploring django-functest makes me angry! Why? Because I've wasted so much time writing low-level, boilerplate-filled tests for the past few years instead of using it, lol.
This is definitely something we want to incorporate into Mezzanine. Let me know if you're still interested in helping out with a test suite based on django-functest. I think it'll be specially helpful for the admin. For now I've added some key components we want to test to the issue description in light of some things we discovered on #1956

@jerivas as I'm no longer an active user of Mezzanine (I was using it mainly for a client), I'm very unlikely to get the time to contribute here. However, I'm still using django-functest in lots of projects, so if you need help with anything on that front let me know and I'll see what I can do. That includes any place where the docs are inadequate.


Generator doesn't create a default user for the API

Issue
Generator doesn't create a default user for the API, but doesn't warn you need to have at least one.
Binda API: v0.0.1.alpha.1
Binda: 0.1.11
Ruby on Rails: 5.2

The Generator doesn't create an API User because it doesn't know what contents shall be whitelisted.
We could:
a. just warn at install time that you need to create an API User in order to user the API
b. Create an API User that can see every Structure available at that time
What do you think?

I'm sorry Alessandro but I don't think this solution is ok...
Api user is created, but can't see anything through the API.
Another thing that smells bad is the class method in the model. That should't ben there.
We should have some sort of installer like the one we have for Binda Shopify.

Sorry, I've just seen both messages. Happy to amend anything where needed.

Api user is created, but can't see anything through the API.
You are right. I haven't thought about that.
b. Create an API User that can see every Structure available at that time
Shall we do that?

class method in the model
That's here to make it easier to test, but happy to amend it. When you say "some sort of installer like the one we have for Binda Shopify" do you mean this lines?


Fixing layout inconsistencies on new fullscreen marquee

while integrating the comments from the demo last Friday we left some inconsistencies on the block by accident. This will fix the issues.
Resolves: MWPW-143742 lasted comment
Test URLs:

Before: https://main--express--adobecom.hlx.page/express/create/flyer?martech=off
After: https://fullscreen-marquee-qa--express--adobecom.hlx.page/express/create/flyer?martech=off

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 36.67%.  Consider uploading reports for the commit 48595b1 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##            stage     #750      +/-   ##
==========================================
+ Coverage   36.60%   36.67%   +0.07%
==========================================
  Files         132      132
  Lines       25750    25750
==========================================
+ Hits         9425     9444      +19
+ Misses      16325    16306      -19

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


macs2 callpeak error

ImportError: /usr/lib64/libgfortran.so.1: undefined symbol: sqrtq
And anybody kown how to deal with this problem ?

Sorry, python module numpy need to be reasonable installed !


Fix broken Action: Fetch cabinet statement

Description:  Github action Fetch cabinet statement failing
Traceback (most recent call last):
  File "main.py", line 6, in <module>
    cabinent_statements = helper_functions.get_cabinent_statements_urls(date) #read cabinet statements until date
  File "/home/runner/work/gov-za-multilingual/gov-za-multilingual/src/gov_cab_statements_scrape/helper_functions.py", line 60, in get_cabinent_statements_urls
    statement['title'] = row.find('td').find('a').text
AttributeError: 'int' object has no attribute 'find

Looks like a simple fix, maybe they changed something in the website structure

#21


Updater seems to loose context when run through requestAnimationFrame

Hello,
I'm currently having an issue I can't resolve by myself.
class MyComponent {

  ...

  handleRef(ref) {
    this.rootNode = ref;

    if (ref === null) {
      cancelAnimationFrame(this.animationFrameID);
      this.animationFrameID = null;
      return;
    }

    this.onAnimationFrame();
  }

  onAnimationFrame() {
    if (!this.rootNode) { return; }

    // computes stuff

    if (conditionOnStuff) { this.setState({ field: true }); } // <-- this explodes.

    this.animationFrameID = requestAnimationFrame(this.onAnimationFrame.bind(this));
  }

  render() {
    return
 this.handleRef(r)} />;
  }
}

This component uses a ref on its root node, and depends on requestAnimationFrame for computing stuff around. when a condition is met, we call this.setState but it fails like this:

My understanding of the issue is that somehow track of my component's context was lost, but I don't have enough knowledge of react-lite's internals to put a finger on it.
Also, it works fine when I replace react-lite by react and react-dom.
Any idea of what could happen ?

Which version of react-lite did you use?
onAnimation had better not trigger in  handleRef, handleRef just use to attach and detach ref
class MyComponent {
  componentDidMount() {
  	if (condition) {
  		this.onAnimationFrame()
  	}
  }
  componentDidUpdate() {
  	if (condition) {
  		this.onAnimationFrame()
  	}
  }
  componentWillUnmount() {
  	this.cancelAnimationFrame()
  }
  handleRef(ref) {
    this.rootNode = ref;
  }
  cancelAnimationFrame() {
  	cancelAnimationFrame(this.animationFrameID)
  }
  onAnimationFrame() {
    if (!this.rootNode) { return; }

    if (this.state.count < 10) {
    	this.setState({ count: this.state.count + 1 });
    } // <-- this explodes.

    this.animationFrameID = requestAnimationFrame(this.onAnimationFrame.bind(this));
  }

  render() {
    return
 this.handleRef(r)}>{this.state.count}
;
  }
}


Unify PresentMaker and MissingNodesBasicFormatter, fixing a formatting bug in string literals

The underlying issues of the malformatted multi-line string literal are that

We are setting an anchorPoint for empty lines. Anchor points are meant to be starting points at which the user didn’t provide any manual indentation relative to which we should format the rest of the tree. But for empty lines it’s not like the user didn’t provide any indentation. There simply wasn’t anything to indent.
leadingTrivia.trimmingTrailingWhitespaceBeforeNewline was not considering whether the token text itself contained a newline in isBeforeNewline.

Now, to detect if the token is followed by a newline, we should check if its text is empty, which is the case for empty string literals. Unfortunately, this is also the case for missing identifiers, which also have an empty text but whose empty text will be replace by a placeholder by PresentMaker. To distinguish between the two, I merged PresentMaker and MissingNodesBasicFormatter so that the BasicFormat also performs the text replacement to placeholders.
Fixes #1959

@swift-ci Please test

In the following test case (no spaces in the empty lines), an indent is inserted in the first blank line. This is not identical to the original string.
assertFormatted(
  source: #"""
    assertionFailure("""

      First line
      Second line
      """)
    """#,
  expected: #"""
    assertionFailure("""

      First line
      Second line
      """)
    """#
)

Actual Result:
assertionFailure("""
␣␣␣␣

  First line
  Second line
  """)

In the following test case (no spaces in the empty lines), an indent is inserted in the first blank line. This is not identical to the original string.

Fixed

@swift-ci Please test

Running the following test case with the latest commit 3961b9c3bf3019e38c17db190de774d32b22ff61 produces incorrectly indented results.
assertFormatted(
  source: #"""
    assertionFailure("""

      \("""
        First Line
      """)
    """)
    """#,
  expected: ...
)

Actual result:
assertionFailure("""

      \("""
    First Line
  """)
    """)

@swift-ci Please test

Fixed as well. I can’t think of any more ways to break formatting of multi-line string literals but if you do find more, please let me know @kishikawakatsumi. And thanks for the thorough testing.

@swift-ci Please test

@swift-ci Please test


Prediction

Could you please include the instruction for doing the prediction?

Thanks for your answer and the code. I have an additional question on prediction. When I train the model, the error values are between the range of 1 to 2.7. and then, I have to normalize the scores based on all the scores in the testing set to get the prediction scores (between 0 to 1). How would I predict the anomaly for a single image? Do I need to keep the normal images even while predicting and store the single image in the test folder under abnormal set?

@samet-akcay I also has met this questions, I write a test code according your test() in model.py, the input is an image, I print the error value, how can I classify it real or fake according to the error value?

I created the custom dataset as mentioned in the README.txt with train and test directories.
train -> normal
test -> normal
-> abnormal
During training, the code splits the train set into "train" and "test". This means that it does not process the original test set created.
My question is how can I test the code on the "test" dataset which has normal and abnormal images.
Also, when the training is completed, my final AUC reading is:
AUC: 0.797 max AUC: 0.816
but when the ROC is drawn, I am getting the AUC as:
AUC = 0.80, EER = 0.28
Can anyone explain to me why am I getting this AUC value?  As I am new to this field, I am trying to understand the calculations.
Any explanation is appreciated.

@ samet-akcay
Hello samet-akcay,
Firstable,thanks for ur work,
I wanna know the predict answer with test data, I searching the threshold,but cant find it,dose it is " _ " in evaluate.py ?
evaluate.py :
 fpr, tpr, _ = roc_curve(labels, scores)
If it is,it has arranged,how can I make it arrang with test data?
Very thanks for your help and great work!

I created the custom dataset as mentioned in the README.txt with train and test directories.
train -> normal
test -> normal
-> abnormal
During training, the code splits the train set into "train" and "test". This means that it does not process the original test set created.
My question is how can I test the code on the "test" dataset which has normal and abnormal images.
Also, when the training is completed, my final AUC reading is:
AUC: 0.797 max AUC: 0.816
but when the ROC is drawn, I am getting the AUC as:
AUC = 0.80, EER = 0.28
Can anyone explain to me why am I getting this AUC value? As I am new to this field, I am trying to understand the calculations.
Any explanation is appreciated.

hi，why in my train the AUC is always nan,but the train generate picture is not too bad


How to inference in one shot mode?

I modified demo\demo.py like
        config_file="configs/one-shot/split1_vitl.yaml",
        rpn_config_file="configs/RPN/mask_rcnn_R_50_FPN_1x.yaml",
        model_path="weights/trained/oneshot/vitl_0074999.split1.pth",

But it crashed with following messge:
RuntimeError: Error(s) in loading state_dict for OpenSetDetectorWithExamples:
	Missing key(s) in state_dict: "offline_backbone.fpn_lateral2.weight",

You can try changing the rpn_config_file to the one-shot version you want to use

I generate new prototype with my datasets

, but the test results seems not so good. How can I improve it?
test_images.zip
support_images.zip

I saw that in your support images, you have more than one images per class, are you sure that you are trying in a one-shot configuration ? If you build the prototypes with all images of your classes, maybe you can try to use the few-shot or the open-vocabulary version first to see if it can give better results.

The support image is all instances in one image. Test results is still very bad given one images per class. And I'm trying to retrain it on half of my datasets.

For one shot, is it necessary to training devit with scripts/train.sh,  ignoring rpn with scripts/train_rpn.sh? It seems  there is no params for rpn model in demo.py.
Besides, I only modify CLASS_PROTOTYPES to prototypes generated by my datasets and register my datasets as coco_2017_train_oneshot_s1 instead of the original one in the source code.
Is these enough to train one shot model?

I have retrained devit and rpn for one shot by configs/one/shot/split1_vitl.yaml and configs/RPN/mask_rcnn_R_50_C4_1x_oneshot_s1.yaml.  But how can I test it with demo.py? There is no params for rpn in demo.py.

config_file="configs/one-shot/split1_vitl.yaml",  #'configs/one-shot/split1_vitl.yaml'
rpn_config_file="configs/RPN/mask_rcnn_R_50_C4_1x_oneshot_s1.yaml",
model_path="weights/trained/one-shot/vitl_0074999.split1.pth",
get error
config_file="configs/one-shot/split1_vitl.yaml",  #'configs/one-shot/split1_vitl.yaml'
rpn_config_file="configs/RPN/mask_rcnn_R_50_C4_1x_oneshot_s1.yaml",
model_path="weights/trained/one-shot/vitl_0074999.split1.pth",
how can i inference with one shot model?

@LLsmile
Hi,
Can you please tell me how do you build prototypes for your new object?  i ran demo/build_prototypes.ipynb with masks of my new object and got the .pth file and ran the demo with this new prototype model but got RuntimeError: Input and output sizes should be greater than 0, but got input (W: 0) and output (W: 128)
What is wrong? Thanks.


Invalid according to Policy: Policy expired.

When I try to upload a document, I get this error from AWS: Invalid according to Policy: Policy expired.
Do you have any idea what this could be about? My server / computer time is correct. I also changed the x-amz-date to 20150323T160944Z (with time). No change.
Request parameters
...
"x-amz-algorithm": AWS4-HMAC-SHA256
"x-amz-credential": AKIAJIQBGKWIQFOB6BTA/20150323/us-east-1/s3/aws4_request
"x-amz-date": 20150323T00000Z
...

Response (403 Forbidden)

<Error>
  AccessDenied
  <Message>Invalid according to Policy: Policy expired.</Message>
  <RequestId>9002BD2AC1D05F0A</RequestId>
  <HostId>sKjnB//MBQ1woLqdccBdPbX4IySIZ4l+lPiDvkh3OEYYwhygc1Q/mBXnCWOPtdns</HostId>
</Error>

Repsonse Date
"date": Mon, 23 Mar 2015 16:09:44 GMT

What did you set your expiry to in your directive? Can you perhaps post the policy from your request?

I'm experiencing this same behavior. I set the expiry to 5 mins (300000 msecs) in my directive. The strange thing is that yesterday, which is when I set this all up, it worked like a charm.  Today when I attempted an upload I saw this error. Nothing changed on the S3 side of things.
I too have confirmed that there is no clock drift or anything of that nature going on.

For me, this issue is due to the inclusion of datejs (http://www.datejs.com). That library overrides Date.now(), which is used to create the expiration for the policy.  The datajs version of this function does not return a timestamp, but instead returns an actual date object.
I overrode the implementation to behave is it should (i.e., return a timestamp) and my issue went away. This is not an issue with slingshot in my case.

Thanks for sharing @eeiswerth.
For anybody else still experiencing this issue, lookup upload.instructions.policy, where upload is your upload instance that has failed.
It is a base-64 encoded string. Decode it and it shall reveal the expiry date of your request.

@gsuess I too get this error. Where should I lookup upload.instructions.postData?

upload is your Slingshot.Upload instance.

@eeiswerth Glad you mentioned what caused your issue - it's exactly what's causing mine! How did you get around it exactly? In what way did you override the implementation?

I've solved this by setting expire: 60 * 60 * 60 * 1000 (one hour) in Slingshot.createDirective
@gsuess, does this pose any risks? (not exactly an s3 professional here...)

I'm seeing this error too.
there were no problem this morning, but started just one or two hours ago.
I have no idea what caused this (I haven't added any package today).
and in my case, expire: 25 * 60 * 1000 gave about 10 minutes. so it resolves the error.
Found "expiration":"2016-09-05T06:34:10.713Z" in upload.instructions.postData
my time zone is AEST(+10)


[1.20.1] Config Option to disable Potion Tooltips

Apothic Attributes: ApothicAttributes-1.20.1-1.2.1
Is there a config option to disable the Potion Tooltips added by this mod? If not, would it be possible to create config options to do so?

The latter (the gray unlocalized string) is only shown if advanced tooltips (f3+h) is enabled.
Its trivial to add a config for it though, not sure when I might get to it.

I would also like that, as I am using Effect description mod, which adds potion description to all potions, including moded potions, and this causes a duplicated line on the base vanilla potions.

I would also like this to be implemented! A simple toggle in the config would be hugely appreciated

I updated to 1.3.0 which should have the config to disable this, but I see no config file

The config file is located at /config/attributeslib.cfg.  That menu likely does not support the .cfg config format used by my mods.


immersive portals mod requiring   0.28.1 fabric API

Is it a mod compatibility issue?
Yes
If it's a mod compatibility issue, please provide the link(s) to the incompatible mod(s)

https://www.curseforge.com/minecraft/mc-mods/immersive-portals-mod/files/4945515
https://www.curseforge.com/minecraft/mc-mods/immersive-portals-mod/files/4973659
Minecraft version
1.20.2
Describe the issue
i've tried repeatedly downloading the immersive portals mod multiple times on latest minecraft fabric API but everytome i download the mod the same error screen appears showing that the mod is incompatible with the fabric launcher requiring fabric API ver 0.28.1    even though the latest fabric launcher is ver 0.15.3
( ps , im not sure why there is a mod called QMiscUtil is on the error list even though the immersive portals mod is the only mod in the mod file and that the fabric loader works finely without the immersive portals mod even thought i want to try out the immersive portal mod ,BTW could you devs mind updating the forge version for immersive portals for minecraft ver 1.20)

Install Fabric API, it's a separate mod


Suse 13.1: ./compile.sh succeeds but has a "missing dependency declarations" error (stdarg.h etc.)

Trying to build the latest bazel from git (14cd308) results  in an output/bazel file, but the console output suggests an error. Afterwards, the bazel server is running and I can build the rust example but not the C++ example. Using gcc (SUSE Linux) 4.8.1 20130909 [gcc-4_8-branch revision 202388]:
$ export JAVA_HOME=/work/jdk1.8.0_45/ # same with 1.7.0_55 OpenJDK from /usr/bin/java
$ ./compile.sh
INFO: You can skip this first step by providing a path to the bazel binary as second argument:
INFO:    ./compile.sh build /path/to/bazel
🍃  Building Bazel from scratch...........
🍃  Building Bazel with Bazel.
.Extracting Bazel installation...
.....
INFO: Found 1 target...
INFO: From Compiling src/main/tools/namespace-sandbox.c:
src/main/tools/namespace-sandbox.c: In function 'SpawnCommand':
src/main/tools/namespace-sandbox.c:149:5: warning: call to function 'EnableAlarm' without a real prototype [-Wunprototyped-calls]
     EnableAlarm(timeout);
     ^
src/main/tools/namespace-sandbox.c:72:6: note: 'EnableAlarm' was declared here
 void EnableAlarm();
      ^
ERROR: /work/bazel/src/main/tools/BUILD:14:1: undeclared inclusion(s) in rule '//src/main/tools:namespace-sandbox':
this rule is missing dependency declarations for the following files included by 'src/main/tools/namespace-sandbox.c':
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stddef.h'
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed/limits.h'
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed/syslimits.h'
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stdarg.h'.
Target //src:bazel failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.031s, Critical Path: 0.33s

Building output/bazel

Using the generated output/bazel file and trying to build the cpp hello world example results in a similar error:
$ /work/bazel/output/bazel build examples/cpp:hello-world
INFO: Found 1 target...
ERROR: /tmp/git-root/my-project/examples/cpp/BUILD:9:1: undeclared inclusion(s) in rule '//examples/cpp:hello-world':
this rule is missing dependency declarations for the following files included by 'examples/cpp/hello-world.cc':
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stdarg.h'
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stddef.h'
  '/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stdint.h'.
Target //examples/cpp:hello-world failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.345s, Critical Path: 0.20s

However, building the rust example via bazel works (after editing PATH in tools/build_rules/rust/rust.bzl to also include my ~/bin/ where rustc resides).

:+1: I’m getting this too (OS X 10.10.4 & Xcode).

Never mind as far as my above comment is concerned; the Bazel failures were due to a misconfiguration with the compiler, not with Bazel. I’m still interested in how this happens on a larger scale, however.

How was the compiler misconfigured? Apart from bazel nobody complains.
Or are there other workarounds, could I manually specify the missing dependencies, or override them?
this rule is missing dependency declarations for the following files included by 'src/main/tools/namespace-sandbox.c': [..]```

Or can I add  these "dependency declarations" manually?

You could add them to the CROSSTOOL file (https://github.com/google/bazel/blob/master/tools/cpp/CROSSTOOL#L50-52).

That fixes the issue, bazel and the example build, thank you:
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL
index cf39954..f1033cb 100644
--- a/tools/cpp/CROSSTOOL
+++ b/tools/cpp/CROSSTOOL
@@ -50,2 +50,3 @@
   cxx_builtin_include_directory: "/usr/lib/gcc/"
+  cxx_builtin_include_directory: "/usr/lib64/gcc/"
   cxx_builtin_include_directory: "/usr/local/include"


Add CNCF logo to meshery.io homepage

Current State of the Meshery.io site
Meshery is shown as a CNCF landscape project:

Desired State of the Meshery.io site
As Meshery is now a CNCF project and should use the plain CNCF logo:
cncf-horizontal-color.svg
Text in this section should be: "Meshery is a Cloud Native Computing Foundation project."

Contributor Resources

See the Contributing to Meshery.io Website section of the readme.md.

@leecalcote please make changes if they are needed

Sure @alphaX86

@navendu-pottekkat quick Q the text "Meshery is a CNCF project" should be the title?

Yes, the subtitle can be black IMO // @leecalcote

"Meshery is a Cloud Native Computing Foundation project."
LOGO
"Proudly representing every service mesh."