lightgbm.dask in 3.2.0 - OSError: [Errno 22] Invalid argument

Description
"OSError: [Errno 22] Invalid argument"
Reproducible example
You can see the full notebook here: https://github.com/Azure/azureml-examples/blob/cody/al/tutorials/using-lightgbm/1.local-eda.ipynb
It fails on:
import lightgbm as lgbm

model = lgbm.dask.LGBMRegressor(**params).fit(X, y)
model

where X and y are Dask arrays
Environment info
pip installed 3.2.0
brew is still on 3.1.1
is this the source of the issue?
Command(s) you used to install LightGBM
brew install lightgbm
brew upgrade lightgbm
pip install --upgrade lightgbm

macos
Additional Comments
Full traceback:
OSError: [Errno 22] Invalid argument
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<timed exec> in <module>
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/lightgbm/sklearn.py in fit(self, X, y, sample_weight, init_score, eval_set, eval_names, eval_sample_weight, eval_init_score, eval_metric, early_stopping_rounds, verbose, feature_name, categorical_feature, callbacks, init_model)
    816             callbacks=None, init_model=None):
    817         """Docstring is inherited from the LGBMModel."""
--> 818         super().fit(X, y, sample_weight=sample_weight, init_score=init_score,
    819                     eval_set=eval_set, eval_names=eval_names, eval_sample_weight=eval_sample_weight,
    820                     eval_init_score=eval_init_score, eval_metric=eval_metric,
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/lightgbm/sklearn.py in fit(self, X, y, sample_weight, init_score, group, eval_set, eval_names, eval_sample_weight, eval_class_weight, eval_init_score, eval_group, eval_metric, early_stopping_rounds, verbose, feature_name, categorical_feature, callbacks, init_model)
    614
    615         if not isinstance(X, (pd_DataFrame, dt_DataTable)):
--> 616             _X, _y = _LGBMCheckXY(X, y, accept_sparse=True, force_all_finite=False, ensure_min_samples=2)
    617             if sample_weight is not None:
    618                 sample_weight = _LGBMCheckSampleWeight(sample_weight, _X)
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
     61             extra_args = len(args) - len(all_args)
     62             if extra_args <= 0:
---> 63                 return f(*args, **kwargs)
     64
     65             # extra_args > 0
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/sklearn/utils/validation.py in check_X_y(X, y, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, estimator)
    812         raise ValueError("y cannot be None")
    813
--> 814     X = check_array(X, accept_sparse=accept_sparse,
    815                     accept_large_sparse=accept_large_sparse,
    816                     dtype=dtype, order=order, copy=copy,
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/sklearn/utils/validation.py in inner_f(*args, **kwargs)
     61             extra_args = len(args) - len(all_args)
     62             if extra_args <= 0:
---> 63                 return f(*args, **kwargs)
     64
     65             # extra_args > 0
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/sklearn/utils/validation.py in check_array(array, accept_sparse, accept_large_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, ensure_min_samples, ensure_min_features, estimator)
    614                     array = array.astype(dtype, casting="unsafe", copy=False)
    615                 else:
--> 616                     array = np.asarray(array, order=order, dtype=dtype)
    617             except ComplexWarning as complex_warning:
    618                 raise ValueError("Complex data not supported\n"
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/numpy/core/_asarray.py in asarray(a, dtype, order, like)
    100         return _asarray_with_like(a, dtype=dtype, order=order, like=like)
    101
--> 102     return array(a, dtype, copy=False, order=order)
    103
    104
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/dask/array/core.py in __array__(self, dtype, **kwargs)
   1481
   1482     def __array__(self, dtype=None, **kwargs):
-> 1483         x = self.compute()
   1484         if dtype and x.dtype != dtype:
   1485             x = x.astype(dtype)
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/dask/base.py in compute(self, **kwargs)
    281         dask.base.compute
    282         """
--> 283         (result,) = compute(self, traverse=False, **kwargs)
    284         return result
    285
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/dask/base.py in compute(*args, **kwargs)
    563         postcomputes.append(x.__dask_postcompute__())
    564
--> 565     results = schedule(dsk, keys, **kwargs)
    566     return repack([f(r, *a) for r, (f, a) in zip(results, postcomputes)])
    567
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/client.py in get(self, dsk, keys, workers, allow_other_workers, resources, sync, asynchronous, direct, retries, priority, fifo_timeout, actors, **kwargs)
   2652                     should_rejoin = False
   2653             try:
-> 2654                 results = self.gather(packed, asynchronous=asynchronous, direct=direct)
   2655             finally:
   2656                 for f in futures.values():
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/client.py in gather(self, futures, errors, direct, asynchronous)
   1961             else:
   1962                 local_worker = None
-> 1963             return self.sync(
   1964                 self._gather,
   1965                 futures,
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/client.py in sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
    835             return future
    836         else:
--> 837             return sync(
    838                 self.loop, func, *args, callback_timeout=callback_timeout, **kwargs
    839             )
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
    349     if error[0]:
    350         typ, exc, tb = error[0]
--> 351         raise exc.with_traceback(tb)
    352     else:
    353         return result[0]
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/utils.py in f()
    332             if callback_timeout is not None:
    333                 future = asyncio.wait_for(future, callback_timeout)
--> 334             result[0] = yield future
    335         except Exception as exc:
    336             error[0] = sys.exc_info()
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/gen.py in run(self)
    760
    761                     try:
--> 762                         value = future.result()
    763                     except Exception:
    764                         exc_info = sys.exc_info()
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/client.py in _gather(self, futures, errors, direct, local_worker)
   1855                 else:
   1856                     self._gather_future = future
-> 1857                 response = await future
   1858
   1859             if response["status"] == "error":
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/client.py in _gather_remote(self, direct, local_worker)
   1906
   1907             else:  # ask scheduler to gather data for us
-> 1908                 response = await retry_operation(self.scheduler.gather, keys=keys)
   1909
   1910         return response
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/utils_comm.py in retry_operation(coro, operation, *args, **kwargs)
    382         dask.config.get("distributed.comm.retry.delay.max"), default="s"
    383     )
--> 384     return await retry(
    385         partial(coro, *args, **kwargs),
    386         count=retry_count,
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/utils_comm.py in retry(coro, count, delay_min, delay_max, jitter_fraction, retry_on_exceptions, operation)
    367                 delay *= 1 + random.random() * jitter_fraction
    368             await asyncio.sleep(delay)
--> 369     return await coro()
    370
    371
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/core.py in send_recv_from_rpc(**kwargs)
    859             name, comm.name = comm.name, "ConnectionPool." + key
    860             try:
--> 861                 result = await send_recv(comm=comm, op=key, **kwargs)
    862             finally:
    863                 self.pool.reuse(self.addr, comm)
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/core.py in send_recv(comm, reply, serializers, deserializers, **kwargs)
    642         await comm.write(msg, serializers=serializers, on_error="raise")
    643         if reply:
--> 644             response = await comm.read(deserializers=deserializers)
    645         else:
    646             response = None
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/distributed/comm/tcp.py in read(self, deserializers)
    197
    198             frames = bytearray(frames_nbytes)
--> 199             n = await stream.read_into(frames)
    200             assert n == frames_nbytes, (n, frames_nbytes)
    201         except StreamClosedError as e:
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/iostream.py in read_into(self, buf, partial)
    473
    474         try:
--> 475             self._try_inline_read()
    476         except:
    477             future.add_done_callback(lambda f: f.exception())
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/iostream.py in _try_inline_read(self)
    840             return
    841         self._check_closed()
--> 842         pos = self._read_to_buffer_loop()
    843         if pos is not None:
    844             self._read_from_buffer(pos)
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/iostream.py in _read_to_buffer_loop(self)
    753             # can't see it; the only way to find out if it's there is to
    754             # try to read it.
--> 755             if self._read_to_buffer() == 0:
    756                 break
    757
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/iostream.py in _read_to_buffer(self)
    865                     else:
    866                         buf = bytearray(self.read_chunk_size)
--> 867                     bytes_read = self.read_from_fd(buf)
    868                 except (socket.error, IOError, OSError) as e:
    869                     # ssl.SSLError is a subclass of socket.error
~/miniconda3/envs/dkdc/lib/python3.8/site-packages/tornado/iostream.py in read_from_fd(***failed resolving arguments***)
   1138     def read_from_fd(self, buf: Union[bytearray, memoryview]) -> Optional[int]:
   1139         try:
-> 1140             return self.socket.recv_into(buf, len(buf))
   1141         except BlockingIOError:
   1142             return None
OSError: [Errno 22] Invalid argument

Thanks for opening this. Could you give me a bit more information?

What versions of distributed and dask are you on?
Why are you mixing brew install lightgbm and pip install lightgbm?

I can't say for sure that the issue you're facing is about mixing installation methods, but I am curious to learn why you're doing that.

One other thing I noticed in that notebook, that you might try (it will be a few hours until I'm able to try reproducing this on a Mac).
You're calling .persist() and then going straight into .fit(). LightGBM's tests only cover these cases:

the array is totally unevaluated
the array has been .persist()-ed AND .wait()-ed, so it is totally materialized

It's possible that the way lightgbm.dask interacts with the data you pass in can lead to errors if it is given data in this "middle area" where it's partially persist()-ed at the time you start training.
So could you try adding this before .fit() and let me know if it resolves the issue?
from distributed import wait
_ = wait([X, y])

dask==2021.3.0
distributed==2021.3.0
When I only pip install lightgbm (on my mac), and try to import, I get an error like "image not found" - brew installing has historically fixed that error for me - i.e. probably a case of me not really understanding what I'm doing
I'll try running this on linux/azure compute which will install via conda and should indicate whether this is the issue

@lostmygithubaccount

When I only pip install lightgbm (on my mac), and try to import, I get an error like "image not found"

Please try brew install libomp first before pip ... as it is said in the LightGBM installation guide for macOS. I bet you face this error: https://github.com/sberbank-ai-lab/LightAutoML/issues/5#issuecomment-759845256.

"Warning: libomp 11.1.0 is already installed and up-to-date." - so does not seem to be the issue here?
- Cody

From: Nikita Titov @.>
Sent: Tuesday, March 23, 2021 9:47 AM
To: microsoft/LightGBM @.>
Cc: Cody Peterson @.>; Mention @.>
Subject: Re: [microsoft/LightGBM] lightgbm.dask in 3.2.0 - OSError: [Errno 22] Invalid argument (#4100)
@lostmygithubaccounthttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flostmygithubaccount&data=04|01|cody.peterson%40microsoft.com|531e1d6226504f4622a208d8ee1b50ac|72f988bf86f141af91ab2d7cd011db47|1|0|637521148373153354|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=KQuSgSaESF24WODPUiHSD%2Ba145hDKPaV7ExFwFWZZhg%3D&reserved=0
When I only pip install lightgbm (on my mac), and try to import, I get an error like "image not found"
Please try brew install libomp first before pip ... as it is said in the LightGBM installation guide for macOS.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FLightGBM%2Fissues%2F4100%23issuecomment-805059186&data=04|01|cody.peterson%40microsoft.com|531e1d6226504f4622a208d8ee1b50ac|72f988bf86f141af91ab2d7cd011db47|1|0|637521148373173346|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=Y42Fuv4n3prznAZ%2BzawX6KI0%2Fmp50RdMZSlI2PYtMZg%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FANCGO2PHQYJLWZTN7XFPVUDTFDAZHANCNFSM4ZVQRFVQ&data=04|01|cody.peterson%40microsoft.com|531e1d6226504f4622a208d8ee1b50ac|72f988bf86f141af91ab2d7cd011db47|1|0|637521148373173346|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&sdata=qXZAwumy3mQaRTwoKBMSi0g7nWaUBAUBwzsP1teN6oM%3D&reserved=0.

"Warning: libomp 11.1.0 is already installed and up-to-date." - so does not seem to be the issue here?

Then need to see full logs for

I get an error like "image not found"

to confirm this.


[fix]: bugfix choice(INDArray source, INDArray probs, int numSamples)

Summary
Fixed a bug that occurred when using the choice(INDArray source, INDArray probs, int numSamples) function (For example, when you declare an INDArray with double type.) because the data type of source was not taken into account.

The signature seems to have been processed correctly. Thank you.

Merged, great job!


Testing: click method doesn't work with inner HTML

Hello!
I have an application that I want to unit test but the click() method is not working.
Here is the code of the link I want the Test to click:

And here is the code in my test:
$this
    ->actingAs(User::find(1))
    ->visit(route('events.index'))
    ->click('')
    ->seePageIs(route('events.show', $event->event_type))
    ->see($event->type->event);

The error I get back is as follows:
Symfony\Component\CssSelector\Exception\SyntaxErrorException: Expected selector, but <delimiter "#" at 1> found.

/home/vagrant/metrics/vendor/symfony/css-selector/Exception/SyntaxErrorException.php:34
/home/vagrant/metrics/vendor/symfony/css-selector/Parser/Parser.php:281
/home/vagrant/metrics/vendor/symfony/css-selector/Parser/Parser.php:140
/home/vagrant/metrics/vendor/symfony/css-selector/Parser/Parser.php:116
/home/vagrant/metrics/vendor/symfony/css-selector/Parser/Parser.php:51
/home/vagrant/metrics/vendor/symfony/css-selector/XPath/Translator.php:297
/home/vagrant/metrics/vendor/symfony/css-selector/XPath/Translator.php:123
/home/vagrant/metrics/vendor/symfony/css-selector/CssSelector.php:94
/home/vagrant/metrics/vendor/symfony/dom-crawler/Crawler.php:658
/home/vagrant/metrics/vendor/laravel/framework/src/Illuminate/Foundation/Testing/InteractsWithPages.php:756
/home/vagrant/metrics/vendor/laravel/framework/src/Illuminate/Foundation/Testing/InteractsWithPages.php:563
/home/vagrant/metrics/tests/EventsControllerTest.php:31

My application is running Laravel 5.1.24 and PHPUnit 4.8.18

The click() method searches for a  link that either contains a text inside, an id= attribute or a name= attribute that matches the string you pass as a parameter.

So I have to give the button an ID or put some text between it? I can't do any of these options as these buttons are in a table cell on my page and repeated for each row in the table.
If this is the only way to click the button then I think this code needs to be revised in the framework to allow for the same button being looped onto the page (for example, specifying the first button that appears with a certain class)

I ran into the same issue. I put an id inside the table row a tag, it didn't work for me.
Hello World

Working example.


python3Packages.greeclimate: 1.1.1 -> 1.2.0

Description of changes
https://github.com/cmroche/greeclimate/releases/tag/v1.2.0

Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

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

3 packages built:

home-assistant-component-tests.gree
python310Packages.greeclimate
python39Packages.greeclimate


Tooltip arrow wrongfully positioned

This happens if the file system pane is closed.

Looks like a duplicate of https://github.com/atom/tabs/issues/86 and/or https://github.com/atom/tabs/issues/66, so closing this in favor of those two issues.

This is actually a core issue, I'd rather leave this open.

Also, updated the title

Yup, I can reproduce this in Yosemite:

Hide tree-view
Hover over file tab until tooltip pops up

As far as I can tell, this has been fixed as of Atom 0.190, so I'm going to close this. @wcandillon Feel free to reopen though if you experience this again!

This is still an issue

As far as I can tell, this (or something like this) happens whenever a tooltip arrow can't be centered on the element it's bound to (ie. if the element is up against the window edge and the tooltip content is long enough). Here's another example from find-and-replace:
No arrow

Arrow


rds_service.py error

Steps to Reproduce

Running prowler aws -log-level ERROR
AWS
Single Account

Expected behavior
To execute without throwing the error
Actual Result with Screenshots or Logs
2024-11-28 10:20:18,851 [File: rds_service.py:458] [Module: rds_service] ERROR: eu-west-2 -- KeyError[449]: 'SourceType'
We have an postgress RDS 16.3 instance in eu-west-2 and the script is throwing this error
How did you install Prowler?
From pip package (pip install prowler)
Environment Resource

ECS Fargate task

OS used

Alpine Linux

Prowler version
4.6.0
Pip version
na
Context
No response

Hi @garym-krrv,
Could you check if PR #5961 resolves your issue? Let me know if it works for you or if further adjustments are needed.
Thank you for using Prowler!

Will do @puchy22

I reopen the issue until @garym-krrv confirms that everything works as expected.

Thanks, just tied up with Work. Will get to this today for sure @puchy22

Hi @puchy22 , just tested this and I no longer recieve the error.
Many Thanks.. Closing.


SliceFilter and PatchFilter Renaming Proposal

Motivation for the feature

Currently we have refactored out a SliceFilter class which is a callable dictionary that can provide feedback on what gets filtered out, depending on the various flags that is used to instantiate the class with.

However, in PR#980, this is expanded to be more than just filtering slices but also patches. So we might consider renaming it SlicePatchFilter.

In addition, "filter" has rather unique connotation within the image processing context (e.g. gaussian filter, which is typically applied globally to all pixels within the image as part of the preprocessing) which may be somewhat confusing.

Description of the feature

I recommend either renaming to SlicePatchSelector or SliceSelector.

Selector in generals are a lot more specific in this context than Filter.

Alternatives

Chooser
Refiner
Maybe even drop slice/patch? since this is now a generic filter/selector?

Additional context

Hi @dyt811, thank you for opening this issue.
As I mentioned in the meeting, I think I'm going to implement the "PatchFilter" separately from the "SliceFilter" in PR #980, as the current implementation is a bit confusing.
I like the term Selector the best, and would suggest having 2 classes named SliceSelector and PatchSelector.

While working on #980, I came across an ambiguity with the term "Selector" so I kept "Filter" for now and I'll cross-post my comment here.

In PR #980, we implemented a PatchFilter similar to the SliceFilter and kept the name "filter" for consistency for the moment.


Fixes minor typo in tutorials/colab/DeepHyper_101.ipynb

dictionnary -> dictionary

Hello @saforem2 , thank you for submitting this PR. It looks like the diff is much larger than the typo announced in the description. Could you summarise what/why some things have been changed (first import/install cell, final plot, %time statement)?

Shoot sorry, I meant to elaborate in the body but changes include:

Wrap !pip install deephyper in a try/except block that first attempts to import deephyper and only installs if not found
Minor changes to plot style (grey lines / text for visibility in light / dark mode)

Light/dark mode is a good idea. maybe we should provide some style guidelines to remember about doing this everywhere (do not need to be complex). On this page for example.

I added a small comment about something I just noticed... If you could edit this it would be great and then I merge. Thank you.

I added a small comment about something I just noticed... If you could edit this it would be great and then I merge. Thank you.

Sorry, where did you add a comment?

fwiw, I made a gist with the .mplstyle file I used if you're interested

here it is @saforem2 I forgot to validate the review...


Training is very slow

The current version uses a pytorch/huggingface (or maybe other dependencies) combination that is very slow, as shown in this and this issue.
The current workaround would be to use version 0.3.0 and manually update the packages (e.g., timm) after installing ConfigILM until a fix is given in the dependencies or otherwise known.

Resolved with library updates in 0.4.5


Merge google upstream as of 2020-05-26

For a preview click here.

This change is

+@EricCousineau-TRI
+@ggould-tri
+@rpoyner-tri
+@sammy-tri
+@sherm1
+@soonho-tri
+@RussTedrake
for review, please.
For a preview click here.
You are invited to read this as closely or loosely as your time merits. I'll leave this open for one week (until Oct 15th) and resolve any discussions you open during that period, but then I'll plan to merge after that point. We can continue revising the guide in follow-ups as necessary.

The review deadline has expired, I'm merging now. I am happy to adjust to late feedback in a separate PR.
-@EricCousineau-TRI -@RussTedrake


Enable unlisted_choice with researchdelight hub

Fixes https://github.com/2i2c-org/infrastructure/issues/2873

Thanks @GeorgianaElena!


Terrascan wrongly reports a accurics.gcp.NS.130 (checkIpForward) violation

terrascan version: 1.0.0
Operating System: Ubuntu 20.04

Description
Terrascan reports a violation of the accurics.gcp.NS.130 rule (rule code is in checkIpForward.rego), and it should not.
What I Did
Here's my google_compute_instance. Adding a can_ip_forward = false doesn't make any difference.
resource "google_compute_instance" "development-workstation" {
  name             = var.development_workstation_name
  machine_type     = var.development_workstation_machine_type
  min_cpu_platform = var.development_workstation_min_cpu_platform

  boot_disk {
    initialize_params {
      image = "${google_compute_image.dev-workstation-image-ubuntu-2004.family}/${google_compute_image.dev-workstation-image-ubuntu-2004.name}"
      type  = "pd-ssd"
    }
  }

  network_interface {
    network = "default"

    access_config {
      // Ephemeral IP
    }
  }
}

What am I doing wrong?

Hi @ferrarimarco, appreciate the bug report. I verified the issue on my dev box, and it's definitely a policy bug.
Basically, it looks like the intention for the checkIpForward rule was to check if  !(.can_ip_forward == true), but due to syntax,  "not api.config.can_ip_forward" actually checks if a key does not exist, which in this case is true (it's not in the test file).
Since the can_ip_forward rule defaults to false, removing the "not" and just checking for can_ip_forward == true should suffice.
pkg/policies/opa/rego/gcp/google_compute_instance/checkIpForward.rego:
package accurics
checkIpForward[api.id]
{
api := input.google_compute_instance[_]
not api.config.can_ip_forward == true
}
I'll check in the fix shortly.


altdoc CRAN version

We can switch back to the CRAN version of altdoc now, right? @vincentarelbundock @etiennebacher

yes, I think so


Add missing 'Microsoft.Extensions.OptionsModel' namepace

After the latest commits, there's a namespace lost by mistake, so this fixes issue #171
/cc @DamianEdwards @Eilon

Why do you say it's missing? If that was missing from the project.json file, it wouldn't compile.

Yep, it's not compile at my end, after I pull the latest changes


Docstring fix in create_statefbk_iosystem

This PR only changes the docstring of create_statefbk_iosystem, makes help more readable.

Changes math formulas to sphinx math
Changes most signal-names to inline math in order to be consistent with formulas
Fixes some typos
Adds a full example

coverage: 94.968%. remained the same when pulling d0aa48adb2de3441a66390c243d8fb5089b88241 on KybernetikJo:doc-fix-create_statefbk_iosystem into 42c6fb1498aa9f5d542113da288c7c4e3547c117 on python-control:main.

Any thoughts on this general style issue? If we think that Sphinx/readthedocs is the main way people will digest documentation, I am OK with using the :math: directive more liberally.

I agree with all your comments there.
More complex equations should be set in math and most users will

use some sort of Sphinx (RTD or inline help in IDEs like Spyder, JupyterLab might get it in the future too: https://github.com/jupyterlab/jupyterlab/issues/8581), or
will understand to read LaTeX, having control systems scientists as our main audience.

OTOH we should not go overboard for single symbols.

The numpydoc style guide says:

Equations : as discussed in the Notes section above, LaTeX formatting should be kept to a minimum. Often it’s possible to show equations as Python code or pseudo-code instead, which is much more readable in a terminal.

Based on this, I have made several suggestions below regarding reverting to plain text in the docstrings, for better display on terminals.
@sawyerbfuller @bnavigator Any thoughts on this general style issue? If we think that Sphinx/readthedocs is the main way people will digest documentation, I am OK with using the :math: directive more liberally.

I was completely unaware of that part of numpydoc, and I'm ok with us not merging it.
(It was a good remark, because I would like to change Slycot/slycot/analysis.py to numpydoc. I can take that into account over there.)
What should we do with this PR?

Close this PR with comment.
Keep it open, not do anything, just keep it as reference. Maybe latex rendering in terminals will change at some point in the future.
Incorporate comments from @murrayrm, @bnavigator and merge. I am not sure it worth it, though.

I am fine with all three variants.

Although there is little left after incorporating our comments, I think even minor typo fixes and formatting are worth merging. Keep on working and thanks for your contributions!


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/86166

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/86309

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/86598

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/86899

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/87845

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/88419

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/89508

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/90336

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/91010

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/93807

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

 Let me know once you have set it up, and we can add the repos for downstream testing

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/112784

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/112808

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.

Triggering TagBot for merged registry pull request
This extra notification is being sent because I expected a tag to exist by now, but it doesn't.
You may want to check your TagBot configuration to ensure that it's running, and if it is, check the logs to make sure that there are no errors.


Bluetooth: Controller: Fix BT_CTLR_ISOAL_PSN_IGNORE for event overlap

Fix BT_CTLR_ISOAL_PSN_IGNORE implementation when adjusting Sequence Number during overlap with current CIG event. Reuse the implementation from non-PSN ignore implementation.

@Tronil This is a trivial change, hope you can review it.

@Tronil i took your small change of refactoring the use of latency_prepare  in this PR. If CI passes here and this PR is merged , then I can follow up on your PR https://github.com/zephyrproject-rtos/zephyr/pull/74244 and try that also merged for v3.7 release as it is bugfix.

@cvinayak please rebase


Pronunciation FAQ

Just came across this project and it seems odd to me that there isn't a pronunciation guide in the FAQs.

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.


Text is not aligned vertically anymore

As mentioned in the other issue https://github.com/sfsam/Itsycal/issues/144 the text is not aligned vertically anymore. Please have a look on the drawing with the old build:

And new build

It is just a couple of pixel difference, but is noticeable.

Thanks for noticing this.
This is a bug in macOS 10.14+. No change was made to how the text is drawn in Itsycal.
The change that causes this behavior was setting the Deployment Target of the app to macOS 10.14 from macOS 10.12. This change was made to utilize new API related to Mojave's Dark Mode.
For some reason, changing the deployment target to 10.14 slightly changed the metrics of many UI elements throughout the app. This shouldn't happen. I got most of them, but missed this one.
I have a hack/workaround which I'm hoping I will be able to share fairly soon.

Nice, thanks a lot! I'll close this issue as soon as I can confirm the improvement.

Can you tell me what version of macOS you are running and whether you have a Retina or non-Retina monitor?

I am running MacOS 10.14.6 and the screenshots above are from non-retina screen.
On the retina Macbook display it looks better though. There the text is only slightly too high:

I have made a test version. Could you try it out?
https://itsycal.s3.amazonaws.com/Itsycal-0.12.1-test-1.zip

Now it is much better! On the same hight as the original Apple clock in menu bar. I checked it on both screen, retina and non-retina.
Thanks! Closing the issue.


Session-scoped async providers can't use async context managers

Expected behavior

An async generator provider should be able to use an async context manager (async with syntax).
Actual behavior

A RuntimeError is thrown when trying to do this.
To Reproduce

import asyncio
from contextlib import asynccontextmanager
import aiodine

@asynccontextmanager
async def ctx():
    yield

@aiodine.provider(scope="session")
async def some_value():
    async with ctx():
        yield "value"

@aiodine.consumer
async def main(some_value):
    print("value:", some_value)

asyncio.run(main())

Material

$ python debug/app.py
value: value
an error occurred during closing of asynchronous generator <async_generator object some_value at 0x10d308488>
asyncgen: <async_generator object some_value at 0x10d308488>
Traceback (most recent call last):
  File "debug/app.py", line 15, in some_value
    yield "value"
GeneratorExit

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "debug/app.py", line 15, in some_value
    yield "value"
  File "/Users/Florimond/.pyenv/versions/3.7.2/lib/python3.7/contextlib.py", line 189, in __aexit__
    raise RuntimeError("generator didn't stop after throw()")
RuntimeError: generator didn't stop after throw()

Possible solutions

Desktop (please complete the following information):

OS: macOS Mojave
Python version: 3.7.2
aiodine version: 1.2.5

Additional context

Ran into this while trying to integrate orm in a Bocadillo app: it needs an async session-scoped provider which calls async with on the Database instance.

Actually, this behavior is caused by not using async with aiodine.session().


CSV parsing should supported nested line breaks

Currently, this use case fails:
https://www.csvjson.com/csv2json/8176be8c26c4936b3a3eace16c7a1d6b
Its because of this CSV line which includes a line break:
"array mixed objects","[1,null,\"ball\"]","[2,{\"a\":10,\"b\":20},\"cube\"]",
,"a\"b","alert(\"Hi!\")","string with quotes"
,"bell is \u0007","multi
line
text","string with bell&newlines"

According to RFC-4180 seciton 2.6, this is valid CSV.

Right - a CSV line with a real linebreak (\n) is indeed valid according to RFC-4180 but this is one of the cases that cause problems when working with CSVs -- Apache Hadoop, specifically its Hive component is notorious for having issues when the data contains newlines.
If the producer of the CSV file (the program exporting data from a database) uses the CSVJSON variant of CSV then newlines get encoded as \n (according to the JSON string value rules) and thus the line is not broken.
The CSV sample input looks a bit garbled - it should be something like:
type,value1,value2
"number",1,2
"boolean",false,true,
"null",null,"non null",
"array of numbers",[1],"[1,2]",0
"simple object",{"a":1},{"a":1,"b":2}
"array mixed objects",[1,null,"ball"],[2,{"a":10,"b":20},"cube"]
"string with quotes","a\"b","alert("Hi!")"
"string with bell&newlines","bell is \u0007","multi\nline\ntext"


jit egm-lecture (new PR)

copy of #182

Thanks @natashawatkins
Is this ready for review?

@jstac yep. All three optimal growth lectures were updated because we use the same files across the lectures, and also for consistency.

Thanks @natashawatkins , nice work.  Merging.


Create Song “2024-04-22/index-2”

Automatically generated by Netlify CMS

👷 Deploy Preview for vuepress-cms-test processing.

Name
Link

🔨 Latest commit
e98dd8a90aa68e2c27a475dc5f4996082de88ed0

🔍 Latest deploy log
https://app.netlify.com/sites/vuepress-cms-test/deploys/6626293ebd858b000895ba6c


Audio Stream VOIP doesn't instantiate playback

I have tried implementing this in my Godot project using (version 4.2 stable) but I can't get it to work. When I press play, I get an error saying that the Audio Stream VOIP must implement the "instantiate playback" method.
Here is the error:
E 0:00:05:0557   instantiate_playback: Method must be implemented!
  <C++ Error>    Method/function failed. Returning: Ref<AudioStreamPlayback>()
  <C++ Source>   servers/audio/audio_stream.cpp:187 @ instantiate_playback()
E 0:00:05:0557   play: Failed to instantiate playback.
  <C++ Error>    Condition "stream_playback.is_null()" is true.
  <C++ Source>   scene/3d/audio_stream_player_3d.cpp:580 @ play()

I'm very confused by this error since the method seems to be implemented at least from what I can tell. My guess is that I messed something up since I'm not very used to compiling C++ projects.

The godot_cpp submodule is outdated. You need to fetch the latest changes (git submodule update --remote) to compile for Godot 4.2 stable.

That did indeed solve it!


Does it work in bare Android project?

I tried to use Kadb inside bare Android project but get this error:
Could not find com.github.flyfishxu.spake2-java:spake2:0.0.5.

Only kadb is on Maven Central.
You have to add jitpack repository in the settings.gradle.kts file.
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven("https://jitpack.io")
    }
}


object_subclass macro creates mutable reference to mutable static

I stumbled upon this bit:
https://github.com/gtk-rs/gtk-rs-core/blob/b97554d03ae9ae8f1c56e0e61f55d2612e1be271/glib-macros/src/object_impl_attributes/subclass.rs#L106
which throws the following warning (which is then swallowed because it's coming from a macro invocation):

creating a mutable reference to mutable static is discouraged
for more information, see issue #114447 https://github.com/rust-lang/rust/issues/114447
this will be a hard error in the 2024 edition

This will fail to compile in rust 2024 either way, so we need to deal with this before upgrading. However, this is creating a mutable temporary reference that is then converted into a pointer and subsequently dropped. We should use std::ptr::addr_of_mut!() instead, and also make sure we are actually using it correctly here.

Yes, this code is from before addr_of_mut! was stable :) You make a PR?


tcl.h not found (Debian)

In order to get the tool to build on Debian I needed to replace all references of "#include <tcl.h>" to "#include <tcl/tcl.h>".  This includes references within the modified OpenSTA repository.
I realise Debian is not a supported distro but thought it might be useful that this is noted.

Solved. Close.


Keep getting MOVED errors after enabling autopipelining

For some reason I keep getting MOVED errors after enabling auto-pipelining.
Anyone knows a possible reason for this?

I thought the library was supposed to handle these errors automatically.
I'm using some Lua scripts in Redis, maybe it has something to do with that?

I found that my redis cluster is behaving very strangely.
One of the slaves isn't synchronizing with its master at all.
I'll try to fix it and close this issue.

Strangely, I keep receiving MOVED errors even after fixing the slave:
2022-12-15T16:23:43.951551038Z 0|index  | You have triggered an unhandledRejection, you may have forgotten to catch a Promise rejection:
2022-12-15T16:23:43.951619937Z 0|index  | WO: MOVED 15327 <IP_ADDRESS>:48418
2022-12-15T16:23:43.951631339Z 0|index  |     at R0e (/app/index.js:195:11553)
2022-12-15T16:23:43.951635837Z 0|index  |     at pG (/app/index.js:195:12448)

Okay I found something.
Auto pipelining in ioredis separates pipelines per node.
I solved by making ioredis separate pipelines per slot.
I don't know why it didn't happen to anyone else, given Redis itself states that pipelines should always target a single slot.
I will close the issue and open a PR.


BUGFIX: SD-2847 Update ecommerce demo data

Build succeeded (check pipeline).

https://checklist.intgdc.com/job/gooddata-public-demos/job/gooddata-public-demos-validation/133/ : SUCCESS in 13s
https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-oss-check/140/ : SUCCESS in 4s

Build succeeded (check pipeline).

https://checklist.intgdc.com/job/gooddata-public-demos/job/gooddata-public-demos-validation/134/ : SUCCESS in 13s
https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-oss-check/141/ : SUCCESS in 4s

Build succeeded (check pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-oss-check/144/ : SUCCESS in 4s

LGTM

Sonar scan result

No issue found. Congratulations!

More detail, see in https://sonarqube-gate.intgdc.com/dashboard?id=gooddata-public-demos-gate-PR68
To scan for vulnerabilities in dependencies and run unit tests (to get coverage report in sonar) please comment your PR with 'extended check sonar'.

Build succeeded (gate pipeline).

https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-merge-compliance-check/60/ : SUCCESS in 10s
https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-sonarqube-scan-zuul-gate/58/ : SUCCESS in 50s
https://checklist.intgdc.com/job/compliance/job/gooddata-public-demos-fossa-scanning-zuul/21/ : FAILURE in 16s (non-voting)


As an author, I want un-befriend local and remote authors

https://github.com/Zhipeng-Chang/CMPUT404-Winter-2019-GroupProject/pull/112


ZigBee smart plugs (identified as lumi.plug.v1) not showing Power & Consumption entities

My ZigBee smart plugs not showing Power & Consumption entities via the miot integration, however they show these via the "Xiaomi Gateway 3" integration.
A difference that I can see is that the miot integration identifies the plugs as lumi.plug.v1, where as the  "Xiaomi Gateway 3" integration identifies the plugs as lumi.plug ZNCZ02LM.

Power & Consumption not found in miot-spec for lumi.plug.v1.

Is there another lumi plug in the spec that does include those attributes by any chance? Just wondering if it is possible that the plug was incorrectly identified as lumi.plug.v1 instead of another model.

I'm not sure if this helps, but zibee2mqtt has a power attribute for the lumi ZNCZ02LM smart socket.

Power (numeric) #
Instantaneous measured power. Value can be found in the published state on the power property. To read (/get) the value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/get with payload {"power": ""}. It’s not possible to write (/set) this value. The unit of this value is W.
Energy (numeric) #
Sum of consumed energy. Value can be found in the published state on the energy property. It’s not possible to read (/get) or write (/set) this value. The unit of this value is kWh.

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    value_template: "{{ value_json.power }}"
    unit_of_measurement: "W"
    device_class: "power"

sensor:
  - platform: "mqtt"
    state_topic: "zigbee2mqtt/<FRIENDLY_NAME>"
    availability_topic: "zigbee2mqtt/bridge/state"
    value_template: "{{ value_json.energy }}"
    unit_of_measurement: "kWh"
    device_class: "energy"

Not miot-spec.
This component only uses the miot-spec.


Multiple "SceneCaptureToDiskCamera" mix up saved images

How to reproduce

Add at least two SceneCaptureToDiskCameras to the scene
Set their "Save to Folder" different for each camera
Set their "Post Process Effect" different for each camera
Play

Each camera saves in its own folder but the resulting images seem to be somehow mixed up.

Ok @nsubiron the problem is that the Render Target is being shared because the property is defined as Transient. I've also fixed a bug in the constructor naming, btw, we will need to change this SaveToFolder to be checked in runtime because it is different in production than in editor.


API review updates for v1.0

Description
CSV+OpenAPI Export of work done in Google Spreadsheet for version 1.0.
The OpenAPI yaml can be directly copied to Swagger and tagged for 1.0, but I propose we start the release process here in the Github Repo and also potentially connect Swagger directly to the repo instead of manually copying stuff.
Related Issue
Closes https://govstack-global.atlassian.net/browse/GOV-409
Motivation and Context
n/a
How Has This Been Tested?
Still waiting for #9

@lalc I requested your review here, knowing that we have already reviewed the API in the Spreadsheet and decided to release it in last meeting.
But in the future, it would be great if we can find a workflow where reviews/sign-offs are formally captured in GitHub.
So the review activity itself with comments can remain in the Spreadsheet, but a formal sign-off is given on GitHub? I think that aligns well with how the rest of the spec should be released, anyways: Everything flows through GitHub, all releases originate from the repo etc.

Another comment: The OpenAPI spec here is 1:1 with what's on Swagger Hub.

@lalc since we already decided to use the API as-is for 1.0.0 and continue doing refinements, I will merge this PR.
I'm not sure exactly when/how we are going to call our current main branch the 1.0.0 release, maybe it's not the Working Group that will make the call or tag the release. So until then, we can also just keep the branch "release-able". A lot of software uses similar methods.


Add vk.com

Hi, I wanted to add vk.com as social sites. I've added the domains according to this link: https://myip.ms/view/hosts/297290/vk_com.html

Hi Mirkan @mirkancal, I won't merge this because "social" is a separate extension to the base unified hosts file.
In other words, the baseline unified hosts file is for adware, malware, trojans, phishing, etc.
Those who want to block social, and/or porn, and/or gambling, use extended versions of the baseline unified hosts file.
You should submit this to one of the curators of social hosts lists.  Presently that's @sinfonietta at https://github.com/Sinfonietta/hostfiles, or @tiuxo at https://github.com/tiuxo/hosts
Closing.


fixes #1

this pull request implements the navbar
link to the issue: https://github.com/zero-to-mastery/Keiko-Corp/issues/1

Looks good, merging in.


Basic contract metadata support

As a smart contract developer, I want to add contract metadata to my smart contract
BACKGROUND
Metadata should be in line with TZIP16 - https://tzip.tezosagora.org/proposal/tzip-16/
Consider:

TZIP20 - https://tzip.tezosagora.org/proposal/tzip-20/
TZIP21 - https://tzip.tezosagora.org/proposal/tzip-21/
Taquito TZIP-16 Contract Metadata and Views - https://tezostaquito.io/docs/metadata-tzip16/

ACCEPTANCE CRITERIA

[ ] Have the ability to take in properties for metadata
[ ]  Create a JSON artifact for the metadata
[ ] Publish to contract metadata to IPFS

Thoughts:
Adjust the init task to ask for:

author name and e-mail. Could be multiple.
home page

The above would be used as default values for the "author" and "homepage" meta fields for contracts.
Additionally, I think we need to extend the scaffolding as we've talked about earlier.
Plugin would expose a new field called "scaffolds" and would look like this:
scaffolds: [
    Scaffold.create({
      name: "mligo",
      description: "Blank contract using mligo syntax",
      alias: "ml",
      options: [],
      handler: "proxy",
      type: "contract"
    })
]

The interface for defining a scaffold would be very familiar as it closely resembles the interface for defining a task. The important thing to note there is the "type" field, which will inform the end-user what kind of scaffold this is.
Developers could then scaffold the a contract like this:
taq scaffold mligo increment.mligo
Just like tasks, we can resolve conflicts using the --plugin argument:
taq scaffold example increment.jsligo --plugin ligo would scaffold increment.jsligo using the example scaffold from the ligo plugin.
We'd also add a list scaffolds tasks to list the available scaffolds that the installed plugins have exposed. This would display a table with name, description, and type columns.
Finally, we add a metadata plugin which exposes a scaffold for generating tzip-16 metadata.
scaffolds: [
    Scaffold.create({
      name: "TZIP16",
      description: "TZIP16 metadata for the given contract",
      alias: "meta",
      options: [{
        flag: "contract",
        type: "contract",
        description: "The filename of the contract to generate metadata for"
      }],
      handler: "proxy",
      type: "contract"
    })
]

This would allow users to generate TZIP16 metadata for an existing contract:
taq scaffold meta --contract increment.mligo increment.json
When they run that, the metadata plugin would prompt them for:

name (default to filename without extension)
description
version
license

With that information, the task would generate an artifact called increment.json that would look like this (without my inline comments):
{
  "name": "increment",
  "description": "Sample increment contract",
  "version": "0.0.1",
  "license": "GPLv2",

  // Taken from init task
  "authors": ["Michael Weichert<EMAIL_ADDRESS>  "homepage": "https://mweichert.com" ,

  "source": {
    "tools": ["ligo", "taqueria"],

    // Extracted from git origin
    "location": "https://github.com/foo/bar"
  },
  "interfaces": ["TZIP-16"]
}

We can add the following later:

Metadata validation via third-party tools
Implement hooks, so that running "scaffold mligo increment.mligo" also runs "metadata --contract increment.mligo increment.json"


Crashes When loading a Save from pre-installation

Dunno if this is something I just somehow missed in the wiki, but i scoured it and didn't see anything about it. Went through a whole lotta trouble shooting processes to find out why it was crashing when i tried to load my most recent save, I'd get through part of the loading process (ex. when the newscaster is speaking on the tv,) but after a few moments the game would crash. But on starting an entirely new game, it worked fine.
Note: It seems like its only some of the saves, as one of the other older playthroughs i have going also works, but its inconsistent and i can't find out a pattern on why.

Mods may save things into persistent storage in save. My guess is that some mod saved something there at some point and now you miss it, making the save corrupt.
CET by itself does not do this, but its moda may save things. Same may happen with any redscript mod, RED4ext mod, redmod,... Anything that can access relevant script functions.


Malformed API examples

Some of the API examples are malformed - due to incorrect apib syntax.

@valekjo Please be a bit more concrete in issue descriptions, it took us few minutes to figure out

This was done with #405.


../../../mvdan/garble/main.go:337:5: undefined: token.IsExported

go version go1.12.7 darwin/amd64

Read the README:

Obfuscate a Go build. Requires Go 1.13 or later.


'frame' is only available on iOS 12.0 or newer

Building with Xcode 10 leaves this message in GLNotificationBar.swift line 592 :
'frame' is only available on iOS 12.0 or newer.

@wjsimard I found solution to fix this.
Replace below Code
func addSeprator(_ toObject:UIView) -> UIView {
    let frame = toObject.frame
    let seprator = UIView(frame: CGRect(x: 0,y: (frame.height) + 3, width: (APP_DELEGATE.keyWindow?.frame.size.width)! - 20,height: 0.5))
    seprator.backgroundColor = UIColor.gray
    seprator.alpha = 0.6
    return seprator
}

use this code when iOS 12 earlier
let frame = toObject.frame
to
let toObject:UIView = toObject as! UIView
let frame:CGRect? = toObject.frame


tvm_vendor: 0.8.0-1 in 'rolling/distribution.yaml' [bloom]

Increasing version of package(s) in repository tvm_vendor to 0.8.0-1:

upstream repository: https://github.com/autowarefoundation/tvm_vendor.git
release repository: https://github.com/ros2-gbp/tvm_vendor-release.git
distro file: rolling/distribution.yaml
bloom version: 0.10.7
previous version for package: 0.7.3-2

tvm_vendor
* Update TVM version (#7 <https://github.com/autowarefoundation/tvm_vendor/issues/7>)
  This patch is needed to properly run the packages that
  use ML models from the modelzoo.
  Issue-Id: SCM-3720
  Change-Id: I331efb40337ac15ec6b84ed9b9050fa42e49dc0f
* CI: Add Galactic CI
* Contributors: Joshua Whitley, Luca Foschiani

FYI @LucaFos @JWhitleyWork


Network data structures

Currently pysal uses different data structures for storing graph nodes, edges, adjacency list. In this issue we can discuss if we want to move to a single data structure (on the lines of networkx) which can simplify the API significantly. It can also be a possible neat solution to https://github.com/pysal/pysal/issues/609
Updates regarding the same could be recorded in https://github.com/pysal/pysal/wiki/Network-Development
@jlaura

This would also potentially dramatically improve the performance of the Dijkstra algorithm, correct?
Best Regards,
James Gaboardi, MS GISc
Florida State University
Department of Geography
<EMAIL_ADDRESS>
From: Mridul Seth<EMAIL_ADDRESS>Sent: Friday, February 19, 2016 11:55 AM
To: pysal/pysal
Subject: [pysal] Network data structures (#746)
Currently pysal uses different data structures for storing graph nodes, edges, adjacency list. In this issue we can discuss if we want to move to a single data structure (on the lines of networkx) which can simplify the API significantly. It can also be a possible neat solution to #609https://github.com/pysal/pysal/issues/609
Updates regarding the same could be recorded in https://github.com/pysal/pysal/wiki/Network-Development
@jlaurahttps://github.com/jlaura

Reply to this email directly or view it on GitHubhttps://github.com/pysal/pysal/issues/746.

A different algorithm would likely have a larger impact than a different
data structure, but it could.
On Fri, Feb 19, 2016 at 11:01 AM, James Gaboardi<EMAIL_ADDRESS>wrote:

This would also potentially dramatically improve the performance of the
Dijkstra algorithm, correct?
Best Regards,
James Gaboardi, MS GISc
Florida State University
Department of Geography
<EMAIL_ADDRESS>
From: Mridul Seth<EMAIL_ADDRESS>Sent: Friday, February 19, 2016 11:55 AM
To: pysal/pysal
Subject: [pysal] Network data structures (#746)
Currently pysal uses different data structures for storing graph nodes,
edges, adjacency list. In this issue we can discuss if we want to move to a
single data structure (on the lines of networkx) which can simplify the API
significantly. It can also be a possible neat solution to #609<
https://github.com/pysal/pysal/issues/609>
Updates regarding the same could be recorded in
https://github.com/pysal/pysal/wiki/Network-Development
@jlaurahttps://github.com/jlaura

Reply to this email directly or view it on GitHub<
https://github.com/pysal/pysal/issues/746>.
—
Reply to this email directly or view it on GitHub
https://github.com/pysal/pysal/issues/746#issuecomment-186333453.

I started messing around with this. Instead of writing the graph class for scratch, I am using networkx as a hard dependency for the time being . Using the (di)graph class from it and changing the code accordingly while trying to keep the API intact.
I'll put up the code in a couple of days.
@jlaura Thoughts?

@MridulS Updated #655 with a bit of commentary on this.  I looked at networkX and this is an issue of representation.  I could see perhaps using a class that stores multiple networkx graphs.  The current implementation stores multiple different graphs and attempts to keep them in sync.  Perhaps this is too stateful and a bit more onus on the user significantly reduces complexity?

A PR to change the network representation would be welcome.


cargo objcopy looks like passing strange argument to the objcopy command

I am a beginner of rust. When I run cargo objcopy --verbose --release --target=... -- ..., it looks like passing a strange argument to the objcopy command.
The execution log is the following.
# cargo objcopy --verbose --release --target=aarch64-unknown-none  -- --strip-all -O binary target/aarch64-unknown-none/release/kernel8 kernel8.img
"/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo" "build" "--release" "--target" "aarch64-unknown-none" "--message-format=json"
    Finished release [optimized] target(s) in 0.01s
"rust-objcopy" "/workspace/rust-on-bare-metal-raspi3-samples/target/aarch64-unknown-none/release/kernel8" "--strip-all" "-O" "binary" "target/aarch64-unknown-none/release/kernel8" "kernel8.img"
/usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-objcopy: error: too many positional arguments
#

I think "/workspace/rust-on-bare-metal-raspi3-samples/target/aarch64-unknown-none/release/kernel8" is a strange argument.
If more information is required to solve this problem, please tell me because I am not sure what information is important for debugging.

Hi there.
I think your line:
cargo objcopy --verbose --release --target=aarch64-unknown-none  -- --strip-all -O binary target/aarch64-unknown-none/release/kernel8 kernel8.img
should read
cargo objcopy --verbose --release --target=aarch64-unknown-none  -- --strip-all -O binary kernel8.img
cargo-objcopy will automatically pass in the corrrect binary according to your cargo selection, in your case the default binary.

Thank you for your helpful answer.
I have resolved my problem thank to your answer! (I have fixed a given Makefile).
So I close this issue.


Run command implementation

Amazing work! I am going to merge this PR and continue here: https://github.com/evilmartians/lefthook/pull/264. There are some tests that need fixing for windows runner, and goreleaser config that doesn't know how to build the app yet. This is not a problem this PR should solve.
As you see we are refactoring the current codebase step by step in the refactoring branch. When everything is ready we will release the new version of lefthook. If this project is interesting for you and you have time and wish, please come with feature requests or any other questions. It would be great to work on this.
Anyway, thank you for the contribution!

Amazing work! I am going to merge this PR and continue here: https://github.com/evilmartians/lefthook/pull/264. There are some tests that need fixing for windows runner, and goreleaser config that doesn't know how to build the app yet. This is not a problem this PR should solve.
As you see we are refactoring the current codebase step by step in the refactoring branch. When everything is ready we will release the new version of lefthook. If this project is interesting for you and you have time and wish, please come with feature requests or any other questions. It would be great to work on this.
Anyway, thank you for the contribution!

Thanks, it was a fun experience for me :)


Added Process Cloning for specified PID

Firstly, awesome BOF guys, thank you!😁
This PR adds the option to clone the target process before memory dumping, as outlined here.

Thanks a lot! awesome contribution 😄


Douyin User Profile Video List

Hi,
This API in your script is not working, please check it: https://www.iesdouyin.com/aweme/v1/web/aweme/post/?sec_user_id=...
thank you!

Now it's okay, rerun to get the <IP_ADDRESS> update


Deprecated ReflectionType function alert

I often get a list of error popups which prevent me to work fluently.

Is thee a way to get rid of "Function ReflectionType::__toString() is deprecated" warning?

Does this happen when working with PHP files?

Does this happen when working with PHP files?

Yes, it does.

Hi @joantp  do you still experience this?

Yes, I do. Shouldn't I? Anything new?

It looks to be caused by a package, are you able to reproduce this in safe mode?
In particular a package that does PHP analysis, like ide-php, is the likely cause. No core packages do language specific analysis like that.

It looks to be caused by a package, are you able to reproduce this in safe mode?
In particular a package that does PHP analysis, like ide-php, is the likely cause. No core packages do language specific analysis like that.

Yes, you are right. Can not reproduce in safe mode, so it is not an issue of atom's core packages.
But the problem persists in normal mode and I can't guess what is the package causing this annoying problem.

It looks to be caused by a package, are you able to reproduce this in safe mode?
In particular a package that does PHP analysis, like ide-php, is the likely cause. No core packages do language specific analysis like that.

Yes, you are right. Can not reproduce in safe mode, so it is not an issue of atom's core packages.
But the problem persists in normal mode and I can't guess what is the package causing this annoying problem.


Prototype Pollution

HI when I installed node-red-contrib-oled on ...
Raspberry pi with..
node-red 0.20.6
nr dashboard 2.15.5
stretch v9
node -v 10.16.0
I installed via cmd line but same result if install via manage palette.
I get ... found 100 vulnerabilities (12 low, 5 moderate, 83 high)
run npm audit fix to fix them, or npm audit for details
npm audit fix   does not resolve issue
npm audit   reveals that all are attributed to node-red-contrib-oled  see attached file for details
node-red-contrib-oled.txt
Incidentally the oled node & oled works great but from what I read these vulnerabilities need to be fixed in the underlying code.
Please advise thanks.

#23


Documentation does not reflect new test explorer/playwright dropdowns

The below dropdowns are not showing in the readme.

This icon no longer present

Additional questions:
What does show and reuse browser do?
Do you select cancel when you wish to finish a recording?
What is the difference between record new and record from here?

will be live once docs are released


mixed precision

It seems that the package dose not support mixed precision training, since the Embedding layer needs add operating with output and embedding parameters, which dtype are 'float32' and 'float16' leading to a dtype error "TypeError: Input 'y' of 'AddV2' Op has type float16 that does not match type float32 of argument 'x'.".
Is there any plane to fix this?

It is interesting to note that we were able to use mixed-precision training before with TF 1.15 and TF Estimator.  With TF 2.3 and Keras, we are seeing this same error.

Any updates on this?

Any updates on this?


live share crashed during a session

Product and Version [VS/VSCode]:
OS Version [macOS/Windows/Linux]:
Live Share Extension Version:
Target Platform or Language [e.g. Node.js]:
What were you doing when you encountered the desync?
How often have you encountered desyncs?

We would need the logs to investigate further, you can use the Live Share: Export Logs command to get a zip file with logs, then attach to this issue.


Splatting a StaticArray into singly-typed functions

Splatting an Array into a function call isn't possible, because at compile time there's no way to know the size of the array (#1096, #1464). However, a StaticArray has known type and size at compile time, so could presumably be splatted without runtime issues.
Current behaviour
def foo(a : Int32, b : Int32)
  a + b
end

foo *StaticArray[1, 2] # Error: argument to splat must be a tuple, not StaticArray(Int32, 2)

Proposed behaviour
def foo(a : Int32, b : Int32)
  a + b
end

foo *StaticArray[1, 2] # => 3

There is also the issue of mixed argument types:
def foo(a : String, b : Int32)
  a + b
end

foo *StaticArray["test", 2] # Error: StaticArrays can only be splat into functions with a single parameter type

Using a tuple rather than a StaticArray would be the obvious choice in the simplified examples shown above, but in my use case the StaticArray is coming from a library function which can't be changed.
I'd love to hear what people think about this feature - too niche? Or useful syntactic sugar?

What's that library function?

What's that library function?

It's not stdlib, my apologies for being unclear. (If you're curious: HSLuv#rgb_to_hsluv(r, g, b) : StaticArray(Float64, 3))
The library that I'm using is implemented in over twenty programming languages, and every implementation uses a common api (colors are returned as float arrays).

I think that given this use case is extremely rare, I don't think it's worth making the language that much complex

You can convert static array to tuples as follows:
a = StaticArray[2, 4, 6]
pp! a # => StaticArray[2, 4, 6]

def to_t(a : StaticArray(T, N)) forall T, N
  {% begin %}Tuple.new({% for i in (0...N) %}{% if i > 0 %},{% end %} a[{{i}}]{% end %}){% end %}
end

pp! to_t(a) # => {2, 4, 6}

Both good points. After thinking about it for a while longer, I agree that this feature is probably too niche. I was briefly humoring the idea of trying to factor StaticArray out into a subclass of Tuple (the former seems to fundamentally be a special case of the latter), but that sounds like much more trouble than it's worth :p
Closing.


keel 0.197.0 compatibility

replace OrcaExecutionStatus with TaskStatus - without this fix, the plugin doesn't work with <197 keel. this PR assumes that 0.0.10 will be tagged after :D

@nabuskey whenever you get a chance, can you please cut a new release too. thanks!


CNAME

"In the New Resource Record dialog box, make sure that the fields are set to precisely the following values:
Host Name: sip
Type: CNAME
Address: sip
dir.online.lync.com"
The Address should be in one sentence "sipdir.online.lync.com" instead of separately.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: d0937468-6fd2-c83a-ed60-81129a4b766a
Version Independent ID: 010a32f0-45a3-81da-1a6c-864996a86597
Content: Create DNS records for Office 365 using Windows-based DNS
Content Source: Office365-Admin/dns/create-dns-records-using-windows-based-dns.md
Service: o365-administration
GitHub Login: @pebaum
Microsoft Alias: pebaum

This can be closed thanks @AndreaBarr @mypil


Add opportunity to change type of array size

By default binary parses an array in this way. It parses Int (64 bit BE), but there's might be situation when length is 32 bit int (or 16 bit int).
--N--|--Elem 0--|--Elem 1--|....|--Elem N--
 U32 |    T     |  ...     | .. |    T
-----|----------|----------|----|---------

Is there beautiful way to do it?

Yep! CountedBy should cover this use case. In particular, you'll have something like
data MyRecord = MyRecord
  { myArray :: CountedBy Word32 MyType,
  ...
  } deriving (Generic, Binary)

and then use getCounted on the myArray field to access the underlying [MyType].
Although, in hindsight, using [] might be suboptimal, especially if you expect to have more than a few elements in the array. Please let me know if this would be an issue for you — I'd be happy to hack on the library to support other sequential container types!

I feel embarrassed to ask for help, however, for two days I can't understand should or not I use this library in my case.
I write the MS-CFB parser (FAT in the file). The problem is that parser should read parts of data from different sectors. Therefore, reading from file more effective (because of hSeek) rather then from ByteString. Although, there are two cases (reading from file and from ByteString)
Let me show peace of code that parses DIFAT sectors (DIFAT contains information about FAT sectors location) and concatenates them together.
type DIFAT = [Word32]

type SectorGetter m = Word32 -> m BL.ByteString
newtype Config m = Config {secGetter :: SectorGetter m}

getDIFATSector :: Int -> Get (DIFAT, Word32)
getDIFATSector count = do
  values <- getMany getWord32le count
  return (take (length values - 1) values, last values)

getDIFAT :: (Monad m) => Header -> Reader (Config m) (m DIFAT)
getDIFAT header = do
  r <- asks secGetter
  let secSize = _sectorSize header `div` 4
  return $ go r (_firstDifatSectorLoc header) (fromIntegral secSize)
  where
    go :: (Monad m) => SectorGetter m -> Word32 -> Word32 -> m DIFAT
    go sg sec size = do
      l <- sg sec
      let (head, tail) = runGet (getDIFATSector $ fromIntegral size) l -- getDIFATSector :: Int -> Get (DIFAT, Word32)
      case tail of
        0xFFFFFFFE -> return head
        _ -> fmap (head ++) (go sg tail size) -- ineffective

Header contains _firstDifatSectorLoc.
There is function that gets current sector from a file:
getSectorFromFile :: Handle -> Word32 -> Word32 -> IO BL.ByteString
getSectorFromFile hdl secSize secNo = do
  hSeek hdl AbsoluteSeek $ toInteger $ secSize * (secNo + 1)
  BL.hGet hdl (fromIntegral secSize)

In the main it's just curried, thus, we get Word32 -> IO BL.ByteString. Then we can create Config, then call runReader.
I have two questions:

Is this library help to solve the problem?
Is there something wrong with getDIFAT?

I think you are not interested in that, and if it is so then, please, let me know.

Spoiler
I don't want to spend your time, but it's really difficult to find examples of parsing binary data.

~~Otherwise if you don't mind we could discuss on this problem~~

Thanks a lot!


Add instructions for self signed certicate

Create doc with the workaround discuessed on https://github.com/GoogleContainerTools/jib/issues/543#issuecomment-404347465

just adding the default password

What password? Not sure what you mean.

Default password for Java keystore, that is "changeit". I think it should be in document.

Mine was not password protected, which step was that?

To help with the confusion about the password protection of cacerts: Since version 5.2 KeyStore Explorer automatically tries to open cacerts with the default password ("changeit"). It only prompts for a password if this fails.

@chanseokoh @briandealwis changes applied


Empty payload don't raise validation exception

class Product(typesystem.Object):
    properties = {
        'name': typesystem.string(max_length=100),
        'rating': Rating,
        'in_stock': typesystem.Boolean,
        'size': ProductSize,
    }

def create_product(product: Product):
    ...

Considering the example above:

If I send a request with the wrong payload ({} or [] or {key': 'value'}) to create_product, it returns an error saying that the request is missing required params;

If I send a request with an empty payload, no error is raised and the product variable is equal do None in the view.

At the second point, shouldn't it raise an error too?

Yup, it should.

Verified that empty payloads do now result in 400 responses, as of the latest release.


CUDA memory error when batching

Using the batching method suggested in the prediction notebook I am getting a memory error. Is this the correct method? Or is there another way images should be batched?
Example to reproduce:
import torch
import torchvision

print("PyTorch version:", torch.__version__)
print("Torchvision version:", torchvision.__version__)
print("CUDA is available:", torch.cuda.is_available())

from segment_anything import sam_model_registry
import numpy as np

model_checkpoint = '/path/to/sam_vit_b_01ec64.pth'
sam = sam_model_registry["vit_b"](checkpoint=model_checkpoint).to(device='cuda')

images = np.zeros((10, 256, 256, 3), dtype='uint8')

batched_input = []
for i in range(images.shape[0]):
    batched_input.append(
        {
            'image': torch.as_tensor(images[i], device=sam.device).permute(2, 0, 1).contiguous(),
            'original_size': images[i].shape[:2],
        }
    )

batched_output = sam(batched_input, multimask_output=False)

Traceback:
PyTorch version: 1.13.1.post200
Torchvision version: 0.14.1a0+59d9189
CUDA is available: True
Traceback (most recent call last):
  File "/home/user/.config/JetBrains/PyCharmCE2023.1/scratches/20230415_SAM_batched.py", line 25, in <module>
    batched_output = sam(batched_input, multimask_output=False)
  File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "/home/user/git/segment-anything/segment_anything/modeling/sam.py", line 98, in forward
    image_embeddings = self.image_encoder(input_images)
  File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 112, in forward
    x = blk(x)
  File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 174, in forward
    x = self.attn(x)
  File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 234, in forward
    attn = add_decomposed_rel_pos(attn, q, self.rel_pos_h, self.rel_pos_w, (H, W), (H, W))
  File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 358, in add_decomposed_rel_pos
    attn.view(B, q_h, q_w, k_h, k_w) + rel_h[:, :, :, :, None] + rel_w[:, :, :, None, :]
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 7.50 GiB (GPU 0; 10.91 GiB total capacity; 9.14 GiB already allocated; 69.44 MiB free; 9.33 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Process finished with exit code 1

Maybe you need a better GPU device or reduce your batch-size.
torch.utils.data.Dataset is a easier way to make batched dataset.

To be more specific I can run three 256x256x3 images through this batching script but 4+ fails. It seems each individual image is taking up 3GB of gpu ram which seems odd for relatively small images and makes me think I am initializing multiple sessions instead of batching inputs within one session as the prediction example suggests.
Thanks!

How to improve the usage of GPU memory ?  My GPU has 24268MiB , but  less 8000MiB used

name: my-app-install token
id: my-app
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

name: Checkout private repo
uses: actions/checkout@v2
with:
repository: getsentry/my-private-repo
token: ${{ steps.my-app.outputs.token }}

Have you solved this problem yet ？

Hello, I have the same issue. Did you find a solution? Thank you

I have not found a solution here yet.

PyTorch version: 1.13.1.post200
Torchvision version: 0.14.1a0+59d9189
CUDA is available: True
Traceback (most recent call last):
File "/home/user/.config/JetBrains/PyCharmCE2023.1/scratches/20230415_SAM_batched.py", line 25, in
batched_output = sam(batched_input, multimask_output=False)
File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/home/user/git/segment-anything/segment_anything/modeling/sam.py", line 98, in forward
image_embeddings = self.image_encoder(input_images)
File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 112, in forward
x = blk(x)
File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 174, in forward
x = self.attn(x)
File "/home/user/miniconda3/envs/sam/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 234, in forward
attn = add_decomposed_rel_pos(attn, q, self.rel_pos_h, self.rel_pos_w, (H, W), (H, W))
File "/home/user/git/segment-anything/segment_anything/modeling/image_encoder.py", line 358, in add_decomposed_rel_pos
attn.view(B, q_h, q_w, k_h, k_w) + rel_h[:, :, :, :, None] + rel_w[:, :, :, None, :]
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 7.50 GiB (GPU 0; 10.91 GiB total capacity; 9.14 GiB already allocated; 69.44 MiB free; 9.33 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

I have done some reverse engineering,
Change the batch size to reduce it points_per_batch (default is 64).
mask_generator = SamAutomaticMaskGenerator(sam,  points_per_batch=8)

You have to try the different combinations of  dtype (dtype= has multiple combinations, look the code https://github.com/pytorch/pytorch/blob/main/torch/nn/modules/module.py )  Also non_blocking combination
Example: torch.float16, torch.float32, torch.float64, torch.half, torch.cdouble, torch.complex128 ...) :
sam = sam_model_registry[KEY_model_type](checkpoint=sam_checkpoint)
gpu1 = torch.device("cuda:1")
sam.to(gpu1, dtype=torch.half, non_blocking=True)

It also helps to change the max_split_size_mb, also try different combinations.
Example: 512, 256,128....
import os
os.environ['PYTORCH_CUDA_ALLOC_CONF']='max_split_size_mb:512' #'garbage_collection_threshold:0.8,max_split_size_mb:512'

It may also help to clear the cache at startup.
import torch
#https://stackoverflow.com/questions/59129812/how-to-avoid-cuda-out-of-memory-in-pytorch
torch.cuda.empty_cache()
torch.cuda.memory_summary(device=None, abbreviated=False)
import gc
gc.collect()

FINALLY , if nothing works,  if you have a very small GPU (2gb) you have to switch it to CPU. take 3min per image but works
device = "cpu" # "cuda"
sam = sam_model_registry[KEY_model_type](checkpoint=sam_checkpoint)
sam.to(device=device)

Clearing the cache made the most difference for me, but there is still an issue when a processed image has a gorillion+ masks and a high resolution. It's a bit hard sometimes to predict how many masks an image will have. I've seen a wide variety from the three models, where the biggest difference has been about 90 masks between vit_h (207) and vit_l (117) for the same image.

Thanks for the input all.
I found my initial issue is I simply had my list forming outside of the loop and I needed to clear the batch with a given batch size.
Solution:
import torch
import torchvision

print("PyTorch version:", torch.__version__)
print("Torchvision version:", torchvision.__version__)
print("CUDA is available:", torch.cuda.is_available())

from segment_anything import sam_model_registry
import numpy as np

model_checkpoint = '/path/to/sam_vit_b_01ec64.pth'
sam = sam_model_registry["vit_b"](checkpoint=model_checkpoint).to(device='cuda')

images = np.zeros((10, 256, 256, 3), dtype='uint8')

batch_size = 3

batched_input = []
for i in range(images.shape[0]):
    batched_input.append(
        {
            'image': torch.as_tensor(images[i], device=sam.device).permute(2, 0, 1).contiguous(),
            'original_size': images[i].shape[:2],
        }
    )

    if len(batched_input) == batch_size:
        batched_output = sam(batched_input, multimask_output=False)

        batched_input = []
        torch.cuda.empty_cache()

SAM is simply a big model and my batch size was surprisingly low with a 1080TI 11GB.

I tried to run sam_vit_b for training document 1024* pixel images, but it's still OOM with CUDA when the process run to 282 batch , GPU will run on 14.78GB OOM Tesla T4x2 on Kaggle , but in CPU it's work

@jefromson @Leci37 @Dongjie-Cheng Brothers can share the complete batch inference script, thank you!

Even though I set "cpu"  i still have this issue, like there is some other process calling the gpu


New version: VectorizationBase v0.19.15

Registering package: VectorizationBase
Repository: https://github.com/JuliaSIMD/VectorizationBase.jl
Created by: @chriselrod
Version: v0.19.15
Commit: a55b65bbc894e20858777f34938ac410f2c074c4
Git reference: master

block


Add language translation module

Feature description:
Translate a phrase from one language to another.
Wit.ai already has entity called "phrase_to_translate", which does good job of picking phrases up.  I already tried a simple version of this on my own, and it seems to work well.
Any ideas on how to implement it?
Google provides Google translate API, using the same key as Google Maps.
Wit.ai can be easily trained to pick up source/target language and phrase to translate. There's the annoying part of adding languages...
Source language is optional, as Google translate can auto-detect it.
Target language can be optional and be made English by default if not provided.
I'm a little busy this week, but can get this written the following week :)
Thoughts?

Hello Adrian,
It could be nice improvement to have this module.
First implement with optionals as source and Target would be nice to have at first ^^
Then So the issue would be to find a work around for the autodetection of language. When someone wants to translate from specific language to another language that is not English ?
For the implementation , I thought of google too at first when reading your title it is fast and accurate. Still we should have a link to redirect to Google translate if the translation is not correct for the user .

Any updates on this ?
@adrianyi @casdidier

Sorry I took part in a bootcamp for a bit and did not have time to work on this... I realized that Google translate is actually not free, haha, which led me to do some more research. I had to reinstall my OS and lost all progress, so I'll have to start over, sadly.
I'll get back on this in the next couple of weeks!

@adrianyi No issues.
I'd love to work on this too. Do you mind sharing what are you doing so we can collaborate ?

@paawan01 Would love to work together. This week is packed for me, but I should be relatively free starting Sunday night, so I'll dig up what I have so far then :)
A good alternative to Google translate may be Bing translate, which is free up to 2M characters. There's a free Russian one, but it's not very accurate...

Isn't it possible to launch search on Google search : <translate "input text" into English > and get the result by reading the HTML banner that is displayed usually on top on Google links . You see those quick access results pannel


ARTEMIS-4520 JMSContext.acknowledge() doesn't work if last message received is null

This looks good assuming all the current tests still pass

Test-suite looks good. There were a few unrelated failures that all succeeded locally when retried.


Add funcof()

Equivalent to __func__ in C99.

This would be nice to have, but there may be better options for getting the current function name (perhaps through some sort of runtime info module). Additionally, the language has already grown somewhat large, and I'm not sure if adding this feature is worth the additional language complexity. Closing this issue for now.


Link CoreRT class library to WPF(.net core 3.1) App

Hi,
I'm trying to move some of my WPF backend to net core class library to take advantage of CoreRT AOT.
In the samples, I've not seen a way to link the executable(dll in this case) to other .net apps.
Will I link to it as C++ or as C#?
Thanks

You would need to use plain C to communicate with your library. Start with https://github.com/dotnet/corert/tree/master/samples/NativeLibrary and use DllImport from you main app to call into the library.

Thanks, I should close the issue.
Is there a recommended way to link struct between the caller and the C structure?

Thanks, I should close the issue.
Is there a recommended way to link struct between the caller and the C structure?

Common assembly with structs definition.

Here is what i'm having problem with

Class1.cs -> NativeLibrary.dll

   //Struct definition
   //[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    public struct StructTest
    {
        public string str;
        public int integer;
    }

        //Function definition
        [UnmanagedCallersOnly(EntryPoint = "test_str")]
        public static string TestString(StructTest testStr)
        {
            // The marshalling code is typically auto-generated by a custom tool in larger projects.
            try
            {
                // UnmanagedCallersOnly methods only accept primitive arguments. The primitive arguments
                // have to be marshalled manually if necessary.
                //string str = Marshal.PtrToStringAnsi();

                Console.WriteLine(testStr.str);
                Console.WriteLine(testStr.integer.ToString());
            }
            catch
            {
                // Exceptions escaping out of UnmanagedCallersOnly methods are treated as unhandled exceptions.
                // The errors have to be marshalled manually if necessary.
                return "nil";
            }
            return testStr.str;
        }

Here is the console App linked to the native dll
    class Program
    {
        [DllImport("NativeLibrary.dll", EntryPoint = "test_str", CallingConvention = CallingConvention.StdCall, CharSet = CharSet.Unicode)]
        public static extern void TestString(StructTest testStr);

        static void Main(string[] args)
        {
            Console.WriteLine("Hey");
            var result = Add(1, 2);
            WriteLine(result.ToString());
            WriteLine("Hello World!");
            StructTest structTest = new StructTest { integer = 10, str = "solved" };
            TestString(structTest);
        }
    }

The struct cannot have a reference type in it. If you need to send over a string, it needs to be a char* or some other pointer. The string on the CLR side is different from a string on the CoreRT side.

But i'm writing C# on the NativeLibrary part, not C++

Yes, you need to do something along the lines of the following:
On the calling side (CoreCLR):
fixed (char* c = myString)
{
    StructTest tst = new StructTest
    {
        str = c;
    }

    TestString(tst);
}

On the called side (CoreRT):
var newString = new string(tst.str /* str field is char* */);

You cannot just pass a System.String back and forth because one is allocated by the garbage collector on the CoreCLR side and the other on the CoreRT side. Very bad things happen when a GC is trying to operate on a piece of memory it doesn't manage.

Thanks so much for the solution, but before you posted the solution I was able to achieve the same using IntPtr as the parameter type too...
    public struct StructTest
    {
        public string fieldstr;
        public int fieldint;
    }
        [UnmanagedCallersOnly(EntryPoint = "sumstring")]
        public static IntPtr sumstring(IntPtr first, IntPtr second, IntPtr structTest)
        {
            // Parse strings from the passed pointers
            string my1String = Marshal.PtrToStringAnsi(first);
            string my2String = Marshal.PtrToStringAnsi(second);
            StructTest test = Marshal.PtrToStructure<StructTest>(structTest);

            // Concatenate strings
            string sum = my1String + my2String + test.fieldstr + test.fieldint.ToString();

            // Assign pointer of the concatenated string to sumPointer
            IntPtr sumPointer = Marshal.StringToHGlobalAnsi(sum);

            // Return pointer
            return sumPointer;
        }

then calling it from the C# app side like this :
    public struct StructTest
    {
        public string fieldstr;
        public int fieldint;
    }
    class Program
    {
        [DllImport("NativeLibrary.dll", EntryPoint = "sumstring", CallingConvention = CallingConvention.StdCall)]
        public static extern string Concat(string first, string second, StructTest structTest);

        static void Main(string[] args)
        {
            Console.WriteLine(Concat("Hello", " World", new StructTest { fieldint = 10, fieldstr = "Hola" }));
        }
    }


Exe file error

Theirs a error with opening the exe file ( it shows a error ) so please fix it!!

what exactly does the error show?

A library is missing

which exactly??

Dlls

alright, I'll figure that out in a bit

@OakShubs try it now

Alt

R

R

It worked thank you

you're welcome


Add category to autocomplete query

I would like to restrict autocomplete to gene, allele, phenotype, etc
E.g
https://api.monarchinitiative.org/api/search/entity/autocomplete/Bloc1s6&category=allele

We do this already.
For example:
https://api.monarchinitiative.org/api/search/entity/autocomplete/Bloc1s6?&category=gene
gives only results for type gene

doh forgot the '?'. And somehow I didn't spot the category field when I looked at the swagger