fix keep-alive memory leak

What kind of change does this PR introduce? (check at least one)

[x] Bugfix
[ ] Feature
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change? (check one)

[ ] Yes
[x] No

If yes, please describe the impact and migration path for existing applications:
The PR fulfills these requirements:

[x] It's submitted to the dev branch for v2.x (or to a previous version branch), not the master branch
[ ] When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)
[ ] All tests are passing: https://github.com/vuejs/vue/blob/dev/.github/CONTRIBUTING.md#development-setup
[ ] New/updated tests are included

If adding a new feature, the PR's description includes:

[ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to open a suggestion issue first and wait for approval before working on it)

Other information:
Compares the component instance, not the tag

Does the comparison of the instance objects have any performance implications versus a simple tag comparison?
I can see this being fast if during operation, this will only ever trigger a memory reference check (to see if two variables are pointing to the exact same memory location). But if it has to check for matches across cloned/copied objects, wouldn't there be a slower comparison operation to ensure all properties are congruent?
I haven't tested this yet. Just opening up discussion.


Allow configuration Azure:SignalR:Enabled false to disable Azure SignalR

Describe the bug
For netcore31, instead of manually call AddAzureSignalR, you can enable or disable Azure SignalR through config:
{
  "Azure": {
    "SignalR": {
      "Enabled": false
    }
  }
}

However, once AddAzureSignalR is added to code, this configuration never works again, it does not sound a consistent behavior from the user's perspective.

I was suprised when this didn't work, can this be fixed please? 😃

Are there any updates on this issue? We would love to be able to disable SignalR through Azure:SignalR:Enabled. Should we just remove the call to AddAzureSignalR()?

@hasandogu Yes, remove the call to AddAzureSignalR() will work.
If you're working on netcoreapp3.0+, you're able to switch between local SignalR and Azure SignalR by the simple configuration Azure:SignalR:Enabled. This is the usage for this configuration. See steps below.
Code in startup.cs

ConfigureService like:

public void ConfigureServices(IServiceCollection services)
{
      services.AddSignalR();
}

Configure like

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    app.UseEndpoints(routes =>
    {
        routes.MapHub<Chat>("/chat");
    }
}

Add Azure SignalR assembly startup in launchSettings.json

"environmentVariables": {
    ...,
    "ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.Azure.SignalR"
  }

Then use Azure:SignalR:Enabled to switch between SignalR/Azure SignalR.

I think it would fundamentally make sense to have an Azure:SignalR:Enabled configuration item that would work even if you have AddAzureSignalR().   The documentation pretty clearly indicates for local dev we should bypass this, but offers no way to do this, absent writing our own conditional configuration code.   I tried omiting the connection string, and it throws an exception.   Then I found this article and tried the HostingStartupAssemblies setup, but in .net 5 this apparently either does not work or there's more to it then this.
Even if it did work, I think the hostingstartupassemblies way of configuring this is incredibly obtuse and would make it very difficult for developers supporting the app to understand what is happening.

Another issue is enabling or disabling it based on Configuration provided by custom configuration sources. This Enabled key seems to only be searched for in the HostingEnvironment. It does not take into account custom configuration JSON, or other services that might deliver IConfiguration at runtime.
I would recommend the "on/off" functionality not be at the level of registration, but taken into account by Azure SignalR registered services itself, post startup.
I'm about to write a completely custom version of AddAzureSignalR for this, that injects different implementations for services based on configuration. =(

Any update on this seemingly very simple issue?  Why have this setting if it doesn't really do anything?  In my case I am attempting to disable/enable per environment and it is proving to be incredibly frustrating as basic configuration does not even seem to work with this product. 😖

After internal discussion, we decide to mark this issue as won't fix and follow current behavior.


Print recipe ingredients in format useful for import

I am trying to move recipes between craft installation using the feedme plugin, and while the import appears to allow for ingredient by row (quantity, unit, ingredient) the ingredient tag itself does not have the option to output in that format, only the formatted complete output.
How can I access the recipe ingredient table values in their stored format?

I'm not sure tbh -- @engram-design was nice enough to do the FeedMe integration, but I'm not sure how it works.

This is specific to the recipes plug-in, maybe a feature request. There should be the option to output quantity, unit, and ingredient by row.

Okay I completely misread what you were asking. You weren't asking about importing anything, but rather about being able to access the data from the field individually, yes?

Will re-open if more information is provided


Variable Fonts will ship in Firefox 62

I'd love to see Firefox's info on https://caniuse.com/#feat=variable-fonts updated.
Note 4 is definitely not true anymore. ("Does not support the font-weight and font-stretch properties.")
I'm not sure about Note 2 or Note 5. Or when Note 4 became not-true (in FF61 cycle? Or 62?)
Let me ping folks who do know, and they can fill in this issue with the details.
I know web developers and designers are excited about  Variable Fonts, and we want them to see that yes, it is in fact coming to Firefox in September.
Thanks.

Note 2 is no longer accurate; as of Firefox 59, there's support (if the relevant prefs are turned on) for Windows 10 (Fall Creators Update or later) and Linux (with FreeType 2.7.1 or later), and as of Firefox 60 there is also support on Android.
Note 5 also became obsolete with the FF60 cycle.
Also, a further adjustment to note 2: the macOS system version requirement is now 10.13 or later (matching Safari); we no longer attempt to support variable fonts on 10.12.
Note 4 became obsolete in the FF61 cycle.

Thanks for all the details! I believe the data's been appropriately updated now.

They haven't. The past comment before Fyrd's ones say that also supported on Win10 Fall Creators Update and Linux with Freetype 2.7.1 or newer so it needs fixing.


uTorrent script hanging

Windows 10 build 14393.693
uTorrent 3.4.9 w/ WebGUI enabled
If this is the wrong place to look for support I appologize but I couldn't find any official forums. I'm trying to get the uTorrent script working but I can't get it to execute properly. According to the uTorrent logs I think it's sending the correct command:

[2017-02-24 14:13:17]  Executing: C:\sickbeard_mp4_automator-master\uTorrentPostProcess.py sonarr udp://tracker.trackerfix.com:82/announce D:_uTorrent\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg] multi Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe.mkv 2F0A5F8A0A841F8E1F34CC29C81B77A64EA9B993 Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg]

And all I can find in the script folder's info.log file is this:

2017-02-24 14:06:32 - uTorrentPostProcess - INFO - uTorrent post processing started.
2017-02-24 14:06:32 - readSettings - INFO - C:\Python27\python.exe

The command line opens with those two lines and sits there for a few minutes. Oddly enough, it creates another folder inside of the download folder with the same name. Then it creates a new .mkv file inside that with the same name as the downloaded video in the folder above but it always sits at less than 100mb. Eventually the command line does something then disappears. The logs don't show any additional info after that so I ran the command manually and this is what it eventually does after hanging for a bit:

2017-02-24 14:19:58 - uTorrentPostProcess - INFO - uTorrent post processing started.
2017-02-24 14:19:58 - readSettings - INFO - C:\Python27\python.exe
Traceback (most recent call last):
File "C:\MP4Automator\uTorrentPostProcess.py", line 160, in
shutil.copy(inputfile, newpath)
File "C:\Python27\lib\shutil.py", line 119, in copy
copyfile(src, dst)
File "C:\Python27\lib\shutil.py", line 69, in copyfile
raise Error("%s and %s are the same file" % (src, dst))
shutil.Error: D:\_uTorrent\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg]\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg]\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe.mkv and D:\_uTorrent\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg]\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe[rarbg]\Brooklyn.Nine-Nine.S04E11E12.720p.WEB-DL.DD5.1.H264-GoApe.mkv are the same file

For reference, this is my uTorrent section from the autoProcess.ini:

[uTorrent]
convert = False
couchpotato-label = couchpotato
sickbeard-label = sickbeard
sonarr-label = sonarr
bypass-label = bypass
sickrage-label = sickrage
webui = True
action_before = stop
action_after = removedata
host = http://<IP_ADDRESS>:38081/
username = Belariad
password = REDACTED
output_directory =
radarr-label = radarr

Delete you username and password stuff mate

Can you post your full autoProcess file? I suspect you have something weird going on in the extensions or copyto options

autoProcess.txt

I have a similar problem where I can't even get it to start the conversation, but just looking at where you have put
[uTorrent]
convert = False This should be set to True if you want it to convert the files.

Should be fixed


mediaconvert is missing "Rotate" option on VideoSelector

I've been trying to create a job in mediaconvert using the auto rotate option as follows
session = botocore.session.get_session()
client = session.create_client(
        'mediaconvert',
        region_name=AWS_REGION,
        endpoint_url=MEDIACONVERT_ENDPOINT)

result = client.create_job(
            Role=AWS_ROLE,
            Settings={
              ...
              'Inputs': [{
                ...
                'VideoSelector': {
                  ...
                  'Rotate': 'AUTO'
                }
              }]
            })

However this option is missing from the service-2.json file.
/data/mediaconvert/2017-08-29/service-2.json
Please update this.

That change went out in today's release v1.12.103 (https://github.com/boto/botocore/blob/develop/botocore/data/mediaconvert/2017-08-29/service-2.json#L8039).


[Bug]:  when match search varchar type column throw ERROR 3013

Is there an existing issue for the same bug?

[X] I have checked the existing issues.

Version or Commit ID
v0.2.0
Other environment information
centos7.6, 256G memory

Actual behavior and How to reproduce it
table fileds = {id: int , embedding: vector (1024*float), content : varchar}
index={embedding: hnsw M:16 ef:50 metric:ip, content: Fulltext}
search:
res = table.output([""]).match("content", "DS-K3AJ303/Dm140", 'topn=3').to result()
return error:
Exception ERROR:3013 Invalid query statemet : OrQueryNode should not have both not child and non-not child
Expected behavior
return result and not exception
Additional information
No response

Hi, currently '-' is used for NOT query specified within the search grammer. You could use quotation marks to specify do "DS-K3AJ303/Dm140" as a phrase query so that the token inside the quotes is escaped.

Just adjust through following query statement:
 res = table.output([""]).match("content", "\"DS-K3AJ303/Dm140\"", 'topn=3').to result()

Converting the query into phrase query is a workaround. After the feature #1266 has been supported, the following query statement should work at that time.
 res = table.output([""]).match("content", "DS\-K3AJ303/Dm140", 'topn=3').to result()

Fixed by #1303
Special characters in query should be escaped by users.


fix: World::get_info -> pub

Could replace the sys::ecs_world_info_t with the type alias WorldInfoT, doesn't really affect much though and this is still an improvement. Would approve if I had the button.

Could replace the sys::ecs_world_info_t with the type alias WorldInfoT, doesn't really affect much though and this is still an improvement. Would approve if I had the button.

65fdc5f


Snippet placeholder transform place inversion

VS Code Version: 1.54.3 (user setup)
OS Version: Windows_NT x64 10.0.18363

Steps to Reproduce:

Write the following code snippet:

	"dummy": {
		"scope": "python",
		"prefix": "dummy",
		"body": [
			"${3:${1:Hi} ${2:Mark}}",
			"${3/(.+)/He said ${1} to ${2}/}"
		]
	}

Test it in a .py file.
When entering values to $1 and $2, result is :

Hi Mark
He said Hi Mark to

where "He said Hi to Mark" is expected.

Does this issue occur when all extensions are disabled?: Yes

There seems to be a misunderstanding. The ${N} tokens have a different meaning inside transformations. They refer to the capturing group of the regular expression. Your regex only defined one group and there the output is He said valueOf[(.+)] to


unable to install Saleor on A2hosted shared (with Python 3.7.3, Node.js 12.9.0, PostgreSQL  9.6.16)

when installing saleor with this command:
pip install -r requirements.txt
The installation failed :
Building wheels for collected packages: uwsgi
  Building wheel for uwsgi (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/webroser/virtualenv/envirpit/3.6/bin/python3.6_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d0405479/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d0405479/uwsgi/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 /tmp/pip-wheel-5te9vlal
       cwd: /tmp/pip-install-d0405479/uwsgi/
  Complete output (38 lines):
  /opt/alt/python36/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'
    warnings.warn(msg)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  copying uwsgidecorators.py -> build/lib
  installing to build/bdist.linux-x86_64/wheel
  running install
  using profile: buildconf/default.ini
  detected include path: ['/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include', '/usr/include']
  Patching "bin_name" to properly install_scripts dir
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-d0405479/uwsgi/setup.py", line 138, in <module>
      'Programming Language :: Python :: 3.6',
    File "/home/webroser/virtualenv/envirpit/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/opt/alt/python36/lib64/python3.6/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/home/webroser/virtualenv/envirpit/3.6/lib/python3.6/site-packages/wheel/bdist_wheel.py", line 215, in run
      self.run_command('install')
    File "/opt/alt/python36/lib64/python3.6/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
      cmd_obj.run()
    File "/tmp/pip-install-d0405479/uwsgi/setup.py", line 79, in run
      uc.build_uwsgi(conf)
    File "/tmp/pip-install-d0405479/uwsgi/uwsgiconfig.py", line 276, in build_uwsgi
      t.start()
    File "/opt/alt/python36/lib64/python3.6/threading.py", line 846, in start
      _start_new_thread(self._bootstrap, ())
  RuntimeError: can't start new thread
  ----------------------------------------
  ERROR: Failed building wheel for uwsgi
  Running setup.py clean for uwsgi
Failed to build uwsgi
Installing collected packages: uwsgi, weasyprint
    Running setup.py install for uwsgi ... error
    ERROR: Command errored out with exit status 1:
     command: /home/webroser/virtualenv/envirpit/3.6/bin/python3.6_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d0405479/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d0405479/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i69v16rg/install-record.txt --single-version-externally-managed --compile --install-headers /home/webroser/virtualenv/envirpit/3.6/include/site/python3.6/uwsgi
         cwd: /tmp/pip-install-d0405479/uwsgi/
    Complete output (25 lines):
    /opt/alt/python36/lib64/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'descriptions'
      warnings.warn(msg)
    running install
    using profile: buildconf/default.ini
    detected include path: ['/usr/lib/gcc/x86_64-redhat-linux/4.8.5/include', '/usr/include']
    Patching "bin_name" to properly install_scripts dir
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-d0405479/uwsgi/setup.py", line 138, in <module>
        'Programming Language :: Python :: 3.6',
      File "/home/webroser/virtualenv/envirpit/3.6/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
        return distutils.core.setup(**attrs)
      File "/opt/alt/python36/lib64/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/opt/alt/python36/lib64/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/tmp/pip-install-d0405479/uwsgi/setup.py", line 79, in run
        uc.build_uwsgi(conf)
      File "/tmp/pip-install-d0405479/uwsgi/uwsgiconfig.py", line 276, in build_uwsgi
        t.start()
      File "/opt/alt/python36/lib64/python3.6/threading.py", line 846, in start
        _start_new_thread(self._bootstrap, ())
    RuntimeError: can't start new thread
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/webroser/virtualenv/envirpit/3.6/bin/python3.6_bin -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-d0405479/uwsgi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-d0405479/uwsgi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-i69v16rg/install-record.txt --single-version-externally-managed --compile --install-headers /home/webroser/virtualenv/envirpit/3.6/include/site/python3.6/uwsgi Check the logs for full command output.

I haven't seen this error before, seems like related to your environment. Saleor requires Python 3.8, can you upgrade your version and try again?

It seems that the shared hosting option of A2hosted limits the number of threads a process can spawn. There is nothing we can do as the problem is not specific to Saleor.
You may be able to progress further by asking https://github.com/unbit/uwsgi developers for help with debugging.


Did Scott and Adam receive my email about project 1?

@Colsai and @VintageGold , did you get my email regarding Project 1? I used your UMBC emails<EMAIL_ADDRESS><EMAIL_ADDRESS>

Yes we did received your email on Oct 27th evening.


v8.0.3: fix: avoid using flags as fallbacks for missing CLI args

What does this PR do?
Follow up for #103 and #104- There's a new surprise on Commander's new version: If a command has a required parameter (hello [message]), support unknown options and it gets invoked without the parameter but with unknown options, instead of sending message as undefined, it will take the options to fill the missing parameters:
hello --something else

Will end up as:

message: --something.
unknown options: ['else'].

Now, how does it affects projext? If you call projext run without any target name, projext would find the default target name and use it; but if run gets called from projext-plugin-runner, the instruction becomes projext run --plugin projext-plugin-runner... yes, projext will try to find the target --plugin.
The fix is to check arguments list to make sure there are no flags before a real parameter or the command object. This fix only works on commands with a single parameter, which are all the commands with parameters on projext, but not to worry, I'll probably replace Commander soon, it's slow and it's giving too many issues after the latest release.
How should it be tested manually?
Try to use projext-plugin-runner without specifying the target and you'll see what happens :P.

Pull Request Test Coverage Report for Build 372

15 of 15 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 369:
0.0%

Covered Lines:
2288

Relevant Lines:
2288

💛  - Coveralls


Popup menu new option now showing correct text

Seems like the new options is not showing the correct text in the popup menu?

Also I could not get the new pickpocket feature to work, is it system dependant or is there a way to use it by using a shortcut?

I forgot to add the text replacement code for the custom check, i will quickly fix that. Regarding the pick pocketing: It can be triggered via the new "Pick pocket" key (no default value set) or the new macro (player folder) "Pick pocket". If it is active for a token (Pick pocket DC =/= -1) it should also be displayed in the action windows (the one in your screenshot).

I have added the missing translation with v2.0.1

Here is the new FR translation :
fr.json
I noticed that when I use the pick pocket action on a character, I don't see anything in his inventory (i'm using Custom System Builder), maybe this functon is system dependant?

Thanks for the translation update, much apreciated.
Custom system builder is indeed not supported currently, sorry. I will look into it immediately.

Ok, thanks a lot !

I have just released v2.0.3, i have added Custom System Builder support based on the example system provided. In case this doesn't work, are you using one of the provided systems, if yes, which one? If not, is there somewhere where i can download the system you use/can you send me the system file (preferable with at least one example item)?
The update also includes your translation update, thanks again.

No,  it's not working, I still can't see any item when I use pick pocket.
Do you want the "world" file or the "system" file?
I'm using standard CSB that I got on foundry, but the system is empty (that's the point), so things like quantity have to be set up manually (using a key) inside the item. But the inventory (items carried by the character) is still kinda built-in I guess.
Idk if i'm answering your question correctly, I hope so.

I need the json you can download in the settingstab (middle) and the json you can download when right clicking an item. The world file should work too though.

Oh ok :
export.json
World
fvtt-Item-random-template-B9SuC3GSeVBhSN2y.json
Just a random item template with only one key (quantity)
fvtt-Item-random-item-ji5xoVJNd8JcBcL2.json
A random item (the one on the character), based on the template

The newest v2.0.4 should now be compatible with the system (hopefully)

This works but when I take something, if the remaining quantity is 0, then the item doesn't disappear from the character I stole. Is it possible to do something about it?
Nothing to do with this issue, but I was wondering if it would be possible in the future to steal money via the item pile currency system? That would be awesome.

That items remain with 0 stacks i currently intentional. There is a chance that some systems/modules may do something weird with that doesn't behave well with the item copy i use. So in case something weird happen, the original still remains in the source inventory. Deleting the items isn't a problem, i just want to wait a few weaks incase some bugs with item copying arise.
Adding currency should be possible. I will need an export of the character data sheet you use though to see what the currency path is.

Ok nice ! This is a simple character with 3 main currencies and 3 secondary currencies (like it is possible to do with item pile).
fvtt-Actor-niz-BuATNbUkOayPSTR2.json

I think currencies should now appear and be transfered correctly with v2.0.5

This is working great, awesome man thanks !
Btw do you have any plateform where people can support your work?

Glad to hear that it works.
No, i don't have any platform for that.


[vsportal] Problem running Pangolin outside of conda env

Traceback (most recent call last):
  File "/home/poona8/.local/bin/pangolin", line 33, in <module>
    sys.exit(load_entry_point('pangolin==3.1.5', 'console_scripts', 'pangolin')())
  File "/home/poona8/.local/bin/pangolin", line 22, in importlib_load_entry_point
    for entry_point in distribution(dist_name).entry_points
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 524, in distribution
    return Distribution.from_name(distribution_name)
  File "/usr/local/lib/python3.9/importlib/metadata.py", line 187, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: pangolin

Ah, I needed to use pip3 install . instead of python3 setup.py install --user

python3 setup.py install --user installed to /home/poona8/.local/lib/python3.9/site-packages/covizu-0.3-py3.9.egg, which did not work.
python3 setup.py install installed to /home/poona8/workspace/python-app/venv/lib/python3.9/site-packages/covizu-0.3-py3.9.egg, which did work.


Update Zsh-Plugin-Standard link

The zdharma org no longer exists, so the link to the plugin standard is currently dead. This fixes it :)

Hey @pschmitt. Than you for PR!


pip installation using github repository incomplete

I tried to install pytorch-lightning using pip and the github repository.
Importing the module results in the following errors:
`
ModuleNotFoundError                       Traceback (most recent call last)
 in
8 from torchvision import ops
9
---> 10 import pytorch_lightning as ptl
11 from pytorch_lightning import Trainer
12 from test_tube import Experiment
/opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pytorch_lightning/init.py in
----> 1 from .models.trainer import Trainer
2 from .root_module.root_module import LightningModule
3 from .root_module.decorators import data_loader
ModuleNotFoundError: No module named 'pytorch_lightning.models'`
Following the error I found out, that there is no models folder under the path site-packages\pytorch_lightning

Pip install by itself should be fine.
If you're trying to clone and run master, something might have broken with relative imports
@Borda
Make sure you're using python 3.6 as well

@Borda looks like pep8 recommends absolute imports as well. let's just go back to those, i remember now why i got rid of relative imports a long time ago. Causes all sorts of headaches and it's not clear where things are coming from.

there was an error in the Trainer since the subpackage was missing __init__
it was fixed in #44 eacd93e2f05066c5ff7a89709ab9ec51bafbc607

ok awesome. should be on master now

@egonuel pls could you check it now...

@Borda I just checked it and now I'm getting this error (numpy is installed):

pip install git+https://github.com/williamFalcon/pytorch-lightning.git@master --upgrade
Collecting git+https://github.com/williamFalcon/pytorch-lightning.git@master
Cloning https://github.com/williamFalcon/pytorch-lightning.git (to revision master) to /tmp/pip-req-build-42ipxsly
Running command git clone -q https://github.com/williamFalcon/pytorch-lightning.git /tmp/pip-req-build-42ipxsly
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /opt/miniconda3/envs/dev_pytorch_lightning36/bin/python /opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpb9traczs
cwd: /tmp/pip-req-build-42ipxsly
Complete output (22 lines):
Traceback (most recent call last):
File "/opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in
main()
File "/opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-u6myx0it/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 145, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/tmp/pip-build-env-u6myx0it/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 126, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-u6myx0it/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 234, in run_setup
self).run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-u6myx0it/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 141, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 5, in
import pytorch_lightning
File "/tmp/pip-req-build-42ipxsly/pytorch_lightning/init.py", line 1, in
from .models.trainer import Trainer
File "/tmp/pip-req-build-42ipxsly/pytorch_lightning/models/trainer.py", line 9, in
import numpy as np
ModuleNotFoundError: No module named 'numpy'

ERROR: Command errored out with exit status 1: /opt/miniconda3/envs/dev_pytorch_lightning36/bin/python /opt/miniconda3/envs/dev_pytorch_lightning36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpb9traczs Check the logs for full command output.

it seems that numpy is missing in the setup, see following fix req. in setup #60

Fixed with the patch from #60 on #67

I just tried to get the latest master using pip, and I still get the same error as posted above...

I googled arround a bit and this has something to do with the pip version. I had installed pip 19.2.1. After downgrading to 18.0 the installations works. For reference see here https://github.com/earthlab/earthpy/issues/206
Does this work for you with a newer than 18.0 version?

@williamFalcon there are two possible solutions, fix __init__.py or setup.py

fixing __init__.py by wrapping import to try

try:
    from .models.trainer import Trainer
    from .root_module.root_module import LightningModule
    from .root_module.decorators import data_loader
except ImportError as e:
    print(e)

fixing setup.py remove loading pytorch_lightning at the beginning...

see the fix in #71, you may try it as
pip install git+https://github.com/Borda/pytorch-lightning.git@fix-setup

unfortunately, the #68 was merged in really fast fashion without complete testing...
we may consider modifying CI such way that it will test installation to blank environment

@Borda thanks, this runs through and installs without errors.
I don't think I can reopen this issue as it was closed by @williamFalcon

@egonuel  sorry you’re still having install issues!
@Borda thanks for taking a look. I’m not sure whether something was introduced that broke it, haven’t had any pip install issues.
a few things:

try catch seems hacky to me. let’s do the setup fix?
not sure it matters but we don’t explicitly support venv, people should just be using conda here.
is the only fix for setup making a relative import? i want to keep imports absolute. Haven’t had clone+install issues in this repo ever until just this week with these new changes people introduced. does it have to do with that? or maybe that we all use conda?

installing to blank environment would be a good move for CI but might be slow no?

unfortunately, the #68 was merged in really fast fashion without complete testing...
we may consider modifying CI such way that it will test installation to blank environment
@egonuel pls reopen this ticket till it is properly fixed... :)

i run branches on my gpu machine before merging if tests pass there then i merge since those are more thorough. in some cases it may look like CI didn’t finish bc the local gpu run finishes first, which is when i merge

https://github.com/williamFalcon/pytorch-lightning/issues/56#issuecomment-519413104 sure but before you test the setup, you install or you already gad installed the requirements so all needed libraries were there... which is another story from installing to blank env

try catch seems hacky to me. let’s do the setup fix?

up to you, if you chose fix setup you need to keep in mind that the version is at two places (setup and init)

not sure it matters but we don’t explicitly support venv, people should just be using conda here.

for conda it should be fine since at already comes with preinstalled most libraries

is the only fix for setup making a relative import? i want to keep imports absolute. Haven’t had clone+install issues in this repo ever until just this week with these new changes people introduced. does it have to do with that? or maybe that we all use conda?

relative/absolute import does not change anything in this context

installing to blank environment would be a good move for CI but might be slow no?

not necessary, it just changes order, you try to install which install also all requirement and later when you ask for requirements installation it pass since everything is already there...

@egonuel try again?

@williamFalcon it works now, nice! Thanks a lot!


docs: add Raft config file

Signed-off-by: lilin90<EMAIL_ADDRESS>
What have you changed? (mandatory)
Add 1 doc: Raft Configuration
Does this PR affect documentation (docs/docs-cn) update? (mandatory)
Relevant.
Does this PR affect tidb-ansible update? (mandatory)
No.

@Hoverbear @CaitinChen PTAL

@siddontang @CaitinChen Since this is already covered in the tikv-ctl doc, I'll close this PR.


ignoreFiles invalid matches

With this setup:
content/daylight/day/sunday.txt
content/daylight/index.md

and this config:
ignoreFiles:
- day/

Neither file is created in the output folder. Same goes for these:
- day/.*
- day\\
- day\\.*

https://gohugo.io/getting-started/configuration#ignore-content-files-when-rendering

So the problem was, that my actual setup looks like this:
monday/content/daylight/day/sunday.txt
monday/content/daylight/index.md

so day/ was essentially ignoring everything. Proper config would be:
ignoreFiles:
- /day$

Something else I did notice though, is that the match seems to have some kind of
depth limit. For example, with this setup:
content\daylight\day\wed.txt
content\daylight\index.md
content\daylight\tue.txt

ignoreFiles:
- \.txt

you get this result:
public\daylight\day\wed.txt
public\daylight\index.html

https://github.com/gohugoio/hugo/issues/7221

Why was this closed? The described confusing behavior (the alleged depth limit) still persists.

This was my issue under another account. I had other more important issues, and I solved this one myself as detailed in the other thread.


IconButton tooltips accept nodes, not just strings

@nevir Can you update the doc?

Thanks @nevir!
@oliviertassinari feel free to submit a quick fix for the doc site. Otherwise, I'll make a note to update it in the next minor release :)


zimfw: 1.13.1 -> 1.14.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/zimfw/zimfw/releases.
meta.description for zimfw is: The Zsh configuration framework with blazing speed and modular extensions
meta.homepage for zimfw is: https://zimfw.sh
Updates performed

Version update

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 1.14.0 with grep in /nix/store/5mbncww5nhiws5d5hma40pydlj4wdp3n-zimfw-1.14.0
found 1.14.0 in filename of file in /nix/store/5mbncww5nhiws5d5hma40pydlj4wdp3n-zimfw-1.14.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

zimfw

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/5mbncww5nhiws5d5hma40pydlj4wdp3n-zimfw-1.14.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A zimfw https://github.com/r-ryantm/nixpkgs/archive/94e90e895a76ce58b8286cb02262059049c10820.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/94e90e895a76ce58b8286cb02262059049c10820#zimfw

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/5mbncww5nhiws5d5hma40pydlj4wdp3n-zimfw-1.14.0
ls -la /nix/store/5mbncww5nhiws5d5hma40pydlj4wdp3n-zimfw-1.14.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review --extra-nixpkgs-config '{ allowInsecurePredicate = x: true; }' run on x86_64-linux 1

1 package built:

zimfw

Maintainer pings
cc @joedevivo for testing.

Result of nixpkgs-review pr 322560 run on x86_64-linux 1

1 package built:

zimfw


added PSSpred container

This builds a PSSpred container image.
@advanderveer @borismattijssen

Cool! let this be the start for a nice collection of examples that illustrate the value for various scientific compute use cases. @borismattijssen  could you take a look if its easy to always fetch the latest GitHub release during Docker builds? If not we can merge this

curl -s https://api.github.com/repos/nerdalize/nerd/releases | grep "browser_download_url.*linux.tar.gz" | head -n 1 | cut -d '"' -f 4
This will give the latest download URL. So this will download the latest binary:
curl -L `curl -s https://api.github.com/repos/nerdalize/nerd/releases | grep "browser_download_url.*linux.tar.gz" | head -n 1 | cut -d '"' -f 4` | tar xz

This will not download the latest version if docker is caching.

Closing this, I believe we use Nerd as a base image now


Provider must require service context on creation, cause it might constist service logger

task already done for etcd v2


[BUG] Rename CopyMemory to LHCopyMemory [Windows SDK Conflict]

Hey, When using LightHook on MSVC and WindowsSDK source cannot be compiled because your implementation of CopyMemory conflicts with Windows SDK  CopyMemory, This can simply be fixed by renaming it to something else like LHCopyMemory.
Regards

That was fixed already so I am going to close this.


pdfviewer will not show online pdfs... even with CORS correctly configured

Link to PDF file (or attach file here): https://github.com/mozilla/pdf.js/blob/gh-pages/web/viewer.js#L8366
Configuration:

Web browser and its version: firefox
Operating system and its version: ubuntu
PDF.js version: PDF.js version 1.5.292 (latest commit of gh-pages as of today- bc5e00a)
Is an extension: no

Steps to reproduce the problem:

Set up a page for the viewer.
Set up a server to serve pdfs with the access-control-allow-origin configured correctly
Go to the viewer with the file argument set to one of the pdfs from step 2 (as in "example.com/web/viewer.html?file=http://website.org/pdf.pdf")

What is the expected behavior? (add screenshot)
For the viewer to show the pdf normally.
What went wrong? (add screenshot)
Exception thrown by the viewer: "file origin does not match viewer's"
NOTICE: When I removed the throw exception from line 8366 (if (fileOrigin !== viewerOrigin) then throw the exception), the viewer worked JUST FINE with my project. So this check should be substituted for one that doesn't prevent something that should work from working, or removed (IMO).

It's disabled on purpose. See #6916 for details. We also mentioned that at FAQs.


gtt: init at 8

Description of changes
add gtt: Google Translate TUI (Originally). Now support Apertium, Argos, Bing, ChatGPT, DeepL, Google, Reverso.
from https://github.com/eeeXun/gtt

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@linuxissuper can you also update PR title

@linuxissuper sorry I wasn't clear enough, PR title should be gtt: init at 8

@linuxissuper sorry I wasn't clear enough, PR title should be gtt: init at 8

I'm sorry, should've been obvious to me 🙈
not sure why the title wasn't the first commit anyway 🤔


a error when build tensorrt_llm

[ 98%] Built target layers_src
[ 98%] Built target common_src
[ 98%] Built target runtime_src
[ 98%] Built target kernels_src
[ 98%] Linking CXX static library libtensorrt_llm_static.a
[ 98%] Built target tensorrt_llm_static
[100%] Linking CXX shared library libtensorrt_llm.so
/usr/bin/ld:/workspace/base/TensorRT-LLM-release-0.5.0/cpp/tensorrt_llm/batch_manager/x86_64-linux-gnu/libtensorrt_llm_batch_manager_static.a: file format not recognized; treating as linker script
/usr/bin/ld:/workspace/base/TensorRT-LLM-release-0.5.0/cpp/tensorrt_llm/batch_manager/x86_64-linux-gnu/libtensorrt_llm_batch_manager_static.a:1: syntax error
collect2: error: ld returned 1 exit status
gmake[3]: *** [tensorrt_llm/CMakeFiles/tensorrt_llm.dir/build.make:714: tensorrt_llm/libtensorrt_llm.so] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:677: tensorrt_llm/CMakeFiles/tensorrt_llm.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:684: tensorrt_llm/CMakeFiles/tensorrt_llm.dir/rule] Error 2
gmake: *** [Makefile:179: tensorrt_llm] Error 2

with build command
./scripts/build_wheel.py --clean --cuda_architectures "80-real" --trt_root /usr/local/tensorrt

libtensorrt_llm_batch_manager_static.a:1: syntax error

Did you execute
git lfs install
git lfs pull

as described here: https://github.com/NVIDIA/TensorRT-LLM/blob/release/0.5.0/docs/source/installation.md#fetch-the-sources ?
The .a files are LFS files, the issue might be that those files are not fetched properly.

你执行了吗
git lfs install
git lfs pull

如此处所述： https: //github.com/NVIDIA/TensorRT-LLM/blob/release/0.5.0/docs/source/installation.md#fetch-the-sources？
这些.a文件是 LFS 文件，问题可能是这些文件未正确获取。

Yes! That's right, it's work 😁

Cool. I'm closing that issue. Feel free to re-open if needed.


Update benchmark tests and definitions

update benchmark tests to remove requirement for automated namespace creation as this process will be different across controllers (see #1196).
cleanup test list and profile level definitions to align with 1.

/assign @rjbez17 @Divya063 @phoenixking25

/lgtm
/approve


data: Coffe and Wifi

Add a new project to the list
I want to add a new project to the list   that is coffe and wifi which helps to find user nearby cafes with information regarding power supply..
Code of Conduct

[X] I agree to follow this project's Code of Conduct

Completed. Thanks for your contributions 🎉 ❤


Nginx plugin Phalcon 4.x compatibility

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
[x] I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
[x] I have searched the existing issues and I'm convinced that mine is new.
[x] The title contains the plugin to which this issue belongs
Describe the bug
In https://github.com/opnsense/core/issues/4012 we upgraded our Phalcon version to 4.1 and refactored the relevant code, it seems that the Nginx plugin contains some custom constraints which depend on Phalcon and might be subjected to change.
The master branch and upcoming development release of OPNsense will contain all required changes in core, the Nginx plugin needs to be validated and altered if needed.
# grep -r Phalcon www/nginx/
www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php:     * @throws \Phalcon\Validation\Exception on validation errors
www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php:     * @throws \Phalcon\Validation\Exception on validation errors
www/nginx/src/opnsense/mvc/app/controllers/OPNsense/Nginx/Api/SettingsController.php:     * @throws \Phalcon\Validation\Exception
www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php:use Phalcon\Validation\Message;
www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NgxBusyBufferConstraint.php:    public function validate(\Phalcon\Validation $validator, $attribute)
www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php:use Phalcon\Validation\Message;
www/nginx/src/opnsense/mvc/app/models/OPNsense/Base/Constraints/NaxsiIdentifierConstraint.php:    public function validate(\Phalcon\Validation $validator, $attribute)
www/nginx/src/opnsense/service/templates/OPNsense/Nginx/webgui.conf:  # Phalcon ui and api routing

@fabianfrz do you have time to handle this one?

@AdSchellevis Is there a way I can test that? So that I do have a phalcon 4.1 on a VM to test with?

@fabianfrz the new phalcon version is shipped as a development package in 21.1.5, so switching a vm to development should be enough to test your changes. I haven't looked at ui_devtools yet, still need to recompile some stuff on my mac

@AdSchellevis I will try to have a look at it this weekend then.


LightningCLI: Variable interpolation and command line arguments

🐛 Bug
Hi! I'm not sure this is actually a bug or if the one doing something wrong, but here's the problem.
I'm using OmegaConf’s variable interpolation to link one parameter in the configuration file to a second one, which I want to provide with the command line. The problem is that, when using the command line to provide one of the two parameters, the second one, linked to the first one with variable interpolation, doesn't change.

To Reproduce

config.yaml

foo: default_value
bar: ${foo}

main.py

from pytorch_lightning.utilities.cli import LightningCLI

class MyLightningCLI(LightningCLI):
    def add_arguments_to_parser(self, parser):
        parser.add_argument("--foo", type=str)
        parser.add_argument("--bar", type=str)

if __name__ == "__main__":
    cli = MyLightningCLI(parser_kwargs={"parser_mode": "omegaconf"})

Run

python main.py fit \
    --config=config.yaml \
    --foo=some_value \
    --print_config

Result

The result of this is that the foo parameter is equal to the value assigned with the command line, some_value, but the bar parameter isn't, and it is instead keeping its default value set in the config file (default_value).
seed_everything: null
trainer:
  logger: true
  checkpoint_callback: null
  ...
foo: some_value
bar: default_value
...

Expected behavior
I expected the bar parameter to be equal to the foo parameter, that is to have the value some_value:
seed_everything: null
trainer:
  logger: true
  checkpoint_callback: null
  ...
foo: some_value
bar: some_value
...

Environment

PyTorch Lightning Version (e.g., 1.5.0): 1.6.4
PyTorch Version (e.g., 1.10): 1.10.2
Python version (e.g., 3.9): 3.9
OS (e.g., Linux): Mac
GPU models and configuration: None (CPU)
How you installed PyTorch (conda, pip, source): pip

@lodo1995 Thanks a lot for pointing that out! I honestly didn't notice that, that's unfortunate 😭 Do you happen to know if there is some workaround for that?

@mikcnt I guess there must be a smart way to abuse argument linking to achieve what you want, but I'm not sure how.
Alternatively, you can "brute force" it by overriding before_instantiate_classes, manually looking for the pattern ${*} in every string argument and doing the appropriate lookup and replacement based on other arguments. Watch out for infinite recursion if you try this!
But no, I don't know of any simple workaround.

@mikcnt with your example using foo and bar it is not known what was the real use case behind it. Could you please your actual case? There are many cases in which link_arguments should be used, but people go for variable interpolation because it is a better known concept.

@lodo1995 thanks a lot for the tips! I'll try something out, even though I still want to keep things simple.
@mauvilsa Sure, my example isn't really explanatory. My use case is similar to the the first example of https://github.com/Lightning-AI/lightning/issues/13558. Basically, I want to provide one single parameter through the command line (let's say the name of the experiment), and I want to be able to fill some other parameter as well (e.g., wandb run, directory for the checkpoints, etc).

@mauvilsa Sure, my example isn't really explanatory. My use case is similar to the the first example of #13558. Basically, I want to provide one single parameter through the command line (let's say the name of the experiment), and I want to use that to fill some other parameter as well (e.g., wandb run, directory for the checkpoints, etc).

To me it seems that what you want is not interpolation. There is a single parameter, and its value will always be used in several specific places. It is not responsibility of who uses the CLI to do this in a config file. Is your intention that the loggers are always WandbLogger and CSVLogger, or you want the amount and which loggers to be configurable? link_arguments does not support linking to a target which is an element of a list, like the logger when there are multiple. But if the loggers are fixed I think it might be already possible to do what you want.

To me it seems that what you want is not interpolation. There is a single parameter, and its value will always be used in several specific places. It is not responsibility of who uses the CLI to do this in a config file.

I see what you're saying. The reason why I was thinking about interpolation is that I didn't want to necessarily use the same parameter for every single location, but most definitely a slight modification of this, and that was something easily achievable with interpolation. Nevertheless, I think that would suffice.

Is your intention that the loggers are always WandbLogger and CSVLogger, or you want the amount and which loggers to be configurable?

Yes, I'll use only WandbLogger for every experiment.

There were some cases that link_arguments did not support which are required for your logger example. I implemented them but not yet in a release. To try out the code below you will need to install jsonargparse from source.
If the CLI will have one or more fixed loggers, then better to make the choice of loggers non-configurable. Only configurable would be the parameters of each fixed logger. For a single logger, this could be done as:
def save_dir_from_experiment_name(name):
    return f'logging-{name}'

class MyCLI(LightningCLI):
    def add_arguments_to_parser(self, parser):
        parser.add_argument('--experiment_name', type=str, required=True)
        parser.add_class_arguments(TensorBoardLogger, 'tensorboard')
        parser.link_arguments('experiment_name', 'tensorboard.save_dir', compute_fn=save_dir_from_experiment_name)
        parser.link_arguments('tensorboard', 'trainer.logger', apply_on='instantiate')

The save_dir_from_experiment_name function is just to illustrate that linked values can be modified, which is what I understood you wanted. The config would have a structure like:
trainer:
  ... # excluding logger
experiment_name: ...
tensorboard:
  ... # excluding save_dir

For multiple loggers it could be as:
def as_list(*items):
    return [*items]

class MyCLI(LightningCLI):
    def add_arguments_to_parser(self, parser):
        parser.add_argument('--experiment_name', type=str, required=True)
        parser.add_class_arguments(TensorBoardLogger, 'loggers.tensorboard')
        parser.add_class_arguments(CSVLogger, 'loggers.csv')
        parser.link_arguments('experiment_name', 'loggers.tensorboard.save_dir')
        parser.link_arguments('experiment_name', 'loggers.csv.save_dir')
        parser.link_arguments(
            ('loggers.tensorboard', 'loggers.csv'),
            'trainer.logger',
            apply_on='instantiate',
            compute_fn=as_list,
        )

And the config structure:
trainer:
  ... # excluding logger
experiment_name: ...
loggers:
  tensorboard:
    ... # excluding save_dir
  csv:
    ... # excluding save_dir

Sorry for the superlate response. That's exactly what I was searching for! Thanks for helping out and taking the time to write a comprehensive guide :).

@mikcnt If you don't have any further questions, you should close the issue. Thanks! :)


deutsche_bahn platform not working (no data)

Home Assistant release (hass --version): 0.36.1
Python release (python3 --version): Python 3.4.2
Component/platform: deutsche_bahn
Description of problem: DB component stopped working - for few last days it constantly shows 'unknown' for every component like it cannot retrieve data
Expected: show attributes like next train, delay etc.
Traceback (if applicable): not available

Works fine on dev
sensor:
  - platform: deutsche_bahn
    from: Munich
    to: Berlin

Does this work from the command-line?
>>> import schiene
>>> s = schiene.Schiene()
>>> s.connections('Mannheim HbF', 'Stuttgart HbF')

I don't know if I do this properly, but I've tried to use code in python and:
>>> import schiene
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'schiene'
>>>

Is it possible that module got deleted after last update (from 0.36) or somehow different?
(I don't do anything with this server really)

After installing:
$ pip install schiene
Collecting schiene
  Using cached schiene-0.18.tar.gz
Requirement already satisfied: requests>=2.10.0 in ./lib/python3.4/site-packages (from schiene)
Collecting beautifulsoup4>=4.4.1 (from schiene)
  Using cached beautifulsoup4-4.5.3-py3-none-any.whl
Installing collected packages: beautifulsoup4, schiene
  Running setup.py install for schiene ... done
Successfully installed beautifulsoup4-4.5.3 schiene-0.18

Code you've mentioned works in CLI, but not in HASS (still 'unknown' near every position which was working earlier).

Is it possible that module got deleted after last update (from 0.36) or somehow different?

I don't think so.

Maybe it has something to do with #5519 and beautifulsoup4?

I doubt that because this change is only available in dev. Maybe it's the other way around and beautifulsoup4 4.5.3 fixes the issue ;-)
Can you please post your configuration.yaml entry for the sensor? There was an issue a few weeks back when certain information were not available.

Here it is - names of stations are redacted, but were working without any changes:
# Deutsche BahN
- platform: deutsche_bahn
  from: 'REDACTED'
  to: 'REDACTED'

- platform: template
  sensors:
    train_next_departure:
      value_template: '{{ states.sensor.REDACTED_to_REDACTED.attributes.next }}'
      entity_id: 'sensor.REDACTED_to_REDACTED'
    train_bywho:
      value_template: >
        {{ states.sensor.REDACTED_to_REDACTED.attributes.products|replace("[\'", '')|replace("\']", '') }}
      entity_id: 'sensor.REDACTED_to_REDACTED'
    train_nexton_deprature:
      value_template: '{{ states.sensor.REDACTED_to_REDACTED.attributes.next_on }}'
      entity_id: 'sensor.REDACTED_to_REDACTED'
    train_delay:
      value_template: '{{ states.sensor.REDACTED_to_REDACTED.attributes.delay }}'
      entity_id: 'sensor.REDACTED_to_REDACTED'

All of the entities get the 'unknown' values of course.

Recap:
With
>>> import schiene
>>> s = schiene.Schiene()
>>> s.connections('Your from:', 'Your to:')

you get a response with the information about your journey but not with HA. What happens if you use different stations in HA?

It seems like it's still unknown

I'm after upgrade to 0.37 - problem still exists


Running tests only for a module?

I would like to run TDD tests only for a selected module. Is there any Grunt task for it?
Development instructions in
https://github.com/angular-ui/bootstrap/wiki/Development
only mention grunt watch, which is massive and slow.
For specific modules, only build:module is mentioned,
(whereas watch:module ignores the module),
with further instructions somewhat sketchy:
"Check the Grunt build file for other tasks that are defined for this project."
I couldn't tell how to do it from looking to Gruntfile.js but I'm no "Grunt expert" (using Gulp instead, which I prefer by far).

You can edit karma.conf.js to include files only from the modules you need. Otherwise, you can modify the tests to use fdescribe for the particular tests you want to run.

I was hoping for a cleaner solution, don't want getting merge conflicts when pulling updates from upstream.
I would prefer to use a separate custom karma config but not sure how to make it run.
There are also subtleties when modifying karma:

one does not forget the dependencies of modules, e.g. bindHtml and position for typeahead:

the following elegant brace matching globs will NOT watch for file changes (see https://github.com/karma-runner/karma/pull/1251, which is not fixed after all):
// list of files / patterns to load in the browser
files: [
...
'src/{typeahead,bindHtml,position}//*.js',
'template/{typeahead,bindHtml,position}//*.js'
],

One has to use the more verbose globs without braces instead.

The other solution with fdescribe unfortunately doesn't work (without additional hacking) because fdescribe breaks the validators:
$ grunt watch
Running "enforce" task

Running "ddescribe-iit:files" (ddescribe-iit) task
>> src/typeahead/test/typeahead.spec.js has `fdescribe` at line 1
Warning: Task "ddescribe-iit:files" failed. Use --force to continue.

Aborted due to warnings.

See working config here:
https://github.com/dmitriz/bootstrap/commit/f5e4dcbf009945a566142e33e97f3daab4b0eb30

To get around the ddescribe tests, just use --force like:
grunt watch --force
# or
grunt --force

I don't think we should change anything in the code to support this as we do want all the tests to run by default.
Perhaps it's a good idea to add these instructions to the wiki.

Thanks, it is better :)
But still not ideal.
When I am working on specific module, I want to keep running all related tests, not just one I changed to fdescribe. Some related tests are spread over several files. Manually editing them back and forth just doesn't feel right.

Concerning running all tests...
It takes 25 seconds (!) for the whole run on my Macbook Pro (8 GB RAM, 1600 MHz DDR3), I don't want to think how slow it is on cheaper less powerful machines.
Worse - I get 3 full screens of warnings not related to the module I am working on - do you really want to see them all after every single edit?
But wait - it gets even worse!
As I type and save, your first edit is picked by Karma and tests are run. During the next 25++ seconds as they run, Karma will ignore all you following edits. What that effectively means, you will end up with untested potentially faulty code but will still see "Done, without errors."!
You will see the errors eventually but possibly too many at a time, which can easily drive you (at least me) insane :scream:

Here I submitted a related PR:
https://github.com/angular-ui/bootstrap/pull/3548#issuecomment-93482302

You can set fdescribe on multiple describe blocks. I don't think this should go into core. If you're working on a module, this is a temporary state. I don't think the core should support your use case. We want to run all tests all the time. If anything, we should instead spend time and effort on making the tests run faster.

Agreed with @chrisirhc here. And we should really remove fdescribe checks on watch - we only care that are not left behind in the final build - having them during watch is OK.

Ah right, indeed, it makes sense to remove those fdescribe checks on each watch run. It can run it when it's not a watch statement or during the initial run but not on each subsequent watch run.

Hm. I'm running it on my machine and I don't see the warnings on every run. I only see it on the initial run. Perhaps @dmitriz has a different configuration?

I have created Gist to demonstrate testing output:
https://gist.github.com/dmitriz/6bdf94d41f6c652bd15f
By changing reportSlowerThan: inside karma.conf.js I can suppress the warnings.
Note that time can slightly change for different test runs, so suppressed warnings can also change.
With  reportSlowerThan: 300 all warnings disappear.
But the problem is not the warnings, it is the 25 seconds to complete tests on each run
I may be missing something but I can't understand how that can be practical.
Can someone who is doing TDD and working on the code confirm that she is indeed running all 700+ tests upon each file save?

I'm using fdescribe when developing specific modules.

It should be noted that fdescribe and fit can be used for convenience in combination with grunt karma:continuous or karma start karma.conf.js. This avoids the whole re-running tests problem while working in an isolated area of the codebase.


how to run different test targets in same version of simulators parallel

Hi
I want to run my test targets parallel in same version of simulators.Is that possible?
to be more clear what I want to do is
targetA -----ios 6 version 10.1
targetB------ios 6 version 10.1

It's not possible to do this in a single invocation of pxctest run-tests. What you could do is boot two simulators in a different device set path, and then run in parallel:
pxctest run-tests --deviceset /tmp/targetA --only targetA ...
pxctest run-tests --deviceset /tmp/targetB --only targetB ...

when i run this command
pxctest boot-simulators \     --deviceset /tmp/test-simulators \     --destination 'name=iPhone 5,os=iOS 9.3' \     --destination 'name=iPad Retina,os=iOS 9.3'
i get Unknown command: boot-simulators`` do i miss something?

The boot-simulators command is not released yet. This means you'd need to install via brew install pxctest --HEAD.

hi @okanerdogan84 ! I have a working python script and json file to accomplish what you are looking for, using only and spawning multiple processes to divvy tests up among multiple, headless simulators, see below, let me know if you have any questions!
---PYTHON---
`import subprocess
import glob
import os
from subprocess import Popen
import math
import time
import json
with open('ios_tests.json') as f:
IOS_TESTS_DICT = json.load(f)
COMMANDS_ETC = IOS_TESTS_DICT['commands_etc']
DIRECTORY = IOS_TESTS_DICT['directory']
SIM_DIRECTORY = IOS_TESTS_DICT['simulator_dir']
REPO_DIRECTORY = DIRECTORY + COMMANDS_ETC['project_string']
NUMBER_OF_SIMULATORS = IOS_TESTS_DICT['number_of_simulators']
LIST_OF_LIST_OF_TESTS = []
TESTS_PER_SIMULATOR = 1
TESTS_DIR = IOS_TESTS_DICT['tests_dir']
def get_list_of_tests():
list_of_tests = [os.path.basename(x) for x in glob.glob(REPO_DIRECTORY + '/' + TESTS_DIR + '/*Test.swift')]
trimmed_list_of_tests = []
for test in list_of_tests:
trimmed_list_of_tests.append(test[:test.index('.swift')])
return trimmed_list_of_tests
def build_list_of_lists():
list_of_lists = []
tests = get_list_of_tests()
number_of_tests = len(tests)
tests_to_add = number_of_tests
TESTS_PER_SIMULATOR = math.floor(number_of_tests / int(NUMBER_OF_SIMULATORS))
while tests_to_add >= 1:
temp_list = []
for num in range(1, int(TESTS_PER_SIMULATOR) + 1):
if tests_to_add > 0:
temp_list.append(tests[tests_to_add - 1])
tests_to_add -= 1
list_of_lists.append(temp_list)
return list_of_lists
def get_comma_separated_string(list_of_string):
return ','.join(list_of_string)
def call_subprocess(command, cwd=REPO_DIRECTORY):
print('calling process in directory - ' + cwd + ' - ' + command)
subprocess.check_call(command, cwd=cwd, shell=True)
def create_simulator_directory(sim_num):
os.makedirs(REPO_DIRECTORY + '/' + SIM_DIRECTORY + '/' + sim_num)
def build_simulator(sim_num):
call_subprocess(COMMANDS_ETC['build_simulators'] % (REPO_DIRECTORY + '/' + SIM_DIRECTORY + '/' + sim_num))
def iterate_over_simulators(passed_func):
for num in range(1, int(NUMBER_OF_SIMULATORS) + 1):
passed_func(str(num))
def create_directories():
iterate_over_simulators(create_simulator_directory)
def build_simulators():
iterate_over_simulators(build_simulator)
def run_tests(commands_param):
print('running processes in ' + REPO_DIRECTORY + '- ')
for cmd in commands_param:
print(cmd)
processes = [Popen(cmd, cwd=REPO_DIRECTORY, shell=True) for cmd in commands_param]
for p in processes:
p.wait()
def build_test_commands():
commands_inner = []
for num in range(1, int(NUMBER_OF_SIMULATORS) + 1):
# if its the final simulator
if num == int(NUMBER_OF_SIMULATORS):
# if there is more than 1 list left
if num != len(LIST_OF_LIST_OF_TESTS):
# add the rest of the tests
commands_inner.append(build_test_command(str(num), get_comma_separated_string(
LIST_OF_LIST_OF_TESTS[num - 1]) + ',' + get_comma_separated_string(LIST_OF_LIST_OF_TESTS[num])))
return commands_inner
commands_inner.append(build_test_command(str(num), get_comma_separated_string(LIST_OF_LIST_OF_TESTS[num - 1])))
return commands_inner
def build_test_command(sim_num, string_of_tests):
return COMMANDS_ETC['run_test'] % (
REPO_DIRECTORY + '/' + SIM_DIRECTORY + '/' + sim_num, REPO_DIRECTORY + '/' + SIM_DIRECTORY + '/' + sim_num,
REPO_DIRECTORY, ':' + string_of_tests)
execute commands
try:
start_time = time.time()
call_subprocess(COMMANDS_ETC['clone_statement'], cwd=DIRECTORY)
call_subprocess(COMMANDS_ETC['checkout_branch'])
call_subprocess(COMMANDS_ETC['pod_install'])
call_subprocess(COMMANDS_ETC['xcode_build'] % REPO_DIRECTORY)
LIST_OF_LIST_OF_TESTS = build_list_of_lists()
create_directories()
commands = build_test_commands()
build_simulators()
run_tests(commands)
end_time = time.time()
total_time = (end_time - start_time) / 60
print('done. took ' + str(total_time) + ' minutes')
except subprocess.CalledProcessError as e:
print('Test exited with non-zero code:', e)
`
---JSON---
{ 	"number_of_simulators": "2", 	"directory": "/Users/me/", 	"tests_dir": "uiTests", 	"simulator_dir": "sim_devices", 	"commands_etc": { 		"checkout_branch": "git checkout feature/fail_branch", 		"project_string": "project", 		"clone_statement": "git clone https://bitbucket.org/PATH", 		"pod_install": "pod install", 		"build_simulators": "pxctest boot-simulators --deviceset %s --destination 'name=iPad Air 2,os=iOS 10.2'", 		"xcode_build": "xcodebuild -IDEBuildLocationStyle=Custom -IDECustomBuildLocationType=Absolute -IDECustomBuildProductsPath='%s/build/Products' -scheme 'project - TS' -workspace 'project.xcworkspace' -destination 'platform=iOS Simulator,name=iPad Air 2,OS=10.2' build-for-testing", 		"run_test": "pxctest run-tests --output %s --deviceset %s --destination 'name=iPad Air 2,os=iOS 10.2' --testrun %s/build/Products/\"project - TS_iphonesimulator10.2-x86_64.xctestrun\" --only 'mosaicUITests%s'" 		} }


Unable to Run Tutorial.ipynb

Hello,
I am not able to run the tutorial notebook. The error message is:

I am using python 3.8.18 and pytorch 1.8.0 via (pip install torch==1.8.0+cu111 torchvision==0.9.0+cu111 torchaudio==0.8.0 -f https://download.pytorch.org/whl/torch_stable.html). A list of my conda environment packages is attached.
pae_env_packages.txt
Note that I have tried various versions of pytorch and I either receive the attached error, or an error regarding the mode not being boolean.
Can you help resolve this error? If there is a docker container or a specification file of the exact environment you used to run the notebooks, that would be helpful.
Thanks in advance.

Following up on this issue.


Not compatible with File__Find when bootstrap?

When I run perl6 bootstrap.pl command under panda directory, it returns the following error:
Could not find lib in any of: /home/xuzhao/git/panda/ext/File__Find/lib
I have checked and the ext/File__Find/lib folder does exist.

Hmm, is it still happening? What if you remove and re-clone panda directory? What's your platform?

I recloned panda repo and this problem is already fixed.

Good to know. Thanks, and sorry for the wait.


refactor: move all 'filetests/vcode' tests to 'filetests/isa'

When I was looking for examples of what test compile looked like in vcode, I realized that the aarch64 tests are in a different location than I would have expected. This moves them into parallel folders in filetests/isa (alongside x64, x86, riscv).

Let's see if a rebase and re-push clears up the CI issues.


CrossdataManifest couldn't be parsed

Hi,
I installed a new Stratio-Cassandra with Lucene 2.1.5 and Also updated Stratio-Cassandra-Connector Version No 0.4.0-SNAPSHOT
But when i installing Stratio Crossdata to attach a new Connector to Cluster i got an ERROR
xdsh:root> ADD CONNECTOR /home/tg1//target/cassandra-connector-0.4.0-SNAPSHOT/conf/CassandraConnector.xml;
[Driver] 07-07-2015 16:34:05.383 [ERROR|BasicDriver$] CrossdataManifest couldn't be parsed
Error parsing manifest:
com.stratio.crossdata.common.exceptions.ManifestException: javax.xml.bind.UnmarshalException

with linked exception:
[org.xml.sax.SAXParseException; lineNumber: 8; columnNumber: 13; cvc-complex-type.2.4.a: Invalid content was found starting with element 'Native'. One of '{RequiredProperties, OptionalProperties, SupportedOperations, Functions}' is expected.]
at com.stratio.crossdata.driver.utils.ManifestUtils$.parseFromXmlToConnectorManifest(ManifestUtils.scala:101)
at com.stratio.crossdata.driver.utils.ManifestUtils$.parseFromXmlToManifest(ManifestUtils.scala:49)
at com.stratio.crossdata.driver.BasicDriver.addManifest(BasicDriver.scala:545)
at com.stratio.crossdata.driver.BasicDriver.sendManifest(BasicDriver.scala:383)
at com.stratio.crossdata.driver.BasicDriver.executeApiCall(BasicDriver.scala:299)
at com.stratio.crossdata.driver.BasicDriver.executeAsyncRawQuery(BasicDriver.scala:256)
at com.stratio.crossdata.sh.Shell.executeAsyncRawQuery(Shell.java:416)
at com.stratio.crossdata.sh.Shell.loop(Shell.java:376)
at com.stratio.crossdata.sh.Shell.main(Shell.java:163)
Caused by: javax.xml.bind.UnmarshalException

In Prerequisite column It is given that
Cassandra version 2.1.6 must be installed and started.
Crossdata version 0.4.0-SNAPSHOT is needed to interact with this connector.
but i did not find Crossdata 0.4.0 version in repository, it is still 0.3.4.
Can u please upload the New version of Crossdata
Thanks!

The 0.4.0-SNAPSHOT version is in Master branch. Please checkout to this
branch and the problem with the manifest will be resolved.
On Tue, Jul 7, 2015 at 1:52 PM, Austin Solomon<EMAIL_ADDRESS>wrote:

Hi,
I installed a new Stratio-Cassandra with Lucene 2.1.5 and Also updated
Stratio-Cassandra-Connector Version No 0.4.0-SNAPSHOT
But when i installing Stratio Crossdata to attach a new Connector to
Cluster i got an ERROR
xdsh:root> ADD CONNECTOR
/home/tg1//target/cassandra-connector-0.4.0-SNAPSHOT/conf/CassandraConnector.xml;
[Driver] 07-07-2015 16:34:05.383 [ERROR|BasicDriver$] CrossdataManifest
couldn't be parsed
Error parsing manifest:
com.stratio.crossdata.common.exceptions.ManifestException:
javax.xml.bind.UnmarshalException

with linked exception: [org.xml.sax.SAXParseException; lineNumber:
8; columnNumber: 13; cvc-complex-type.2.4.a: Invalid content was found
starting with element 'Native'. One of '{RequiredProperties,
OptionalProperties, SupportedOperations, Functions}' is expected.] at
com.stratio.crossdata.driver.utils.ManifestUtils$.parseFromXmlToConnectorManifest(ManifestUtils.scala:101)
at
com.stratio.crossdata.driver.utils.ManifestUtils$.parseFromXmlToManifest(ManifestUtils.scala:49)
at
com.stratio.crossdata.driver.BasicDriver.addManifest(BasicDriver.scala:545)
at
com.stratio.crossdata.driver.BasicDriver.sendManifest(BasicDriver.scala:383)
at
com.stratio.crossdata.driver.BasicDriver.executeApiCall(BasicDriver.scala:299)
at
com.stratio.crossdata.driver.BasicDriver.executeAsyncRawQuery(BasicDriver.scala:256)
at com.stratio.crossdata.sh.Shell.executeAsyncRawQuery(Shell.java:416) at
com.stratio.crossdata.sh.Shell.loop(Shell.java:376) at
com.stratio.crossdata.sh.Shell.main(Shell.java:163) Caused by:
javax.xml.bind.UnmarshalException

In Prerequisite column It is given that
Cassandra version 2.1.6 must be installed and started.
Crossdata version 0.4.0-SNAPSHOT is needed to interact with this connector.
but i did not find Crossdata 0.4.0 version in repository, it is sitll
0.3.4.
Can u please upload the New version of Crossdata
Thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/Stratio/stratio-connector-cassandra/issues/3.

--
Juanjo Lopez
Via de las Dos Castillas, 33. Ática 4. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: 91 352 59 42 // @stratiobd

Ok, I will check it and let you know.
Thanks for the reply..... :)

Hi ,
I have a Twitter table in Crossdata Cataloge and i am using cassandra connector,
When i querry the table
...............................................................................................................................................................
xdsh:root:DemoTwitter> SELECT * FROM IndexTweet WHERE CreatedAt >= '2015-07-10 10:41:44+0530' AND  CreatedAt <= '2015-07-10 10:43:44+0530'  LIMIT 10;
[Driver] 11-07-2015 12:58:15.601 [INFO|Shell] Query 699cd2ca-3fb7-45e7-9ad1-42d2c2a85e95 in progress
xdsh:root:DemoTwitter>
Result: The operation for query 699cd2ca-3fb7-45e7-9ad1-42d2c2a85e95 cannot be executed:
Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING
...............................................................................................................................................................
and if i give ALLOW FILTER to this querry i am getting
Parser exception:
Error recognized: line 1:139: required (...)+ loop did not match anything at input 'ALLOW'
SELECT * FROM IndexTweet WHERE CreatedAt >= '2015-07-10 10:41:44+0530' AND CreatedAt <= '2015-07-10 10:43:44+0530' LIMIT 10 ?ALLOW FILTERING;
Please tell me what is the problem?
I am usind Apache Cassandra 2.1.7
Crossdata 0.4.0
Cassandra Connector 0.4.0.

Hi again,
Nowadays Crossdata hasn't implement the ALLOW FILTERING command, because
it's very inefficient. Please see this datastax  doc and you can see the
reasons of why Crossdata are not implemented allow filtering.
http://www.datastax.com/dev/blog/allow-filtering-explained-2
One solution could be create a Lucene Index in CreatedAt column. Once you
have the lucene index, you can use the function range implemented in
Cassandra Connector. You can redesign the query like this:
SELECT * FROM IndexTweet WHERE CreatedAt=range('2015-07-10 10:41:44','
2015-07-10
10:43:44');
I hope this solution works fine for your use case.
Juanjo
On Sat, Jul 11, 2015 at 9:33 AM, Austin Solomon<EMAIL_ADDRESS>wrote:

Hi ,
I have a Twitter table in Crossdata Cataloge and i am using cassandra
connector,
When i querry the table
...............................................................................................................................................................
xdsh:root:DemoTwitter> SELECT * FROM IndexTweet WHERE CreatedAt >=
'2015-07-10 10:41:44+0530' AND CreatedAt <= '2015-07-10 10:43:44+0530'
LIMIT 10;
[Driver] 11-07-2015 12:58:15.601 [INFO|Shell] Query
699cd2ca-3fb7-45e7-9ad1-42d2c2a85e95 in progress
xdsh:root:DemoTwitter>
Result: The operation for query 699cd2ca-3fb7-45e7-9ad1-42d2c2a85e95
cannot be executed:
Cannot execute this query as it might involve data filtering and thus may
have unpredictable performance. If you want to execute this query despite
the performance unpredictability, use ALLOW FILTERING
...............................................................................................................................................................
and if i give ALLOW FILTER to this querry i am getting
Parser exception:
Error recognized: line 1:139: required (...)+ loop did not match anything
at input 'ALLOW'
SELECT * FROM IndexTweet WHERE CreatedAt >= '2015-07-10 10:41:44+0530' AND
CreatedAt <= '2015-07-10 10:43:44+0530' LIMIT 10 ?ALLOW FILTERING;
Please tell me what is the problem?
I am usind Apache Cassandra 2.1.7
Crossdata 0.4.0
Cassandra Connector 0.4.0.
—
Reply to this email directly or view it on GitHub
https://github.com/Stratio/stratio-connector-cassandra/issues/3#issuecomment-120592417
.

--
Juanjo Lopez
Via de las Dos Castillas, 33. Ática 4. 3ª Planta
28224 Pozuelo de Alarcón, Madrid
Tel: 91 352 59 42 // @stratiobd

Hi Juanjo,
Your solution of using 'range' worked fine for me.
Thanks for help!! :)


Configurable icons in Product facet navigation component

In order to offer more configurations with regards to styling the icons are now configurable see #348. This ticket also brought about the use of Font Awesome icons.
This ticket is to replace the "plus" and "minus" "icons" that toggle when you collapse and expend facets. These are the steps:

Replace the "plus" and "minus" "icons"
In icon.config.ts add a keys PLUS = 'plus' and MINUS = 'minus'
mini-cart.components.html and .ts can be used as an inspiration
The toggle of the icons should remain the same. Use ts for this.
The component behaviour should not change

Don't forget to include IconModule in the imports of product-list.modules if it isn't already there.

verified by checked if fonts are used for these 2 icons, they are, closing


A new level of verbosity that shows sstores and sloads in trace

Component
Forge
Describe the feature you would like
openchain style sstores and sloads as part of the trace as an additional level of verbosity on traces.

Additional context
No response

Going to close this as a duplicate of https://github.com/foundry-rs/foundry/issues/3390 which tracks this idea + other trace improvements. Note that you can use the vm.record and vm.accesses cheats as a partial workaround for now—you lose some ordering info since it returns two separate arrays instead of a single array of both reads+writes, and it doesn't give you values. A good feature request would be to improve accesses to return more data if you wanted to open that issue, e.g. return a single array of structs like:
struct StorageAccess {
  bool isWrite; // true for SSTORE, false for SLOAD
  bytes32 slot;
  bytes32 previousValue;
  bytes32 newValue; // for SLOAD, this would match previousValue
}


Type load exception on Dilithium with Dilithium config disabled

Sitecore 8.2.170728
Unicorn 4.0.2: Unicorn.Dilithium.config has been disabled.
[TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Unicorn.Data.Dilithium.DilithiumSitecoreDataStore'.  Assembly: 'Unicorn, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.]    Unicorn.Data.Dilithium.DilithiumExtensions.EnablesDilithiumSql(IConfiguration configuration) +0    Unicorn.ControlPanel.Controls.ConfigurationInfo.Render(HtmlTextWriter writer) +833    Unicorn.ControlPanel.Responses.ControlPanelPageResponse.Execute(HttpResponseBase response) +379    Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.ProcessRequest(HttpContext context) +690    Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.Process(HttpRequestArgs args) +94
(Sorry for the dutch in the message there)
Just upgraded the Unicorn packages, am I missing something?

It looks like an assembly might be out of date? Check the deployed version.
Either way some config is still referencing the dilithium data store; it is
possible to enable it without the config file, which just changes the
defaults to dilithium
On Thu, Sep 28, 2017, 5:07 AM WizX20<EMAIL_ADDRESS>wrote:

Sitecore 8.2.170728
Unicorn 4.0.2: Unicorn.Dilithium.config has been disabled.
[TypeLoadException: De verklaring waarnaar wordt verwezen in een
methode-implementatie mag geen afsluitingsmethode zijn. Type:
Unicorn.Data.Dilithium.DilithiumSitecoreDataStore. Assembly: Unicorn,
Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null.]
Unicorn.Data.Dilithium.DilithiumExtensions.EnablesDilithiumSql(IConfiguration
configuration) +0
Unicorn.ControlPanel.Controls.ConfigurationInfo.Render(HtmlTextWriter
writer) +833
Unicorn.ControlPanel.Responses.ControlPanelPageResponse.Execute(HttpResponseBase
response) +379
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.ProcessRequest(HttpContext
context) +690
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.Process(HttpRequestArgs
args) +94
(Sorry for the dutch in the message there)
Just upgraded the Unicorn packages, am I missing something?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kamsar/Unicorn/issues/249, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAGU_XY3LEOllyc7wK91DOrd9zM4GJedks5sm4wBgaJpZM4PnKba
.

I re-fetched the sources, removed obj and cleared the bin directories. Clean and rebuild, removed all binaries and configs related with rainbow and unicorn. And finally re-deployed. It does not seem to help. The deployed version is correct.
Weird, I installed it on a vanilla Sitecore of the same version and it seems to work. Well, back to the drawing board!

Ok, I've played around with it a bit and it now crashes on the Sitecore vanilla installation too.
The additional files:
App_Config-Include.zip

\Include

Rainbow.config: default rainbow configuration
Unicorn.Helix.config: Copied from Habitat source

\Include\Foundation

Foundation.Serialization.config: Foundation set-up as defined in our solution
Foundation.Serialization.Settings.config: max path lenght and truncation settings

\Include\Project

Website.Tenant.config: The tenant config, only contains a sitecore var for the solutions sourceFolder (Make sure this is an existing path on disk, and for the foundation serialization add the path $(sourcefolder)\Foundation\Serialization\serialization on disk)

\Include\Unicorn

Default configuration with an additional Unicorn.zSharedSecret.config secret key patch.

Uncommented al the include nodes in Foundation.Serialization.config, then there is a logical exception that there are no nodes :)
Enabled as only include:
<include name="Settings.Feature" database="master" path="/sitecore/system/Settings/Feature"> 				<exclude children="true" /> 			</include> 			<include name="Settings.Foundation" database="master" path="/sitecore/system/Settings/Foundation"> 				<exclude children="true" /> 			</include> 			<include name="Settings.Project" database="master" path="/sitecore/system/Settings/Project"> 				<exclude children="true" /> 			</include>
Still no-go, this also breaks Unicorn.

In the original exception, what would the message be in English? Google Translate nets me the lovely and I'm sure incorrect TypeLoadException: The declaration referred to in a method implementation must not be a termination method

Try to get Windows to use English instead of the default installed language..anyway I worked it out this is the message in English:
Declaration referenced in a method implementation cannot be a final method.  Type: 'Unicorn.Data.Dilithium.DilithiumSitecoreDataStore'.  Assembly: 'Unicorn, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.

Found it! NuGet failed to update the reference to the new Kamsar.WebConsole.dll. In visual studio the reference was ok, but when I cleared out my packages folder I noticed the reference went into broken state... so when upgrading re-check your references to the rainbow and unicorn binaries.

How odd, well glad you figured it out!

Reopening this to investigate. Just did a 3.3.2 upgrade to 4.0.3 and was hit by this error.
Declaration referenced in a method implementation cannot be a final method.  Type: 'Unicorn.Data.Dilithium.DilithiumSitecoreDataStore'.  Assembly: 'Unicorn, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Unicorn.Data.Dilithium.DilithiumSitecoreDataStore'.  Assembly: 'Unicorn, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[TypeLoadException: Declaration referenced in a method implementation cannot be a final method.  Type: 'Unicorn.Data.Dilithium.DilithiumSitecoreDataStore'.  Assembly: 'Unicorn, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'.]
Unicorn.Data.Dilithium.DilithiumExtensions.EnablesDilithiumSql(IConfiguration configuration) +0
Unicorn.ControlPanel.Controls.ConfigurationInfo.Render(HtmlTextWriter writer) +772
Unicorn.ControlPanel.Responses.ControlPanelPageResponse.Execute(HttpResponseBase response) +379
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.ProcessRequest(HttpContext context) +710
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.Process(HttpRequestArgs args) +94
(Object , Object[] ) +74
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +469
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.(Object , EventArgs ) +517
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +139
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88

Definitely some assembly conflict nonsense. It caught me out though. I copied debug builds of all Unicorn/Rainbow assemblies to the target bin folder and the error went away. I then deleted my debug assemblies, redeployed the solution that was failing like above - and the error is still gone.
I did do a Kamsaw.Webconsole updated manually as described above, but that did not make the problem go away.
Maybe Configy?


Can't run server, unhandled exception

Can't run server, import error exception (see attached log). Do I need to install some missing packages?
log.txt

Hi! Sorry, removed this invalid import in the last commit. Please pull


Question about zero-inflated models in section 12

Hello,
I realize that this package is under development. I was looking through, and note that the section 12 models file includes the zero-inflated models from the book, e.g.
## R code 12.9 m12.3 <- ulam(     alist(         y ~ dzipois( p , lambda ),         logit(p) <- ap,         log(lambda) <- al,         ap ~ dnorm( -1.5 , 1 ),         al ~ dnorm( 1 , 0.5 )     ) , data=list(y=y) , chains=4 )
However, these do not seem to appear in the Julia / Turing.jl files. I was wondering whether there were resources for running zero-inflated models in Turing, or whether you had managed to implement them.
Best,
Eric

Hi Eric-
I suspect one reason this model has not been added is that the logpdf for the zero inflated Poisson has not been implemented. Here my attempt at a numerically stable implementation:
using Distributions, Turing, StatsFuns
import Distributions: logpdf

struct ZIPoisson{T1,T2} <: DiscreteUnivariateDistribution
    logλ::T1
    w::T2
end

function logpdf(d::ZIPoisson, y::Int)
    LL = 0.0
    if y == 0
        LLs = zeros(typeof(d.logλ), 2)
        LLs[1] = log(d.w)
        LLs[2] = log(1 - d.w) - exp(d.logλ)
        LL = logsumexp(LLs)
    else
        LL = log(1 - d.w) + logpdf(LogPoisson(d.logλ), y)
    end
    return LL
end

This can be added to your script and it should work. Note that ZIPoisson uses log of lambda rather than lambda. That should get you started.
Rob, do you think ZIPoisson should be included in Distributions or Turing?

Hi Chris, thanks for stepping in. Let me play around a bit and compare the results between your model and below Stan language model. I am clearly not the right person to answer your question but definitely like the idea to add this example to the collection of models (both Stan and Turing) as your example shows how "relatively easy" it is to extend the set of available distributions. Does that make sense? ( @torkar  @trappmartin )
Hi Eric,
It has never really been my intention to have all models in the ([Stan|Turin|DynamicHMC]Models repositories. But it certainly helps if folks indicate which models are difficult. Thank you.
data{
    int y[365];
}
parameters{
    real ap;
    real al;
}
model{
    real p;
    real lambda;
    al ~ normal( 1 , 0.5 );
    ap ~ normal( -1.5 , 1 );
    lambda = al;
    lambda = exp(lambda);
    p = ap;
    p = inv_logit(p);
    for ( i in 1:365 ) {
        if ( y[i]==0 )
            target += log_mix( p , 0 , poisson_lpmf(0|lambda) );
        if ( y[i] > 0 )
            target += log1m( p ) + poisson_lpmf(y[i] | lambda );
    }
}

Nice to see that people want to add more models to the rethinking repository and as you suspected Eric, the reason for not having these models was that I didn't get that far due to other obligations. My ultimate goal when starting the translations was to have all models from McElreath's Rethinking translated, and now the 2nd edition has been released :)
Rob, I think that ZI models are quite common (I've used them in my own research so we have some anecdotal evidence at least ;)
From the top of my head, Richard assumes, in the 2nd edition, the following data generative processes,

Gaussian
Binomial
Bernoulli
Poisson
ZI-Poisson
Neg-Binomial
Beta-Binomial
Categorical
Ordered-logit/ordered categorical/ordered logistic) (see polr() in R's MASSpackage)
MVNormal
Log-Normal

On top of that, it would be interesting to also have adjacent-category and sequential likelihoods (https://journals.sagepub.com/doi/pdf/10.1177/2515245918823199), other flavors of ZI (Beta, Neg-Bin, Bin), 0/1-Beta, and shifted-lognormal, skew-normal, student, weibull.
I have to confess that I haven't checked out the support for the above distributions in Distributions.jl lately... In short, I would like to pick one of the above distributions and simply start using it, just like when I use rethinking, brms, rstanarm, et al.
I think many people would not see it as "relatively easy" to implement things from scratch, after all, if everyone did that we would have variants with bugs sooner or later, so perhaps better offer robust alternatives? Even in the relatively simple example that Chris provides, given that I'm not fluent in Turing, I would have to rely on @trappmartin to check the code and optimize if needed.

Would there be the possibility to identify those distributions that are commonly used in probabilistic modelling settings but not available at the moment? I and others from the Turing team are not really doing much modelling and therefore we don't really know what is missing from a user perspective. But I think it would be great if we could extend the set of distributions supported by default to a more reasonable collection.

As far as I can tell, most of the distributions mentioned so far appear to be implemented in Distributions or Turing. Although Turing has an ordered-logistic distribution, I'm not sure whether it covers all of the adjacent category models @torkar referenced. ZI-Poisson is the missing distribution among the ones mentioned so far. Aside from that, the only other distribution I can think of at the moment is the Wiener process, which is used in many fields.

Here is a working example for future reference:
using Distributions, Turing, StatsFuns, Random
import Distributions: logpdf, rand

struct ZIPoisson{T1,T2} <: DiscreteUnivariateDistribution
    logλ::T1
    w::T2
end

function logpdf(d::ZIPoisson, y::Int)
    LL = 0.0
    if y == 0
        LLs = zeros(typeof(d.logλ), 2)
        LLs[1] = log(d.w)
        LLs[2] = log(1 - d.w) - exp(d.logλ)
        LL = logsumexp(LLs)
    else
        LL = log(1 - d.w) + logpdf(LogPoisson(d.logλ), y)
    end
    return LL
end

function rand(d::ZIPoisson)
    return rand() <= d.w ? 0 : rand(Poisson(exp(d.logλ)))
end

rand(d::ZIPoisson, N::Int) = map(_->rand(d), 1:N)

inv_logit(x) = 1/(1 + exp(-x))

@model model(data) = begin
    a1 ~ Normal(1, .5)
    logλ ~ Normal(-1.5, 1)
    w = inv_logit(a1)
    data .~ ZIPoisson(logλ, w)
end

Random.seed!(74591)
data = rand(ZIPoisson(-1.5, .70), 1000)

n_samples = 3000
n_adapt = 1500
config = NUTS(n_adapt, .65)
n_chains = 4
chain = sample(model(data), config, MCMCThreads(), n_samples, n_chains, progress=true)

Thanks Chris, I'll add it for now as m12.3bt.jl to StatisticalRethinkingTuring.
Given Richard (T)'s very useful list I think the answer to your original question could be a separate repo in JuliaStats, e.g. AdditionalDistributions.jl, which can hold new distributions and/or flavors until shown robust and of general interest. Maybe some of the distributions in distributions.jl in Turing could also go there to test those in more settings.
I haven't tried it yet , but wonder if the ZIPoisson() definition as you provided also is sufficient for Turing's MAP(), Prior() and predict()?

Hello: I was revisiting this recently, and noticed that the model does not seem to replicate the book result. I think that the priors were switched around. However, making a minor change to Chris' code corrects this (RCall with the appropriate seed (seed 365, on page 390) to generate the same data).
`# this replicates the book result
@model ppl12_3bt(x) = begin
α_λ ~ Normal(1, 0.5) # Normal(-1.5, 1)
α_p ~ Normal(-1.5, 1)
logλ = α_λ
logitp = α_p
p = inv_logit(logitp)

for i ∈ 1:length(y)
    y[i] ~ ZIPoisson(logλ, p)
end

end
`
Relatedly, I've been writing up the functions to make ZIPoisson more complete -- e.g. adding a cdf, quantile, function. ZIPoisson should also work with Turing's predict() function now. Do you think that I should submit this to ZIPoisson, with appropriate credit given to Chris?
Eric

It would be great to have distributions like ZIPoisson available, even if they might initially not be as robust and complete as the other distributions in Distributions.jl. Maybe my preference would still be to add it to Distributions.jl, but if that turns out to be too complicated/time consuming, create a new repo AdditionalDistributions.jl in either Turing or StatisticalRethinkingJulia as a holding place until implementations of such new distributions have been tested and are considered mature enough.


embeds_one NameError: uninitialized constant

Following the documentation: http://mongoid.org/en/mongoid/docs/relations.html#embeds_one
I get the following error when I try to define an embeds_one relationship:
NameError: uninitialized constant Apikey
This is the code:
class ApiKey
  include Mongoid::Document

  field :access_token, type: String
  embedded_in :user
  before_create :generate_access_token

  private
    def generate_access_token
      self.access_token = SecureRandom.hex
    end
end

class User
  include Mongoid::Document

  field :name, type: String
  embeds_one :apikey
end

u = User.new name: 'foo'
a = ApiKey.new

puts u.inspect
#<User _id: 54ecd47b6c6f63241d000000, name: "foo">

puts a.inspect
#<ApiKey _id: 54ecdade6c6f6324fc010000, access_token: nil>

u.apikey = a   # Here raise the error!

please try changing
embeds_one :apikey
to
embeds_one :api_key
or using the option
:class_name => "ApiKey"

Thank you!
embeds_one :api_key

It was what I did and it works perfectly.