Gradient calculations in some optimizers are invalid

Environment

Qiskit Machine Learning version:0.2.1
Python version: 3.8.5
Operating system: linux

What is happening?
I found that most optimizers such as GradientDescent and SciPyOptimizer, define the function gradient_num_diff  to estimate the gradient. AQGD defines _compute_objective_fn_and_gradient to calculate the analytical gradient.
In fact, when running VQC, it will calculate the gradient through class VQC (NeuralNetworkClassifier) and pass gradient to optimizer.optimize() as a parameter. This will cause the gradient solving function defined in the optimizer to not be used.
I'm not sure in which way VQC calculates the gradient (whether it is related to numerical differentiation), but at least for AQGD, the gradient of VQC is not an analytical gradient. Then the optimizer AQGD is meaningless.
How can we reproduce the issue?
When I run VQC，
in qiskit_machine_learning/algorithms/classifiers/neural_network_classifier.py,  function.gradient gives the gradient.
    function = BinaryObjectiveFunction(X, y, self._neural_network, self._loss)
    else:
        if self._one_hot:
            function = OneHotObjectiveFunction(X, y, self._neural_network, self._loss)
        else:
            function = MultiClassObjectiveFunction(X, y, self._neural_network, self._loss)

    objective = self._get_objective(function)

    self._fit_result = self._optimizer.optimize(
        self._neural_network.num_weights,
        objective,
        function.gradient,
        initial_point=self._choose_initial_point(),
        **kwargs

Below we find the AQGD.optimize，

The gradient calculated by VQC is used as the third parameter of minimize
Therefore, in the code will execute

Other optimizers such as SLSQP, CG, L_BFGS_B  also have this problem.
What should happen?
The gradient calculation defined in the optimizer is not used.
The gradient is always calculated by the following algorithm：
from /qiskit_machine_learning/algorithms/objective_functions.py
    def gradient(self, weights: np.ndarray) -> np.ndarray:
          # predict is of shape (N, num_outputs)
          y_predict = self._neural_network_forward(weights)
          # weight probability gradient is of shape (N, num_outputs, num_weights)
          _, weight_prob_grad = self._neural_network.backward(self._X, weights)

          grad = np.zeros(self._neural_network.num_weights)
          num_outputs = self._neural_network.output_shape[0]
          # loss gradient is of shape (N, num_output)
          loss_gradient = self._loss.gradient(y_predict, self._y)
          for i in range(num_outputs):
              # a dot product(matmul) of loss gradient and weight probability gradient across all
              # samples for an output.
              grad += loss_gradient[:, i] @ weight_prob_grad[:, i, :]

          return grad

My level is limited, I don’t understand which method is calculating the gradient, I hope you can guide me.
Any suggestions?
No response

Hello,
I'm not quite sure, I understand the issue. We provide an objective function and a function that computes gradient of the objective and we pass both of them to the optimizer. So, I don't see any issues here.
The way how optimizers are called was changed slightly, as well the optimizer interface. Please take a look at the lines in NeuralNetworkClassifier: https://github.com/Qiskit/qiskit-machine-learning/blob/main/qiskit_machine_learning/algorithms/classifiers/neural_network_classifier.py#L105-L112

Thank you for your response @adekusar-drl
I am new to quantum machine learning, so my understanding is rather shallow. I'm sorry if my description for the issue is a bit confusing. I just can't understand if NeuralNetworkClassifier passes the gradient to the optimizer, then the function defined in the optimizer to calculate the gradient will not be called.
The key is that, for example, since AQGD uses analytic gradient for optimization, it needs to use the parameter shift rule to calculate gradients(_AQGD.compute_objective_fn_and_gradient is defined to calculate analytic gradient based on the parameter shift rule).  So whether the gradient given by NeuralNetworkClassifier  is the exact analytic gradient?
There are other optimizers that calculate gradients based on numerical differentiation, is the gradient given by NeuralNetworkClassifier again a numerical differentiation approximation solution? Is this a contradiction? Because no matter which optimizer of gradient calculation rules is used, the gradients are all calculated and passed through NeuralNetworkClassifier.
I don't quite understand in what way  NeuralNetworkClassifier calculates the gradient. In the code it looks a bit like back -propagation. Could you please explain it for me?Thanks a lot.

Thank you for your response @adekusar-drl I am new to quantum machine learning, so my understanding is rather shallow. I'm sorry if my description for the issue is a bit confusing. I just can't understand if NeuralNetworkClassifier passes the gradient to the optimizer, then the function defined in the optimizer to calculate the gradient will not be called.

That's right.

The key is that, for example, since AQGD uses analytic gradient for optimization, it needs to use the parameter shift rule to calculate gradients(_AQGD.compute_objective_fn_and_gradient is defined to calculate analytic gradient based on the parameter shift rule). So whether the gradient given by NeuralNetworkClassifier is the exact analytic gradient?

Yes, by default we pass a function that computes exact gradient via the param shift rule.

There are other optimizers that calculate gradients based on numerical differentiation, is the gradient given by NeuralNetworkClassifier again a numerical differentiation approximation solution? Is this a contradiction? Because no matter which optimizer of gradient calculation rules is used, the gradients are all calculated and passed through NeuralNetworkClassifier.

An optimizer does not have to estimate gradients anyhow. It may fully rely on the functions passed to it. And since we don't have any assumptions here, we manually construct a gradient function. The way how an optimizer estimates gradients may be inefficient, so if one can build a gradient function, I think, it is better to do this unless it is proven that the optimizer does it better for some reasons.

I don't quite understand in what way NeuralNetworkClassifier calculates the gradient. In the code it looks a bit like back -propagation. Could you please explain it for me?Thanks a lot.

This is correct, this is backward pass where gradients are computed and the algorithm makes an optimization step.

Thank you for your detailed answer。 @adekusar-drl I have understood your explanation and it is a great help for me. Thanks again.


Chrome: Open the options source/screenshot links in a new tab

Chrome attempts to open them in the options popup which leads to

Firefox does not have this issue
To be clear: I am talking about the screenshot and source links

Perhaps it's safer to add a listener instead so this doesn't happen to any future links by mistake.
delegate(document, '[href^="http"]', /* preventDefault, window.open()*/)


Feat: Refactor abilities, add 'trolling' ability

Thanks for your first contribution to gnutard bot!

I saw it it my dream


Use u64 instead of i64 for the type for recorded values

This will make it easier to port my tests over, since those all use unsigned values, and value has to be non-negative anyway. This diff is mostly pretty mechanical; 95% of it is just making obvious changes to keep the compiler happy.
If you'd prefer I could submit this (and future) PRs to a different (non-master) branch if you'd like to accumulate this stuff elsewhere, though I don't plan on ever making a PR that would leave master in a broken state.

I'm happy to compare them to master. I wasn't planning on cutting another minor release any time soon, so preparing master for the eventual major release that this will be seems fine.

My biggest worry about this change is the danger of u64 underflow when we subtract. I've pointed out one already above, but there may be others. Could you make a pass and just check that there aren't other places where we're subtracting from a u64 where we don't know that the result isn't negative?

Sure, I'll check over it and try to convince myself that we won't underflow. My implementation used u64 and didn't have any issues, but you also have more functionality so there may well be things that don't play well.

Yeah, I have this nagging sensation that there was some case where I couldn't figure out whether a particular number was allowed to be negative or not, and I just decided to do everything with i64 (obviously a very lazy solution :p). I completely agree that the right thing to do (as you've started here) is to move to u64 and figure out where, if anywhere, we need to watch for underflow.

I haven't forgotten about this; just been busy.

OK, I think that's everything -- let me know if there's anything else you'd like addressed in this PR.

Looks good to me! Thanks for all the work you've put in :)


🐛 FIX: Check during doctree-resolve if env has attribute

This PR fixes doctree-resolve in the event that the extension is imported but not used.

Codecov Report

Merging #16 into master will decrease coverage by 0.27%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage   96.80%   96.53%   -0.28%
==========================================
  Files           3        3
  Lines         344      346       +2
==========================================
+ Hits          333      334       +1
- Misses         11       12       +1

Flag
Coverage Δ

#pytests
96.53% <50.00%> (-0.28%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

sphinx_exercise/__init__.py
94.85% <50.00%> (-0.43%)
:arrow_down:

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 22f8c36...0de1f68. Read the comment docs.


fix: ignore empty or null agent versions (FIX #10)

This fixes a frustrating bug reported by @doesterr (#10) where the "your app is running multiple agent versions" report could be incorrect due to inconsistencies in the data we get from the API.
It also adds a 4th tab to report apps with no agent versions, so those don't get lost in the ether.

:tada: This PR is included in version 0.3.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


SVG: "Invalid SVG dimensions"

Steps to reproduce (this PDF):
page4.pdf
npm install
node_modules/.bin/gulp dist-install
node examples/node/pdf2svg.js /tmp/page4.pdf

Error:
Error: Invalid SVG dimensions
    at unreachable (/tmp/pdf.js/build/dist/legacy/build/pdf.js:2086:9)
    at assert (/tmp/pdf.js/build/dist/legacy/build/pdf.js:2091:5)
    at DOMSVGFactory.create (/tmp/pdf.js/build/dist/legacy/build/pdf.js:640:24)
    at SVGGraphics._makeTilingPattern (/tmp/pdf.js/build/dist/legacy/build/pdf.js:24178:36)
    at SVGGraphics._makeColorN_Pattern (/tmp/pdf.js/build/dist/legacy/build/pdf.js:24127:23)
    at SVGGraphics.setFillColorN (/tmp/pdf.js/build/dist/legacy/build/pdf.js:24088:39)
    at SVGGraphics.executeOpTree (/tmp/pdf.js/build/dist/legacy/build/pdf.js:23634:22)
    at /tmp/pdf.js/build/dist/legacy/build/pdf.js:23508:18
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:834:11)

Changing the code to get rid of Error: Invalid SVG dimensions such that the page isn't completely broken with the SVG-backend should be fairly easy, however that's unfortunately not guaranteed to to actually fix rendering completely in this case.


Rounded edges / triplanar shaders

Modifies gr_foreground.shader and gr_foreground_scorch.shader to use new triplanar texture mapping nodes.
Also adds rounded edges to the rock and sand SDF layers with some example settings.
https://github.com/apetavern/sbox-grubs/assets/1110904/ca9bb5a9-b0b5-4067-a59f-0c23a41c01a3

Lovely stuff as always, thanks!


Joint IC/SL Integration

Description of changes:
Added ATIS and Snips support to datasets.py and a joint IC/SL format to output_formats.py. Also added configs to config.ini and updated the evaluation logic to include intent classification accuracy.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks for the PR.
Per discussion, I think moving parts related to intent classification to IC/SL dataclass rather than having it in the baseline dataset class would be cleaner. :)


[New Model]: transport unit / global transport label

Model Description
We want to attach the information of a global transport label to a digital twin that represents a transport unit.
Relevant Standards
VDA 4994 Global Transport Label https://www.vda.de/de/aktuelles/publikationen/publication/vda-4992---mat-label-und-emat-datenaustausch
Example Data

MS1 Criteria

[ ] The proposed aspect model does not exist already
[ ] The proposed aspect model does not extend an existing aspect but introduces completely new functionality
[ ] The proposal references a Catena-X use case
[ ] Relevant standards are mentioned/linked
[ ] A first draft of the data structure is provided in an example
[ ] A modeling steward has been assigned

FYI @jacewski-bosch @jonbckr @johannsvarela

modeling_team


Refactor "editorconfig"

There are 2 kinds of ".Editorconfig" in code, one is JSON string for the web edtior, another is *editorconfig.Editorconfig for the file rendering (used by TabSizeClass)
This PR distinguish them with different names.
And by the way, change the default tab size from 8 to 4, I think few people would like to use 8-size tabs nowadays.

Would like to mention related issue https://github.com/go-gitea/gitea/issues/24991, just in case you have any idea where we are missing this context variable 😆.


Is there a way to enable iGPU when bootcamp is on an external drive EFI Boot?

Is there a way to enable iGPU when bootcamp is on an external drive EFI Boot?
You can apparently use Command + boot disc to set that as standard at startup and add apple_set_os.efi to external usb does seem to boot into windows when that is done, but I’m not seeing the iGPU in device manager.

I also am curious about how to do this.

I guess no one have an update on this?
I also have windows on an external drive and just got an eGPU, then discovered the mess around it all!

i am using 2017MBP13'' with windows10 installed on external SSD connected via TB3 alone with akitio node.
with refind installed, all i do is select applesetosefi and then bootin to windows normally. both my iGPU and external gpu will be deteced in windows.

@zjxlsgh can you explain in more detail?

@marcotini
In regard of?

How to make it works? Because as I understood, the Boot Camp partition need to be the first one (so it’s automatic when you turn on the Mac, it’s automatically goes on Windows). But if you have installed on the external hard drive, how it’s working all of this?

Install wintogo version on external ssd (via usb interface) you do this on another win machine (whether it's vm or pc)
It has to be wintogo, I think I used Rufus.
Then install refind


Allow options in objectToDocumentXML when calling a method

Allows overriding the InputMessage "Request" element for custom elements based on args param

Options is optional field for objectToDocumentXML function
Replicates _xml parameter functionality (sending a custom XML structure as a literal) with JSON arguments.

Coverage decreased (-0.5%) to 94.529% when pulling 130c2045a2ff51da3b385c06a9923e3df83d3668 on ndeniche:ndeniche_override-base-element into af93a6f45720431371ab3f23866d3ad3f2efae1b on vpulim:master.

@ndeniche please add more tests to cover all scenarios.

i'm closing this in 4 days if there's no more action

All of my new code is covered. Should I improve coverage by adding tests to other features?

@ndeniche if coverage has decreased, then not all the added code has been covered.


Fix CMAKE_INSTALL_LIBDIR exampel in README.md

In README, CMAKE_INSTALL_LIBDIR is set up with the "lib" path.
The lib path is recorded in the pc file referenced by the pkg-config tool.
This path must be modified to the absolute path "/lib".

:memo: TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #200. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

INFO: You can read if there are misspelled characters at our misspelling check report. Please read http://ci.nnstreamer.ai/nnstreamer-edge/ci/repo-workers/pr-checker/200-202402272300190.54708003997803-548693b7d7dcc1ba1a16cced86f98a23de54c861/report/misspelling_result.txt.

INFO: You can read if there are misspelled characters at our misspelling check report. Please read http://ci.nnstreamer.ai/nnstreamer-edge/ci/repo-workers/pr-checker/200-202402272300480.81850290298462-8df0279175a61d204354d08be04c557e6915629a/report/misspelling_result.txt.


unwanted link created even if the image is already wrapped by a link

At the moment, the following common markdown syntax will turn
[![Minion](https://octodex.github.com/images/minion.png)](http://google.com)

into

The duplicated  tag is not compliant with HTML specs.
Expected outcome: Skip performing linkfy if image is already wrapped by link_open and link_close.
Hi @crookedneighbor please let me know what you think? I am happy to create a PR to implement it if this change is helpful.

Sounds good to me. Go for it!

This is out in v3.0.0!

This is out in v3.0.0!

Hey @crookedneighbor thanks for the quick action! Tested and works 🔥


Clean command does nothing for sub_dirs on Mac OS X

When there are multiple apps living within subdirectories, like so:
{sub_dirs, [
    "apps/app1",
    "apps/app2",
    "apps/app3",
    "rel"
]}.

A call to rebar clean from the top level directory does not remove any files, or anything at all. Changing to the individual app directories and calling from there functions as expected - rebar -v clean called from apps/app1 shows the expected "INFO:  sh info: ... cmd: rm -rf ebin/*.beam", yet shows nothing from the top level.
rebar compile and rebar generate are handling all subdirectories properly.
Running Mac OS X 10.9, having tried last few versions of rebar in combination with Erlang 17 and 16, all experiencing the same issue.

i think #56 is relevant here, in my projects i define a {recursive_cmds, [clean]} tuple in the top-level rebar.config, to prevent cleaning the deps i use skip_deps=true

@imfranklin can you confirm @lrascao 's fix works? If so, I misread this and it isn't a bug.

@ferd it does work.
On my production servers, which are either CentOS or Debian (and running the stable release of rebar at time of deployment), clean...well...cleans it all - recursive by default, it seems. Was this recursive cleaning the previous behavior by default? If so, apologies for bug-reporting a config/function change.

 We were just not very attentive with versioning back then.


Write request is not processed in the random order

Describe the bug
Write data to multiple characteristics one by one and I dont want to wait for response of each write. Problem here is Order of write not executed same as I requested.
To Reproduce
Steps to reproduce the behavior:
Writing the data to multiple characteristic one by one.
rxBleConnection.writeCharacteristic(characteristicUUID1, bytesToWrite))
rxBleConnection.writeCharacteristic(characteristicUUID2, bytesToWrite))
rxBleConnection.writeCharacteristic(characteristicUUID3, bytesToWrite))
rxBleConnection.writeCharacteristic(characteristicUUID4, bytesToWrite))
When I print the logs, write is executed in the different order
ie,
1st  characteristicUUID3 - executed
2nd characteristicUUID2 - executed
3rd characteristicUUID4 - executed
4th characteristicUUID1 - executed
Expected behavior
I am expecting write should occur in the same order as my request.
like in below order,
1st  characteristicUUID1 - executed
2nd characteristicUUID2 - executed
3rd characteristicUUID3 - executed
4th characteristicUUID4 - executed

Hello, thanks for using the library. I am afraid that without a code sample I cannot recreate your issue. Writes (and most of other interactions) are handled in FIFO order by default. Could you share more details?

Closing due to lack of information and inactivity of the original poster.
When more data will be available—feel free to add that information and reopen this issue.
Best Regards


Convert pre-commit hook to pre-push hook

The precommit hook wasn't offering much value and was causing issues when rebasing so instead I propose (after discussing with @edavey) that we change it to a pre-push hook. This will mean we retain the safety the hook offers without the lengthy time it takes to commit and the likelyhood of the hook failing when rebasing/

This seems like a sensible move. I'm suspicious of the benefit of Husky (I have it turned off) as we have CI, but this is better than a pre-commit hook.

@pezholio Yeah to be honest I agree - but maybe a decision that can be made when beta development starts properly. This should ease some of the pain for now 💊


Need to upload video

I need to upload video to Instagram. Please let me know how can I do it.
Thanks
Alok

The feature has been tested and works fine, if you have any question, please let me know
Make sure you read the test before using it.
https://github.com/TheM4hd1/SwiftyInsta/blob/be9289b8b9279f1f6f004e5cbc649cb6d98d8a92/SwiftyInstaTests/SwiftyInstaTests.swift#L704


Fix/party town action required

What is it?

[x ] Feature / enhancement
[ ] Bug
[ ] Docs / tests

Description
Notice to user the next step for implement QwikPartyTown
Use cases and why
After run npm run qwik add partytown the user must add   <QwikPartyTown />
Checklist:

[x ] My code follows the developer guidelines of this project
[ x] I have performed a self-review of my own code
[ x] I have made corresponding changes to the documentation
[ x] Added new tests to cover the fix / functionality

@manucorporat I thinking is need add a specific place on documentation for the startes script

Thanks for the PR! you mean adding to the docs all the integrations?


Mocha tests now use ES6

npm test was failing because server/utils/auth.js uses ES6 features, so I updated the test command.
Also, harmony arrows in test/basic_routes.js, because harmony arrows :heart_decoration:

Harmony arrows actually removes the context for the tests. They should be full functions or at least the outer most describe function should not be an arrow function.

@BerkeleyTrue Like this? Why is it that the describe functions need to use the old syntax? Because of that lexical this thing?

need to use the old syntax

I wouldn't say old syntax. arrow functions have very specific behavior that differentiate it from anonymous and named functions. For instance calling new on an arrow function will throw, arrow functions do not have arguments or this of their own.
In mocha, the context of the test is the test itself, so you can do things like this.Model = loopback.SomeMOdel.
Arrow functions are really only meant to be used in callbacks to keep this in scope within those functions. But like to use it because it is shorter, myself included.


avoid get color_read_* with depth format

Description
Avoid crash for serializing depth texture (some driver may crash when GL.glGetIntegerv(eGL_IMPLEMENTATION_COLOR_READ_FORMAT, (GLint *)&implFormat); with no color attachment found.
In fact the code path remains the same because implFormat and implType is only needed when depthFormat==false.

It goes to show that there's never an end to Android driver bugs...


Implement idxmax and idxmin functions

This implements idxmax and idxmin functions similar to thier pandas equivalents.
This is my first time contributing to the project so I am not certain the structure or approach is the best.  Please let me know if there is a better way to implement this.
This also includes two other changes.
First, it drops some code for backwards-compatibility with numpy 1.12, which isn't supported.  This code was hiding an error I needed to have access to in order to get the function working.
Second, it adds an option to Dataset.map to let you map DataArray methods by name.  I used this to implement the Dataset versions of idxmax and idxmin.

[X] Closes #60
[X] Tests added
[X] Passes isort -rc . && black . && mypy . && flake8
[X] Fully documented, including whats-new.rst for all changes and api.rst for new API

This looks extremely good and thorough! Thanks @toddrjen !
I'll have a proper look through later. I see a couple of minor questions I'll add in too. Others feel free to get ahead of me!

@keewis @max-sixty The map thing is purely a convenience function.  I know there are other ways to do it, but since I thought this would be a useful feature for users in its own right, I did it that way.  But of course I can do it another way if you disagree.
The one complication is that using DataArray.idxmax and DataArray.idxmin assumes that the Dataset would only ever contain DataArray objects.  That may be mostly the case now, but I didn't want to bake that into the code.  I could do it using a lambda or nested function, but as I said I thought this approach had other benefits to users.
I will address the other comments inline.

@keewis @max-sixty The new commit with the requested changes has been pushed to this branch (except for the map one, pending ongoing discussion).  Please take a look.

@max-sixty

To what extent should this support non-index coordinates?

I am not familiar with non-index coordinates, what are those?
Do you mean non-dimension coordinates?  Does that even make sense in a general way?  If they are 1D and tied to just one dimension coordinate that could be done, but if they are not tied to any dimension or tied to multiple dimensions or otherwise not 1D I am not sure what it would mean to take the idxmin/idxmax of them.

The one complication is that using DataArray.idxmax and DataArray.idxmin assumes that the Dataset would only ever contain DataArray objects

I hear you and share the impulse that baking this in seems not ideal. Though I think it's a reasonable compromise to make, and there are no plans to deviate from it.
(Ideally maybe we have a ._contained_class attribute on the dataset which is almost always DataArray)
I think having a lambda is fine too.

Do you mean non-dimension coordinates?

Yes, thanks for clarifying

Does that even make sense in a general way? If they are 1D and tied to just one dimension coordinate that could be done, but if they are not tied to any dimension or tied to multiple dimensions or otherwise not 1D I am not sure what it would mean to take the idxmin/idxmax of them.

Yes, it wouldn't work in all cases, fair point. There are some cases in which it would work though, I'm unsure if it would be too complicated an interface to return them depending on whether it would work.
(and completely fine to contemplate these later)

I fixed the extra space in the docstring and moved the business logic to computation.py.

LGTM! Any other thoughts before we merge?

In general this is really nicely put together. My main asks:

Remove the unrelated API change to map
Think about if the alternative of returning an arbitrary value rather than promotion or raising an error.

For details see the comments above. If we want  to support (2), then it might make sense to use a string for selecting values of promote rather than True/False/None (e.g., so we can include the option to return an arbitrary coordinate value).

That could work.
The corner case we would need to decide on is again promotion.
What happens if the fill value is a "higher" type in the numeric tower than
the original type?  What if it is lower?

We could try to always convert to the fill dtype (or more often the
dtype equivalent to the Python native type), and raise and exception of it
doesn't work.
We could promote the fill value or original data, whichever is
"lower".

What if someone tries to use a string type for numeric data or vice
versus?  If we do option 1 that is easy.  Otherwise we probably need to use
numpy casting rules?
What about an object dtype fill value?
What about a date/time regard dtype?
On Mon, Mar 23, 2020, 23:49 Stephan Hoyer<EMAIL_ADDRESS>wrote:

@shoyer commented on this pull request.
In xarray/core/dataset.py
https://github.com/pydata/xarray/pull/3871#discussion_r396887940:

@@ -5914,5 +5921,169 @@ def pad(

     return self._replace_vars_and_dims(variables)

def idxmin(

   self,

   dim: Hashable = None,

   axis: int = None,

   skipna: bool = None,

   promote: bool = None,

Just to throw out another API option: what about having a fill_value
argument instead of promote? The default (fill_value=dtypes.NA) would do
type promotion for integer dtypes and always fill with NA. Other values
(e.g., fill_value=0) could be used to avoid type promotion with an
integer coordinate.
Advantages:

No special cases to keep track of.
Consistent with other xarray methods that take a fill_value argument.

Disadvantages:

No built-in way to raise an error instead of promotion (but users
could do this themselves pretty easily)
No built-in way to "only promote if necessary" (but this is a weird
non-type stable API that doesn't work great with Dask, anyways)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/pull/3871#discussion_r396887940, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AARK43Q3GISCTFURNDUDQNDRJAUTJANCNFSM4LP7WEMA
.

Please see the newest version with the promote argument changed to fill_value.

I am not sure why the tests are suddenly failing.  The tests were all working, then I rebased on the latest master and they are failing and I can't figure out why.

I figured out what is going wrong.  I will make a commit with a fix and include it in this pull request later today.

I think I have implemented all the requested changes and all tests are passing.  Please take a look.

Here is a new commit with the discussed changes.

Thank you again @toddrjen, both for the content and the iteration.
@shoyer any final thoughts? Otherwise I'll merge tomorrow?

Amazing — let's merge on green!

I have gone over it one more time and made a few documentation fixes.  Please take one more look before merging.

Thanks @toddrjen that's a great contribution!

@toddrjen thank you again! This ended up being quite an adventure, really appreciate you pushing all the way.


New package: JSOSolvers v0.1.0

Registering package: JSOSolvers
Repository: https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl
Created by: @abelsiqueira
Version: v0.1.0
Commit: 5b28ca0c6d46d85f9e84904cb7ab0413dccac7d0
Reviewed by: @abelsiqueira
Reference: https://github.com/JuliaSmoothOptimizers/JSOSolvers.jl/commit/5b28ca0c6d46d85f9e84904cb7ab0413dccac7d0#commitcomment-34218755

Can you also add
[compat]
julia = "1"

to your project file and retrigger the bot.

Done


Close button is off on Ubuntu

When attempting to close Lens on Ubuntu 22.04.2 LTS, the close button is off a bit, have to click more to the left to close
As you can see, its not highlighting when directly over it

I have to move the mouse more to the left to close

Thanks for the report


Rule-based replacement of NFC commands

We could log all NFC commands and display them in a list. Then, we could let the user create rules to change these requests on the fly (e.g. replace certain bytes, drop messages, ...) to see what happens and try to find holes in the protocols.
There is obviously a certain risk of bricking a card with that, but it would be worth a try, IMO. Somewhat related to #38.

Device filters have been dropped in favor of scriptable server filters in v2.


Move to syntax-tree org

@BarryThePenguin This is totally up to you, but by moving this repo to the syntax-tree it’s easier for more people to help: shared code responsibility and more people that can publish (once I have an npm org set up), meaning less of a bus factor!

I think this is a great idea 👍
Is there anything that needs changing first before the move (CI, Licensing, etc..)? Or can I just hit the transfer button?

@BarryThePenguin Ping! I just did a refactor btw to give everything a nice polish after a few years of not getting much attention.

Done! Was a bit slow 💦

@BarryThePenguin Awesome, thanks @BarryThePenguin!! 🎉


Get contract

This change is

Coverage remained the same at 95.99% when pulling 6f6b06192462db83ce49aed7fef354a7bf157334 on VolVoz:get_contract into 33a7658a552cc430d40ff4e490132a17590faa9b on openprocurement:a138304743419559_filter_doc_type.

Прибери зайвий коміт


Add support for embedding languages for the runs keyword

Is your feature request related to a problem? Please describe.
Not specifically.
Describe the solution you'd like
I would like to see my step runs show the correct syntax when I'm editing GH Actions or Workflows. Thank you!
Additional context
IntelliJ supports this via a feature called Language Injection. Users can either add a comment before the key such as # language=sh or modify their JSON Schema to provide the "x-intellij-language-injection": "Shell Script" property.
For VSCode, a request for generic support didn't gain much traction. Based on the discussion in microsoft/vscode#1751 it seems the preferred way to do this is with an extension using Grammar Injection or Embedded Languages.

Complementing OP's request: it would be great to support several "languages embedded in YAML":

Shell script in a run: block
JavaScript in a uses: actions/github-script@v7 block

And "Support" means:

Syntax highlighting
Checking (e.g. via Shellcheck for Shell, and via tsserver for JavaScript)

Somewhat related proposal: https://github.com/microsoft/vscode/issues/224581

In the mean time, there is an extension which provides YAML blocks syntax highlighting: https://github.com/harrydowning/yaml-embedded-languages
Still not practical in this case as we would have to tag each run: | block with its corresponding language, like:
- shell: python
- run:|  # python
    print("Yo!")


[Bug]: bug in slider

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
on hovering then the arrow is visible otherwise its a rectangle
Expected behavior
https://github.com/user-attachments/assets/7428deb2-f370-4d0c-b491-c4a776058549
Add ScreenShots
No response
On which device are you experiencing this bug?
No response
Record

[X] I have read the Contributing Guidelines
[X] I'm a GSSOC-EXT contributor
[X] I'm a HACKTOBERFEST contributor
[X] I have starred the repository

@Aditya-edith proceed.


enable or disable safety checker at configure time

The configure script now asks the user whether they wish to activate the safety filter by default. It also asks for their preferred sampler and steps. These values get written into ~/.invokeai
See discussion on Discord at: https://discord.com/channels/1020123559063990373/1038203262911914115

LGTM.

The CI actions are picking up a bug. I am fixing it.

For some reason this PR does not seem to want to pass the CI tests, even though it doesn't touch the environment files. I am going to have to withdraw it, port the changes, and make a new PR.
Weird!

Checks are not passing. Retire this PR.


Extract, Transform and Process Data for partner & promote events page(s)

We defined what we hope to see here: https://docs.google.com/document/d/1bebTOrMsDT7uD8x6rwuAf7ysjMVnbkqtTcDIsZ9GzI0/edit#
I will re-confirm with L23 that they want to see this done & will update this ticket when it is unblocked and @gilesdring can act on it

Will need to check data extract with L23 before visualising it.

One page for partner and one for present.

Have now added partner core data
https://github.com/open-innovations/leeds-2023/tree/main/data/metrics/events/partner-events
and prepared data for site
https://github.com/open-innovations/leeds-2023/tree/main/docs/metrics/events
I think this is ready for visualisation...


AVG prevents Win Executable Download

Hi Mr.Auburn,
i would like to inform you about a Message i got from my locally installed AVG Antivirus Program.
It shows me this:

I tried Firefox and Edge browsers to make sure its not Firefox itself.
Then i tried to a Second download of another exe , namly the
FastNoiseSIMD_Preview_0.7.exe
from:
https://github.com/Auburn/FastNoiseSIMD/releases
The second Exe did not throw any errors at all, passed additional scans and runs fine.
The first mentioned Exe can not get passt the Download check.
Since i am fine with the SIMD version, im ok, but i thought i should let you know about this.
(At first i thought its a False-Positive, but im a bit scepctical now that the second exe didnt throw any warnings.)

Fixed in v1.1.0 with new web app

Thanks!


Feature/preload fonts

Font is now only loaded once with the page load.

Navigation is super smooth now!


[BUG]Font awesome icons not rendering properly.

Description
The default font awesome icon pack is not rendering properly on the CMS page.

Steps to reproduce

Click on edit
Select the Icon widget
Select Icon
Select any icon from the 'Font awesome regular' icon pack
Save it

Expected behaviour
The icons should render properly.
Actual behaviour
Icons not rendering properly.

Screenshots

Additional information (CMS/Python/Django versions)
django-cms==3.8

Because you've got your own template here, you'll need to load font awesome yourself, it won't be loaded/provided by the CMS automatically.
https://fontawesome.com/start

I'm closing this based on my current assumptions of what's going on.
@skini-galaxia if you could ensure that fontawesome is included in your template & test again. Failing that post here so we can open this again.


Remove the “Processed by the Data Processing Pipelines” from "Contribute" section

Remove the "processed by our standard data processing pipelines" paragraph from the Data Processing and Results page.

Completed closing:
https://data.humancellatlas.org/contribute/contributing-data-processing-results
@theathorn


Spearbit 184

Description

Type of change

[ ] Docs change / dependency upgrade
[ ] Configuration / tooling changes
[ ] Refactoring
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Requires changes in customer code

High-level change(s) description - from the user's perspective

Related Issue(s)
Fixes
Related pull request(s)

note: tests working; forge install failing


Bump disk quota to 2G

Even newly created instances got their disk to 850MB out of 1GB.

History:

memory up from from 512MB to 2GB:https://github.com/alphagov/notifications-template-preview/commit/e9b209a022af9f42f774f79b414dbf63c1c8c67a#diff-336218f780d169ff24b1103188ca554fR8
memory reduced from 2GB to 1GB: https://github.com/alphagov/notifications-template-preview/commit/61eb51e3a98e603c79d83541fb60c0d02b39d571#diff-336218f780d169ff24b1103188ca554fR4


Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2)

When running locally the cog predict -i  it working fine but when pushed on replicate it giving this error
Traceback (most recent call last):   File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 334, in predict     return _predict(   File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 370, in _predict     for event in worker.predict(input_dict, poll=0.1):   File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/worker.py", line 135, in _wait     raise FatalWorkerException( cog.server.exceptions.FatalWorkerException: Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2)  any idea @anotherjesse  @bfirsh

Same issue 🤔

@anotherjesse @bfirsh

No solution

+1

Hi @cudanexus. Can you please share the name of the model on Replicate?

+1

@AnushreeBannadabhavi @wolfpixels @arnavmehta7 @Tariqh23 If you're seeing the same behavior, could you please share the name of the Replicate model you're using?

When running locally the cog predict -i  it working fine but when pushed on replicate it giving this error Traceback (most recent call last): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 334, in predict return _predict( File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/runner.py", line 370, in _predict for event in worker.predict(input_dict, poll=0.1): File "/root/.pyenv/versions/3.8.16/lib/python3.8/site-packages/cog/server/worker.py", line 135, in _wait raise FatalWorkerException( cog.server.exceptions.FatalWorkerException: Prediction failed for an unknown reason. It might have run out of memory? (exitcode 2)  any idea @anotherjesse @bfirsh

do you get the solution. Can you share with me ? Looking forward. Thanks

https://replicate.com/findix/sd-scripts
@mattt The error occurs on this model.

i have the same problem.https://replicate.com/archcollege/voice

same here，when i run  cog predict in local.

Anyone has the solutions?

I came to this and fix it,  maybe your predict func came to some exception that does not be catched.

I've not worked on cog from a lot of time, but this might help someone:
I was able to run it locally as I had better configurations locally than the VM on which I was trying to deploy.
I will suggest reducing the model size or increasing the memory of the machine on which you are trying to deploy.
Additionally try to add a try-except block and do following everywhere in the exception block:
import traceback
print(traceback.format_exc())

has anyone solved the problem?

Try deploying on more powerful hardware. At least in my case, Cog really did run out of memory.


fix(log error): handle optional target

fixes:

#521
#242

Coverage decreased (-0.1%) to 87.184% when pulling 2d50ef4a6554ca976bc171cb06e9cf5b05d016d4 on logger-bug into 0381fdfbc5976ad8a3632fd92b7406047f1c6748 on master.


What are the hardware requirements for reproducing Codes15B?

Hello~ Li! I attempted to replicate Codes15B using 8*A800, with flash-attention installed and modeling_gpt_bigcode.py copied over. The accelerate config has also been set up.
I have attempted to train the codes_7B model under the conditions of 8*A800 without any issues. However, when it comes to training codes_15B, an error occurs. The error message is as follows:
(test-moss2) ubuntu@gpu16:~/CodeS$ tail -f logs/train_codes_15B_bird.log
nohup: ignoring input
[2024-08-11 10:24:29,845] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
W0811 10:24:32.716214<PHONE_NUMBER>63072 torch/distributed/run.py:779]
W0811 10:24:32.716214<PHONE_NUMBER>63072 torch/distributed/run.py:779] *****************************************
W0811 10:24:32.716214<PHONE_NUMBER>63072 torch/distributed/run.py:779] Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
W0811 10:24:32.716214<PHONE_NUMBER>63072 torch/distributed/run.py:779] *****************************************
[2024-08-11 10:24:41,295] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2024-08-11 10:24:41,318] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2024-08-11 10:24:41,357] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2024-08-11 10:24:41,459] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
[2024-08-11 10:24:41,513] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
[2024-08-11 10:24:41,608] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
[2024-08-11 10:24:41,692] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[2024-08-11 10:24:41,698] [INFO] [real_accelerator.py:110:get_accelerator] Setting ds_accelerator to cuda (auto detect)
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:49: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  def forward(ctx, input, weight, bias=None):
/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/deepspeed/runtime/zero/linear.py:67: FutureWarning: `torch.cuda.amp.custom_bwd(args...)` is deprecated. Please use `torch.amp.custom_bwd(args..., device_type='cuda')` instead.
  def backward(ctx, grad_output):
accelerator.is_main_process: False
accelerator.device: cuda:5
accelerator.is_main_process: True
accelerator.device: cuda:0
Namespace(block_size=4096, checkpointing_steps=100000, column_num=10, epochs=4, lr=5e-06, mode='sft', output_ckpt_dir='./ckpts/codes-15b-bird-with-evidence', per_device_train_batch_size=4, pretrained_model_name_or_path='./codes-15b', pt_data_dir='./data/corpus.bin', resume_from_checkpoint=None, resume_tag=None, save_all_states=False, seed=42, table_num=6, tensorboard_log_dir='./train_logs/codes-15b-bird-with-evidence', text2sql_data_dir='./data/sft_bird_with_evidence_train_text2sql.json', warmup_ratio=0.05)
tokens per batch: 524288
sequences per batch: 128
using LLM from: ./codes-15b
accelerator.is_main_process: False
accelerator.device: cuda:4
accelerator.is_main_process: False
accelerator.device: cuda:1
accelerator.is_main_process: False
accelerator.device: cuda:6
accelerator.is_main_process: False
accelerator.device: cuda:2
accelerator.is_main_process: False
accelerator.device: cuda:3
accelerator.is_main_process: False
accelerator.device: cuda:7
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
enable flash attention.
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
enable flash attention.
Loading checkpoint shards:   0%|          | 0/7 [00:00<?, ?it/s]/home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/transformers/modeling_utils.py:442: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
enable flash attention.
W0811 10:33:49.341474<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927915 closing signal SIGTERM
W0811 10:33:49.342151<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927917 closing signal SIGTERM
W0811 10:33:49.342481<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927918 closing signal SIGTERM
W0811 10:33:49.342605<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927919 closing signal SIGTERM
W0811 10:33:49.342723<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927920 closing signal SIGTERM
W0811 10:33:49.342852<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927921 closing signal SIGTERM
W0811 10:33:49.342965<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:858] Sending process 2927924 closing signal SIGTERM
E0811 10:34:02.121527<PHONE_NUMBER>63072 torch/distributed/elastic/multiprocessing/api.py:833] failed (exitcode: -9) local_rank: 1 (pid: 2927916) of binary: /home/ubuntu/env/miniconda3/envs/test-moss2/bin/python
╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/ubuntu/env/miniconda3/envs/test-moss2/bin/accelerate:8 in <module>     │
│                                                                              │
│   5 from accelerate.commands.accelerate_cli import main                      │
│   6 if __name__ == '__main__':                                               │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])     │
│ ❱ 8 │   sys.exit(main())                                                     │
│   9                                                                          │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/acce │
│ lerate/commands/accelerate_cli.py:45 in main                                 │
│                                                                              │
│   42 │   │   exit(1)                                                         │
│   43 │                                                                       │
│   44 │   # Run                                                               │
│ ❱ 45 │   args.func(args)                                                     │
│   46                                                                         │
│   47                                                                         │
│   48 if __name__ == "__main__":                                              │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/acce │
│ lerate/commands/launch.py:908 in launch_command                              │
│                                                                              │
│   905 │   │   if mp_from_config_flag:                                        │
│   906 │   │   │   args.deepspeed_fields_from_accelerate_config.append("mixed │
│   907 │   │   args.deepspeed_fields_from_accelerate_config = ",".join(args.d │
│ ❱ 908 │   │   deepspeed_launcher(args)                                       │
│   909 │   elif args.use_fsdp and not args.cpu:                               │
│   910 │   │   multi_gpu_launcher(args)                                       │
│   911 │   elif args.use_megatron_lm and not args.cpu:                        │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/acce │
│ lerate/commands/launch.py:647 in deepspeed_launcher                          │
│                                                                              │
│   644 │   │   )                                                              │
│   645 │   │   with patch_environment(**current_env):                         │
│   646 │   │   │   try:                                                       │
│ ❱ 647 │   │   │   │   distrib_run.run(args)                                  │
│   648 │   │   │   except Exception:                                          │
│   649 │   │   │   │   if is_rich_available() and debug:                      │
│   650 │   │   │   │   │   console = get_console()                            │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/torc │
│ h/distributed/run.py:892 in run                                              │
│                                                                              │
│   889 │   │   )                                                              │
│   890 │                                                                      │
│   891 │   config, cmd, cmd_args = config_from_args(args)                     │
│ ❱ 892 │   elastic_launch(                                                    │
│   893 │   │   config=config,                                                 │
│   894 │   │   entrypoint=cmd,                                                │
│   895 │   )(*cmd_args)                                                       │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/torc │
│ h/distributed/launcher/api.py:133 in __call__                                │
│                                                                              │
│   130 │   │   self._entrypoint = entrypoint                                  │
│   131 │                                                                      │
│   132 │   def __call__(self, *args):                                         │
│ ❱ 133 │   │   return launch_agent(self._config, self._entrypoint, list(args) │
│   134                                                                        │
│   135                                                                        │
│   136 def _get_entrypoint_name(                                              │
│                                                                              │
│ /home/ubuntu/env/miniconda3/envs/test-moss2/lib/python3.8/site-packages/torc │
│ h/distributed/launcher/api.py:264 in launch_agent                            │
│                                                                              │
│   261 │   │   │   # if the error files for the failed children exist         │
│   262 │   │   │   # @record will copy the first error (root cause)           │
│   263 │   │   │   # to the error file of the launcher process.               │
│ ❱ 264 │   │   │   raise ChildFailedError(                                    │
│   265 │   │   │   │   name=entrypoint_name,                                  │
│   266 │   │   │   │   failures=result.failures,                              │
│   267 │   │   │   )                                                          │
╰──────────────────────────────────────────────────────────────────────────────╯
ChildFailedError:
========================================================
train_causal_lm.py FAILED
--------------------------------------------------------
Failures:
  <NO_OTHER_FAILURES>
--------------------------------------------------------
Root Cause (first observed failure):
[0]:
  time      : 2024-08-11_10:33:49
  host      : gpu16
  rank      : 1 (local_rank: 1)
  exitcode  : -9 (pid: 2927916)
  error_file: <N/A>
  traceback : Signal 9 (SIGKILL) received by PID 2927916
========================================================

I'm not sure where the issue lies, but my local environment is CUDA 12.4, and here are the details of my torch version.
(test-moss2) ubuntu@gpu16:~/CodeS$ pip list|grep torch
torch                   2.4.0
torchaudio              2.4.0
torchvision             0.19.0

If you have the time, could you take a look at this bug for me? Thank you.

BTW, the scripts I used for training the codes_7B and codes_15B are as follows:
(test-moss2) ubuntu@gpu16:~/CodeS$ cat train_codes_7B_bird.sh
set -e
# SFT CodeS-7B on BIRD with external knowledge
accelerate launch train_causal_lm.py --per_device_train_batch_size 4 --block_size 4096 --seed 42 --pretrained_model_name_or_path ./codes-7b --epochs 4 --lr 5e-6 --warmup_ratio 0.05 --checkpointing_steps 100000 --tensorboard_log_dir ./train_logs/codes-7b-bird-with-evidence --mode sft --output_ckpt_dir ./ckpts/codes-7b-bird-with-evidence --text2sql_data_dir ./data/sft_bird_with_evidence_train_text2sql.json --table_num 6 --column_num 10

(test-moss2) ubuntu@gpu16:~/CodeS$ cat train_codes_15B_bird.sh
set -e
# SFT CodeS-15B on BIRD with external knowledge
accelerate launch train_causal_lm.py --per_device_train_batch_size 4 --block_size 4096 --seed 42 --pretrained_model_name_or_path ./codes-15b --epochs 4 --lr 5e-6 --warmup_ratio 0.05 --checkpointing_steps 100000 --tensorboard_log_dir ./train_logs/codes-15b-bird-with-evidence --mode sft --output_ckpt_dir ./ckpts/codes-15b-bird-with-evidence --text2sql_data_dir ./data/sft_bird_with_evidence_train_text2sql.json --table_num 6 --column_num 10

It can be observed that, apart from the different directories for the input and output weight files, there are no other differences in the parameters.
I'm curious as to why train_codes_7B_bird.sh can run, but train_codes_15B_bird.sh cannot, even though both are under the same conditions of 8*A800.

Upon careful investigation, it was found that the model was stuck during the initialization.
model = AutoModelForCausalLM.from_pretrained(opt.pretrained_model_name_or_path)

It turns out that the limitation was due to the size of the memory; my server host only has 504G of RAM.
At this point, simply change num_processes=8 to num_processes=4.
By reducing the number of parallel processes, the memory usage per process is decreased.
(test-moss2) ubuntu@gpu16:/CodeS$ cat /home/ubuntu/.cache/huggingface/accelerate/default_config.yaml
compute_environment: LOCAL_MACHINE
deepspeed_config:
  gradient_accumulation_steps: 4
  gradient_clipping: 1.0
  offload_optimizer_device: none
  offload_param_device: none
  zero3_init_flag: false
  zero_stage: 2
distributed_type: DEEPSPEED
downcast_bf16: 'no'
machine_rank: 0
main_training_function: main
mixed_precision: bf16
num_machines: 1
num_processes: 4
rdzv_backend: static
same_network: true
tpu_env: []
tpu_use_cluster: false
tpu_use_sudo: false
use_cpu: false


how to fix his issue to factoring

when i exc
RPC_USER=rpcuser RPC_PASS=verylongrpcpasswordpassword SCRIPTPUBKEY=avalidscriptpubkey python FACTOR.py
it error :
***   Warning: new maximum stack size = 536870912 (512.000 Mbytes).
Traceback (most recent call last):
File "FACTOR.py", line 629, in
gHash = ctypes.CDLL("./gHash.so").gHash
File "/usr/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: ./gHash.so: cannot open shared object file: No such file or directory

@moodsj Hey! Sorry, just saw this issue. Yes, you need to run the build.sh script to build that binary. It will put it in the right place and then you can run the python script.

Closing. Re-open if you are still having this same issue.

@moodsj , there is a dockerfile that does all this stuff now. Should be a lot easier to mine.


performance comparisons accidentally compare apples and oranges

If someone reads this without thinking, they'll jump to conclusion "zipkin is slow"
https://github.com/open-telemetry/opentelemetry-service/blob/master/docs/performance.md#results-without-tail-based-sampling
Why are we not comparing apples and apples? Ex binary format with binary format, or text vs text? Zipkin's http endpoint has accepted protobuf since before this project started
Is there some difficulty encoding protobuf? If not, can you please correct this?
https://github.com/openzipkin/zipkin/releases/tag/2.8.3

Zipkin exporter and performance measurement results are inherited from OpenCensus Service. I added a separate issue to add binary format to Zipkip exporter: https://github.com/open-telemetry/opentelemetry-service/issues/356
Once that is done we can update performance results.

thanks @tigrannajaryan looking forward to it.

The performance doc is outdated, closing this in favor of https://github.com/open-telemetry/opentelemetry-collector/issues/1450


arkmanager update doesn't detect latest ARK version

There seems to be an issue as the latest version is not picked up by the update check. Forcing the update seems to work though.
arkmanager update
Running command 'update' for instance 'main'
Checking for update; PID: 4662
Your server is already up to date! The most recent version is 5057242.

 /var/games/steam/steamcmd.sh +login anonymous +app_info_update 1 +app_info_print 376030 +quit | grep build
                                "oldtestbuild"
                                "buildid"               "5076975"
                                "buildid"               "5051323"
                                "buildid"               "5082537"
                                "buildid"               "5066419"
                                "buildid"               "3409246"
                                "buildid"               "5067756"
                                "buildid"               "5067756"
                                "buildid"               "5066419"
                                "buildid"               "3409246"
                                "buildid"               "3955003"
                                "buildid"               "4205769"
                                "buildid"               "4662824"
                                "buildid"               "5032386"
                        "oldtestbuild"
                                "buildid"               "5062023"
                                "buildid"               "5002538"
                                "buildid"               "5018051"
                                "buildid"               "5082253"
                                "buildid"               "4815191"
                                "buildid"               "3576610"
                                "buildid"               "4641352"
                                "buildid"               "5035113"
                                "buildid"               "5034977"
                                "buildid"               "4701755"
                                "buildid"               "5081370"
                                "buildid"               "5076975"

arkmanager update --force
Running command 'update' for instance 'main'
Checking for update; PID: 7564
Downloading ARK update ... The server is already stopped
\033[0;39m Saved arks directory is /var/games/ARK/server/ShooterGame/Saved/SavedArks
 Copying ARK world file (Ragnarok)                                 [   OK   ]
 Copying ARK profile files
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
   xxxx.arkprofile                                    [   OK   ]
 Copying ARK tribe files
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
   yyyy.arktribe                                             [   OK   ]
 Copying ARK tribute tribe files
 Copying GameUserSettings.ini                                      [   OK   ]
 Copying Game.ini                                                  [   OK   ]
 Compressing Backup                                                [   OK   ]
 Created Backup:  main.2020-05-27_13.18.12.tar.bz2
Applying update from staging directory
Update to 5076975 complete

Server is running Ubuntu 16.04.6 LTS (Xenial Xerus).
arkmanager v1.6
What else do you need for further investigation?
Edit: I just noticed that I'm running an old version of arkmanager. Was this maybe already fixed in a release after v1.6?

https://steamdb.info/app/376030/depots/?branch=public shows the current public branch build as 5076975

So adding steamcmd_appinfocache=/home/gameserver/.steam/steam/appcache/appinfo.vdf to my arkmanager/instances/main.cfg should fix this?
Why wasn't this an issue up until now? All previous updates were always detected correctly and installed.

steamcmd_appinfocache should be in arkmanager.cfg
steamcmd_appinfocache="/home/steam/Steam/appcache/appinfo.vdf"      # cache of the appinfo command - change this to "/home/steam/.steam/appcache/appinfo.vdf" on Debian/Ubuntu/CentOS if you have the steamcmd package installed

I don't know what rules steamcmd applies to indicate when the app cache is out of date, or when to ignore +app_info_update 1

So adding steamcmd_appinfocache=/home/gameserver/.steam/steam/appcache/appinfo.vdf to my arkmanager/instances/main.cfg should fix this?

@tryallthethings did this work for you?

Sorry, yes it did as far as I remember


Print doesn't work for Instax Mini 2

Hey, I'm trying to print an image from my Mac using this Python SDK to no avail.
My spec
MacBook Pro M2 Max
Code
from InstaxBLE import InstaxBLE

try:
    instax = InstaxBLE(
        print_enabled=True,
        dummy_printer=False
    )
    instax.connect()
    instax.enable_printing()
    instax.print_image('image.jpg')
except Exception as e:
    print(e)
finally:
    instax.disconnect()

Terminal output

2024-02-05 21:36:05.767 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>
2024-02-05 21:36:05.820 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>
2024-02-05 21:36:05.873 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = connected>
Printer details:
Model:               Instax Mini Link
Photos left:         7/10
Battery level:       95%
Charging:            False
Required image size: 600x800px
MTU:                 182
2024-02-05 21:36:06.917 Python[53807:51297307] Peripheral ready to send: <CBPeripheral: 0x103b10080, identifier = ABA62E9E-5061-2DD0-DB72-471F64D0AB3A, name = INSTAX-45148263(IOS), mtu = 185, state = disconnecting>

I've put a few prints in InstaxBLE.py and this code is being called (line 399):
 if self.printEnabled:
   self.packetsForPrinting.append(self.create_packet(EventType.PRINT_IMAGE))
   self.packetsForPrinting.append(self.create_packet((0, 2), b'\x02'))

Followed by line 409:
if not self.dummyPrinter:
   packet = self.packetsForPrinting.pop(0)
   self.send_packet(packet)

So I'm not sure what's the problem.

Just a quick check: did you run the code only as written in your post? Because the code in your post won't work: as soon as it's done sending the first package from the print_image('image.jpg') command, python will quit. We need Python to stay active and listen for the printer's response, which indicate if it can send the next part of the image.
That is why in the example (just run python3 InstaxBLE.py) there is a sleep() command:
    finally:
        sleep(60)
        instax.disconnect()  # all done, disconnect

This will make sure Python stays active for at least 60 seconds, during which it can receive printer responses and reply to them by sending the next part of the image. See issue #11

Just checking in to see if you've had time to try this, @saharmor. Would be great to know if this was indeed the problem :)

@javl Instax Mini 2 works after adding the sleep(60). Anyway, thanks for the cool library, i can now print it using python

Hi I have tried to connect to my instax mini link 2 using the demo function from the InstaxBLE file and it seems like some UUID is not found .
`def test():
instax = InstaxBLE(device_address="88:B4:36:XX:XX:XX",verbose= True)
try:
instax.connect()
    if instax.image_path:
        instax.print_image(instax.image_path)
    else:
        instax.print_image(instax.printerSettings['exampleImage'])

except Exception as e:
    print(type(e).__name__, __file__, e.__traceback__.tb_lineno)
    instax.log(f'Error: {e}')
finally:
    sleep(60)
    print('finally, disconnect')
    instax.disconnect()  # all done, disconnect

test()`
This is the console output :
`Searching for instax printer...
Connecting to INSTAX-4211XXX(ANDROID) [88:B4:36:XX:XX:XX]
Connected
Error on attaching notification_handler: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
RuntimeError /home/XXXX/XXXX/instax-printing/printing-worker/main.py 55
Error: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
finally, disconnect
Process finished with exit code 0`

That's odd.
Can you try adding instax.print_services() to the code? This should print an overview of all available endpoints.
def test():
    instax = InstaxBLE(verbose=True)
    try:
        instax.connect()
        instax.print_services()
    except Exception as e:
        print(type(e).__name__, __file__, e.__traceback__.tb_lineno)
        instax.log(f'Error: {e}')
    finally:
        sleep(60)
        print('finally, disconnect')
        instax.disconnect()  # all done, disconnect

@javl  It gives me the same error :
Searching for instax printer...
Connecting to INSTAX-42113XXX(ANDROID) [88:B4:36:XX:XX:XX]
Connected
Error on attaching notification_handler: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
Successfully connected, listing services...
RuntimeError /home/buj/Projects/testbanch/instax-test/main.py 21
Error: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
Also I observed in the Bluetooth  settings that the connection is closed after 1-2 seconds , it might be a Bluetooth  drive issue.
I have installed Ubuntu on another device and tested it and the connection seems to be right . I'm going to do some more digging and post the results here if I find something .
Thx for the reply

Ah yeah, I see it already attaches inside the connect() method.
You could try calling the print_services() directy after connecting, before it tries to attach the handlers:
Around this line: https://github.com/javl/InstaxBLE/blob/e9f1d0c1c3898832bebe2fed2b64f80ae89144f2/InstaxBLE.py#L208
But, if you say it works on a different system the address shouldn't be the problem. Would be great if you can report back if you find a solution.

This is the output , not very helpful i guess :))
/usr/bin/python3.10 /home/buj/Projects/testbanch/instax-test/main.py
Searching for instax printer...
Connecting to INSTAX-4211XXXX(ANDROID) [88:B4:36:XX:XX:XX]
Successfully connected, listing services...
Connected
Error on attaching notification_handler: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
Successfully connected, listing services...
RuntimeError /home/buj/Projects/testbanch/instax-test/main.py 21
Error: Service with UUID 70954782-2d83-473d-9e5f-81e1d02d5273 not found.
I'm going dig some more on the driver side of things .


Backup restore

Add backup and restore document to left nav and modify document based on feedback from Alain. Also fix anchor links.

LGTM

Ping should we merge this? @AndyDiamondstein is this still appropriate?

Yes, it is still appropriate to merge.
On Fri, Aug 7, 2015 at 3:09 PM, Alain Jobart<EMAIL_ADDRESS>wrote:

Ping should we merge this? @AndyDiamondstein
https://github.com/AndyDiamondstein is this still appropriate?
—
Reply to this email directly or view it on GitHub
https://github.com/youtube/vitess/pull/763#issuecomment-128797704.

--
Andy Diamondstein
Technical Writer
YouTube
650-253-4101 (desk)
415-812-7670 (cell)


Move Reg in separate file

Part of #841 to simplify review

/ci diff pr

/ci diff pr

/ci diff pr

cc @Emilgardis

/ci diff semver


Configure multiple ports

Enhancement Proposal
While using the Ingress library, is it possible to configure binding to more than one port and also one different from 80/443?

Yes, and the TCP ingress already does this, but what's the intended use case here? Traefik is an HTTP reverse proxy, and if the requests are HTTP, there isn't a great reason to shunt them over another port (which may also require an additional IP from the load balancer).
Binding to more than one port on the outside is possible. Proxying to more than one port on the inside from multiple external ports (if you mean an N:N mapping of external ports to internal ones) isn't, really.
Do you have example use cases?

If what you're looking for is for multiple ports to be mapped internally, then you can already achieve that using traefik-route-k8s.
If what you're looking for is for for ports to be mapped externally, then that is just not how you would do it in with a Kubernetes ingress. You would be able to do this using a Kubernetes Service of type LoadBalancer, but for an ingress the port is typically shared between all ingressed applications.

We are closing this issue due to inactivity. If it is still needed, please re-open


grant permissions sql file

I have 4 different schemas & 4 different roles, some tables can be accessed from one schema to another using that schema's user name. Everytime I create a new table I have to give permissions. Instead can I have the grant scripts in a repeatable migrations like a view so that always at the end it gets executes and everytime I don't need to provide permissions when I create a new table.
Repeatable migrations always executes finally after all the version files are done?
can you confirm?
Also what is the ideal way to have grant permissions in flyway.

Everytime I create a new table I have to give permissions. Instead can I have the grant scripts in a repeatable migrations like a view so that always at the end it gets executes and everytime I don't need to provide permissions when I create a new table.

This could be achieved with a callback. Sounds like it shouldn't be executed after every migrate, just when you create a table. So you could do the following:

Create an afterMigrate callback with the grant script
Inside the callback use a placeholder to supply relevant parameters (like table name)
Put the callback in a subfolder (e.g. tableCreationCallbacks)
When migrating a table creation, add the subfolder as a location, and supply the placeholder values

This is an ad-hoc process to ensure the callback is executed when you create tables

Repeatable migrations always executes finally after all the version files are done?
can you confirm?

Yes, from the docs:

Within a single migration run, repeatable migrations are always applied last, after all pending versioned migrations have been executed. Repeatable migrations are applied in the order of their description.

Also what is the ideal way to have grant permissions in flyway.

Personally I don't have a recommendation. Flyway offers various mechanisms to do this, so you should pick the one that works best for you.
Does that help?

@SwapnaRavi21 Any news? Did it help?

I did not try out yet. You can close this issue
On Tue, Jun 9, 2020 at 8:09 AM Mikiel Agutu<EMAIL_ADDRESS>wrote:

@SwapnaRavi21 https://github.com/SwapnaRavi21 Any news? Did it help?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flyway/flyway/issues/2827#issuecomment-641247261, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ANXA2SZNCBY4YKGDP22JHBLRVYQ6HANCNFSM4NHXZEAQ
.

--
Regards,
Swapna Ravi


VLC Android

Guys, I have implemented VLC player for Android. It should be faster, have more options and be more robust than the native player. Done in collaboration with @Ivshti.
I hope it might help someone else. @bradmartin Let me know what you think - does it make sense to merge it in the master or it should remain as a separate fork?

Hey @MiroValchev good work! As for merging, I don't think this is something we would add to this plugin. This plugin is currently being verified by the NativeScript team to be listed as a 'Verified' plugin on their site.
Also, since this is just the Android side it would add some bloat to the Android side. Do you have an idea of the added file size to the .apk with VLC? Let's continue to discuss this later on I have a meeting now. :+1:

@bradmartin unfortunately vlc does add something like 50-60 mb to the apk size.
And I am also inclined to think that this plugin should use the native player by default, but I think either a vlc option or a twin-fork (same API) is a good idea

You could always publish a vlc player plugin if you wanted to maintain it :)
On Wed, Feb 24, 2016, 2:20 PM Ivo Georgiev<EMAIL_ADDRESS>wrote:

@bradmartin https://github.com/bradmartin unfortunately vlc does add
something like 50-60 mb to the apk size.
And I am also inclined to think that this plugin should use the native
player by default, but I think either a vlc option or a twin-fork (same
API) is a good idea
—
Reply to this email directly or view it on GitHub
https://github.com/bradmartin/nativescript-videoplayer/pull/7#issuecomment-188439171
.

Yea that much added 50-60mb is a bit heavy for this. I think you should publish a vlc player plugin yourself but I'd make note of the added package size so devs know up front what they're getting. :)

@bradmartin I think you are right. We will publish this a a separate plugin. The video plugin should stay light.


Add Apache License

Hi @mandatoryprogrammer, I'm a big fan
This will make it so that enterprises are free to use the code internally,
and of course, contribute upstream afterwards 🎈 🍰 ⚡ .

p.s. I am happy to help maintain if you no longer wish to, though I realize I should build credibility first :)

Sounds reasonable to me, totally forgot to include a license with this :). You can also maintain it if you'd like, I suppose just DM me on Twitter with a bit on your background (https://twitter.com/IAmMandatory)?

Sure thing @mandatoryprogrammer, I will DM you later tonight 👍


SAMZA-1621: Delete the ephemeral processor node in StreamProcessor shutdown phase.

@xinyuiscool Please take a look.

@vjagadish1989
Added a retry based on sessionTimeOut in ZkUtils.registration if there're duplicate processors. Can you take a look.

@vjagadish1989
Rebased with master and fixed the merge conflicts.