TypeError: init() missing 2 required positional arguments: 'node_def' and 'op'

Describe the bug
Hi,
Thank you for sharing your implementation of DGMR. I'm new to deep learning, but I'm very interested in it and learning to use it in atmospheric science.
When I run the code using the run.py under the train directory, I got the following message:
...
...
98.3 M    Trainable params
0         Non-trainable params
98.3 M    Total params
393.086   Total estimated model params size (MB)
Sanity Checking: 0it [00:00, ?it/s]2022-07-21 01:24:47.641350: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
2022-07-21 01:24:47.641881: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
2022-07-21 01:24:47.641954: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
2022-07-21 01:24:47.644718: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
2022-07-21 01:24:47.646172: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
2022-07-21 01:24:47.656873: W tensorflow/core/platform/cloud/google_auth_provider.cc:184] All attempts to get a Google authentication bearer token failed, returning an empty token. Retrieving token from files failed with "NOT_FOUND: Could not locate the credentials file.". Retrieving token from GCE failed with "FAILED_PRECONDITION: Error executing an HTTP request: libcurl code 6 meaning 'Couldn't resolve host name', error details: Could not resolve host: metadata".
Traceback (most recent call last):
File "run.py", line 205, in
trainer.fit(model, datamodule)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 770, in fit
self._call_and_handle_interrupt(
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 723, in _call_and_handle_interrupt
return trainer_fn(*args, **kwargs)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 811, in _fit_impl
results = self._run(model, ckpt_path=self.ckpt_path)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1236, in _run
results = self._run_stage()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1323, in _run_stage
return self._run_train()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1345, in _run_train
self._run_sanity_check()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1413, in _run_sanity_check
val_loop.run()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 204, in run
self.advance(*args, **kwargs)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 155, in advance
dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 204, in run
self.advance(*args, **kwargs)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 112, in advance
batch = next(data_fetcher)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 184, in next
return self.fetching_function()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 259, in fetching_function
self._fetch_next_batch(self.dataloader_iter)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/pytorch_lightning/utilities/fetching.py", line 273, in _fetch_next_batch
batch = next(iterator)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 652, in next
data = self._next_data()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1347, in _next_data
return self._process_data(data)
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/torch/utils/data/dataloader.py", line 1373, in _process_data
data.reraise()
File "/work2/04310/jshel/stampede2/usr/local/miniconda3/envs/dgmropenclimatefix/lib/python3.8/site-packages/torch/_utils.py", line 454, in reraise
raise self.exc_type(message=msg)
TypeError: init() missing 2 required positional arguments: 'node_def' and 'op'
...
...
Please see the attached run.log file for full log message.
To Reproduce
Steps to reproduce the behavior:

Go to the train directory;
eidt run.py. Since I'm using CPU, so I changed the accelerator to "CPU".
trainer = Trainer(
max_epochs=1000,
logger=wandb_logger,
callbacks=[model_checkpoint],

gpus=6,
precision=32,
accelerator="cpu"

run "python run.py"

Expected behavior
I'm not sure if I have done it in a right way to train the model using the radar data in the paper and how to use multiple cpus. The README.md file make it very clear about how to install the model and run it in a simple way. It may be nice to have a very small sample of train/val/test data of radar with the code or provide a link to download the train/val/test data manually since it would be very helpful to see what the data really like and to understand the model.
Additional context
I attached the entire log file "run.log" and the packages I used just in case.
run.log
pip_list.txt

Hi,
Glad you like the repo! There is a small set of train/validation/test located at "gs://dm-nowcasting-example-data/datasets/nowcasting_open_source_osgb/nimrod_osgb_1000m_yearly_splits/radar/20200718" in GCP. It seems that this issue has to do with being unable to access the sample dataset data. The run script uses this HuggingFace dataset script https://huggingface.co/datasets/openclimatefix/nimrod-uk-1km/blob/main/nimrod-uk-1km.py to load and process the data into the format that DGMR expects, and while it shouldn't need any credentials I think, as its a public GCP bucket, you might have to supply something?

Hi, I tried to download the data in GCP simply using "gsutil cp -R gs://dm-nowcasting-example-data ." and it succeed. It didn't ask any credentials. Now it's kinda of confusing.  Could you please take a look at the screenshot I attached? As you say, the run script uses nimrod-uk-1km.py to load and process the data, however I didn't find nimrod-uk-1km.py in my directory. Am I miss something?

Yeah, the nimrod-uk-1km is downloaded to the HuggingFace cache, usually under ~/.cache/huggingface/ somewhere and is loaded on the fly from HuggingFace, so its not included in the repo.

Yes, I found it! I have no idea why that happened, but when I move to a GPU machine, I didn't get that error any more. However, I met a new error as below.

Yeah, sorry, I've been trying to get it to run on multiple gpus, but it seems like there is an issue with parameterized modules that currently doesn't allow that. So if you change gpus to 1 it should work, you probably have to reduce the batch size as well

Got it! Thank you very very much! O(∩_∩)O


SPA: retrieving access token with a subset of refresh token scopes

Hello,
Following Vivien's question here: RFC6749 allows requesting a new access token from a refresh token with fewer permissions:

1.5.  Refresh Token
Refresh tokens are credentials used to obtain access tokens.  Refresh
tokens are issued to the client by the authorization server and are
used to obtain a new access token when the current access token
becomes invalid or expires, or to obtain additional access tokens
with identical or narrower scope (access tokens may have a shorter
lifetime and fewer permissions than authorized by the resource
owner).

Section 6 of this RFC indeed allows a scope parameter when requesting new access token:

Refreshing an Access Token

[...]
grant_type
REQUIRED.  Value MUST be set to "refresh_token".
refresh_token
REQUIRED.  The refresh token issued to the client.
scope
OPTIONAL.  The scope of the access request as described by
Section 3.3.  The requested scope MUST NOT include any scope
not originally granted by the resource owner, and if omitted is
treated as equal to the scope originally granted by the
resource owner.

It may be wanted to call some externals APIs from javascript with an RFC6750 Bearer access token as credential to access this API - which in return access some data on our "own" API (for example: allowing this external API to access phone number on "my" /userinfo API, and only phone number through the phone scope). However, the initial refresh token may have been granted with wider set of scopes.
It would be nice if mod_auth_openidc could return narrower-scope access tokens from the InfoHook endpoint. This could be done via an additional parameter on this endpoint, such as:
<redirect_uri>?info=json&access_token_scope=phone%20myotherscope

Hello,
I looked deeper how scopes are handled in mod_auth_openidc and effectively the list of scopes is statically defined in the configuration file. By default, it is not the backend that requests an AT to the agent, but the agent that passes the AT to the backend in the OIDC_access_token header (only JS apps have to request the AT explicitly). Like this, only one AT at a time is managed per session.
The agent can be asked to refresh the AT on the RefreshHook endpoint (<redirect_uri>?refresh=<return_to>&access_token=<access_token>).
However this option doesn't allow a client to get different AT with reduced scopes because :

It is not possible to specify the requested scopes.
If a new AT with reduced scopes is obtained, it overwrites the main one (the one atteched to the session with extended scopes) : mod_auth_openidc can only manage a single AT at time, and even if it allowed a scope reduction, the new AT would overwrite the main one, which would be problematic if we had to call several API simultaneously with different scopes ...

Similarly, the InfoHook endpoint (<redirect_uri>?info=json), does not meet the need as it is because:

It is not possible to specify the required scopes
It is not possible to force the AT renewal (only the AT at the end of their life are refreshed)
If a new AT with reduced scopes is obtained, it overwrites the main one

To allow the scope reduction, it would therefore expand the possibilities offered by the InfoHook endpoint to allow an application (JS or backend):

to recover a new AT with custom scopes on demand (in this case mod_auth_openidc should force the token renewal using the RT even if a valid AT is cached in the module);
but also, not to modify the session state after getting the new AT with reduced scopes, that is, not to overwrite or discard the main AT.

It seems feasible.
The oidc_handle_info_request() function must be modified to accept custom scopes in request parameters, and force the agent to get a new AT with these scopes whatever the remaining lifetime of the tokens set in memory.
The oidc_refresh_access_token() function have also to be duplicated to a new oidc_refresh_access_token_with_custom_scope() function that would be modified to allow a caller to retieve a new AT with custom scopes, without discarding the main AT linked to the session.
The interface could be:
<redirect_uri>?info=json&custom_scope=scope1%20scope2
I think this evolution could be beneficial to the project. It allows web portals that call different APIs to respect the principle of least privilege that is promoted by OAuth.
@zandbelt What is your view of that? Do you plan to implement such a feature someday?
Many thanks

I have no plans to implement this, I would welcome a PR... But I would like to understand why you think the original access token needs to be retained: it may very well be (that's undefined behavior anyhow) that the Authorization Server invalidates the old access token since it handed out a new token with lesser scopes for that particular client. After all the token swap to reduce scipes is done for security hygiene reasons and hence - as part of that routine - the old token should be discarded by both the Client and the Authorization Server IMO.

stepup authentication with OIDCUnAutzAction  can be used to implement such a scenario, the SPA will have to call into differently "scoped" paths to obtain a new access token, see: https://github.com/OpenIDC/mod_auth_openidc/wiki/Step-up-Authentication


AngularJS file not included, so add use CDN

The first step in developing or testing ng-idle, including using the sample, is to run npm install. That will install all dependencies needed, and the sample will work fine.
I do not wish to hardcode to a specific version of Angular on a CDN, but use the version you're currently building/testing with. That way you minimize confusion when something seems to work in building/testing but not in the sample.


Skia animations don't redraw properly on iOS

Describe the bug
I tried new example with lottie animation from @MatkovIvan on iOS. Animation is stuck on the 1st frame. Reading time reference inside drawIntoCanvas block solves the issue.
May be it is a bug cause it works normally on desktop.
Affected platforms
Select one of the platforms below:

iOS

Versions

Kotlin version*: 1.8.20
Compose Multiplatform version*: 1.4.0

Btw, can it be used in common code with android target by any chance? I added skia dependency and binaries to androidMain, but getting compile error on this line:
e: file:///.../compose-multiplatform-ios-android-template/shared/src/commonMain/kotlin/App.kt:55:26 Type mismatch: inferred type is NativeCanvas /* = android.graphics.Canvas */ but org.jetbrains.skia.Canvas was expected

animations don't redraw properly on iOS

That's why it was added 😅 (see description in https://github.com/JetBrains/compose-multiplatform-core/pull/560)
We're using that mpp app to try the things without publishing any packages (it depends on project sources). Please use this folder as a source of official examples: https://github.com/JetBrains/compose-multiplatform/tree/master/examples

can it be used in common code with android target by any chance?

Please wait proper support or use expect/actual. Also please note that skiko/skia is implementation details and any references to it cannot be considered as stable API.

I added skia dependency and binaries to androidMain

Compose on android doesn't use "our" skia/skiko, I don't think mixing this is a good idea and doubt that it will work.

Oh, i see. Thanks for demo and help :)

Thanks to @eymar, we found the root cause of this problem. It's related to K/Native compose compiler plugin, so it's not only about iOS, but web target is affected too.
The problem here is about incorrect detection "stability" of external types. External types here stands for classes from libraries that compiled without compose compiler plugin. Also, there might be more cases with types declared in module-dependencies at the moment. In this case using Animation type doesn't trigger re-drawing the canvas. That's why adding any mutable state into drawIntoCanvas scope resolves the issue.
I'm reopening this issue to track this problem publicly.

Describe the bug I tried new example with lottie animation from @MatkovIvan on iOS. Animation is stuck on the 1st frame. Reading time reference inside drawIntoCanvas block solves the issue.
May be it is a bug cause it works normally on desktop.
Affected platforms Select one of the platforms below:

iOS

Versions

Kotlin version*: 1.8.20
Compose Multiplatform version*: 1.4.0

Btw, can it be used in common code with android target by any chance? I added skia dependency and binaries to androidMain, but getting compile error on this line:
e: file:///.../compose-multiplatform-ios-android-template/shared/src/commonMain/kotlin/App.kt:55:26 Type mismatch: inferred type is NativeCanvas /* = android.graphics.Canvas */ but org.jetbrains.skia.Canvas was expected

Same thing happens to me

I was able to achieve this in iOS using this approach. Of couse is a solution that could be improve but it works for me
`@Composable
fun LottieAnimation(
modifier: Modifier,
animationRoute: String,
restart: Boolean,
loading: @Composable () -> Unit = {},
) {
var animation by remember { mutableStateOf<Animation?>(null) }
LaunchedEffect(Unit) {
    animation = Animation.makeFromData(Data.makeFromBytes(animationRoute.readByteArray()))
}

when (val value = animation) {
    null -> loading()
    else -> SkiaAnimation(
        modifier = modifier,
        animation = value,
        restart = restart
    )
}

}
@Composable
private fun SkiaAnimation(
modifier: Modifier,
animation: Animation,
restart: Boolean,
) {
var elapsedSeconds: Float by remember { mutableStateOf(DefaultElapsedSeconds) }
var lastTimeInMillis: Long by remember { mutableStateOf(DefaultLastTimeInMillis) }
val invalidationController = remember { InvalidationController() }
Surface(
    modifier = modifier
        .drawAnimationOnCanvas(
            animation = animation,
            time = elapsedSeconds,
            invalidationController = invalidationController
        )
) {}

LaunchedEffect(Unit) {
    while (this.coroutineContext[Job]?.isActive == true) {
        withFrameMillis { absoluteMillis ->
            if (lastTimeInMillis > DefaultLastTimeInMillis) {
                val deltaMillis =
                    (absoluteMillis - lastTimeInMillis)
                elapsedSeconds += deltaMillis / MillisecondsInOneSecond
            }
            lastTimeInMillis = absoluteMillis
        }

        if (elapsedSeconds >= animation.duration) {
            elapsedSeconds %= animation.duration
        }
    }
}

}
private fun Modifier.drawAnimationOnCanvas(
animation: Animation,
time: Float,
invalidationController: InvalidationController
): Modifier = this then drawWithContent {
drawIntoCanvas { canvas ->
animation.seekFrameTime(time, invalidationController)
animation.render(
canvas = canvas.nativeCanvas,
dst = Rect.makeWH(size.width, size.height),
)
}
}
private const val MillisecondsInOneSecond = 1000F
private const val DefaultElapsedSeconds = 0f
private const val DefaultLastTimeInMillis = 0L`
and readByteArray could be something like this, for the iOS part:
actual fun ResourceName.readByteArray(): ByteArray {
    val filePath = NSBundle.mainBundle.pathForResource(name = this, ofType = null)
        ?: throw Exception("No resource found at path: $this")
    val url = NSURL.fileURLWithPath(filePath)
    val data = NSData.dataWithContentsOfURL(url) as NSData
    return data.bytes!!.readBytes(data.length.toInt())

@alexzhirkevich please note that workaround for code that we have in our reproduction was mentioned in the first message here:

Reading time reference inside drawIntoCanvas block solves the issue.

We are keeping this issue open to track problem with "stability" types in compiler plugin

@MatkovIvan Yep, I undestood that from the 1st time. Not sure why u tag me 😅 (prev comment was not from me)

Ooops, yeah it was supposed to tag @ivfr89, sorry

hey @MatkovIvan .. i the code from official sample .. but it seems doesn'e work with lottie that based on animation base64 image .. any workaround for this .. ?

official sample

As mentioned above, "mpp" is our internal project for testing, it's not an official sample.

doesn'e work with lottie that based on animation base64 image

Currently this format is only supported by an underlying skiko library, not Compose Multiplatform itself. Skiko just wraps Google's skia - https://skia.org/docs/user/modules/skottie/
If the issue that you are experiencing is related to skia, it's better to report it as a bug on skia's issue tracker.
Anyway, if it's not an issue about lack of recomposition on iOS/Web - it's better to file a separate issue with a clear description and steps to reproduce.

Fixed by https://github.com/JetBrains/compose-multiplatform-core/pull/1002

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


chore: temporarily disable codecov [ggj]

Temporarily disabling Codecov due to https://about.codecov.io/security-update/.

Closing since this is using bazel coverage, not codecov.


AttributeError: module 'distutils' has no attribute 'dep_util'. Did you mean: 'dir_util'? -- however dep_util is included in distribution

Not sure if this behavior is intended or not.
The build of photocollage in Fedora Linux fails with setuptools 69.0.3 with this error:
+ /usr/bin/python3 setup.py build
/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build.py:130: SetuptoolsDeprecationWarning: Direct usage of `distutils` commands
!!

        ********************************************************************************
        It seems that you are using `distutils.command.build` to add
        new subcommands. Using `distutils` directly is considered deprecated,
        please use `setuptools.command.build`.

        This deprecation is overdue, please update your project and remove deprecated
        calls to avoid build errors in the future.

        See https://peps.python.org/pep-0632/ for details.
        ********************************************************************************

!!
  for cmd_name in self.get_sub_commands():
Traceback (most recent call last):
  File "/builddir/build/BUILD/PhotoCollage-1.4.5/setup.py", line 67, in <module>
    distutils.core.setup(
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 131, in run
    self.run_command(cmd_name)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/builddir/build/BUILD/PhotoCollage-1.4.5/setup.py", line 49, in run
    if distutils.dep_util.newer(po, mo):
       ^^^^^^^^^^^^^^^^^^
AttributeError: module 'distutils' has no attribute 'dep_util'. Did you mean: 'dir_util'?

It's my understanding that the module is just deprecated, not made no-op immediately.
When trying things in repl, the behavior observed during the imports is indeed weird:
$ python3.12
>>> from distutils import dep_util
>>> dep_util
<module 'distutils.dep_util' from '/usr/lib/python3.12/site-packages/setuptools/_distutils/dep_util.py'>

$ python3.12
>>> import distutils
>>> distutils.dep_util
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'distutils' has no attribute 'dep_util'. Did you mean: 'dir_util'?

dep_util is a module and also documented as such (https://docs.python.org/3.11/distutils/apiref.html#module-distutils.dep_util) and PhotoCollage never imports it, so this seems expected.

Hello,
I am the author or PhotoCollage and I just discovered this issue while trying to solve a new build problem on Debian that was reported to me: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1077437. I seems the same as the one you encountered @befeleme.
However, on the same system (Fedora Linux 40) and same Python version (3.12.4) I don't experience the problem:
$ python3.12 setup.py build
# works fine

$ python3.12
>>> from setuptools import distutils
>>> from distutils import dep_util
>>> dep_util.newer
<function newer at 0x7f57b30f7060>

For info:
>>> import setuptools
>>> setuptools.__version__
'69.0.3'
>>> import distutils
>>> distutils.__version__
'3.12.4'

@befeleme are you still experiencing the problem (6 months after)?
Does anyone know how imports should be done to have the best compatibility here?
https://github.com/adrienverge/PhotoCollage/blob/c74cc3a/setup.py#L20-L25
Thanks!

From what I see the Debian issue was already fixed upstream via https://github.com/adrienverge/PhotoCollage/commit/4496e1905430da64b011ebd94d56514181e98c7c

@lazka thank you for the quick answer :zap:
In this case :ok_hand:


Discrepency in recommended filter for invertible regions

There are slightly different recommendations for filtering in the paper supplement compared to the Github recommendations (> vs >=).
Github, "Our default is to classify a region as invertible if at least 1%
of reads support the R orientation with a minimum Pe_R > 5 and Span_R > 3."
Supplemental, "For a region to be identified as invertible, we require at
least five reads supporting the R orientation from the paired-end reporting
method, and three reads supporting the R orientation from the spanning method.
Furthermore, the number of reads supporting the R orientation must be at
least 1% of the total reads that uniquely align to the F and R version of the
invertible DNA region."

The aim of PhaseFinder is to detect reliable invertible regions, and it is up to you to choose the threshold to balance the false positive and false negative rate.


The option to auto collapse, or not,  budget accounts has gone. This means you cannot view all your budget accounts in one view. As soon as you select another budget account the previous one collapses, meaning you cant view your budget in full. [BUG] ...

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. OSX, Windows]
Browser [e.g. chrome, firefox]
Toolkit Version [e.g. 2.22.0]

Setting Export
Please replace the text 'REPLACE_ME_WITH_SETTINGS' below with your exported Toolkit settings. You can export these by going to the Toolkit Options page, click the Import/Export Settings button at the top right and copying the text in the modal which appears.
Note! DO NOT replace the leading and trailing ``` characters as they are required formatting characters.
REPLACE_ME_WITH_SETTINGS

Hey @AussieAsh, at the top of your budget is there a minus sign next to the word Category?

If so, you might have the "Add Master Category Toggle" feature enabled and set to "solo mode". This makes it so that only one master category can be open at a time. If you right click on the minus sign it should change into an arrow, and you'll be able to expand the master categories as normal.


[App Service] az appservice plan create : add --zone-redundant parameter

Description

Adds --zone-redundant/-z parameter  to az appservice plan create to allow creating zone redundant app service plans.
Testing Guide

azdev test --live test_zone_redundant_plan
History Notes

This checklist is used to make sure that common guidelines for a pull request are followed.

[X] The PR title and description has followed the guideline in Submitting Pull Requests.

[X] I adhere to the Command Guidelines.

[X] I adhere to the Error Handling Guidelines.

App Service


Adding "intel map" to regex in intel-map.coffee

Added the phrase "intel map" to the regex hubot will listen for. Per https://github.com/hubot-scripts/hubot-ingress/issues/21

@therealklanni let me know if I need to change anything or if I got it right this time :)

Everything looks good! :+1:
Will get this merged in along with your other changes as soon as I have time.

Published 0.9.0


Change to get kubeconfig from commandlin or env

It is required to honor KUBECONFIG env variable when running with local-up-cluster, etc. Also for consistency we use kubeconfig instead of kibe-config for command line argument.
/assign @wlan0

/lgtm


Proposal to improve database recovery procedure

This PR fixes #99

Thanks.
I've merged with some improvements.


Default variables

Currently all the variables are in the group_vars/all file.

some variables are not intended to be modified by the user
some variables may assume reasonable defaults

The first type of vars should be moved to the role level vars folder and the second to the default folder.
Variables on playbook level will be specific to the environment (sokol or core) and contain only required ones. That way it will be easier for the user to configure the deployment.

I'd say there are 3 "levels" of variables:

network-wide - applies to all roles on a network, and are not intended to be modified by the user
role-specific - should assume reasonable defaults, but may be modified by the user
instance-specific - must be provided by the user (node name, keys, etc)

so 1 goes to group_vars/sokol or group_vars/core (if we agree on https://github.com/poanetwork/deployment-playbooks/issues/74)
2 goes to roles/xxx/default/main.yml
3 goes to roles/xxx/vars/main.yml - this one is empty and not managed by version control (added to .gitignore). Also, this is the file that user modifies before running playbook
is that correct?


Adapter static talks about brotli compression, but no brotli files are generated

First of all, a great thanks for making sveltekit!
Describe the bug
Upon generating assets with the static adapter, the console talks about brotli.
vite v2.1.3 building for production...
✓ 36 modules transformed.
.svelte/output/client/_app/manifest.json                                        2.27kb
.svelte/output/client/_app/pages/blog/$layout.svelte-bc46c501.js                0.88kb / brotli: 0.48kb
.svelte/output/client/_app/pages/index.svelte-9c14b94a.js                       2.77kb / brotli: 1.01kb
.svelte/output/client/_app/pages/about.svelte-0054d702.js                       6.17kb / brotli: 2.04kb
.svelte/output/client/_app/pages/blog/about_this_site.svx-9894ea34.js           4.04kb / brotli: 1.53kb
.svelte/output/client/_app/pages/blog/index.svelte-1d0d2ad6.js                  3.80kb / brotli: 1.49kb
.svelte/output/client/_app/chunks/Tag-3f8ec96c.js                               0.85kb / brotli: 0.47kb
.svelte/output/client/_app/chunks/index-e2fe1118.js                             5.14kb / brotli: 1.98kb
.svelte/output/client/_app/assets/start-e9853c00.css                            5.76kb / brotli: 1.46kb
.svelte/output/client/_app/assets/pages/index.svelte-ece06296.css               3.89kb / brotli: 1.17kb
.svelte/output/client/_app/assets/pages/blog/$layout.svelte-7ee25cc0.css        0.39kb / brotli: 0.19kb
.svelte/output/client/_app/assets/Tag-84bd08b3.css                              0.75kb / brotli: 0.26kb
.svelte/output/client/_app/assets/pages/blog/about_this_site.svx-f7025d3f.css   0.87kb / brotli: 0.38kb
.svelte/output/client/_app/assets/pages/blog/index.svelte-cdb6cb2c.css          0.94kb / brotli: 0.37kb
.svelte/output/client/_app/assets/pages/about.svelte-f9a365f3.css               1.79kb / brotli: 0.60kb
.svelte/output/client/_app/start-5fbc547e.js                                    25.28kb / brotli: 7.69kb
vite v2.1.3 building SSR bundle for production...
✓ 36 modules transformed.
.svelte/output/server/app.js      150.74kb
.svelte/output/server/style.css   13.23kb

I checked in both the build directory and the .svelte output directory and can't find any .br files.
Could it be that it's just an indication of possible compression and not actually doing the compression?
To Reproduce
svelte-kit build with a static adapter
To help us help you, if you've found a bug please consider the following:

If possible, we recommend creating a small repo that illustrates the problem.
Reproductions should be small, self-contained, correct examples – http://sscce.org.

Occasionally, this won't be possible, and that's fine – we still appreciate you raising the issue. But please understand that Svelte is run by unpaid volunteers in their free time, and issues that follow these instructions will get fixed faster.
Expected behavior
generated .br files next to the corresponding css and js files.
Stacktraces
If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:

Stack trace
Stack trace goes here...

Information about your SvelteKit Installation:

The output of npx envinfo --system --npmPackages svelte,@sveltejs/kit --binaries --browsers

Your browser
firefox 87

Your adapter
Static

Severity
How severe an issue is this bug to you? Is this annoying, blocking some users, blocking an upgrade or blocking your usage of SvelteKit entirely?
compression can be enabled by other ways, but if would be nice to have it done with svelte-kit. So not critical in my opinion.

That's just Vite telling you what the file will compress to, so that you have a sense of what assets will cost in over-the-wire terms (as well as in parse-and-evaluate terms). The actual compression is usually handled by your fileserver/CDN, and isn't something you need to think about.

Thanks!


allow syncing to a remote server

There is a server component under Remote which can be used to push and pull data. The client should have a sync command to sync the local documents with the server.

finished. Simply use hasken sync to sync with the remote server specified in the .hasken.yml


Country model field

In url (address-create) or (address-detail).
If you input phone number but choose empty_label for country
you will get 'NoneType' object has no attribute 'iso_3166_1_a2'
https://github.com/django-oscar/django-oscar/blob/master/src/oscar/views/generic.py#L188
return country.iso_3166_1_a2
1- So you need to adjust the UserAddressForm
https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/address/forms.py#L23
to make it like ShippingAddressForm
https://github.com/django-oscar/django-oscar/blob/master/src/oscar/apps/checkout/forms.py#L15
or
2- adjust  get_region_code function
https://github.com/django-oscar/django-oscar/blob/master/src/oscar/views/generic.py#L188
I think the first solution much better!

country is a required field on the UserAddress model - so it shouldn't be possible to submit it empty - that should raise a validation error. Have you overridden the model? If so, I think you're probably better off setting a default country or overriding the form handling logic as well.

Sorry for the delay in reply.
To produce the bug
1- add OSCAR_REQUIRED_ADDRESS_FIELDS = ('phone_number', 'country') to settings.py.
2- In page (accounts/addresses/add/) Do not choose a country & enter phone number.
3- click on save button.
the output :
AttributeError at /ar/accounts/addresses/add/
'NoneType' object has no attribute 'iso_3166_1_a2'
I think the bug happened because it starts to check the phone number before return the error flash message.

Thanks - I can reproduce that error now.


Unable to install transformer-deploy module

Any support would be appreciated:
When running demo/torchdynamo/benchmark.ipynb, specifically this cell (pasted code), I run into the error below.
from typing import Dict

import numpy as np
import torch
from onnxruntime import GraphOptimizationLevel

from transformers import AutoModel, PreTrainedModel
from transformer_deploy.backends.ort_utils import convert_fp16
from transformer_deploy.backends.onnx_utils import save_onnx

from dynamo_utils import (
    benchmark,
    check_output,
    get_dynamo_optimizer,
    get_onnx_inference,
    get_pytorch_inference,
    get_pytorch_input,
    plot_benchmarks,
    print_pytorch_profile,
    get_tensorrt_inference,
    seq_lengths,
)

import gc
import tensorrt as trt
from tensorrt.tensorrt import ICudaEngine, Logger, Runtime
import onnx
from transformer_deploy.backends.trt_utils import build_engine, save_engine

ModuleNotFoundError Traceback (most recent call last)Cell In [3], line 8 5 from onnxruntime import GraphOptimizationLevel 7 from transformers import AutoModel, PreTrainedModel----> 8 from transformer_deploy.backends.ort_utils import convert_fp16 9 from transformer_deploy.backends.onnx_utils import save_onnx 11 from dynamo_utils import ( 12 benchmark, 13 check_output, (...) 21 seq_lengths, 22 )ModuleNotFoundError: No module named 'transformer_deploy'

@pommedeterresautee @ayoub-louati

Am I missing any steps? Since I am getting an error regarding No module named 'transformer_deploy'

Hello @elvinagam, are you still facing this problem ? did you tried to install transformer-deploy ?

I solved it somehow without explicitly knowing how to lol. Closing it. Thanks.


Support CNI v0.4.0 with new CHECK action

Currently, cilium-cni supports 0.1.x-0.3.x.

Kubernetes supports CNI v.0.4.0
Coil(https://github.com/cybozu-go/coil) uses only CNI v0.4.0, so it cannot be used in combination with cilium.
By supporting v0.4.0, cilium will be able to use the CHECK command.

It would be nice if cIlium could support v0.4.0.

Currently, cilium-cni supports 0.1.x-0.3.x.

Are there errors when trying with v0.4.0 or did you see these versions documented somewhere?

An error occurred when I tried to configure the following settings.
Config:

{
  "cniVersion": "0.4.0",
  "name": "generic-veth",
  "plugins": [
    {
      "type": "coil",
      "socket": "/run/coild.sock"
    },
    {
      "type": "portmap",
      "capabilities": {
        "portMappings": true
      }
    },
    {
      "type": "cilium-cni"
    }
  ]
}

error:
incompatible CNI versions; config is "0.4.0", plugin supports ["0.1.0" "0.2.0" "0.3.0" "0.3.1"]

The relevant code is here.
Currently, we are adding v0.3.1 support to coil as a workaround.

In case people find this thread through Google: aws-cni v1.10.2 (latest at the time of writing) switched to CNI config 0.4.0 as well. To get CNI chaining with aws-cni working you will need to downgrade to v1.10.1.

Adding support for CNI v0.4.0 would require us to support the new CHECK API (cf. https://github.com/containernetworking/cni/pull/579). Once that is done, it should be as simple as updating the list of supported versions and the version we test in CI.

Taking a look at this; first we can get CHECK plumbed up, then add more things to, well, check.

Will have a first attempt at this shortly.
One open question: should we validate the route table (against the CNI Result) as well? My instinct is no.

OK, PR filed. Not too bad :-)


Create all page mappings in StaticController.java

This file needs updated to include all pages to be linked in the navigation menus.
https://raw.githubusercontent.com/Cardshifter/cardshifter.github.io/master/io.web/src/main/java/com/cardshifter/io/web/controller/StaticController.java
Attached image shows which links need to be added to the controller.

Resolved on commit 7956f270


Resolver error formatting

Closes https://github.com/bundler/bundler/issues/3803

We should remember to apply the following diff once https://github.com/CocoaPods/Molinillo/pull/24 is merged and released:
diff --git a/lib/bundler/resolver.rb b/lib/bundler/resolver.rb
index f21c9cf..ec3b2a4 100644
--- a/lib/bundler/resolver.rb
+++ b/lib/bundler/resolver.rb
@@ -35,6 +35,9 @@ module Bundler
             depth = 2
             tree.each do |req|
               t << "  " * depth << %(#{clean_req req})
+              if spec = conflict.activated_by_name[req.name]
+                t << %(, resolved to #{spec.version},)
+              end
               t << %( depends on) unless tree.last == req
               t << %(\n)
               depth += 1

@indirect this is now ready for review

This is a huuuuuge improvement in the UX of requirement conflicts. :clap: :raised_hands:

@indirect done

Woo! @homu r+

:pushpin: Commit 210f9d9 has been approved by indirect

:hourglass: Testing commit 210f9d9 with merge 1401589...

:broken_heart: Test failed - status

@segiddins looks like it's broken on 1.8.7

Looks like something has an unstable comparable implementation to me?

Hashes literally do not have a stable iteration order in 1.8.7; you'll need to sort the hash before printing the conflict message or store conflicts in an array of tuples.

@indirect should work now!

@homu r+

:pushpin: Commit 4c53d07 has been approved by indirect

:hourglass: Testing commit 4c53d07 with merge 1b83b48...

:broken_heart: Test failed - status

@indirect want to give me a hand on this?

@indirect should actually be fixed now

Heh. Thanks!

@homu r+

:pushpin: Commit 67b0274 has been approved by indirect

:hourglass: Testing commit 67b0274 with merge 9bb228f...

:broken_heart: Test failed - status

@homu r+

:pushpin: Commit ef5b0ea has been approved by segiddins

:hourglass: Testing commit ef5b0ea with merge fbae548...

:broken_heart: Test failed - status

@homu r+

:pushpin: Commit 3fad388 has been approved by segiddins

:hourglass: Testing commit 3fad388 with merge ae575fb...

:sunny: Test successful - status

Wooooo! Finally! Thanks for the help on this one, @indirect !

ugh, just realized that I should be reading the platform from the dep... the output will be wrong if the platform isn't Raunt. :P

mhmm :P

Actually, @indirect, do we even have the platform for locked gems?

no idea! that's... kind of distressing, actually.

Opened #3906 to print platform(s) correctly.


Run Conformance checks for v1.25/rancher

Rancher conformance test results PR on cncf: https://github.com/cncf/k8s-conformance/pull/2364

Since, PR is merged closing the issue.


fix(vue): Add a type to vue arrow middleware

Add a type to vue arrow middleware

what's the purpose of this?


docs: monitor tutorials of GreptimeCloud

@sunng87 PTAL

@nicecui Almost LGTM, and please take a look at these comments.


Implement PropertyOfScript typehint annotation

Annotation already existing in: PropertyTypeHintAnnotation.kt (already there, needs to be uncommented.
Add typehint and typelimiting support in PropertyHintTypeMapper.kt

Closing in favor of #155


📃: want to add Virtual Drum Kit

:red_circle: Virtual Drum Kit :
:red_circle: want to add Virtual Drum Kit to fron end projects :
:red_circle: HMTL, CSS, JS :
Screenshots 📷

will share in PR

:white_check_mark: To be Mentioned while taking the issue :

Full name :  psivasai
What is your participant role? (Mention the Open Source Program name. Eg. GSSOC, SSOC, JWOC, etc.)
GSSOC

Happy Contributing 🚀
All the best. Enjoy your open source journey ahead. 😎

please assign me this issue @Avdhesh-Varshney


Checkboxes are not aligned properly

Checkboxes are not aligned properly on some android devices.

This is Ionic bug. https://github.com/ionic-team/ionic-docs/issues/3459


whats is STDIN parameter in examples

sorry but i am newer in php and i don't know what is STDIN parameter ???

that is when you enter text into the console

but i don't use console so what to use it by browser as url @teknogeek

err well if you were to use it in your browser you would need to use $_GET["variablename"] where variablename is like this yourscript.php?variablename=value

can you help me give me sample php code to registr new number

well this is kinda difficult to port over to the method you want without a bit of work. the registerTool.php needs more data partway through it after you do the captcha

include_once("../src/snapchat.php");
echo "\n\nUsername: ";
$username = 'beljkk';
echo "\nPassword: ";
$password = 'ahmedhassxxxxxx';
echo "\nEmail: ";
$email =<EMAIL_ADDRESS>echo "\nBirthday (yyyy-mm-dd): ";
$birthday = '1990-08-01';
echo "\nGmail address: ";
$gMail =<EMAIL_ADDRESS>echo "\nGmail password: ";
$gPasswd = 'ahmxxxxxxxxxxxxxxxxx';
$snapchat = new Snapchat($username, $gMail, $gPasswd, true);
$id = $snapchat->register($username, $password, $email, $birthday);
echo "\nYou should have a file called '{$id}' in your snap api folder, unzip it.\n";
echo "9 images. If there is a ghost in a image means 1, if not 0\n";
echo "The result should be like the following one: 110000101\n";
echo "After completion, the zip file will be deleted automatically.\n\n";
echo "\nResult: ";
$result = trim(fgets(STDIN));
$result = $snapchat->sendCaptcha($result, $id);
unlink(DIR."{$id}");
if ($result == null)
{
echo "Account successfully created\n";
echo "\nUsername: $username\n";
echo "Password: $password\n";
echo "Email: $email\n";
}
else {
echo "There was an error registering your account\n";
echo "Error code: " . $result['code'];
}

i get 403 forbidden request

403 after which request?

we fire this url   http://localhost/SC-API-master/examples/registerTool.php      ,, i add this dta inside registertool.php and fire the above link

that means you probably arent running something correctly with your local webserver. also it still needs to get STDIN for the captcha result. try running it from your console

i will take a screenshot for what it would look like as an example

http://i.imgur.com/5QdLMt0.png

sorry but how to run it from console :D i only have xampp and dreamwaver

there's more output after that but does that help show you how the STDIN works?
STDIN and STDOUT are UNIX terms that are very common. STDIN just means input from the command line, and STDOUT is output to the command line

try running CMD as administrator and write
C:\xampp\php path\to\registerTool.php

this command open the file

it should run it in your command line

look i write this command  in the first image
start "localhost/SC-API-master/examples/registertool.php"

no you have to put the C:\xampp\php.exe before it. what you should put into your command window is:
C:\xampp\php.exe C:\xampp\htdocs\SC-API-master\examples\registertool.php

i get confirmation email from 20 min and i confirmed my account
second

i run xampp

oh sorry. you need to cd there first. so the whole thing you should type is this:
cd C:\xampp\htdocs\SC-API-master\examples; C:\xampp\php.exe registertool.php

you had a typo in your command. you did C:\xampp\php\php.exe and it should be C:\xampp\php.exe