assigns and assert_template have been removed and extracted to a gem in Rails 5.

Moving discussion from rspec/rspec-core#1993

Are there any plans to continue support for it? Both methods have been extracted into https://github.com/rails/rails-controller-testing.

Personally my vote would be no, @cupakromer ?

I need to think it over a bit. @jonrowe could you expand on your thoughts more? I'd like to understand your reasoning and view on the future of controller tests.

Sure, my reasoning is that rspec-rails is mostly a thin wrapper around rails test helpers and those particular matchers would be difficult to replicate without digging into the controller which I feel would be brittle.
However I'm now realising they've been pulled out to another gem, so for now I'd be ok with just continuing to make the matchers available by using that gem...

I share my issue: https://github.com/rails/rails-controller-testing/issues/5 .
Is this comment correct?:
"So far, RSpec is known to be broken because RSpec implements assign."

So is going to be a problem. Yes, current RSpec does not support Rails 5, but that is changing very soon.
However, with assigns being in an external gem now, we would need to make rspec-rails include it as a dependency. But I don't see how we can do that and still support Rails 3.0 - 4.1 given the gem locks into Rails >= 4.2.

I share my issue: rails/rails-controller-testing#5 .
Is this comment correct?:
"So far, RSpec is known to be broken because RSpec implements assign."

Nope not true. I just realized rails-controller-testing includes the modules into ActionController::TestProcess but RSpec includes ActionController::TestProcess::Behaviour directly.

So is going to be a problem. Yes, current RSpec does not support Rails 5, but that is changing very soon.
However, with assigns being in an external gem now, we would need to make rspec-rails include it as a dependency. But I don't see how we can do that and still support Rails 3.0 - 4.1 given that external gem locks into Rails >= 4.2.

Actually the dependency is going to be Rails >= 5.0 but since it hasn't been released yet we placed it at Rails >= 4.2. In a way, the gem isn't going to be useful until Rails 5.0 rolls out.

Nope not true. I just realized rails-controller-testing includes the modules into ActionController::TestProcess but RSpec includes ActionController::TestProcess::Behaviour directly.

Thanks :smile_cat: I'll look into this.

Actually the dependency is going to be Rails >= 5.0 but since it hasn't been released yet we placed it at Rails >= 4.2.

This is good to know, though that is still a problem. rspec-rails cannot default to including the gem in the gemspec since it still supports other Rails versions. That leaves us with two main choices: implement those methods ourselves or shim stubs for them defaulting to throwing errors if the rspec-controller-testing gem is not available

Nope not true. I just realized rails-controller-testing includes the modules into ActionController::TestProcess but RSpec includes ActionController::TestProcess::Behaviour directly.
Thanks  I'll look into this.

Let me know how I can help since I extracted the two methods into rails-controller-testing. :smile:

That leaves us with two main choices: implement those methods ourselves or shim stubs for them defaulting to throwing errors if the rspec-controller-testing gem is not available

There's another possiility: move the rspec-rails stuff that integrates with these features into a separate gem that depends directly on rails-controller-testing.

There's another possiility: move the rspec-rails stuff that integrates with these features into a separate gem that depends directly on rails-controller-testing.

I need to dig more to really understand the full impact. They are most heavily used by controller specs. Those two matchers combined with views not being rendered by default, is really what made controller specs isolated. However, reviewing things, this may have an impact on request specs, which seem to allow use of the template matching and view specs. The view specs allow you to stub out partials, layouts, and other things; as well as the ability to "assign" an ivar for the view to use.
This could be much more invasive than I had originally anticipated.
On a related note for controller specs, I'm a little surprised Rails left the flash hash around as that is largely a view construct as well; albeit a named hash instead of "magical" instance variables which appear.

On a related note for controller specs, I'm a little surprised Rails left the flash hash around as that is largely a view construct as well; albeit a named hash instead of "magical" instance variables which appear.

Usually used in the next requests views but always set by a controller though...

I'd like to see this work as a first class behaviour. I think we should soft depend on rails-controller-testing and provide an integration if it's present. I'm happy to work on this.

I'd be ok with conditionally supporting this, and requiring rails-controller-testing as a soft dependency for Rails 5

I've just fixed this with fc5fe38

Hello,
I am a little bit confused...
As of today, 2019, what is the recommended approach on this?
Should we use the "rails-controller-testing" gem?
Should we use "render_template" and "redirect_to"?
If we do not use the above two then what about request specs? Those two are the fundamedal matchers of request specs....
Thank you very much in advance...

:wave:
rspec-rails exists to enable the usage of Rails testing patterns with RSpec. Rails recommends that you write system specs for "end to end" testing and request specs when you do not. Controller specs are thus not recommended.
The rails-controller-testing gem is intended as a stop gap for those that still have controller tests / specs and want them to keep working, it is not recommended for new setups but it is your choice of course.
The render_template matcher is not included by default (you'd need the rails-controller-testing gem) but you should be able to assert on the actual response (contents, status codes and wether its a redirect) etc.

Dear @JonRowe,
Thank you very much for your kind time and help :)
I am a little bit confused because in https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec (the official site for rspec) it states:

RSpec provides two matchers that delegate to Rails assertions:

render_template # delegates to assert_template
redirect_to     # delegates to assert_redirected_to

This page is about Request spec, so if the two main matchers of request specs are not supposed to be used, why the general direction is to use request specs?
Probably I am missing something here...
PS: Please excuse me if I missing something obvious, I just started to learn TDD and RSpec... :)

the two main matchers of request specs

They are the two matchers mentioned, one still works redirect_to, without the gem, the other requires the gem due to the decisions made by the Rails team. You should not be asserting a template was rendered, you should be asserting on the behaviour and contents of the output.

why the general direction is to use request specs?

The Rails team have driven the decision to push request specs over controller specs. The underlying functionality comes from Rails. The reason is that controller specs were a partial integration of various Rails functionality and didn't behave as production did. Request specs are the total Rails stack going from the top right down to the response being rendered and are thus a more complete integration test.
It's virtually impossible to unit test parts of Rails due to its high level of coupling between its internal components.


Added Gymnasium Lilienthal

Added Gymnasium Lilienthal (gymlil.de)
Webpage: http://gymnasium-lilienthal.de/
Student's interface/mail: https://gymlil.de/

@liltv Pull request merged. Please notice that free educational license for JetBrains tools is for high and higher schools students, i.e. those who are over 13 of age. Thank you!


add inference deployment method in 05_train_eval_predict_cn

增加第四章节inference部署教程，对文字和代码部分进行调整，均可线下跑通。

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


Add the possibility to use custom model

Description
After training a new model with ivadomed, it would be great to be able to use it directly with sct_deepseg.
However, it is unclear how to do it. As of SCT version 5.0.1dev (3dfd4f81f9e4364dab4d94894ea687a625dbdea5), the usage specifies the following:
  -task <str>           Task to perform. It could either be a pre-installed task, task that could be installed, or a custom task. To list
                        available tasks, run: sct_deepseg -list-tasks
  -list-tasks           Display a list of tasks that can be achieved. (default: False)
  -install-task {seg_sc_t2star,seg_mice_sc,seg_mice_gm,seg_tumor_t2,seg_tumor-edema-cavity_t1-t2}
                        Install models that are required for specified task.

under "-task", it says that we could choose a "custom task", but how to achieve it is unclear: should "-task" point to the .pt model file? Something else?
This issue is somewhat related to #2996, which removed the possibility to point to models. But what is the proposed alternative if someone wants to use a custom model?
@charleygros @andreanne-lemay any thoughts?

Mmmm yep.. this is currently not straightforward.
You will need to go in the code and add some lines :/
To add a flag model would be going backwards..
Could we ask the user to dump their custom model in sct-dev/data/deepseg_models? eg sct-dev/data/deepseg_models/custom_model (following the correct folder format) and to input (somehow) a dictionary that would be used here.. so something like:
    'custom_model':
        { 'models': ['custom_model1']},

Mmmm yep.. this is currently not straightforward.
You will need to go in the code and add some lines :/
To add a flag model would be going backwards..
Could we ask the user to dump their custom model in sct-dev/data/deepseg_models? eg sct-dev/data/deepseg_models/custom_model (following the correct folder format) and to input (somehow) a dictionary that would be used here.. so something like:
    'custom_model':
        { 'models': ['custom_model1']},

We could probably do the same thing we did with models, but with task instead. If we want to use a custom task, we put the path to the packaged ivadomed model:
sct_deepseg -i img.nii.gz -task path/to/ivadomed-model/custom
This would probably be more user friendly than moving the file. Let me know your thoughts.

We could probably do the same thing we did with models, but with task instead. If we want to use a custom task, we put the path to the packaged ivadomed model:
sct_deepseg -i img.nii.gz -task path/to/ivadomed-model/custom
This would probably be more user friendly than moving the file. Let me know your thoughts.

Agree with @andreanne-lemay ! I think it will only work with one-step approach (ie no cascade). But I think it is fine: the user can use the output of the first custom model to run the second step.

Agree with @andreanne-lemay ! I think it will only work with one-step approach (ie no cascade). But I think it is fine: the user can use the output of the first custom model to run the second step.

Yes indeed, I think it is a reasonable compromise. I'll add this to my to-do list.

Yes indeed, I think it is a reasonable compromise. I'll add this to my to-do list.

Agree with @andreanne-lemay ! I think it will only work with one-step approach (ie no cascade).

We could also envision -task allowing more than one input (e.g.: -task model1 model2)

Agree with @andreanne-lemay ! I think it will only work with one-step approach (ie no cascade).

We could also envision -task allowing more than one input (e.g.: -task model1 model2)

We could also envision -task allowing more than one input (e.g.: -task model1 model2)

True, I'll try to generalize it to multiple models as well.

We could also envision -task allowing more than one input (e.g.: -task model1 model2)

True, I'll try to generalize it to multiple models as well.


Functions conditional compilation

WIP

Don't spam cfgs for stable functions.
Not sure we need add cfg for 3.4 or not.
Ready to merge

Thanks
@homu r+

:pushpin: Commit e28039a has been approved by gkoz

:hourglass: Testing commit e28039a with merge 36d666c...

:sunny: Test successful - status


python3 -m pip install syntheon, Wheel error

On mac, tried running install with terminal and on jupyter.
Gets stuck at the wheel, please help.
`Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/zk/40l2b_cx4c5cqb25g1dy7w940000gn/T/pip-build-env-xtpiuqrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/zk/40l2b_cx4c5cqb25g1dy7w940000gn/T/pip-build-env-xtpiuqrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/private/var/folders/zk/40l2b_cx4c5cqb25g1dy7w940000gn/T/pip-build-env-xtpiuqrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "/private/var/folders/zk/40l2b_cx4c5cqb25g1dy7w940000gn/T/pip-build-env-xtpiuqrt/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 2, in
ModuleNotFoundError: No module named 'imp'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
bash-3.2$ `

im kinda a newb...
is it just that i have to "python3 -m pip install" for all the requirements first?
librosa==0.9.1
torch==1.12.1
torchvision==0.13.1
torchaudio==0.12.1
pyyaml
mido
nnAudio==0.3.1
numpy
bitstruct
torchcrepeV2

got most the reqs working, except for these:
Requirement already satisfied: torch in ./anaconda3/lib/python3.11/site-packages (from syntheon) (2.1.0)
ERROR: Cannot install syntheon==0.0.1, syntheon==0.0.2 and syntheon==0.1.0 because these package versions have conflicting dependencies.
The conflict is caused by:
syntheon 0.1.0 depends on torch==1.12.1
syntheon 0.0.2 depends on torch==1.12.1
syntheon 0.0.1 depends on torchaudio==0.12.1
To fix this you could try to:

loosen the range of package versions you've specified
remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

Also am trying to share your work with the Vital community:
https://forum.vital.audio/t/has-anyone-tried-syntheon-for-vital-synplant-ai-for-vital/13617

Got it working, not sure how! Thank for your work!

Hi @santismo, glad it worked for you. Seems to me like an environmental issue as I did not encounter it while installing on Mac. Kindly re-open the issue if you face it again.


CAS SSO stops working after 1hr

Recently we have upgraded tomcat from version  7.0.65 to 7.0.70 and we started facing intermittent connectivity issue for SSO with CAS.
We have deployed CAS 4.1.2 on tomcat 7.0.70 for SSO implementation.
CAS application interacts with third party application(TAP) deployed on JBoss EAP 6.1.
We are able to successfully access third party application for around 1-2hrs via SSO.
Post that we are getting access forbidden error. In CAS logs we are able to see error related to memory leak.
If we restart the server after this, still we keep on getting access forbidden error.
When we revert back the tomcat to older version 7.0.65, SSO works consistently.
If we again change the tomcat to version 7.0.70, SSO works intermittently.
Could you guide us for this issue.
Error in tomcat catalina.out
SEVERE: The web application [/pspcas] appears to have started a thread named [scheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak.
Error in JBoss log:
2016-09-16 10:03:37,516 | ERROR | Unknown-principal | 4Yv2EGJeW6MV3mJkKBIh2vZY | /wui/logout | http-/<IP_ADDRESS>:5056-9 | c.s.handled-errors | null
java.lang.IllegalStateException: null
at org.apache.catalina.connector.ResponseFacade.sendRedirect(ResponseFacade.java:420) ~[jbossweb-7.2.2.Final-redhat-1.jar!/:7.2.2.Final-redhat-1]
at javax.servlet.http.HttpServletResponseWrapper.sendRedirect(HttpServletResponseWrapper.java:170) ~[jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-1.jar!/:1.0.2.Final-redhat-1]
2016-09-16 10:03:37,522 | ERROR | Unknown-principal | 4Yv2EGJeW6MV3mJkKBIh2vZY | /wui/logout | http-/<IP_ADDRESS>:5056-9 | c.sitemap         | An exception occured while handling errors at map:handle-errors - file:///home/taptech/Temenos/appl/OCS/WQDEV1/current/ocs-instance/deployments/ocs-app.ear/wui.war/sitemap/patched-sitemap.xmap:919:20
java.lang.IllegalStateException: JBWEB000043: Cannot create a session after the response has been committed
at org.apache.catalina.connector.Request.doGetSession(Request.java:2627) ~[jbossweb-7.2.2.Final-redhat-1.jar!/:7.2.2.Final-redhat-1]

I have included the following in my report:

[] CAS server version
[] Container/environment type/version (Tomcat, Jetty, Java, Linux/Windows, etc)
[] Steps to duplicate the problem
[] Stacktraces and CAS logs where appropriate.
[] Configuration/Overlay pushed to https://github.com/cas-projects/cas-issues/

That's really a question for the tomcat folks. I am not aware of what the differences are between those two versions.


Cupertino Icons draws the wrong icon that you selected in the code

Steps to Reproduce
Selecting an icon from the library CupertinoIcons
Icon(CupertinoIcons.text_cursor, size: 16)
The icon is displayed correctly in the code editor:

In the app, the icon is not the same, but the one next to it.

If I choose in the code  CupertinoIcons.text_bubble_fill then I'll get it in the app  CupertinoIcons.text_cursor
But not all icons behave this way. Some are displayed correctly.
Library version:
cupertino_icons: ^1.0.1+1

Logs
##flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-8.0.pre, on Linux, locale ru_RU.UTF-8)
• Flutter version 1.25.0-8.0.pre at /home/gorkov/flutter
• Framework revision a12e2a473a (4 дня назад), 2020-12-08 23:13:04 -0500
• Engine revision df39e5c515
• Dart version 2.12.0 (build 2.12.0-133.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /home/gorkov/Android/Sdk
• Platform android-29, build-tools 29.0.2
• Java binary at: /home/gorkov/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Android Studio
• Android Studio at /home/gorkov/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.52.0)
• VS Code at /usr/share/code
• Flutter extension version 3.17.0
[✓] Connected device (1 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 7.0 (API 24)
(emulator)
• No issues found!

No problem on my side, working totally fine.

Reproducible on latest master.
My flutter doctor
[✓] Flutter (Channel master, 1.25.0-9.0.pre.42, on Linux, locale en_IN.utf8)
    • Flutter version 1.25.0-9.0.pre.42 at /home/yash/flutter
    • Framework revision a76bb1a08e (32 hours ago), 2020-12-12 00:17:51 -0700
    • Engine revision 4797b06652
    • Dart version 2.12.0 (build 2.12.0-141.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /home/yash/Android/Sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /home/yash/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • CHROME_EXECUTABLE = /usr/bin/google-chrome-beta

[✓] Linux toolchain - develop for Linux desktop
    • clang version 11.0.0
    • cmake version 3.19.1
    • ninja version 1.10.1
    • pkg-config version 1.7.3

[✓] Android Studio
    • Android Studio at /home/yash/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux
    • Chrome (web)    • chrome • web-javascript • Google Chrome 87.0.4280.66 beta

Hey everyone
Even tho it seems to be tied to cupertino_icons, the issue seems to be reproduce using cupertino_icons: ^1.0.0 as well and seems related to Flutter itself
It can correctly shows text_cursor on stable & beta and regression on devandmaster`
Code
      body: Center(
        child: Icon(CupertinoIcons.text_cursor),
      ),

stable & beta
dev & master

flutter doctor -v
[✓] Flutter (Channel dev, 1.25.0-8.0.pre, on Microsoft Windows [Version 10.0.19042.685], locale en-US)
    • Flutter version 1.25.0-8.0.pre at C:\Code\flutter_dev
    • Framework revision a12e2a473a (5 days ago), 2020-12-08 23:13:04 -0500
    • Engine revision df39e5c515
    • Dart version 2.12.0 (build 2.12.0-133.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at C:\Code\sdk
    • Platform android-30, build-tools 30.0.3
    • ANDROID_HOME = C:\Code\sdk
    • Java binary at: C:\Code\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.8.3)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.8.30804.86
    • Windows 10 SDK version 10.0.18362.0

[✓] Android Studio (version 4.1.0)
    • Android Studio at C:\Code\android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[✓] VS Code (version 1.52.0)
    • VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.17.0

[✓] Connected device (4 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Windows (desktop)       • windows       • windows-x64    • Microsoft Windows [Version 10.0.19042.685]
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 87.0.4280.88
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 85.0.564.67

• No issues found!

CC @xster @willlarche

the same. in master channel

Has anyone made changes to these lately?

@guidezpl I'm going to revert https://github.com/flutter/flutter/pull/71853 unfortunately. It seems like it shifted the glyph codepoints forward by one in addition to the doc changes.

Strange however that the generate script wasn't materially changed in the PR that generated the new dart file. Taking a look.

Ok, fixing forward rather. There was some tricky nuance I just figured out. Between the triple dance of flutter/flutter, flutter/cupertino_icons and xster/framework7-icons where everything's generated, flutter/flutter and flutter/cupertino_icons are up to date. Except I forgot to push the last commit from xster/framework7-icons that I used to generate flutter/flutter and flutter/cupertino_icons with onto GitHube. When @guidezpl updated xster/framework7-icons, it was off of HEAD~1 and all the codepoints were misaligned by 1.
Fixing in https://github.com/flutter/flutter/pull/72384 (and adding some more tests). The missing bit was https://github.com/xster/framework7-icons/commit/2e486f3dfe8aafcca677410b6b1e504794b0ea14.

Doh, it looks like the existing test was disabled during NNBD migration https://github.com/flutter/flutter/pull/69048


[BACKLOG-20951] - creating link for safe stopping on trans status page

@pentaho/ackbar

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -Dsurefire.runOrder=alphabetical -B -fn -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd clean install && mvn -B -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd site

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  engine/src/main/java/org/pentaho/di/www/GetTransStatusServlet.java
  engine/src/main/resources/org/pentaho/di/www/messages/messages_en_US.properties

Unit Test Coverage
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

:warning: Coverage Changes: <0.1% (click to expand)
org.pentaho.di.trans.steps.checksum.CheckSumMeta

Branch Change: -1.2% :small_red_triangle_down:
Complexity Change: -1.4% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.dbproc.DBProcMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta

Method Change: -1% :small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change: -1.1% :small_red_triangle_down:
Complexity Change: -1.3% :small_red_triangle_down:

org.pentaho.di.trans.steps.replacestring.ReplaceStringMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.synchronizeaftermerge.SynchronizeAfterMergeMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.systemdata.SystemDataMeta

Branch Change: -2% :small_red_triangle_down:
Complexity Change: -2% :small_red_triangle_down:
Instruction Change: -0.3% :small_red_triangle_down:
Line Change: -0.8% :small_red_triangle_down:

org.pentaho.di.www.GetTransStatusServlet

Instruction Change: -2.1% :small_red_triangle_down:
Line Change: -1.4% :small_red_triangle_down:

License header violations

:heavy_exclamation_mark: Copyright year is not the current year on engine/src/main/java/org/pentaho/di/www/GetTransStatusServlet.java. Found 2017. Was expecting 2018

@pentaho/ackbar updated copyright

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
mvn -Dsurefire.runOrder=alphabetical -B -fn -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd clean install && mvn -B -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd site

Cleanup Commands
mvn -B -f 'pom.xml' -pl 'engine' -P '!assemblies' -amd build-helper:remove-project-artifact

Changed files
  engine/src/main/java/org/pentaho/di/www/GetTransStatusServlet.java
  engine/src/main/resources/org/pentaho/di/www/messages/messages_en_US.properties

Unit Test Coverage
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.

:warning: Coverage Changes: <0.1% (click to expand)
org.pentaho.di.job.entries.evalfilesmetrics.JobEntryEvalFilesMetrics

Branch Change: -0.8% :small_red_triangle_down:
Complexity Change: -1.1% :small_red_triangle_down:
Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent

Branch Change: -2% :small_red_triangle_down:
Complexity Change: -2.1% :small_red_triangle_down:
Instruction Change: -0.3% :small_red_triangle_down:

org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL

Branch Change: -0.7% :small_red_triangle_down:
Complexity Change: -0.9% :small_red_triangle_down:
Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.checksum.CheckSumMeta

Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta

Method Change: -1% :small_red_triangle_down:

org.pentaho.di.trans.steps.groupby.GroupByMeta

Branch Change: -3.1% :small_red_triangle_down:
Complexity Change: -3.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.ifnull.IfNullMeta

Branch Change: -2% :small_red_triangle_down:
Complexity Change: -1.9% :small_red_triangle_down:
Instruction Change: -0.2% :small_red_triangle_down:

org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change: -3.3% :small_red_triangle_down:
Complexity Change: -3.9% :small_red_triangle_down:

org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta

Branch Change: -0.5% :small_red_triangle_down:

org.pentaho.di.trans.steps.uniquerows.UniqueRowsMeta

Instruction Change: -0.1% :small_red_triangle_down:

org.pentaho.di.www.GetTransStatusServlet

Instruction Change: -2.1% :small_red_triangle_down:
Line Change: -1.4% :small_red_triangle_down:


[ZeWei] view usage message does not specify "company" is needed, it also does not validate if the entity is valid

view contact 1 works the same as view company 1

Are you able to provide screenshot to this? I am unable to reproduce this bug.

Fixed somewhere.


Add the about segment of the User Guide

Summary of Changes

Purpose
How to use the guide
Special Symbols
Explanation of GUI

Codecov Report

Merging #184 (f7e5d40) into master (5e7cf38) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #184   +/-   ##
=========================================
  Coverage     61.20%   61.20%
  Complexity      378      378
=========================================
  Files            77       77
  Lines          1392     1392
  Branches        150      150
=========================================
  Hits            852      852
  Misses          468      468
  Partials         72       72

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e7cf38...f7e5d40. Read the comment docs.


Syntax code revealed in journal

Describe the bug
When a user posts an event and it is displayed on the dnn journal module the syntax formatting code is shown and nothing is formatted.
Expected behavior
In my opinion when posting an event the "notes" form field should be labeled "Description" as this is what gets displayed everywhere in templates and on journal.  If a second form field for entering a summary in that would be ideal.
Replace and setup templates to accept as follows:
"Summary" (Instead of "Notes") as [EVENT:SUMMARY] for templates and is used for Journal posts.
"Description"  (Instead of "Summary") as [EVENT:DESCRIPTION] for templates and is used for event details page links.
Additional context
It is a bit confusing what is going to be displayed when you have two boxes to input information.   Does the "Notes" or the "Summary" suppose to get posted into the journal?   An option to set what gets posted in journal as a template feature   It should be a summary or introduction at top with a full description in the bottom.  Or just one place to put it all since when you click on a link by default you are redirected to an event with just the notes being displayed.
I see "Event Description" being what would match what is being used in templates.  And change "Notes" to "Summary" and put a tool tip mouse over to describe what is expected in each area.
Also when you hover over an event link on the calendar it shows the "notes" area which in my opinion is very unclearly labeled.
The forms may need a little updating to move with the current changes.
I hope I am doing ok making this clear any questions please ask I will be happy to assist as I can.
Thank you.

@thabaum Great description. Thank you. I will review it and see what we can do.


[GSSOC'23] GUESS WORD GAME

hi @Dharmesh177 ,
i want to create a word guessing game. with timer and amazing ui
pls assign me with this issue as a GSSOC'23 contributor
thank you in advance

assigned to @rohanmittal1163
Complete this within 1 week and
Include a screenshot or deploy link to assess your project and thereafter include your project in the main code with following the contributing.md guidelines


Track local changes

This builds on #42 . It tracks local edits (although these are still not saved to browser storage) and displays which files have been modified in the left panel.

Note: This is not about the UI - we may or may not want to display this information for the user - but being able to track changes is important for next steps for sharing to cloud/gist etc.

Closing because we are going in a different direction.


Speed up cnpj

The idea is pretty straightforward: minimize amount of substring and regexps

Codecov Report

Merging #932 (232ffeb) into main (ad309d2) will decrease coverage by 0.06%.
The diff coverage is 92.59%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@             Coverage Diff              @@
##               main     #932      +/-   ##
============================================
- Coverage     92.38%   92.32%   -0.06%
- Complexity     2743     2744       +1
============================================
  Files           289      289
  Lines          5447     5460      +13
  Branches        588      591       +3
============================================
+ Hits           5032     5041       +9
- Misses          268      270       +2
- Partials        147      149       +2

Files Changed
Coverage Δ

...ker/idnumbers/pt/br/IdNumberGeneratorPtBrUtil.java
92.72% <85.71%> (-3.50%)
:arrow_down:

...tafaker/idnumbers/pt/br/DocumentFormatterUtil.java
100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Thanks!


Shield Ally Effect not increasing Shield HP and BT

The effect on shield ally is correctly increasing the shield's hardness but not the HP and BT.

Not currently possible to affect the HP or BT of a shield. Closing as a duplicate of #1318


[Event Change Request] page 9233 "G/L Balance by Dim. Matrix" - OnBeforeFindRec

Describe the request
Hello, can you please add the GLAcc Record variable to the OnBeforeFindRec Event?
    local procedure FindRec(DimOption: Enum "Analysis Dimension Option"; var DimCodeBuf: Record "Dimension Code Buffer"; Which: Text[1024]) Found: Boolean
    var
        GLAcc: Record "G/L Account";
        BusUnit: Record "Business Unit";
        Period: Record Date;
        DimVal: Record "Dimension Value";
        DimensionCodeBuffer: Record "Dimension Code Buffer";
        PeriodPageMgt: Codeunit PeriodPageManagement;
    begin
        OnBeforeFindRec(DimOption, DimVal, GLAcc);
        case DimOption of
            DimOption::"G/L Account":
                begin
                    if (DimCodeBuf.Code <> '') or (not (DimensionCodeBuffer.Get(DimCodeBuf.Code))) then begin
                        FindNext := true;
                        exit(DimCodeBuf.Find(Which));
                    end;
                    DimCodeBuf.DeleteAll();
                    GLAcc."No." := DimCodeBuf.Code;
                    if AnalysisByDimParameters."Account Filter" <> '' then
                        GLAcc.SetFilter("No.", AnalysisByDimParameters."Account Filter");
                    Found := GLAcc.Find(Which);
                    if Found then
                        CopyGLAccToBuf(GLAcc, DimCodeBuf);
                end;

    [IntegrationEvent(true, false)]
    local procedure OnBeforeFindRec(DimOption: Enum "Analysis Dimension Option"; var DimensionValue: Record "Dimension Value"; var GLAccount: Record "G/L Account")
    begin
    end;

Additional context
We want to set an additional Filter to GLAcc.
Internal work item: AB#521545

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 18716.


All but one of the SPARQL queries are broken (for MS submission)

Describe the bug
One of the reviewers remarked:
I could only get one of your example queries to return something on http://kg-hub-rdf.berkeleybop.io/blazegraph/#query I'm not sure if this is expected
To Reproduce
SPARQL queries are here:
https://github.com/Knowledge-Graph-Hub/kg-covid-19/tree/master/queries/sparql
Endpoint is here:
kg-hub-rdf.berkeleybop.io/blazegraph/p
Expected behavior
All SPARQL queries should return something - the title of each describes what it should return
Version
https://github.com/Knowledge-Graph-Hub/kg-covid-19/commit/9fd270e1b141487ee422d138cd74add87118f669

All but one work:

query-01-cl-cat-counts
query-02-sars-cov-2-prot
Broken: query-03-sars-cov-2-interactors
query-04-sars-cov-2-interactors_2nd_order
query-05-sars-cov-2-interactors_druggable_2nd_order
query-06-provided_by_counts

Seems like interaction links are no longer available in their reified form. I will change the query to use direct linking instead.

Justin, can you review this:

fixed query-03-sars-cov-2-interactors

whether it is acceptable. Note: it is now missing the p (see old query above)! (the way in which the interaction worked previously)

Sorry there was a mistake now fixed.

Thanks to @deepakunni3 here the correct version:
fixed query-03-sars-cov-2-interactors

To add more context to this ticket,
In earlier versions of our KG-COVID-19 N-Triples export (and the SPARQL endpoint) we used to have biolink:subject, biolink:object, biolink:predicate as predicates of a reified association. But this was incorrect since Biolink should not mint predicates for core RDF predicates. So subsequent versions of our export, which happened after these SPARQL Queries were written, has the following changes:

biolink:subject -> rdf:subject
biolink:predicate -> rdf:predicate
biolink:object -> rdf:object
biolink:name -> rdfs:label


fix(react-tinacms-editor): fixing FocusRingOptions import path

Using relative path to import FocusRingOptions fails when using webpack and node as the path becomes react-tinacms-inline/dist/src/styles

@all-contributors add @arpi0003 for code and bugs


[cryptopp] Update version to 8.8.0

Fix https://github.com/microsoft/vcpkg/issues/32512

Note: Update cryptopp version to 8.8.0.

[x] Changes comply with the maintainer guide
[x] SHA512s are updated for each updated download
[ ] The "supports" clause reflects platforms that may be fixed by this new version
[ ] Any fixed CI baseline entries are removed from that file.
[ ] Any patches that are no longer applied are deleted from the port's directory.
[x] The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
[x] Only one version is added to each modified port's versions file.

All features are tested successfully in the following triplet:

x86-windows
x64-windows
x64-windows-stataic


implement starknet-rs support for transaction endpoints

Implemented transaction endpoint related starknet methods using the starknet-rs package.
Please review and let me know if any changes are required. Thanks
Closes #13

Please rebase

Resolved

Thanks for your contribution @dhirajs0


FYI: Yaw drift correction - work-in-progress

Not meant for merging

Updated today; can keep the scene in-place if the phone is put on the table.
Having difficulty with very slow head rotation - the yaw drift correction can pull the scene along with the rotation. Looking into it more.

Ok, I thought I could get by without using different reference points but apparently I can't. The reference point needs to be close enough (<5 degrees) to avoid too large of a correction being generated and this "pull" that you get with my current change. The correction angle is a function of the angle between the current orientation and the orientation (both grow together). On to adding them reference points.

Just realized that we are drifting much much more than Oculus (turned off their yaw drift correction to see what happens). Say 5-6 times more. Unless the drift itself is minimized the correction is going to over-correct and be noticeable.

The extra drift (seems to be by an order of magnitude) is caused by the missing thermal calibration of the gyroscope readings. This means our readings are extra noisier and thus drift-ier.

I will get back to this at later time. For now I have another pull request that filters out some of the gyro noise and reduces the drift rate significantly.


[Event-Request] table 210 "Job Journal Line" - OnCopyFromGLAccountOnAfterCheckGLAccount

Hi,
Could you please add the following event request to table 210 "Job Journal Line":
local procedure CopyFromGLAccount()
    var
       ++ IsHandled: Boolean;
    begin
        GLAcc.Get("No.");
        GLAcc.CheckGLAcc;

      ++ IsHandled := false;
     ++   OnCopyFromGLAccountOnAfterCheckGLAccount(Rec, GLAcc, CurrFieldNo, IsHandled);
     ++  if IsHandled then
     ++     exit;

        GLAcc.TestField("Direct Posting", true);
        Description := GLAcc.Name;
        "Gen. Bus. Posting Group" := GLAcc."Gen. Bus. Posting Group";
        "Gen. Prod. Posting Group" := GLAcc."Gen. Prod. Posting Group";
        "Unit of Measure Code" := '';
        "Direct Unit Cost (LCY)" := 0;
        "Unit Cost (LCY)" := 0;
        "Unit Price" := 0;

        OnAfterAssignGLAccountValues(Rec, GLAcc);
    end;

 [IntegrationEvent(false, false)]
    local procedure OnCopyFromGLAccountOnAfterCheckGLAccount(var JobJournalLine: Record "Job Journal Line"; GLAcc: Record "G/L Account"; CurrFieldNo: Integer; var IsHandled: Boolean)
    begin
    end;

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


Regions statistic #

Issue #31
Introduced new DTO Score containing average risk factor of a user for each disease. It greatly reduces time to compose statistics for the region, in comparison with computation of scores on-flight.
Created views serving information about the score of the user and statistics about the regions. Response for the latter one contains data about average risk factors for the disease in all the regions, and distribution of users in user's region among risk groups.

Codecov Report

Merging #35 (3c164de) into dev (c851e33) will decrease coverage by 1.14%.
The diff coverage is 57.47%.

@@            Coverage Diff             @@
##              dev      #35      +/-   ##
==========================================
- Coverage   82.37%   81.23%   -1.15%
==========================================
  Files          14       14
  Lines         454      533      +79
==========================================
+ Hits          374      433      +59
- Misses         80      100      +20

Impacted Files
Coverage Δ

backend/risk_factors/urls.py
100.00% <ø> (ø)

backend/risk_factors/views.py
68.21% <25.58%> (-9.95%)
:arrow_down:

backend/risk_factors/utils.py
52.17% <40.00%> (+5.83%)
:arrow_up:

backend/risk_factors/analysis.py
50.84% <81.81%> (+5.74%)
:arrow_up:

backend/risk_factors/models.py
100.00% <100.00%> (+4.44%)
:arrow_up:

backend/risk_factors/tests/test_setup.py
98.70% <100.00%> (+1.77%)
:arrow_up:

backend/risk_factors/tests/test_views.py
97.95% <100.00%> (+0.34%)
:arrow_up:

... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c851e33...3c164de. Read the comment docs.


Sonoff 4CH PRO R2 with 2 Roller shutters

I am using a Sonoff 4CH PRO with 2 roller shutters,
Any way to configure the "cover" entity ?
I tried to adapt the examples of the standard documentation, but unfortunately it doesn't work....
sonoff:
devices:
1000baabdb:
device_class:
- cover [1, 2]  # open/close shutter 1
- cover [3, 4]  # open/close shutter 2
name: Sonoff 4CH PRO R2
Thanks in advance !

Check #78


[11.x]: Factories: Ensure afterMaking is called prior to create() attributes being set

The Problem
Today, the create attributes in the Factory are ignored/overwritten by those "defaulted" in afterMaking, because of the following sequence of events:

create($attributes)
state($attributes) (Sets the $attributes passed to create as the last-to-run state transformer)
make($attributes)
makeInstance() (Actually unpacks/resolves the to-be-made attributes)
callAfterMaking()
save
callAfterCreating()

Instead, the attributes passed to create should be filled after callAfterMaking has finished, just prior to save being called on the model.
This however isn't as simple as it sounds, because it should be possible to reference things like factory methods in create() that would override those in make(). For example:
->create([
    'user_id' => User::factory()->subscribed()->verified(),
]);

This effectively means we've got a chicken-egg problem, where the model is already instantiated (but not yet created), while the create method itself still has state to set/resolve.
This Solution
Since the state($attributes) called in step 2 is appended to a (potential) list of other state transformers, as well as because they're ran in sequence, we know that it's the last transformer to run prior to Model instantiation / attribute expansion.
By wrapping this very last $attributes state call with an interceptor method, we're able to tap in to the raw attributes (e.g. related Factory instances, per-attribute resolver callbacks) right before they're resolved/unpacked by expandAttributes().
This is useful, because while we don't necessarily have access to useful values yet at this point, it does mean that we're able to see which attributes keys the user passed in to create($attributes), and track them in a property on the Factory instance.

Side-note: While this could be done by doing something like $keys = array_keys($attributes) as the first line in create($attributes), this won't work in case the user's provided a callback/resolver, and while we could resolve this in-place first as well, this could then lead to issues due to the end-user's custom logic being ran more than once.

Next, during step 4 in the makeInstance method, the Eloquent-ready attributes are expanded (using getExpandedAttributes) just prior to calling new Model($attributes). This again provides us with an opportunity, because at this point we have access to the actual attributes that would otherwise be used to instantiate the model.
Now, because we only track the custom attribute keys when create() has already been called (which again, is the last step in a Factory chain), we can simply check if there are any keys on our "tracked" property, and if there are, we can just grab that subset of values and have what is effectively a complete "create()"-method dataset. The only downside at this point however is that we're still in the middle of the make() call, meaning that the only thing we can do for now is to track them in the same way as we tracked the keys themselves.
Finally, once the make() call returns in the create() method, with the Model effectively instantiated and the afterMaking calls having ran as part of the make method, we use forceFill to set the collected/tracked subset of "create" attributes on the model, leading to the intended result.

Currently this unfortunately leads to other problems, specifically those related to situations such as this:
Something::factory()->create([
    'related_id' => $related->id,
]);

If the factory has a default definition of Related::factory(), this change will currently cause the factory-record to get created first, and since the create() payload is now set after the instance has been made, the result is multiple models instead of just one.

The aforementioned problem has been solved, by setting the state as was already being done, the only difference is that now we make sure to update it with the create attributes afterwards.
Verified locally in Forge, and seems to solve the issue without any noticeable side effects.

I figured I could fix the above issue by passing the create attributes to the state method as we're already doing today, followed by simply setting them again after the make call is finished to essentially override this. That way, all the afterMaking hooks can run and modify, while the create attributes still take priority.
While this seemed to work, this unfortunately seems to have the side effect of creating factories passed into the create method's attributes more than once too. I'm not sure whether that's actually true or just my observation (fairly tired, so calling it a night), but I'll see if I can figure this one out later.

There! I've simplified my approach, and believe the issue should now be fully fixed 👍

I wonder how these changes effects sequences?


AppArmor makes it impossible to LOAD DATA INFILE from outside its designated directories; there should be a way to add CSV import directories to the AppArmor config or disable AppArmor entirely

Cookbook version
Actually my own fork, but this issue should equally apply to the current master here
Chef-client version
Whatever AWS OpsWorks uses
Platform Details
AWS, Ubuntu 16.04
Scenario:
Use LOAD DATA INFILE to load CSVs that are located somewhere outside MySQL's data directory
Steps to Reproduce:
Provision a box with a recipe that invokes the mysql_service resource, then call LOAD DATA INFILE
Expected Result:
LOAD DATA INFILE works
Actual Result:
AppArmor blocks the LOAD DATA INFILE call.

This seems more related to AppArmor than the duties of the cookbook itself, can this be composed via https://github.com/chef-cookbooks/apparmor?

As of MySQL 5.7, this would be required anyways unless you disable secure-file-priv it by passing the variable to the conf as NULL, and notify a restart:  https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_secure_file_priv

This seems more related to AppArmor than the duties of the cookbook itself, can this be composed via https://github.com/chef-cookbooks/apparmor?

How so? It's this cookbook that's creating the AppArmor policy that blocks the LOAD DATA INFILE statement.

This is a hack, but I'm calling the apparmor cookbook immediately after creating the mysql_service:
mysql_service 'default' do
  initial_root_password "#{node[:mysql][:root_password]}"
  bind_address '<IP_ADDRESS>'
  port '3306'
  action [:create, :start]
end

include_recipe 'apparmor::default'

... since it's in the mysql_service create function that apparmor gets set up by mysql. Where calling that recipe unloads all apparmor profiles and completely removes apparmor, because I have this attribute set:
default[:apparmor][:disable] = true


[Feature] Allow computing normalized distances

Enable the option to compute the normalized distance, which returns a value between 0 and 1. A result of 0 indicates no similarity between the provided strings, while a result of 1 indicates a perfect match as determined by the similarity function. This feature could be useful when applying a threshold to determine whether two strings are sufficiently similar.

How would you compute that?

Mmh, I'm not entirely sure if this should be part of the library itself or could just be implemented by the user if they need it since it looks pretty straightforward

Depending on how advanced you want the library to be it could be worth adding. For example, if you're allowed to use non-uniform weights for the edit operations then the (maximum) factor you need to normalize by might not be too straight forward for the user themselves to compute.


Fix AttributeError in the glacier tree hash docs

minor documentation bugfix

Codecov Report

Merging #1177 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1177   +/-   ##
========================================
  Coverage    97.98%   97.98%
========================================
  Files           45       45
  Lines         7186     7186
========================================
  Hits          7041     7041
  Misses         145      145

Impacted Files
Coverage Δ

botocore/handlers.py
96.26% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36b7ce0...19b8e16. Read the comment docs.


WebEx teams, send message with AdaptiveCard

Is your feature request related to a problem? Please describe.
I am looking for an example for sending an AdaptiveCard in WebEx teams that also contains the "text" property.  The text property is a required field when posting attachments in the WebexTeams API and no examples work as-is
Describe the solution you'd like
A sample of sending an adaptive card using JSON content for WebEx teams
Describe alternatives you've considered
I can send the message successfully with SparkDotNet, but not with the current examples

Hi @bassfishingnerd
The bot framework team prefers that How-To questions be asked on Stack Overflow using the botframework tag.
Webex has an updated description on integrating adaptive cards with their api here https://developer.webex.com/blog/buttons-and-cards-now-support-adaptive-cards-1-2


InAppUpdater sees the update, but can't install it

Describe the bug
I'm trying to use your library, all works fine, but after the update installation is completed and the program restarts, I see the old version.
To Reproduce
For testing I created a simple application with versionCode 3(before this I posted versionCode 2 in the internal test track, but I did not see updates in my application with versionCode 1) and uploaded it in the Google play in a closed track(alpha version).
Code:
public class UpdateActivity extends AppCompatActivity {

    private UpdateManager mUpdateManager;

    static final int REQUEST_CODE = 781;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_update);

        TextView txtCurrentVersion = findViewById(R.id.currentVersion);
        TextView txtAvailableVersion = findViewById(R.id.availableVersion);

        txtCurrentVersion.setText(String.valueOf(BuildConfig.VERSION_CODE));

        // Initialize the Update Manager with the Activity and the Update Mode
        mUpdateManager = UpdateManager.Builder(this);

        // Callback from Available version code
        mUpdateManager.getAvailableVersionCode(code -> txtAvailableVersion.setText(String.valueOf(code)));
    }

    @Override
    protected void onResume() {
        super.onResume();
        // Continue updates when resumed
        mUpdateManager.continueUpdate();
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                Log.d("MyTag", "Result ok! Result code: " + resultCode);
            }
            else if(resultCode == RESULT_CANCELED){
                Log.d("MyTag", "Result canceled! Result code: " + resultCode);

            }
            else if(resultCode == ActivityResult.RESULT_IN_APP_UPDATE_FAILED){
                Log.d("MyTag", "In app update failed! Result code: " + resultCode);

            }
        }
    }

    public void tryToUpdate(View view){
        mUpdateManager.mode(UpdateManagerConstant.FLEXIBLE).start();
    }

}

After starting, I see that current version = 2, available version = 3, so the app sees the update. Next I click the tryToUpdate button and see the update dialog, click "update", wait, see "An update has just been downloaded", click "restart", see installation activity, after that my application restarts and I see the old version - current version = 2, and this is the problem. Of course, I tried to manually close and open the app but I still see the old version. But if I delete the old version and manually install the new version from Google Play, then all works fine.
So, how can I solve this?
Expected behavior
I expect to see current version = 3, available version = 3.

OS: Android 8.1.0

You are testing the app(version = 2) in debug mode? If that's the case you need to sign the apk with same key used to build app(version = 3) and build a signed apk. Hope this will solve your issue.
The reason is the android OS will not be able to install the update as the apk is not signed.

I tried, unfortunately this doesn't work.

Sorry for being away. I tried the same code you have added above and was not able to reproduce the problem when I'm using signed apks(Build -> Generate Signed Bundle / APK). But I was able to experience the behavior you have stated when just running the app via Android Studio using the debug mode and just building apks(without signing)(Build -> Build Bundle(s) / APK(s))

This is strange, but Google support says this:

Please note that we only support the update while you have downloaded your app from Google Play at least once before using the account to test in-app updates.
To solve this issue, please download app with version 1.2 in Google Play Store and upload a new apk with higher version in Alpha track. After it pass the review, you can try the in-app update again.

Unfortunatly, we are only able to assist the issue if the app is downloaded from Google Play Store instead of installing APK files manually.
Please note that the error install from other source is out of our scope. As a result, we'll still recommend you to use the In App Updates feature while the app is downloaded from our Google Play Store.

So, I downloaded 1.2 on my phone, upload 1.3 to the Google Play, and now I can update my app. But if I build signed apk with 1.2 version using the same key and download it to my phone, I can't do the same, and this is strange because you can do it. Anyway, I think it's Google's area of responsibility. Thanks!


Question

Do you know any apps that use this? Would be interesting to know.

I think only our app Settings Database Editor published on Google Play.

Why not on fdroid though? But still s nice app, that's a better experience than setedit

I don't think it is a wise step currently to opensource the app. But we may publish on another store that doesn't care much about the target SDK level.

Got you.

@gamemn02 it seems like either your dev. [NetVor - Android Solutions] account was suspended by Google, you deleted it or just unpublished all of your 3 apps for some reason (unfortunately), now what, will you post them here, on f-droid or other places ? (I prefer here on GitHub)
I can see that you also have a site, but it's useless in its current state, because it only contains/has a link to SDE's PS page, nothing else.


Incorrect TOKEN mapping for SPWN(Bitspawn protocol)

Problem:
The wormholebridge.com UI is presenting the wrong token pair for SPWN, and that results in moving funds from the OFFICAL SPWN ERC-20 address to the unofficial SPWN SPL address (compared with one in Coinmarkectcap)

the blurry token image(on Ethereum) is matched to the OFFICIAL address of SPWN ERC-20.
the clear token image (on Solana) is matched to the OFFICIAL address of SPWN on Solana.
Here are transactions:
https://etherscan.io/tx/0x1792f2c5a96ed3718f7109594a67b280571b985b247ba3ee6ecac3dfbd268c41
https://solscan.io/tx/4PPeZ8BDRKwfawjGcAToosdU6QEZYM7BYmxaTA9uFkjR5PbegnUHq1VDCwdYtWdbYqmXdkGdJmjm3d39LwwrQ6qC
I'm not sure if this is just a UI bug or contract bug, but I'd appreciate if you could look into this issue and fix asap. Thanks!

Wormhole is not a swap pool - wrapping ERC20-SPWN gives you SPL-wormSPWN. Wormhole can't mint the "official" SPL-SPWN, this is up to pools like Saber.

(let me know if I misunderstood the issue)

I think you misunderstood. I didn't want to swap the tokens. I just wanted to move the ERC-20 SPWN token to Solana

The bridge UI is populating the different address match. So when I select the ERC20-SPWN on Ethereum, it's pre-selecting the matched SPWN SLP on solana, but that's the incorrect address

The wrapped assets addresses on Solana are derived deterministically from the Eth address, it's a fixed programmatic mapping - ETH-20 SPWN will always end up as wormSPWN on Solana.

That's interesting. So wormSPWN is like a pegged SPWN on Solana? And as long as SPWN native token address is not the same as wormSPWN (according to Coinmarketcap), I need another pool to convert from wormSPWN to SPWN (on Solana)?

Yes, Wormhole is just a bridge - it takes any ERC-20 and gives you a wrapped version of it.

Yes, Wormhole is just a bridge - it takes any ERC-20 and gives you a wrapped version of it.

Ah, that makes sense now... So probably Saber is like a platform for this kind of pool? Could you recommend any pool to swap wrapped asset to the native asset on Solana?

Saber has been great for this - for example, they offer a pool that swaps wormSRM to native SRM.

Saber

yeah, that's perfect. Thanks for the explanation, it educated me a lot!


Pull packages from remote location

Overview
Supports sourcing image assets from a remote location but adding the ability to specify a $InstallSourceResolver. A default implementation, leveraging the provided Quickstart.ps1 and packages.json look-up table, has been provided.
The Problem
Previously, when an image required an asset, it would simply append it to the provided $InstallSourcePath (which was validated as being an existing path). This means to get started using this repository, you had to aggregate a list of required files and manually retrieve them from dev.sitecore.net (placing them in the $InstallSourcePath). If you already had these assets readily available on a remote share (e.g. Azure file share, etc), you still were required to download them locally first.
The Solution
Now, you are able to provide a resolver ([scriptblock]) which can be used to fetch and return a location of the asset. When an image needs a file, it's passed to the resolver which can perform a local check or remote grab before returning the file's location. The $InstallSourceResolver has the following signature:
$InstallSourceResolver = {
  Param([string]$Filename,[string]$Tag)
  # your implementation returning a path to the file locally
}

Heads up, this will require #38 to be rolled back. Suppose you can adjust resolver to expect object over string, but having URLs (and potential duplicated ones at that) scattered throughout seems difficult to maintain. (my $0.02)

Now includes all necessary changes to spin up environment in least amount of time.

Closing to merge w/ develop tranch


Gecko momentum api

[x] update code on the lorentz server to include this PR https://github.com/VolumeFi/trading-bots/pull/40/files
[x] fork the repo, so that the service can be separate and the DB doesn't write to the same place
[x] call get_top_gainers function (same way that get_high_returns is called) - this should be in the app.py
[x] results from this function should be funneled into a new api called gecko-gainers.palomabot.ai which should return the data teh same way as the momentum.palomabot.ai api returns the data

https://gecko.momentumbots.palomachain.com/?dex=uniswap_v2&lag_return=6&daily_volume=0&vol_30=1&market_cap=1


network-core: Add core type with methods to create bridge and veth pair.

Allow creating bridge from host to container
Attach veth to both ends of bridge
Allow turning up interfaces

Placeholder for nmstate.

I don't think we can - we can verify

The ones from Cirrus are docker/containerd containers running inside GKE.  I'm pretty sure there more restrictive than podman/crio containers :disappointed:


Cache: Block Cache stats seems broken

Block cache entry stats doesnt show cached index and data blocks as it should when running db bench with -cache_index_and_filter_blocks=true and a block cache with a read benchmark (tested readrandom and readrandomwriterandom) after filling it up with 5Gb.
Block cache LRUCache@0x563268152150#445727 capacity: 220.00 MB usage: 0.09 KB table_size: 256 occupancy: 96 collections: 1 last_copies: 3 last_secs: 6e-05 secs_since: 6
Block cache entry stats(count,size,portion): Misc(1,0.00 KB,0%)
exact cmd:
./db_bench --compression_type=None -db=/data/ -num=10000000 -value_size=1000 -key_size=200 --delayed_write_rate=536870912 -report_interval_seconds=1 -max_write_buffer_number=4 -num_column_families=1 -histogram -max_background_compactions=8 -cache_size=220000000 -max_background_flushes=4 -report_file=fillrandom.csv --disable_wal=true --benchmarks=readrandom,stats -stats_dump_period_sec=30 --duration=150 -cache_index_and_filter_blocks=true -cache_high_pri_pool_ratio=1 --use_existing_db
This happens with rocksdb as well (base/v7.7.8 and base/v8.1.1)

the block cache stats are simply collected separately from the other stats (seems like every 3 mins) and then that info is dumped with the db stats. running the above with longer duration shows that the block cache entries are populated as expected. @udi-speedb  FYI

the block cache stats are simply collected separately from the other stats (seems like every 3 mins) and then that info is dumped with the db stats. running the above with longer duration shows that the block cache entries are populated as expected. @udi-speedb FYI

Glad to hear that. Thanks for checking.


sophiah in https://github.com/booydar/LM-RMT

#params = 151111638
#non emb params = 41066400
| epoch   1 step       50 |     50 batches | lr 0.06 | ms/batch 1378.43 | loss  7.85 | ppl  2570.784
| epoch   1 step      100 |    100 batches | lr 0.06 | ms/batch 968.61 | loss  7.49 | ppl  1787.593
| epoch   1 step      150 |    150 batches | lr 0.06 | ms/batch 971.58 | loss  7.48 | ppl  1769.387
| epoch   1 step      200 |    200 batches | lr 0.06 | ms/batch 969.84 | loss  7.47 | ppl  1760.055
| epoch   1 step      250 |    250 batches | lr 0.06 | ms/batch 973.37 | loss  7.46 | ppl  1738.300
| epoch   1 step      300 |    300 batches | lr 0.06 | ms/batch 970.12 | loss  7.48 | ppl  1772.002
| epoch   1 step      350 |    350 batches | lr 0.06 | ms/batch 970.52 | loss  7.47 | ppl  1751.793
| epoch   1 step      400 |    400 batches | lr 0.06 | ms/batch 973.12 | loss  7.47 | ppl  1755.161
| epoch   1 step      450 |    450 batches | lr 0.06 | ms/batch 970.79 | loss  7.46 | ppl  1736.315
| epoch   1 step      500 |    500 batches | lr 0.06 | ms/batch 974.13 | loss  7.48 | ppl  1765.010
| epoch   1 step      550 |    550 batches | lr 0.06 | ms/batch 973.86 | loss  7.48 | ppl  1778.569
Traceback (most recent call last):
File "/home/notebook/code/personal/80306170/AGI/LM-RMT/pytorch/train.py", line 620, in
train()
File "/home/notebook/code/personal/80306170/AGI/LM-RMT/pytorch/train.py", line 540, in train
optimizer.step()
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/torch/optim/lr_scheduler.py", line 69, in wrapper
return wrapped(*args, **kwargs)
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/torch/optim/optimizer.py", line 280, in wrapper
out = func(*args, **kwargs)
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/pytorch_optimizer/optimizer/sophia.py", line 92, in step
self.compute_hutchinson_hessian(
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/pytorch_optimizer/base/optimizer.py", line 100, in compute_hutchinson_hessian
h_zs = torch.autograd.grad(grads, params, grad_outputs=zs, retain_graph=i < num_samples - 1)
File "/opt/conda/envs/dsd/lib/python3.10/site-packages/torch/autograd/init.py", line 303, in grad
return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: res[i].defined() INTERNAL ASSERT FAILED at "../torch/csrc/autograd/functions/tensor.cpp":142, please report a bug to PyTorch.

hmm, I guess it's not the optimizer problem, but maybe Pytorch autograd internal or the training code (e.g. model, loss, etc) issue.
I just found that a similar error occurs when the loss function is CPU-version loss.
maybe, some modules are not on the same device or there're unreachable graphs (leading to not-backprop-able).

Strange that it triggers, and only after so many steps seems like it would be a pytorch/sync issue.
Just wanted to say, if you are using Cross-Entropy loss (for LM) SophiaG variant is more efficient (since it's just squaring the gradient, see https://github.com/Liuhong99/Sophia/blob/19f45d30723bbffcce3d18e4e858d95b0f36dbb6/sophia.py#L56), you can use it like so (not tested):
hessian = list(map(lambda p: p.grad * p.grad, model.parameters()))
opt.step(hessian=hessian)

This also skips the 2nd order gradient calculation, so it could resolve your issue.

SophiaG worked, but the perfomace is not better than Adam, maybe because of the bias. So I want to try SophiaH, which hasn't the bias.

I have been running into a similar error message. I've been trying to use SophiaH with Lightning AI's automatic_optimization feature, but it always fails:
Traceback (most recent call last):
  File "/src/trainer.py", line 403, in <module>
    ai.train(
  File "/usr/local/lib/python3.10/dist-packages/aitextgen/aitextgen.py", line 804, in train
    trainer.fit(train_model)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 43, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 980, in _run
    results = self._run_stage()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 1023, in _run_stage
    self.fit_loop.run()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 202, in run
    self.advance()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 355, in advance
    self.epoch_loop.run(self._data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 133, in run
    self.advance(data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 219, in advance
    batch_output = self.automatic_optimization.run(trainer.optimizers[0], kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/automatic.py", line 188, in run
    self._optimizer_step(kwargs.get("batch_idx", 0), closure)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/automatic.py", line 266, in _optimizer_step
    call._call_lightning_module_hook(
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 146, in _call_lightning_module_hook
    output = fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/core/module.py", line 1276, in optimizer_step
    optimizer.step(closure=optimizer_closure)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/core/optimizer.py", line 161, in step
    step_output = self._strategy.optimizer_step(self._optimizer, closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/strategies/strategy.py", line 231, in optimizer_step
    return self.precision_plugin.optimizer_step(optimizer, model=model, closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/plugins/precision/precision_plugin.py", line 116, in optimizer_step
    return optimizer.step(closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/lr_scheduler.py", line 69, in wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/optimizer.py", line 280, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/optimizer/sophia.py", line 92, in step
    self.compute_hutchinson_hessian(
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/base/optimizer.py", line 100, in compute_hutchinson_hessian
    h_zs = torch.autograd.grad(grads, params, grad_outputs=zs, retain_graph=i < num_samples - 1)
  File "/usr/local/lib/python3.10/dist-packages/torch/autograd/__init__.py", line 303, in grad
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

If I iterate through every parameter group, and set requires_grad() to True, then I go OOM immediately at the "update_period" step:
for n, p in self.model.named_parameters():
    p.requires_grad = True

If I set requires_grad() to False, then training will progress - but the model never learns anything.
If "requires_grad" in unset for ANY parameter group, I get the original error message.
I am unsure how to proceed at this point, but I would greatly appreciate any advice you have to offer.

I have been running into a similar error message. I've been trying to use SophiaH with Lightning AI's automatic_optimization feature, but it always fails:
Traceback (most recent call last):
  File "/src/trainer.py", line 403, in <module>
    ai.train(
  File "/usr/local/lib/python3.10/dist-packages/aitextgen/aitextgen.py", line 804, in train
    trainer.fit(train_model)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 43, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 980, in _run
    results = self._run_stage()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 1023, in _run_stage
    self.fit_loop.run()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 202, in run
    self.advance()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 355, in advance
    self.epoch_loop.run(self._data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 133, in run
    self.advance(data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 219, in advance
    batch_output = self.automatic_optimization.run(trainer.optimizers[0], kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/automatic.py", line 188, in run
    self._optimizer_step(kwargs.get("batch_idx", 0), closure)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/automatic.py", line 266, in _optimizer_step
    call._call_lightning_module_hook(
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 146, in _call_lightning_module_hook
    output = fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/core/module.py", line 1276, in optimizer_step
    optimizer.step(closure=optimizer_closure)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/core/optimizer.py", line 161, in step
    step_output = self._strategy.optimizer_step(self._optimizer, closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/strategies/strategy.py", line 231, in optimizer_step
    return self.precision_plugin.optimizer_step(optimizer, model=model, closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/plugins/precision/precision_plugin.py", line 116, in optimizer_step
    return optimizer.step(closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/lr_scheduler.py", line 69, in wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/optimizer.py", line 280, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/optimizer/sophia.py", line 92, in step
    self.compute_hutchinson_hessian(
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/base/optimizer.py", line 100, in compute_hutchinson_hessian
    h_zs = torch.autograd.grad(grads, params, grad_outputs=zs, retain_graph=i < num_samples - 1)
  File "/usr/local/lib/python3.10/dist-packages/torch/autograd/__init__.py", line 303, in grad
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

If I iterate through every parameter group, and set requires_grad() to True, then I go OOM immediately at the "update_period" step:
for n, p in self.model.named_parameters():
    p.requires_grad = True

If I set requires_grad() to False, then training will progress - but the model never learns anything.
If "requires_grad" in unset for ANY parameter group, I get the original error message.
I am unsure how to proceed at this point, but I would greatly appreciate any advice you have to offer.

Hello!
SophiaH optimizer needs to be set create_graph=True when calling backward(). means that automatic_optimization should be set False!
here's an example.
import os
from torch import optim, nn, utils, Tensor
from torchvision.datasets import MNIST
from torchvision.transforms import ToTensor
import lightning.pytorch as pl

from pytorch_optimizer import SophiaH
from torch.optim import Optimizer

# define any number of nn.Modules (or use your current ones)
encoder = nn.Sequential(nn.Linear(28 * 28, 64), nn.ReLU(), nn.Linear(64, 3))
decoder = nn.Sequential(nn.Linear(3, 64), nn.ReLU(), nn.Linear(64, 28 * 28))

class LitAutoEncoder(pl.LightningModule):
    def __init__(self, encoder, decoder):
        super().__init__()
        self.encoder = encoder
        self.decoder = decoder

        self.automatic_optimization = False

    def training_step(self, batch, batch_idx):
        opt = self.optimizers()
        opt.zero_grad()

        x, y = batch
        x = x.view(x.size(0), -1)
        z = self.encoder(x)
        x_hat = self.decoder(z)

        loss = nn.functional.mse_loss(x_hat, x)

        # important
        self.manual_backward(loss, create_graph=True)
        opt.step()

        self.log("train_loss", loss)

    def configure_optimizers(self):
        return SophiaH(self.parameters())

dataset = MNIST(os.getcwd(), download=True, transform=ToTensor())
train_loader = utils.data.DataLoader(dataset)

autoencoder = LitAutoEncoder(encoder, decoder)

trainer = pl.Trainer(limit_train_batches=100, max_epochs=1)
trainer.fit(model=autoencoder, train_dataloaders=train_loader)

Thank you for the quick response! I have applied your example to my own code (to the best of my ability), and while we're making progress, training bombs with a new error after reaching the first update_period:
Traceback (most recent call last):
  File "/src/trainer.py", line 403, in <module>
    ai.train(
  File "/usr/local/lib/python3.10/dist-packages/aitextgen/aitextgen.py", line 804, in train
    trainer.fit(train_model)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 532, in fit
    call._call_and_handle_interrupt(
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 43, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 571, in _fit_impl
    self._run(model, ckpt_path=ckpt_path)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 980, in _run
    results = self._run_stage()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/trainer.py", line 1023, in _run_stage
    self.fit_loop.run()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 202, in run
    self.advance()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/fit_loop.py", line 355, in advance
    self.epoch_loop.run(self._data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 133, in run
    self.advance(data_fetcher)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/training_epoch_loop.py", line 221, in advance
    batch_output = self.manual_optimization.run(kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/manual.py", line 91, in run
    self.advance(kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/loops/optimization/manual.py", line 111, in advance
    training_step_output = call._call_strategy_hook(trainer, "training_step", *kwargs.values())
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/trainer/call.py", line 294, in _call_strategy_hook
    output = fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/strategies/strategy.py", line 380, in training_step
    return self.model.training_step(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/aitextgen/train.py", line 59, in training_step
    opt.step()
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/core/optimizer.py", line 161, in step
    step_output = self._strategy.optimizer_step(self._optimizer, closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/strategies/strategy.py", line 231, in optimizer_step
    return self.precision_plugin.optimizer_step(optimizer, model=model, closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/pytorch/plugins/precision/precision_plugin.py", line 116, in optimizer_step
    return optimizer.step(closure=closure, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/lr_scheduler.py", line 69, in wrapper
    return wrapped(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/optim/optimizer.py", line 280, in wrapper
    out = func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/optimizer/sophia.py", line 92, in step
    self.compute_hutchinson_hessian(
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/pytorch_optimizer/base/optimizer.py", line 100, in compute_hutchinson_hessian
    h_zs = torch.autograd.grad(grads, params, grad_outputs=zs, retain_graph=i < num_samples - 1)
  File "/usr/local/lib/python3.10/dist-packages/torch/autograd/__init__.py", line 303, in grad
    return Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
RuntimeError: element 4 of tensors does not require grad and does not have a grad_fn

I don't suspect this is the cause, but there is a warning at the beginning of training:
/usr/local/lib/python3.10/dist-packages/torch/autograd/__init__.py:200: UserWarning: Using backward() with create_graph=True will create a reference cycle between the parameter and its gradient which can cause a memory leak. We recommend using autograd.grad when creating the graph to avoid this. If you have to use this function, make sure to reset the .grad fields of your parameters to None after use to break the cycle and avoid the leak. (Triggered internally at ../torch/csrc/autograd/engine.cpp:1151.)
  Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass

It may be relevant to know that I am using the Huggingface PEFT library for LoRA training. I don't suspect that is the issue either, since all that really does is add some extra layers to the model, and freeze all the other layers.
I will troubleshoot some more when I get the chance. It's been a long day already, and I need to take a break. Thank you for the help thus far, and for maintaining such a useful library!

Alright, well I was able to test your example MNIST code, and it does work. So I know this isn't an environment issue.
I removed PEFT as well, and tried standard fine-tuning. I also tried a couple of different models (GPT-2 and GPT-Neo), from Huggingface Transformers library. All ran in the same problem with "tensors does not require grad and does not have a grad_fn".
I'm sure the issue has to do with my training code. I'm carrying some legacy baggage, and I don't really have the proper skill set to know how to optimize manually (which is why I've relied on automatic_optimization until now). I haven't given up, but I probably am going to move on for now. I appreciate your help.


Support for SQL_GUID type

Querying a MS SQL Server table that has a SQL_GUID type column will make turbodbc raise a RuntimeError:
  File "/Users/Dirkjonker/venv/lib/python3.5/site-packages/turbodbc/exceptions.py", line 31, in wrapper
    return f(*args, **kwds)
  File "/Users/Dirkjonker/venv/lib/python3.5/site-packages/turbodbc/cursor.py", line 72, in execute
    self.impl.execute()
RuntimeError: Error! Unsupported type identifier '-11'

$ grep "(-11)" /usr/local/include/sql*.h
/usr/local/include/sqlext.h:#define SQL_GUID                            (-11)

For our use case, returning the GUID as a string or bytestring would be sufficient.

This seems related to #56.

It would be even better if turbodbc returned a proper Python UUID though.

I been using turbodbc for creating parquet from sql server,  the non support sql_guid seems a big road block on my work, Is this feature being actively pursued?

I was trying to pull around 10000 rows x 20 columns records from Microsoft SQL Server using turbodbc. But I've received below error response.

Unsupported type identifier for column LINE_PK @ SQL_GUID (precision 36, scale 0)


Panic on download of file to /dev/null

I ran pelican object copy /gluex/uconn1/rawdata/test/testFileSize1GB /dev/null and the first time it worked fine.
The second time I ran the command, I got this error:
EBUG[2023-11-10T15:45:58Z] Parsed Cache: http://stash-cache-shoveler.osgdev.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB
DEBUG[2023-11-10T15:45:58Z] Transfers:
DEBUG[2023-11-10T15:45:58Z] Constructed URL: http://stash-cache.osg.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB
DEBUG[2023-11-10T15:45:58Z] Transfer URL String: http://stash-cache.osg.chtc.io:8000/gluex/uconn1/rawdata/test/testFileSize1GB
DEBUG[2023-11-10T15:45:58Z] Starting the HTTP transfer...
null 0.00 b / 0.00 b [-----------------------------------------------------------------------------------------------------------------------------------------------------------------] 0s ] 0.00 b/s
null 976.56 MiB / 976.56 MiB [=================================================================================================================================================================] Done!
DEBUG[2023-11-10T15:45:58Z] Got error from file transfer
DEBUG[2023-11-10T15:45:58Z] Failed to download: transfer error: Unable to read /gluex/uconn1/rawdata/test/testFileSize1GB; permission denied
DEBUG[2023-11-10T15:45:58Z] Constructed URL: http://sc-cache.chtc.wisc.edu:8000/gluex/uconn1/rawdata/test/testFileSize1GB
DEBUG[2023-11-10T15:45:58Z] Transfer URL String: http://sc-cache.chtc.wisc.edu:8000/gluex/uconn1/rawdata/test/testFileSize1GB
DEBUG[2023-11-10T15:45:58Z] Starting the HTTP transfer...
panic: *mpb.Progress instance can't be reused after it's done

goroutine 119 [running]:
github.com/vbauerster/mpb/v8.(*Progress).MustAdd(...)
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:141
github.com/vbauerster/mpb/v8.(*Progress).New(0x10e12a0?, 0x1c264?, {0xffff9805e440?, 0x40009f8370?}, {0x4000ac4a70, 0x2, 0x2})
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:131 +0x84
github.com/vbauerster/mpb/v8.(*Progress).AddBar(0x40002adc20?, 0x17c4e48?, {0x4000ac4a70, 0x2, 0x2})
        /root/go/pkg/mod/github.com/vbauerster/mpb/v8@v8.6.1/progress.go:121 +0x124
github.com/pelicanplatform/pelican/client.DownloadHTTP({{{0x111ff2b, 0x4}, {0x0, 0x0}, 0x0, {0x400093c388, 0x1b}, {0xffffdb1b991d, 0x2a}, {0x0, ...}, ...}, ...}, ...)
        /workspaces/pelican/pelican/client/handle_http.go:515 +0x1f7c
github.com/pelicanplatform/pelican/client.startDownloadWorker({0xffffdb1b991d, 0x2a}, {0xffffdb1b9948, 0x9}, {0x0, 0x0}, {0x40002eca00, 0x3, 0x0?}, 0x0?, ...)
        /workspaces/pelican/pelican/client/handle_http.go:382 +0x2e0
created by github.com/pelicanplatform/pelican/client.download_http
        /workspaces/pelican/pelican/client/handle_http.go:332 +0x894

After a very quick skim of the code, I think this is caused by the fact that the first cache we try returns a permission denied error, and when we try to download from the second cache, we end up using an already initialized and completed progress bar object.


Merge 3 groups, because there is no difference between Extensions and…

… Libraries #63

I just merge and sort in Alphabetical Order

Great, thank you.


feat: support -page-size and page-buffer-size for snapshot export and save

What type of PR is this?
/kind feature

What this PR does / why we need it:
This PR adds the support of -page-size and -page-buffer-size when executing kowkctl snapshot export or kwokctl snapshot save.
Previously, the list pager had the default page size of 500 and 10 as the default page buffer size. Therefore, this PR aims to introduce the tuning of these parameters to users, so they can adjust them accordingly to their needs, which can increase the performance in some cases.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?

Introduce flags `--page-size` and `--page-buffer-size` for `kowkctl snapshot export` and `kowkctl snapshot save`

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:

/ok-to-test

It looks like the CI cluster is abnormal

Yep, It is.
https://github.com/kubernetes/test-infra/issues/29622

/lgtm still
Thanks.


Questions about multi-node deepspeed launcher

Hi, @JialianW! Thanks for your wonderful work!
I try to run GRiT on 4 nodes & 32 GPUs with following command:
python train_deepspeed.py --num-machines 4 --num-gpus-per-machine 8 --config-file configs/GRiT_B_ObjectDet.yaml --output-dir-name ./output/grit_b_objectdet

However, I notice that only one GPU is used on each node.
In implementation, there is no mp.spawn in multi-node deepspeed launcher, is this the reason and is there any plan to fix this?

Thanks for your interest in GRiT.
When we train on our cluster, our cluster itself does the multi-processes creation for us. That's why we didn't use mp.spawn in the code. In order to make it work for you, you may use mpirun or other multi-process manager tools to start the training for multi-nodes. Sorry for the missing information in the readme instructions, we were supposed to update the readme to let people be aware of this.


Docs Format

Our documentations have both reStructuredText (rst) and markdown (md) formats. I think we should use one consistent format and I would vote for markdown.
Please feel free to close this issue if you think this is unnecessary.
I could spend some time on cleaning this if that's ok.

I would be happy to have everything in Markdown. And change the titles too, some of them are in all caps, like UPGRADING.rst. Do one file per PR though (or multiple if they are tiny).

There are few places that prefer .rst other than that I think it is ok to move to mark down.
I also vote for mark down. the files that are required to be in .rst I suggest we keep a copy.

I don't think it's worth duplicating the docs, Is there anything besides the README tha has a concrete constraint like this?

I don't think it's worth duplicating the docs, Is there anything besides the README tha has a concrete constraint like this?

I'm okay with that.