Compilation error in generated swift file when protocol have init method. How to use init in protocol?

[x] I have read the CONTRIBUTING.

I have init method in my protocol.   I am getting the below error when sourcery generates the code.
Keyword 'init' cannot be used as an identifier here. If this name is unavoidable, use backticks to escape it
📝 For Example
// sourcery: AutoMockable
protocol DashboardRepository: AnyObject {
    func fetchDashBoard() -> [DashboardItem]
    func updateNotification()
    init(apiclient: APIClient)
}

Sourcery generated the code as below:
public func init(apiclient: APIClient) -> DashboardRepository {
    mocked(apiclient)
  }
.......

📝 What is the Question?
How to generate the mock when protocol have init method?

@leoture can you please help here.

Hello @mahabaleshwarhnr !
init cannot be declared in an extension Mock ... { ... }. #127 will fix that.
You should create an extension by yourself as bellow:
extension  DashboardRepository {
  init(apiclient: APIClient) {
    ...
  }
}


i tryed to start with and without debuggingbut it always open chrome and open http://localhost:8080/ site

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

VS Code Version:
OS Version:

Steps to Reproduce:

I'm new at coding and i wanted to learn it so i put a code i saw in the first tutorial of VSC and pressed ctrl+f5 and without ctrl but it always open chrome in this site http://localhost:8080/


Latest icons for verified publishers and top publishers are not reflected on the publisher details page

When I go to the publisher details page for a verified publisher, none of the extension cards have a verified icon on them. Similarly, extension cards for top publishers show the old icon.

To Reproduce
Go to https://marketplace.visualstudio.com/publishers/Microsoft or https://marketplace.visualstudio.com/publishers/agile-extensions to see that the latest icons are not reflected on the extension cards
Expected behavior
I expect the extension cards to look the same as they do on the search page with the latest icons for verified and top publishers.
Desktop (please complete the following information):

Browser: Edge Beta

Hi @chrisraygill
Thanks for reaching VS Marketplace Team, are you still facing the issues?
Regards,
VS Marketplace Team

Closing the issue since there has been no updates on the information requested. If the issue still persists please feel free to reopen or create a new issue.


Caffeine-based caching parser for the user_agent processor

Description
Adds and uses a Caffeine-based caching parser for the user_agent processor. Also, adds a Gradle version catalog for Caffeine since we now use it in three projects.
Issues Resolved
Resolves #4618
Check List

[x] New functionality includes testing.
[x] New functionality has a documentation issue. Please link to it in this PR.

[x] New functionality has javadoc added

[x] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Looks great! Thanks for catching and addressing the bug. Were you able to verify that with this change the issue in #4618 no longer exists?

Yes, I did verify this. See PR #4620 where I added a quick solution to generate a large volume of requests with user agent strings. You can also see my reproduction steps here: https://github.com/opensearch-project/data-prepper/issues/4618#issuecomment-2163321593
I ran these tests without the changes. I received the errors. Then ran with my changes and saw no errors for user agent.


Extent too short Title underline in README

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
[x] I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferably).
[x] I've written tests to cover the new code and functionality included in this PR.
[x] I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary
Fix rst warning in README. This may be why the pypi homepage for this package is unstyled, so the PKG-INFO should be updated when this is merged.
Test strategy
Confirm warning:

System Message: WARNING/2 (<tt class="docutils">README.rst</tt>, line 95)

Title underline too short.

Replying to messages and creating threads
********************

is no longer present when the README is rendered with rst2html.

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


iOS compilation error: Module "path_provider" not found

Steps to Reproduce
Simply trying to publish my app to ios store. Already available on Play store.
I cannot archive in Xcode, constantly running into issues. Currently have these issues when attempting to archive:

When attempting to run pod install in the ios directory, I continue to get this warning (which according to my research seems to be more of an error):

I tried following everything in this very long thread thread to resolve this issue, but nothing has worked.
I was able to remove another warning by uncommenting line #2 in the Podfile, platform :ios, '9.0'.
I have tried closing Xcode while making changes, and have tried restarting my computer.
I can flutter run and the app will work correctly on my iPhone when it is connected to my macbook.
Other threads from which I've tried everything:

https://github.com/flutter/flutter/issues/42974
https://github.com/flutter/flutter/issues/20685
https://github.com/flutter/flutter/issues/48103
https://github.com/X-Wei/flutter_catalog/issues/26
https://github.com/flutter/flutter/issues/28870

Expected results:
I can successfully archive in Xcode.
Actual results:
Flutter doctor seems to indicate everything is fine, but I continue to get this errors when trying to archive.
AdministorsMBP4:mem_plus_plus matt$ flutter doctor --verbose
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.15.3 19D76, locale en-US)
    • Flutter version 1.12.13+hotfix.5 at /Users/matt/development/flutter
    • Framework revision 27321ebbad (9 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
    • Android SDK at /Users/matt/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.1, Build version 11A1027
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.4)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 37.1.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] IntelliJ IDEA Community Edition (version 2019.2.4)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

[✓] Connected device (1 available)
    • Takkeezi’s iPhone • {redacted} • ios • iOS 12.4.4

Can you confirm you have Runner.xcworkspace open in Xcode and not Runner.xcodeproj?

Yes, definitely Runner.xcworkspace.

I seem to be lacking Podfiles maybe? (based on a comment in Stackoverflow)

This is what my project looks like that uses path_provider.

Something got messed up, I'd try a fresh project that as the same dependencies just to figure out if you are having problems with Cocoapods on your machine for some reason or if something get messed up in your tree.

The pod warning is just a warning.

I can flutter run and the app will work correctly on my iPhone when it is connected to my macbook.

That's unexpected if you are missing a pod.  It should fail compiling any which way you run it...

I think we need a reproduction case to investigate further.  Can you attach or link to a project that reproduces?

I'm facing the same issue.

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


Issue with Part attachment upload

Filename is not being observed properly, random character string appended to the end of the filename

Fixed by https://github.com/inventree/InvenTree/pull/218


Support covariant cases with T.class_of and simple types in the runtime checker

Added a subtype_of_single? check for when other is a simple type which the class-of type is an instance of.
Motivation

The following code snippet is a valid and covariant way to override a method by returning a subtype of the super method. Moreover, the static checker flags no errors on this code.
# typed: true
require "sorbet-runtime"

class Base
  extend T::Sig

  sig { returns(Module) }
  def foo
    Module.new
  end
end

class Sub < Base
  extend T::Sig

  sig { override.returns(T.class_of(String)) }
  def foo
    String
  end
end

Sub.new.foo

The runtime checker, though, is not happy and fails with the following error message:
signature_validation.rb:204:in `validate_override_types': Incompatible return type in signature for override of method `foo`: (RuntimeError)
* Base: `Module` (in Base at foo.rb:8)
* Override: `T.class_of(String)` (in Sub at foo.rb:18)
(The types must be covariant.)

T.class_of(String) is the type that String is an instance of, and because String.is_a?(Module), String is also an instance of Module as well. Thus, this check should be passing in the runtime checker too.
Test plan

See included automated tests.

We have a policy of testing changes to Sorbet against Stripe's codebase before
merging them. I've kicked off a test run for the current PR.  When the build
finishes, I'll share with you whether or how it failed. Thanks!
Stripe employees can see the build results here:
→ https://go/builds/bui_L0VWB1f6f3BC2N
→ https://go/builds/bui_L0VWKyJJHItSw4

Papertrail: Runtime test at https://go/builds/bui_L0ViZlfx8H2hE3


Moved mypy settings to pyproject.toml

MyPy allows setting to be in the pyproject.toml file starting with v0.900 so moving them there and removing the mypy.ini file.

Codecov Report

Merging #124 (9851a78) into main (6405966) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #124   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines          184       185    +1
=========================================
+ Hits           184       185    +1

Impacted Files
Coverage Δ

sas7bdat_converter/__init__.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


Add differential drive and update docs.

Creates an abstraction of mixers over actuators to support differential drive vehicles (untested).
Moves pilot and session control into the web server.
Adds web interface to switch pilots
Adds web interface to view sessions and delete photos.
Fixes joystick so full throttle is possible at sharp angles.
Moves most documentation to a google doc
Rename demos folder to scripts
Add line detection implementation of CompoundEye using opencv

Issues
fixes #27 #23 #32 #21 #20 #19 #1

Session view.

Pilot Switching in vehicle monitor


Mapped Tasks not showing cache status correctly.

https://github.com/flyteorg/flyteconsole/issues/644
Two issues
(1) It renders cache status incorrectly because it depended on the index of the logs instead of the id. While running, the logs are not in the original order (they are in order of queued/success instead of original order). So need to find correct cache status based on id
(2) the useStyles/hooks should not be used after component is rendered. It broke the app when the execution status is updated. I managed to place it before any render
Type

[x] Bug Fix
[ ] Feature
[ ] Plugin

Are all requirements met?

[ ] Code completed
[ ] Smoke tested
[ ] Unit tests added
[ ] Code documentation added
[ ] Any pending items have an associated Issue

Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
fixes https://github.com/flyteorg/flyte/issues/644

Did you link the correct issue?

Did you link the correct issue?

Yes. This is for the frontend part.


Compiler errors when it finds nothing to do?

I tried to set up a loop compiling all the dependencies of the thing I was working on.

gem compile addressable-2.5.2.gem
ERROR:  While executing gem ... (Gem::Compiler::CompilerError)
There are no extensions to build on this gem file.
Unpacking gem: 'addressable-2.5.2' in temporary directory...

Hello @bimargulies and welcome!
gem-compiler will try to compile the gem, when supplied with a gem that has no extensions, it fail with the above error (it will also fail if the supplied gem is one already compiled.
Do you suggest that instead a noop (no operation) note be displayed instead of an error?
Cheers.

How about distinct exit statuses:
0 for compiled and wrote output
1 for nothing wrong and nothing to do
2 for something actually went wrong
?
On Fri, Feb 16, 2018 at 9:17 AM Luis Lavena<EMAIL_ADDRESS>wrote:

Hello @bimargulies https://github.com/bimargulies and welcome!
gem-compiler will try to compile the gem, when supplied with a gem that
has no extensions, it fail with the above error (it will also fail if the
supplied gem is one already compiled.
Do you suggest that instead a noop (no operation) note be displayed
instead of an error?
Cheers.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/luislavena/gem-compiler/issues/38#issuecomment-366299580,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARP0mDR7TGOqswJUa1KFeA_3R6bwzxdks5tVbg5gaJpZM4SInDe
.

Hello, apologies for the delay getting back to you.
Not sure that I follow your suggestion.
From what I understood from your original report was that compiling (in a loop) triggers and error when there is nothing to compile, which I assume is a problem.
But your current suggestion still suggest return an error.
I'm not precisely sure that we can control the exit code of an specific exception triggered, except doing an unclean exit in the code.
Is that what you're suggesting?

Hello @bimargulies, just merged a change to this. See #47 for details.
Cheers.


Pattern::predict_match_dfa() causes assertion errors on MVSC++

When using the current release version 1.5.5, my program regenerates debug assertion errors when building under Visual C++ (have not tested other compilers/platforms).
The issue is coming from isprint() which is used inside of this block of code below.
    for (Index i = 0; i < Const::HASH; ++i)
    {
      if (pmh_[i] != 0xFF)
      {
        if (isprint(i))
          DBGLOGN("pmh['%c'] = %2x\n", i, pmh_[i]);
        else
          DBGLOGN("pmh[%3d] = %2x\n", i, pmh_[i]);
      }
    }
    for (Index i = 0; i < Const::HASH; ++i)
    {
      if (pma_[i] != 0xFF)
      {
        if (isprint(i))
          DBGLOGN("pma['%c'] = %2x\n", i, pma_[i]);
        else
          DBGLOGN("pma[%3d] = %2x\n", i, pma_[i]);
      }
    }

The _chvalidator() function which I assume is called at some point inside of isprint() includes the following line:  _ASSERTE(c >= -1 && c <= 255);.
I don't think isprint(i) was intended, since Const::HASH is 4096 and the loops would go over 255 regardless. I tried isprint(pmh_[i]) and isprint(pma_[i]) which does get rid of errors.

Thanks for the feedback. Those calls should be isprint(pmh_[I]) and isprint(pma_[I]) as you point out. The problem happens when you're debugging the DFA construction, but not otherwise fortunately.
To be more precise, this part of the code constructs hash-based match predictors to speed up find by searching the input before a DFA match is attempted. The scan operation used in scanners doesn't use or need this feature.
I have experimented with several ways to speed up searching, by creating a set of tests to evaluate Boyer-Moore, Aho-Corasick, Bitap, and hashing-based algorithms. BM and AH are slow, but BM does beat memchr in some cases which is evaluated with a threshold function that picks memchr or BM. If memchr is picked, it uses the least frequently used character to search to speed this up further.

Ah I see, well thankfully it isn't a major issue and the fix is simple so I'll leave it at that.
Thank you.

This problem will be fixed in the upcoming release as this issue shouldn't happen of course.

Version 1.5.6 is available with the fix.


Add camera frustum display and DEM painter

Desired behavior
Implement a way to display the camera frustum and also paint the DEM terrain where the camera is facing.
This is useful for simulation of aerial vehicles with downward facing cameras or other directional sensors.
Alternatives considered

Switch simulators to Cesium or another tool that supports it

Implementation suggestion

Add a wireframe to view the frustum of the camera
Add ability to shade the ground where the camera is pointing

Examples

https://webglfundamentals.org/webgl/lessons/webgl-visualizing-the-camera.html
https://answers.ros.org/question/410027/drawing-camera-frustum-in-rviz-using-tf-and-visualization-marker/
https://gis.stackexchange.com/questions/330787/drawing-camera-lines-until-frustum-rectangle-using-cesium
https://github.com/goodrobots/MAVCesium/issues/13
https://canberrauav.github.io/cuav/build/html/index.html

Additional context

Similar to https://github.com/gazebosim/gz-sensors/issues/427

From a brief discussion with @iche033, it shouldn't be too hard to render a frustum for the camera, though it would be more involved to render camera images in a frame at the end of the frustum as was done in gazebo-classic

more from @iche033:

we could enable camera visualization by adding a gui plugin similar to the visualize_lidar plugin
we would also need a gz::rendering::CameraVisual object
the gui plugin would get the frustum from the camera sensor and create the gz::rendering::CameraVisual object

related: a feature request for camera image visualization https://github.com/gazebosim/gz-sensors/issues/427

Here's a nice video from MAVCesium, which is open source.
https://youtu.be/LdBDePADmc0?si=b57zfOnXljsC_fuP&t=68


Camera

A camera on space
Basic fields

[ ] Point location
[ ] Point focus
[ ] Vetor Vup
[ ] three orthonormal vectors
[ ] distance location <-> focus
[ ] int Vertical Resolution
[ ] int Horizontal Resolution

Basic methods

Empty at the moment...

Vou seguir com essa


Recalculate heights on event

Is there a way I can get scrollify to recalculate section heights every time an event happens. I am using a details-summary pair and want the scroll to work regardless of whether the summary is open or not

Call $.scrollify.update()

Thanks


Cleanup GKE bash logging

When the e2e tests are calling bash, failures don't give traces of what function is being called (example). This cleans up the existing logging to make it consistent and adds a little gke tag for quick parsing. This should make debugging failures easier.
(I've previously fixed the wrong bash because it wasn't clear exactly what was going wrong.)

@k8s-bot test this [testing build queue, sorry for the noise]


Add scroll.blue/stats

Adds scroll.blue/stats to the stats section

this is just https://bcounter.nat.vg/ but more minimal i dont see the point in more sites with a user count, especially one that doesnt introduce anything new


Added All Classrooms option in Users View

Added All Classrooms option in the Users View. The Select Classroom had no option to reset the selected option.

Reduced code redundancy.

Reduced window event listeners (on localized).

Oh you're right.
Thanks.


Document consensus rules from Zcash spec: 7.6 Block Header Encoding and Consensus

For each consensus rule:

check that the rule is implemented in Zebra
make sure the latest version of the rule is quoted in the docs for the code that implements it
make sure the code implements the latest version of the rule

Consensus rule
https://zips.z.cash/protocol/protocol.pdf#blockheader

Implementation

Implemented in:

#477

#591 (PR: #607)

@mpguerra @oxarbitrage there are a lot of consensus rules in this ticket, did you want to split it?
It might help to do this split:

merkle tree root (not in the spec?) and block data root (hashLightClientRoot/hashBlockCommitments)
everything else

Yes i divided the ticket. This one is now for "everything else" and https://github.com/ZcashFoundation/zebra/issues/3297 is for the root stuff. I changed the screenshot of the spec in this ticket to reflect this.


How to customize multiple TLS versions？

Hello everyone, I want the server to support TLS 1.2, TLS 1.3 at the same time, which API should I use, or what method should I use to make the service support multiple versions of TLS at the same time?
I didn't find any workaround from the example.

Could you enable Rustls tls12 and see if that solves your problem?
Maybe we should consider enabling this by default as well (rustls does it) with tls-rustls.

Could you enable Rustls tls12 and see if that solves your problem?您可以启用Rustls tls12看看是否能解决您的问题？
~Maybe we should consider enabling this by default as well (rustls does it) with tls-rustls.也许我们应该考虑使用tls-rustls默认启用此功能（ rustls就是这样做的）。~ EDIT: Indeed, #130 addresses this.编辑：确实， #130 解决这个问题。
Thank you very much for your answer, I'm going to go and look into your suggestion


BibDocFile: fix troubles with text file type detection

Originally on 2013-11-08
On new SLC6 worker nodes, we have a new problem:
Traceback (most recent call last):
  File "/usr/lib64/python2.6/unittest.py", line 278, in run
    testMethod()
  File "/opt/invenio/lib/python/invenio/bibdocfile_regression_tests.py", line 157, in test_guess_format_from_url_local_gpl_license
    self.assertEqual(guess_format_from_url(local_path), '.txt')
  File "/usr/lib64/python2.6/unittest.py", line 349, in failUnlessEqual
    (msg or '%r != %r' % (first, second))
AssertionError: '.el' != '.txt'

How to reproduce:
$ sudo -u apache nosetests invenio.bibdocfile_regression_tests:BibDocFileGuessFormat.test_guess_format_from_url_local_gpl_license
F
======================================================================
FAIL: test_guess_format_from_url_local_gpl_license (invenio.bibdocfile_regression_tests.BibDocFileGuessFormat)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/invenio/bibdocfile_regression_tests.py", line 157, in test_guess_format_from_url_local_gpl_license
    self.assertEqual(guess_format_from_url(local_path), '.txt')
AssertionError: '.el' != '.txt'

----------------------------------------------------------------------
Ran 1 test in 0.004s

FAILED (failures=1)
Exception TypeError: "'NoneType' object is not callable" in <bound method Magic.__del__ of <magic.Magic instance at 0x36ab3b0>> ignored

Apparently magic things the license text file used in this test case is an Emacs Lisp file...

Note: this is known to happen for v1.0.x and v1.1.x on CentOS6.  The CFG_BIBDOCFILE_PREFERRED_MIMETYPES_MAPPING was introduced in v1.2.0.


polish FeignLoadBalancer, remove unused import statement

Codecov Report

Merging #1906 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #1906      +/-   ##
=========================================
- Coverage   75.43%   75.4%   -0.04%
=========================================
  Files         209     209
  Lines        6343    6343
  Branches      794     794
=========================================
- Hits         4785    4783       -2
- Misses       1219    1221       +2
  Partials      339     339

Impacted Files
Coverage Δ

.../cloud/netflix/feign/ribbon/FeignLoadBalancer.java
67.79% <ø> (ø)
:arrow_up:

...a/server/EurekaServerInitializerConfiguration.java
72.41% <0%> (-6.9%)
:arrow_down:

Continue to review full report at Codecov.

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


Fine tuning on mps

I am trying to fine-tune the almanach/camembert-bio-gliner-v0.1 model (but at this point I also tried to do it with the model in the example )
I want to change the device used to mps to use my M2 chip for fine-tuning. I use torch version 2.3.1 and python 3.11.8. I changed these steps of the original code:
device = torch.device('cuda:0') if torch.cuda.is_available() else torch.device('mps')
model.to(device)
print(f"done on {device}")
num_steps = 500
batch_size = 8
data_size = len(train_dataset)
num_batches = data_size // batch_size
num_epochs = max(1, num_steps // num_batches)
print(f"Model device before Trainer: {next(model.parameters()).device}")
output_dir="models",
learning_rate=5e-6,
weight_decay=0.01,
others_lr=1e-5,
others_weight_decay=0.01,
lr_scheduler_type="linear", #cosine
warmup_ratio=0.1,
per_device_train_batch_size=batch_size,
per_device_eval_batch_size=batch_size,
num_train_epochs=num_epochs,
eval_strategy="steps",
save_steps = 100,
save_total_limit=10,
dataloader_num_workers = 0,
#use_cpu = False,
report_to="none",
)

print(f"Model device after TrainerArguments initialization: {next(model.parameters()).device}")
trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=test_dataset,
tokenizer=model.data_processor.transformer_tokenizer,
data_collator=data_collator,
)
print(f"Model device after Trainer initialization: {next(model.parameters()).device}")
trainer.train()
And here is the final print :
**Model device before Trainer: mps:0
Model device after TrainerArguments initialization: mps:0
0%|          | 0/2209 [02:40<?, ?it/s]
Model device after Trainer initialization: cpu
0%|          | 0/2209 [00:00<?, ?it/s]
Skipping iteration due to error: Placeholder storage has not been allocated on MPS device!**
And the error :
ValueError                                Traceback (most recent call last)
Cell In[21], line 44
33 trainer = Trainer(
34     model=model,
35     args=training_args,
(...)
39     data_collator=data_collator,
40 )
42 print(f"Model device after Trainer initialization: {next(model.parameters()).device}")
---> 44 trainer.train()
File ~/Documents/GitHub/GLiner-TransbronchialBiopsy/venv/lib/python3.11/site-packages/transformers/trainer.py:1932, in Trainer.train(self, resume_from_checkpoint, trial, ignore_keys_for_eval, **kwargs)
1930         hf_hub_utils.enable_progress_bars()
1931 else:
-> 1932     return inner_training_loop(
1933         args=args,
1934         resume_from_checkpoint=resume_from_checkpoint,
1935         trial=trial,
1936         ignore_keys_for_eval=ignore_keys_for_eval,
1937     )
File ~/Documents/GitHub/GLiner-TransbronchialBiopsy/venv/lib/python3.11/site-packages/transformers/trainer.py:2279, in Trainer._inner_training_loop(self, batch_size, args, resume_from_checkpoint, trial, ignore_keys_for_eval)
2277 else:
2278     if tr_loss.device != tr_loss_step.device:
...
2281         )
2282     tr_loss += tr_loss_step
2284 self.current_flos += float(self.floating_point_ops(inputs))
ValueError: Calculated loss must be on the original device: cpu but device in use is mps:0
I can't seem to pinpoint the origin of the problem, after trying with the different parameters of the TrainingArguments (no_cuda, use_mps_device=True, etc...)

How did you construct train_dataset and test_dataset? Do you have all the necessary pieces i.e.
GLiNERDataset(
        data_gliner,
        model_config,
        tokenizer,
        words_splitter,
        data_processor,
    )

Also I didn't need to use model.to("mps") for training on GPU to work. I haven't finetuned that specific model, but finetuning "knowledgator/gliner-multitask-large-v0.5" works for me.

Here is what I did for train and test data :
train_path = "data.json"
with open(train_path, "r") as f:
data = json.load(f)
print('Dataset size:', len(data))
random.shuffle(data)
print('Dataset is shuffled...')
train_dataset = data[:int(len(data)*0.9)]
test_dataset = data[int(len(data)*0.9):]
print('Dataset is splitted...')
and
data_collator = DataCollator(model.config, data_processor=model.data_processor, prepare_labels=True)

@sarrabenyahia I followed the code for train.py here, which says to case the data to GLiNERDataset .

Thank you for your help. I tried with the code you followed. I changed only this line :
device = torch.device('cuda:0') if torch.cuda.is_available() else torch.device('cpu')
by
device = torch.device('cuda:0') if torch.cuda.is_available() else torch.device('mps')
I still get the same error :
venv) sarrabenyahia@MacBook-Air-de-Sarra demo % python train_demo.py --config ./config.yaml
Dataset size: 19635
Dataset is shuffled...
Dataset is splitted...
Collecting all entities...
100%|████████████████████████████████████████████████████████████████████████████████████| 17671/17671 [00:00<00:00, 419869.97it/s]
Total number of entity classes:  5606
Collecting all entities...
100%|██████████████████████████████████████████████████████████████████████████████████████| 1964/1964 [00:00<00:00, 617234.61it/s]
Total number of entity classes:  1357
Some weights of CamembertModel were not initialized from the model checkpoint at almanach/camembert-bio-base and are newly initialized: ['roberta.pooler.dense.bias', 'roberta.pooler.dense.weight']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
/Users/sarrabenyahia/Documents/GitHub/GLiner-TransbronchialBiopsy/venv/lib/python3.11/site-packages/transformers/training_args.py:1494: FutureWarning: evaluation_strategy is deprecated and will be removed in version 4.46 of 🤗 Transformers. Use eval_strategy instead
warnings.warn(
max_steps is given, it will override any value given in num_train_epochs
0%|                                                                                | 0/30000 [00:00<?, ?it/s]Skipping iteration due to error: Placeholder storage has not been allocated on MPS device!
Traceback (most recent call last):
File "/Users/sarrabenyahia/Documents/GitHub/GLiner-TransbronchialBiopsy/src/finetuning/demo/train_demo.py", line 97, in
trainer.train()
File "/Users/sarrabenyahia/Documents/GitHub/GLiner-TransbronchialBiopsy/venv/lib/python3.11/site-packages/transformers/trainer.py", line 1932, in train
return inner_training_loop(
^^^^^^^^^^^^^^^^^^^^
File "/Users/sarrabenyahia/Documents/GitHub/GLiner-TransbronchialBiopsy/venv/lib/python3.11/site-packages/transformers/trainer.py", line 2279, in _inner_training_loop
raise ValueError(
ValueError: Calculated loss must be on the original device: cpu but device in use is mps:0
0%|          | 0/30000 [00:54<?, ?it/s]

@sarrabenyahia can you remove this line:
device = torch.device('cuda:0') if torch.cuda.is_available() else torch.device('mps')
I found that setting the device was unnecessary.

tried it just now, still gives me same error
ValueError: Calculated loss must be on the original device: cpu but device in use is mps:0

@sarrabenyahia I just ran into this issue on transformers==4.42. I had to downgrade to 4.41 to get this working on MPS.

Thank you! It works when downgrading the package.


Build variables implementation

Hi Tim,
I implemented CRUD operation for build variables, could you add to your project?
Viz http://docs.gitlab.com/ce/api/build_variables.html

@zakyvit looks good! Could you resolve merge conflicts so I can merge?

I resolved conflicts.


B-20107: Refactor Backup Info Panel

Agility ticket
Summary
Part of removing redux-form and replacing it with formik. This component was not being used so I removed it. ALso removed some code that was not being referenced.

Warnings

:warning:

Files located in legacy directories (src/shared or src/scenes) have
been edited. Are you sure you don’t want to also relocate them to the new file structure?
View the frontend file org ADR for more information

:warning:
This PR does not include changes to unit tests, even though it affects app code.

  Generated by :no_entry_sign: dangerJS against 0782a46c133fd575344258b6f509e6ad52906ad9


Folding should only be expanded by double-clicking the end

Folding should only be expanded by double-clicking the end, 😭 I often expand it when I click inadvertently

@larryw3i This UI is controlled by VS Code--feel free to file this issue against it.


Make running a local dev environment quicker

After setting up a new dev environment for the API server project
I have found some better ways of doing things in a local dev
environment using docker-compose.

The docker-compose up command now installed python dev
dependencies before running the server
The npm install command in the gulp container now shares
a .npm cache with the host
PIP now shares a PIP_DOWNLOAD_CACHE with the host so it
doesn't need to download the same dependencies every
time

:+1:


Traverse layout to extract stylesheet ids

This PR adds functions to parse traverse layout and prepare list of FEAAS stylesheets to be loaded. FEAAS extension in pages allows applying themes to SXA and FEAAS elements. These themes require stylesheet to be loaded. The functions find out class names on components in the form of -library--* and parses the ids out.
Description

reduceLayout - a new general purpose reducer function that walks through the layout with call signature similar to Array#reduce
getFEAASLibraryIds - function that returns list of FEAAS library ids used in the layout
getFEAASLibraryStylesheetURL - generates url to stylesheet by url ID

Testing Details

Tests are not done yet

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

@ambrauer This is initial version of the functions that help with loading stylesheets. It adds one general purpose function to traverse tree as well (loosely based on similar function in personalize module). Tests TBD.

@Inviz Close PR, since work is done in different PR and merged


How to show html page

I have a string contain html tag with css, i want to show it ,what use Widget show?

I think https://github.com/dart-flitter/flutter_webview_plugin is the way to go.
It seems it currently only supports fullscreen

Dupe of https://github.com/flutter/flutter/issues/730


migrate Go scopes statement, comment, string, and textFragment

This adds statement scopes for block and expression statement.
Fixes #1592
Co-authored-by: Pokey Rule<EMAIL_ADDRESS>Checklist

[x] I have added tests
[/] I have updated the docs and cheatsheet
[/] I have not broken the cheatsheet

Decided to do scope migrations very incrementally.
The scope visualizer is AMAZING for this.

this should be pretty straightforward, but one thing to look out for while reviewing, is whether the block statement should be included. It is a statement, strictly speaking, but it only contains other statements. I don't know whether this will be expected to users, or even helpful. There is a test for it, so you can look at what the behavior is. It might make more sense to remove it. Input requested.

I have a new test. Yes. I have not broken the existing test? No comment.

I need to learn about how item is implemented before I can make more progress here. Please hold. :)

Also, item is going to be hard fwiw. Not sure I'd block on that one

I’m making steady progress, including on item.

Item is often best left to the generic item scope handler. If you just remove collectionItem from the definitions, it should fall back to that. If that doesn't work well in certain circumstances, then you can define it using scope queries where appropriate, but remember that the removal range should include a comma, and that comma may be before or after the item, or not exist at all, depending on the item and the list

Item is often best left to the generic item scope handler. If you just remove collectionItem from the definitions, it should fall back to that.

With no collectionItem in either the legacy or the new style definitions, items doesn't work. it is something about the partial migration, or about missing .domain or .iteration annotations.
I'll keep playing around with it for a little bit, and then maybe we can discuss some details over voice/video.

A bit of experimentation suggests leading/trailing for key/value/item is currently not working with Go either. :)

Ok, I've made some progress. I'm down to three failing tests. One of them is mysterious--I don't know how my changes could have caused it to fail; it is an entirely unrelated part of the code. The two comprehensible failures are going from a key to its associated value and vice versa. Also, leading and trailing do not work at all, although that is existing behavior and there are no tests .
The code as written is mildly horrifying. There's a lot of duplication and complication.
I secretly hope for a more elegant way. But if not, that's okay.
The next step here is probably going to involve non-trivial discussion and teaching. Let's both set this down and not look at it until we do so together over voice.
Thanks in advance for all your help with this.  It has been involved and I know I'veasked a lot.

Hard to call this ready for review, but the tests all pass!
Let's discuss leading and tailing over voice. For reals this time.
And then I'll rebase my mess away. :)

https://github.com/cursorless-dev/cursorless/assets/67496/2359a03f-f224-4cf0-8755-2c92abfc96d4

Don't know why the pre-commit is failing. If I run locally:
find packages/cursorless-vscode-e2e/src/suite -name "*.yml" | xargs pnpm transform-recorded-tests

I get no changes. 🤷🏽

When you mean "item doesn't work", you mean it doesn't work with scope visualizer? That's because it's still legacy impl. It should still function as a scope type. I would be tempted to use it rather than defining your own. For example, I don't think your "chuck item" is working, unless I've missed something
Re CI, I can fix. It has to do with the way pre-commit is splitting up args

Also, it looks like you're treating the condition of an if statement as a statement?

Also, it looks like you're treating the condition of an if statement as a statement?

Go if statements can contain simple statements. Useful for reducing scope of variables.

Re CI, I can fix.

I'd prefer to learn to fish, if that's OK.

When you mean "item doesn't work", you mean it doesn't work with scope visualizer? That's because it's still legacy impl. It should still function as a scope type. I would be tempted to use it rather than defining your own. For example, I don't think your "chuck item" is working, unless I've missed something

I removed every reference to collectionItem from go.scm, and items behave...incorrectly. I didn't delete anything related to items from go.ts. So I'm not quite sure how to proceed here.
With this PR as written, items work now in the sense that they get correct ranges, but yeah, they have no delimiter support, so chuck item doesn't clean up commas. key and value also lack delimiter support. And I'm not convinced iteration is working exactly as intended.
None of this is urgent. Let's look together Sunday.

DO NOT REVIEW
pushing code to have it available for discussion only

closing this mess in favor of #1685, which is much smaller in scope.
once that and a few other outstanding pull requests of mine are merged, I will revive the relevant code from this and start new smaller pull requests.


Update marker file name

Update Temurin marker file to be the required notice file. This will ensure that the required notice is in place as part of each build process.
After merging the Temurin.md will be removed from the source repos

I believe that all the new marker files are in place, as per https://github.com/adoptium/adoptium/issues/15, so it is time to switch to the check for these new files.

Looks like my ECA check is failing incorrectly on this repo. I have raised a Bugzilla request with EclipseFdn to get it resolved.

The failing ECA bot check can be ignored in this case, as per Eclipse Foundation approval here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=573893#c5


[1.19] Infinity tools resetting upon actions in smithing table

Industrial Foregoing Version:
industrial-foregoing-1.19.2-<IP_ADDRESS>-2
Titanium Version:
titanium-1.19.2-3.7.0-23
https://user-images.githubusercontent.com/84477180/205458574-c3a9c4e5-0c45-4406-bda1-7d74db0ba974.mp4
dont mind how janky my video is,i had to trim down the size and i kinda overdid it with handbrake.
i reforge it to be an apotheosis item with slots so i have the easiest way to use a smithing table on it,applying a gem. when i apply the gem,the hammer fully resets back to as if it was just crafted.

here i got a better video
https://user-images.githubusercontent.com/84477180/205465019-5671b067-17d6-4708-97cc-82501cf56738.mp4

silly me accidently closing

I'm not really sure if thats IF fault?

Yeah,i sent it in both IF and apoth github just incase,apoth is https://github.com/Shadows-of-Fire/Apotheosis/issues/733

I sent the issue to Apotheosis but they claim it's IF's issue, but this is definitely annoying

I've also recently run into this issue while playing ATM8. I'd be interested to see if there is some kind of fix for this.
Thank you all again for your hard work. Always enjoyed IF

Is there any update to this issue? Encountered it on an ATM9 server

Unfortunately there is not and most likely never will be unless the infinity tools get redesigned. The two mods simply blame it on eachother.


Create color-picker.site.md

Looks good! Could you just remove the reference of the KB in the size parameter though? We only need the numbers - thanks!

done, please check, thanks :)


Revert "[connectivity_platform_interface] Add ConnectivityResult.unknown."

Reverts flutter/plugins#2560

(This might need to be rolled back to "1.0.3+1" if we want to merge this fully green, even after "2.0.0" is removed from pub.dev)

2.0.0 should now be removed from pub.dev

This change will always have a red pre-submit, since the version script checks against master and not what's published in pub.dev. Post-submit, the repo should go green again.

OK, sounds good.

Merging on red, since most of the failures are related to versioning, which is what we're trying to straighten out here.
Running version check for changed packages
packages/connectivity/connectivity_platform_interface/pubspec.yaml incorrectly updated version.
HEAD: 1.0.3, master: 2.0.0.
Allowed versions: {3.0.0: NextVersionType.BREAKING_MAJOR, 2.1.0: NextVersionType.MINOR, 2.0.1: NextVersionType.PATCH}


Resolve #16, add box-shadow to diagonal and circle-component to make …

…Xs and Os glow

Thanks Kyle!
Although this is a private project of mine, so I'm writing these issues as part of my do-lists in order to learn how to solve them myself.
Thanks again @KyleKnolleLynch !


Can't access XMLHttpRequest due to CORS policy when content API call fails.

Issue Summary
When call to content API fails (e.g, bad key, bad host name), response does not include an Access-Control-Allow-Origin header.  When it succeeds, response does indeed have this header.
Consequence is that error object returned to caller always has HTTP status 0 making it impossible to show user actionable error messages ("bad server URL" (404), "invalid API key" (401), "Internal server error" (5xx).
WGET and interactive browser do display an error response (JSON object), so this may be an app coding bug.  I'd appreciate gentle guidance if so.
To Reproduce

Invoke content API at public demo server, with deliberately incorrect key.

const api = new GhostContentAPI({
  url: 'https://demo.ghost.io',
  key: '22444f78447824223cefc4806f',  // last digit replaced by F -- expect 401 error
  version: 'v2'
});

this.busy = true;

try {
  const ar = await api.tags.browse();
  this.result = jsonFormat(ar, { type: "space" });
} catch (error) {
   this.error = `${error} invoking tags.`;
} finally {
   this.busy = false;
}

Try to display a reasonable error message.

Expect:
error object thrown on failure should include same HTTP status logged in console.
Observe:

HTTP status reported as 0 rather than actual returned status (401 404,5xx), response object is undefined.  This is apparently due to CORS policy violation.

Failed to load resource: the server responded with a status of 401 () [https://demo.ghost.io/ghost/api/v2/content/tags/?key=22444f78447824223cefc4806f]
Failed to load resource: the server responded with a status of 401 () [https://demo.ghost.io/ghost/api/v2/content/tags/?key=22444f78447824223cefc4806f]
Access to XMLHttpRequest at 'https://demo.ghost.io/ghost/api/v2/content/tags/?key=22444f78447824223cefc4806f' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. [http://localhost:8080/]
> error_1
Error: Network Error
  config: Object {url: "https://demo.ghost.io/ghost/api/v2/content/tags/", method: "get", params:
 Object, …}
  isAxiosError: true
  message: "Network Error"
  > request: XMLHttpRequest {onreadystatechange: , readyState: 4, timeout: 0, …}
    onabort: function handleAbort() { … }
    onerror: function handleError() { … }
    onload: null
    onloadend: null
    onloadstart: null
    onprogress: null
    onreadystatechange: function handleLoad() { … }
    ontimeout: function handleTimeout() { … }
    readyState: 4
    response: ""
    responseText: ""
    responseType: ""
    responseURL: ""
    responseXML: null
    status: 0
    statusText: ""
    timeout: 0
    upload: XMLHttpRequestUpload {onloadstart: null, onprogress: null, onabort: null, …}
    withCredentials: false
    __proto__: XMLHttpRequest {UNSENT: 0, OPENED: 1, HEADERS_RECEIVED: 2, …}
  response: undefined
  stack: "Error: Network Error
    at createError (http://localhost:8080/4.js:2079:15)
    at XMLHttpRequest.handleError (http://localhost:8080/4.js:2341:14)"
  toJSON: function() { … }
  __proto__: Object {constructor: , name: "Error", message: "", …}

Behaves the same whether I use Ghost content API or axios to make the request.

wget and interactive browser both display a JSON error response.  wget might not enforce CORS, but Chrome browser does, yet it is able to get the response. (in this sample, I botched the host URI rather than the key, wget does not save response file if error is 401...)

$ wget --no-check-certificate --content-on-error https://demo.ghost.io/ghost/api/v2/content/argle?key=22444f78447824223cefc48062
--2019-07-21 17:41:03--  https://demo.ghost.io/ghost/api/v2/content/argle?key=22444f78447824223cefc48062
Resolving demo.ghost.io (demo.ghost.io)... <IP_ADDRESS>, <IP_ADDRESS>, <IP_ADDRESS>, ...
Connecting to demo.ghost.io (demo.ghost.io)|<IP_ADDRESS>|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
Saving to: ‘argle?key=22444f78447824223cefc48062’

argle?key=22444f78447824223cefc48062                                         [ <=>                                                                                ]      73  --.-KB/s    in 0s

2019-07-21 17:41:03 ERROR 404: Not Found.

---------- bob@server3:~ ----------
$ more argle\?key\=22444f78447824223cefc48062
{"errors":[{"message":"Resource not found","errorType":"NotFoundError"}]}

chrome://net-export logs confirm that the server response really does not include 'Access-Control-Allow-Origin' header when the server returns an API error, and does when the call succeeds. (can attach if requested).  I am no HTTP expert, don't know whether I should be expecting one.  But it sure seems XMLHttpRequest is not going to allow access to the error response object without it.
Technical details:

Ghost Version: 2.25
Node Version: 10.15.2
Browser/OS: Chrome latest / Windows 10 (and others)
Database: SQLite3

Hey @bobhy thanks for the detailed bug report :dancer:

@bobhy This is fixed in master now! :tada:

I see that a solution has been provided by I'm having the exact same issue on version 3.3.0. Any ideas?

@eaorak if you need any help please use our forum. If it's determined that there's a genuine bug then we can open a new issue with full reproduction steps.


Review speech-ios-sdk

Make sure the new Speech to Text implementation supports all features of the speech-ios-sdk.

Complete with da2ef0f835434444cc8682f420969efd18dec97c


docs: add refetch documentation

:tada: This PR is included in version 2.22.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[React Editor] Changing editing modes causes scrollable parent to change scroll position

Describe the bug
If an editor is places in the scrollable parent, when changing between markdown and wysiwyg modes, the scrollable parent scrolls down until editor goes out of the viewport or the top of the scrollable parent reaches visible viewport.
To Reproduce
This link contains the codesandbox project that shows the problem.
To reproduce the issue I have a <ul> list with items and one of them contains the <Editor>.
The list has overflow-y: auto, but the parent of the list has overflow: hidden.
Observe that when you switch editing modes, the list keeps scrolling down on each change.
Expected behavior
The parent view should not be scrolling
Desktop (please complete the following information):

OS: macOS
Browser Chrome
Version Version 105.0.5195.125 (Official Build) (arm64)

Thank you for the issue and detailed exmaple to reproduce and understand it.
I think there was a problem while working on synchronizing the cursor. I'll check, but there's no exact plan.

@jwlee1108 이진우씨 감사합니다~
Do you know if there is any workaround I can do to avoid this behaviour? maybe wrap the editor in a div with some styles that should stop it from moving around? Or wrap it in a div that stops certain events from propagating up to the parent and cause scrolling?
Please let me know if you know any workaround.

@benderillo
I haven't exactly dug into this yet. I guess 'scrollIntoView()' in prosemirror is affecting. (refs) So I think it's going to be hard to solve easily.

hi, @jwlee1108. any updates for this bug?

I encountered a similar problem. I made a file list on the left. After selecting a file, I loaded the editor on the right. The two exist in parallel, but loading the editor on the right will cause the scroll bar on the left to scroll

I too face the similar issue. Any update on this?

I have added the editor inside a modal. Whenever I open the modal (editor inside) it scrolls up the parent component. has anyone encountered this kind of issue? Is there any workaround to fix this?

I was able to come up with a workaround for my scrolling issues by applying the change from this commit
Along with applying style 'position:sticky;' to a parent of the editor to halt additional scrolling of editor's parent(s).


The output result of "Out-RsFolderContent" is weird

use "Out-RsFolderContent" to export all items from a report server (MS SQL Server 2019) to FolderA
copy 1 of the reports and rename it (FolderA/reportA.rdl -> FolderA/reportB.rdl)
delete all other reports and keep only reportB in FolderA
use "Write-RsFolderContent" to upload the report (FolderA/reportB.rdl).

Upload success with a warning : "The dataset 'xxx' refers to the shared data source 'xxx', which is not published on the report server.  The shared data source 'xxx' must be published before this report can run.".
I try to download reportA by using built in portal of the report server (MS SQL Server 2019) and compare to the rdl file that download by "Out-RsFolderContent". It seems that the "path" setting of "Datasource" section is (/PathA/DatasourceA -> DatasourceA ).
Am I doing something wrong or this is a bug ?

you have to manage the dependencies manually, in case of shared datasets you need to upload the pre requisites in the right sequence and then use the command set-rsdatasetreference to point it to the location

I try to do Backup / Restore to all items on a Report Server by using "Out-RsFolderContent" and "Write-RsFolderContent". Since I have to manage the dependencies manually, I use the following step and try to figure out the dependencies.

use "Out-RsFolderContent" to export all items on report server to disk
use "Get-RsFolderContent" to list all items on report server (same as 1)

The rd:DataSourceID section of all RDL files that come from 1 don't match any ID which TypeName is "DataSource" that list in 2.
Do I misunderstanding the purpose (or result) of these function ?


Combined Plot Optimization + Band Depth Envelope

Changes to utils_data.py to speed up processing
Implement ability to build envelope around trajectories with top X% of band depth

Hold off on review until implement preprocessing + Lucie edits


Update blob-containers-powershell.md

Corrected "retrieve" vs. "delete" in the "Delete Containers" section.

Microsoft authors of articles need to make updates through the private repository, so the updates can be staged and validated by current validation rules. After you review staging and fix all validation issues, you can add the sign-off comment to let the PR reviewers know the updates are ready to be merged.
It's easy to access the private repo version of your articles in GitHub. Just add -pr to the URL, as follows:
 Public repo URL: https://github.com/MicrosoftDocs/{docs-repo}
 Private repo URL: https://github.com/MicrosoftDocs/{docs-repo-pr}
We have closed this pull request. Please resubmit the updates through the private repo. For more information, see the contributor guide.


Python 3 support

traits needs to be reevaluated all other cloudmesh code is now python 2 and 3 compatible, unfortunately workflow is not as the traits seem not python 3 compatible


hot reload option

Quick question, is there a way to enable a "hot reload" kind of option? I'd read that gin run main.go --all does that trick when using the gin package directly, but I was not able to get that to work inside swagin
I'm very new at Go and this package is helping me a lot moving from python (FastAPI) to Go, great work!!!

SwaGin just inherit gin.Engine, but I don't use that before

Ok, I see. I tried using another package called fresh to restart the app when a change is made and worked as intended. If anyone needs that kind of functionality here's the info:
https://github.com/gravityblast/fresh


CSS Unit Calculator

Fixes Issue🛠
Closes #208
Description👨💻
Added a calculator which  will convert css units like px to rem, em, vw and vice versa
Type of change📄

[] New feature (non-breaking change which adds functionality)

How this has been tested✅
Checklist✅

[] My code follows the style guidelines of this project
[] I have performed a self-review of my own code
[] I have commented my code, particularly in hard-to-understand areas
[] I have added demonstration in the form of GIF/video file
[] I am an Open Source Contributor

Screenshots/GIF📷

Why have you edited GCD calculator in main index.html file? Pls fix and add your calculator section at the end @Akshansh8

Let me see, I wouldn't have pulled the code, my bad

@Rakesh9100 check once I have corrected the issue

Merged!! 🎉 @Akshansh8


Support glossary tooltips

Motivation
Show a floating window on the cross references of the documentation pointing to a glossary term.

Inspiration:
https://sphinx-hoverxref.readthedocs.io/en/latest/index.html

Nice!


Phone management

There is a request to better organize the phone cords and locations for consistency and to avoid cords being overly visible or mismanaged. The standard is to get the wall phones near the door out of the classroom and mounted on the wall. We need validation this is done through the campus.

Hi
I believe this was Alberti doing his due diligence to follow up on…
…do you recall Mrs. Peiffer’s request the week before school started that the phones were not on podiums but on walls near the doors?
After a bit of scrambling, Mr. Hull was going to use his own contact to run cables and install wall jacks.
I hadn’t heard much more and with Alberti handling all of the communication with Mr. Hull, I presumed that this was on hold until summer.
Have you heard anything more of that contact of Mr. Hull who was to put in the wall jacks?
My Best,
Greg Abbott
State Assessment Coordinator & Technical Support
Mason Classical Academy Junior & Senior High School
@.> @.
From: fsteer @.>
Sent: Wednesday, November 8, 2023 11:52 AM
To: masonclassicalacademy/backlog @.>
Cc: gabbott-mason @.>; Assign @.>
Subject: Re: [masonclassicalacademy/backlog] Phone management (Issue #4)
Assigned #4 https://github.com/masonclassicalacademy/backlog/issues/4  to @gabbott-mason https://github.com/gabbott-mason .
—
Reply to this email directly, view it on GitHub https://github.com/masonclassicalacademy/backlog/issues/4#event-10903458711 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BDEZSRSR75I3UFJUO2RRZB3YDO2EZAVCNFSM6AAAAAA5Y3LN4SVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJQHEYDGNBVHA3TCMI .
You are receiving this because you were assigned.  https://github.com/notifications/beacon/BDEZSRSQDAFN5KZEV3AXY3LYDO2EZA5CNFSM6AAAAAA5Y3LN4SWGG33NNVSW45C7OR4XAZNWJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XKUY3PNVWWK3TUL5UWJTYAAAAAFCPFSOLQ.gif Message ID: @.*** @.***> >
--
Pursuant to School Board policy and Mason Classical Academy
administrative procedures,
this e-mail is the property of Mason Classical
Academy and
to be used for official business only. In addition, messages
sent through this system are subject to the Public Records Law of
the State
of Florida and also to review by the school. There should be
no expectation
of privacy.

 Will this be a summer '24 project?


Protocol error during tests

/kind bug
How did you run odo exactly?
The error happens during integration tests, on different clusters (IBM Cloud, PSI)
Actual behavior
protocol error: received *http.http2GoAwayFrame before a SETTINGS frame
Get "https://registry.stage.devfile.io/index": connection error: PROTOCOL_ERROR

protocol error: received *http.http2GoAwayFrame before a SETTINGS frame
[odo]  ✗  Failed to pull stack nodejs from registry.stage.devfile.io/devfile-catalog/nodejs:latest with allowed media types [application/vnd.devfileio.devfile.layer.v1 image/png image/svg+xml application/vnd.devfileio.vsx.layer.v1.tar application/x-tar]: failed to do request: Head "https://registry.stage.devfile.io/v2/devfile-catalog/nodejs/manifests/latest": connection error: PROTOCOL_ERROR

Expected behavior
Any logs, error output, etc?

This looks it might be something with devfile registry instance or registry library.
Maybe @GeekArthur or @johnmcollier could know something about this.

@kadel In your opinion, what would be the effort (installation + maintenance) of having our own devfile registry on the test cluster?

@kadel In your opinion, what would be the effort (installation + maintenance) of having our own devfile registry on the test cluster?

I don't think it is worth it to host our own instance. But we could avoid using devfile registry in most of the tests.
We can modify our test to not use any registry and use devfile.yaml files that are part of our test fixtures instead.
The only tests that are meant to test registry integration would be using remote devfile registry. Theoretically it could be only one test that does that.


Kderme/cbr 375

Description
This PR:

adds the possibility for multiple Accounts to insert the same Tx. This is achieved by using a Compound Primary Key (TxId, AccountId).
Inserts Incoming Txs in meta db
fixes stray comments and strange leftovers from previous PRs.
TODO: some TxMeta, like timestamp are not implemented correcltly, but shouldn`t break anything.

Linked issue
CBR-375
Type of change

[ ] 🐞 Bug fix (non-breaking change which fixes an issue)
[x] 🛠 New feature (non-breaking change which adds functionality)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)
[ ] 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
[x] 🔨 New or improved tests for existing code
[ ] ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

[ ] I have read the style guide document, and my code follows the code style of this project.
[ ] If my code deals with exceptions, it follows the guidelines.
[ ] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
[ ] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

[] I have added tests to cover my changes.
[x] All new and existing tests passed.

QA Steps
Screenshots (if available)

Would it be possible to give PRs a proper title so I don't have to look at the PR to know what its about.


Force upgrade gets stuck where sync has its impassable prompt

What did you expect to happen?
doom upgrade --force should recreate broken repositories, or at least throw an error.
What actually happened?
It hangs indefinitely:
❯ doom sync -u
> Executing 'doom sync -u' with Emacs 27.2 at 2021-11-24 19:16:31
  > Synchronizing your config with Doom Emacs...
    > Regenerating envvars file at "~/.local/state/emacs/env"
      ✓ Successfully generated "~/.local/state/emacs/env"
    > Installing packages...
      - No packages need to be installed
    > (Re)building packages...
      - No packages need rebuilding
    > Updating recipe repos...
    > Updating packages (this may take a while)...
      > In repository "visual-fill-column", failed to get status:

        Failed to get unambiguous name for "main"
        fatal: Needed a single revision

           1) Abort

        How to proceed? (1) 1

! Aborted

        ! Script was abruptly aborted! Run 'doom sync' to repair inconsistencies

❯ doom --yes upgrade --force
- Confirmations auto-accept enabled
  > Preparing to upgrade Doom Emacs and its packages...
  ✓ Doom is already up-to-date!
  Doom is up-to-date!
  > Synchronizing your config with Doom Emacs...
    > Regenerating envvars file at "~/.local/state/emacs/env"
      ✓ Successfully generated "~/.local/state/emacs/env"
    > Installing packages...
      - No packages need to be installed
    > (Re)building packages...
      - No packages need rebuilding
    > Updating recipe repos...
    > Updating packages (this may take a while)...
      > (198/257) Fetching visual-fill-column...

Describe your attempts to resolve the issue
As this is the same issue as in #4984, I know to work around it by deleting the offending repo.
However, this seems a quite nasty error to me.

Duplicate of #4984
Explanation: https://github.com/hlissner/doom-emacs/issues/4984#issuecomment-832842879

As this is the same issue as in #4984, I know to work around it by deleting the offending repo.
However, this seems a quite nasty error to me.

Please don't create a duplicate issue. In https://github.com/hlissner/doom-emacs/issues/4984#issuecomment-832842879 I explain this is a recognized issue and a fix is in the works (in #4273).


Cannot construct a desired FunctionScoreQuery

NEST/Elasticsearch.Net version:
7.10.0
Elasticsearch version:
7.4.2
.NET runtime version:
5.0
Operating system version:
Description of the problem including expected versus actual behavior:
I want to construct a query equivalent to the following JSON
{
  "function_score": {
    "script_score": {
      "script": "doc['some-field'].value"
    }
  }
}

However, when I use the following code
var q = new FunctionScoreQuery
{
    Query = new ScriptScoreQuery
    {
        Script = new InlineScript($"doc['some-field'].value"),
        IsVerbatim = true,
    },
    IsVerbatim = true
};

It gets
{
  "function_score": {
    "query": {
      "script_score": {
        "script": "doc['some-field'].value"
      }
    }
  }
}

which I post it to an ES instance and it gets error.
I checked FunctionScoreQuery and find nowhere to put the ScriptScoreQuery. So how can I get what I want?
Steps to reproduce:
1.
2.
3.
Expected behavior
A clear and concise description of what you expected to happen.
Provide ConnectionSettings (if relevant):
Provide DebugInformation (if relevant):

I find out what I want is equivalent to
{
  "function_score": {
    "functions": [
      {
        "script_score": {
          "script": {
            "source": "doc['some-field'].value"
          }
        }
      }
    ]
  }
}

So I use
var q = new FunctionScoreQuery
{
    Functions = new List<IScoreFunction>
    {
        new ScriptScoreFunction
        {
            Script = new InlineScript($"doc['{field.FieldName}'].value"),
        }
    },
}

to construct the query and get what I want.


Screenshot attached to this issue is not what I see on my screen

Playing around, got the Modeling App to render the viewport in a way that was not stretching to view the available space. Hit the button to create an issue in the top right. This screenshot does not match what I was seeing, unfortunately I did not take my own screenshot and when I flipped back to the app it looked fine again. Thought it also did not match the screenshot attached here.
Flagging that your screenshot implementation might not be capturing exactly what your users are seeing.

Core Dump
coredump-9c69b342-d8b7-4789-b87f-d7db064da12a.json
Reference ID: 9c69b342-d8b7-4789-b87f-d7db064da12a

I am able to recreate this issue. The library that is used for screenshots is html2canvas-pro. It appears to work well for the website based application but when it runs in electron it renders incorrectly. I'll investigate further.


OrthographicViewport zooming alignment issue

currently, scaling while keeping the center position when initiating a new OrthographicsViewport will lead to an offset (top-left alignment), but no zooming. --> behave differently as before.
Expected result for orthographic zooming: (result from v4.x, center aligned)

Current result from v5.0-beta: (top left aligned with wrong scaling)

will create a standalone test example to double check if this issue comes from deck.gl or it's in the app.

narrowed down to 913.

Looking at the above gifs, it looks like it is scaling down gl-viewport (screen space rect), instead of stretching.

What happened in #913  was that the project utility functions had been moved to viewport-mercator-project. So now we could delete them from deck.gl, import them from vpm, and avoid some code duplication.
Some function may have changed in viewport-mercator-project?
One possible thing to look at is that some of the project functions have a parameter that indicates whether pixels are in "top left" (CSS) or "bottom left" (WebGL) coordinates.

I was able to reduce this to alpha.6 (9c541d3, #899 GOOD) and alpha.7 (ade0646, #913 BAD), but couldn't get the build to work to narrow it further down to single PR.

This issue can be bypassed without changing the current API and implementation.
An example was added in https://github.com/uber/deck.gl/pull/1266.
I was not able to locate where exactly that changed the behavior, but before we add multiple viewport support, the width and height of the viewport and canvas are always in sync (referring to the same width and height). Now they are not and hence the content in the viewport - when scaled - are not strengthened to fill the whole canvas, led to result as shown in the second gif.
In short: (already included in the doc.)

when using ortho-viewport without zooming, just specify width, height, left, and top. The ortho-viewport class will assume viewport size and canvas size are the same and derive the right and bottom internally.

when using ortho-viewport with zooming, specify width, height (for canvas), left, top, and right bottom (for viewport) to achieve the zooming effect.

Will close this issue for now.


Unable to play certain Youtube Videos

There are certain youtube videos which are not playable. I am unable to understand the type of videos. Here are the few videos which don't playback
https://www.youtube.com/watch?v=5Asd813Gcns
https://www.youtube.com/watch?v=Ap1K_Bh-o1o
https://www.youtube.com/watch?v=tZuj_beuMc4
https://www.youtube.com/watch?v=HKU96i_Qh8Y

Following are the console logs

[XCDYouTubeKit] Unexpected player script (not an anonymous function)
[XCDYouTubeKit] JavaScript exception: TypeError: undefined is not an object (evaluating 'window.navigator.userAgent.match')
[XCDYouTubeKit] No signature function in player script
[XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. (XCDYouTubeVideoErrorDomain error -2.)
Domain: XCDYouTubeVideoErrorDomain
Code:   -2
User Info: {
NSURL = "https://www.youtube.com/get_video_info?el=detailpage&hl=en&ps=default&video_id=HKU96i_Qh8Y";
}

Please make sure you are using the latest version of XCDYouTubeKit, i.e. 2.5.3 as of this writing. The four videos should play fine. Feel free to reopen this issue if they don't work with the latest version.


L0 tests added

Can you add comment about description of test case added.

Added L0 for azure function container GitHub action. This L0 takes inputs and executes all functions.


No ASR results macOS

Describe the bug
No ASR results are produced and error after a while
To Reproduce
whispering --language en --model tiny --debug
Logs
(whisper_streaming) fc@Claudios-MacBook-Pro whisper_streaming % whispering --language en --model tiny --debug
[2022-10-09 19:13:13,532] cli.get_wshiper:211 DEBUG -> WhisperConfig: model_name='tiny' device='cpu' language='en' fp16=True
[2022-10-09 19:13:14,103] transcriber._set_dtype:35 WARNING -> FP16 is not supported on CPU; using FP32 instead
Using cache found in /Users/fc/.cache/torch/hub/snakers4_silero-vad_master
[2022-10-09 19:13:16,014] cli.get_context:223 DEBUG -> Context: timestamp=0.0 buffer_tokens=[] buffer_mel=None vad=True temperatures=[0.0, 0.2, 0.4, 0.6, 0.8, 1.0] allow_padding=False patience=None compression_ratio_threshold=2.4 logprob_threshold=-1.0 no_captions_threshold=0.6 best_of=5 beam_size=5 no_speech_threshold=0.6 buffer_threshold=0.5 vad_threshold=0.5
[2022-10-09 19:13:16,014] cli.transcribe_from_mic:51 INFO -> Ready to transcribe
[2022-10-09 19:13:16,058] cli.transcribe_from_mic:62 DEBUG -> Audio #: 0, The rest of queue: 0
[2022-10-09 19:13:19,915] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:19,916] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:20,148] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:20,148] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:20,148] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:20,148] transcriber.transcribe:265 DEBUG -> mel.shape (375) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:20,148] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:20,148] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:20,148] cli.transcribe_from_mic:62 DEBUG -> Audio #: 1, The rest of queue: 0
[2022-10-09 19:13:23,595] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:23,595] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:23,785] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:23,785] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:23,785] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 750])
[2022-10-09 19:13:23,785] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:23,785] transcriber.transcribe:265 DEBUG -> mel.shape (750) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:23,785] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:23,785] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 750])
[2022-10-09 19:13:23,785] cli.transcribe_from_mic:62 DEBUG -> Audio #: 2, The rest of queue: 0
[2022-10-09 19:13:27,425] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:27,425] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:27,474] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:27,475] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 750])
[2022-10-09 19:13:27,475] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 1125])
[2022-10-09 19:13:27,475] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:27,475] transcriber.transcribe:265 DEBUG -> mel.shape (1125) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:27,475] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:27,475] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 1125])
[2022-10-09 19:13:27,475] cli.transcribe_from_mic:62 DEBUG -> Audio #: 3, The rest of queue: 0
[2022-10-09 19:13:31,115] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:31,115] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:31,160] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:31,161] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 1125])
[2022-10-09 19:13:31,161] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 1500])
[2022-10-09 19:13:31,161] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:31,161] transcriber.transcribe:265 DEBUG -> mel.shape (1500) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:31,161] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:31,161] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 1500])
[2022-10-09 19:13:31,161] cli.transcribe_from_mic:62 DEBUG -> Audio #: 4, The rest of queue: 0
[2022-10-09 19:13:34,998] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:34,998] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:35,046] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:35,046] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 1500])
[2022-10-09 19:13:35,046] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 1875])
[2022-10-09 19:13:35,046] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:35,046] transcriber.transcribe:265 DEBUG -> mel.shape (1875) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:35,046] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:35,047] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 1875])
[2022-10-09 19:13:35,047] cli.transcribe_from_mic:62 DEBUG -> Audio #: 5, The rest of queue: 0
[2022-10-09 19:13:38,689] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:38,689] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:38,737] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:38,737] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 1875])
[2022-10-09 19:13:38,737] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 2250])
[2022-10-09 19:13:38,737] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:38,737] transcriber.transcribe:265 DEBUG -> mel.shape (2250) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:38,737] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:38,737] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 2250])
[2022-10-09 19:13:38,737] cli.transcribe_from_mic:62 DEBUG -> Audio #: 6, The rest of queue: 0
[2022-10-09 19:13:42,368] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:42,369] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:42,415] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:42,415] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 2250])
[2022-10-09 19:13:42,416] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 2625])
[2022-10-09 19:13:42,416] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:42,416] transcriber.transcribe:265 DEBUG -> mel.shape (2625) - seek (0) < N_FRAMES (3000)
[2022-10-09 19:13:42,416] transcriber.transcribe:271 DEBUG -> No padding
[2022-10-09 19:13:42,416] transcriber.transcribe:326 DEBUG -> ctx.buffer_mel.shape: torch.Size([80, 2625])
[2022-10-09 19:13:42,416] cli.transcribe_from_mic:62 DEBUG -> Audio #: 7, The rest of queue: 0
[2022-10-09 19:13:46,251] cli.transcribe_from_mic:77 DEBUG -> Got. The rest of queue: 0
Analyzing[2022-10-09 19:13:46,251] transcriber.transcribe:235 DEBUG -> 60000
[2022-10-09 19:13:46,298] transcriber.transcribe:252 DEBUG -> Incoming new_mel.shape: torch.Size([80, 375])
[2022-10-09 19:13:46,298] transcriber.transcribe:256 DEBUG -> buffer_mel.shape: torch.Size([80, 2625])
[2022-10-09 19:13:46,299] transcriber.transcribe:259 DEBUG -> mel.shape: torch.Size([80, 3000])
[2022-10-09 19:13:46,299] transcriber.transcribe:263 DEBUG -> seek: 0
[2022-10-09 19:13:46,299] transcriber.transcribe:280 DEBUG -> seek=0, timestamp=0.0, mel.shape: torch.Size([80, 3000]), segment.shape: torch.Size([80, 3000])
[2022-10-09 19:13:46,299] transcriber._decode_with_fallback:103 DEBUG -> DecodeOptions: DecodingOptions(task='transcribe', language='en', temperature=0.0, sample_len=None, best_of=None, beam_size=5, patience=None, length_penalty=None, prompt=[], prefix=None, suppress_blank=True, suppress_tokens='-1', without_timestamps=False, max_initial_timestamp=1.0, fp16=False)
Traceback (most recent call last):
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/bin/whispering", line 8, in
sys.exit(main())
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whispering/cli.py", line 301, in main
for text in transcribe_from_mic(
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whispering/cli.py", line 82, in transcribe_from_mic
for chunk in wsp.transcribe(audio=audio, ctx=ctx):
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whispering/transcriber.py", line 284, in transcribe
result = self._decode_with_fallback(
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whispering/transcriber.py", line 104, in _decode_with_fallback
decode_result = self.model.decode(
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/torch/autograd/grad_mode.py", line 27, in decorate_context
return func(*args, **kwargs)
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whisper/decoding.py", line 700, in decode
result = DecodingTask(model, options).run(mel)
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whisper/decoding.py", line 472, in init
self.decoder = BeamSearchDecoder(
File "/Users/fc/.local/share/virtualenvs/whisper_streaming-htMqhiJ1/lib/python3.10/site-packages/whisper/decoding.py", line 283, in init
self.max_candidates: int = round(beam_size * (1.0 + patience))
TypeError: unsupported operand type(s) for +: 'float' and 'NoneType'
Environment

OS: macOS Monteray
Python Version: 3.10.3
Whispering version: 0.5.0

Thank you for the report.
It seems "Whisper" is not expected version because the line in lib/python3.10/site-packages/whisper/decoding.py shoud be the following.
https://github.com/openai/whisper/blob/9e653bd0ea0f1e9493cb4939733e9de249493cfb/whisper/decoding.py#L282-L283
self.max_candidates: int = round(beam_size * self.patience)

However, yours is the following.
self.max_candidates: int = round(beam_size * (1.0 + patience))

How did you install the "whispering"?
The expected install step is this.

I followed the same. This is how installation is completed:
Successfully built whispering whisper future
Installing collected packages: tokenizers, websockets, urllib3, typing-extensions, tqdm, regex, pyyaml, pyparsing, pycparser, numpy, more-itertools, idna, future, filelock, charset-normalizer, certifi, torch, requests, pydantic, packaging, ffmpeg-python, CFFI, torchaudio, sounddevice, huggingface-hub, transformers, whisper, whispering
Successfully installed CFFI-1.15.1 certifi-2022.9.24 charset-normalizer-2.1.1 ffmpeg-python-0.2.0 filelock-3.8.0 future-0.18.2 huggingface-hub-0.10.1 idna-3.4 more-itertools-8.14.0 numpy-1.23.3 packaging-21.3 pycparser-2.21 pydantic-1.10.2 pyparsing-3.0.9 pyyaml-6.0 regex-2022.9.13 requests-2.28.1 sounddevice-0.4.5 tokenizers-0.13.1 torch-1.12.1 torchaudio-0.12.1 tqdm-4.64.1 transformers-4.23.1 typing-extensions-4.4.0 urllib3-1.26.12 websockets-10.3 whisper-1.0 whispering-0.5.1

The similar report is #24.
It seems that you are using virtualenvs.
Please retry by re-creating virtualenv (i.e. not use the current.local/share/virtualenvs/) or without virtualenv.

Unfortunately, nor the re-creation of virtualenv nor a clean install without virtualenv changes anything.
Installation is performed (apparently) correctly. Model seems to load (some seconds). Mic seems to work in Terminal.

Is the path of whispering is expected?
If you can provide me with logs or other detailed information, I may be able to help.

Do you have the Traceback?
Is it the same as the one in your first post?

Sure. This is a brand new installation:
$ brew install python
$ python3.10 -m pip install --upgrade pip
$ pip3 install poetry

Then
fc@Claudios-MacBook-Pro ~ % pip3 install -U<EMAIL_ADDRESS>Collecting<EMAIL_ADDRESS>  Cloning https://github.com/shirayu/whispering.git (to revision v0.6.2) to /private/var/folders/_9/53wvt37d1jq7x6y7gwgvrstr0000gn/T/pip-req-build-6dao73tv
  Running command git clone --filter=blob:none --quiet https://github.com/shirayu/whispering.git /private/var/folders/_9/53wvt37d1jq7x6y7gwgvrstr0000gn/T/pip-req-build-6dao73tv
  Running command git checkout -q db83a89d7b78d85e373c6d7f41ed00db22390a48
  Resolved https://github.com/shirayu/whispering.git to commit db83a89d7b78d85e373c6d7f41ed00db22390a48
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting whisper@ git+https://github.com/openai/whisper.git@d18e9ea5dd2ca57c697e8e55f9e654f06ede25d0
  Using cached whisper-1.0-py3-none-any.whl
Collecting tqdm
  Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB)
Collecting sounddevice<0.5.0,>=0.4.5
  Using cached sounddevice-0.4.5-py3-none-macosx_10_6_x86_64.macosx_10_6_universal2.whl (108 kB)
Collecting websockets<11.0,>=10.3
  Using cached websockets-10.3-cp310-cp310-macosx_10_9_x86_64.whl (97 kB)
Collecting pydantic<2.0.0,>=1.10.2
  Using cached pydantic-1.10.2-cp310-cp310-macosx_10_9_x86_64.whl (3.1 MB)
Collecting torchaudio<0.13.0,>=0.12.1
  Using cached torchaudio-0.12.1-cp310-cp310-macosx_10_9_x86_64.whl (3.1 MB)
Collecting typing-extensions>=4.1.0
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Requirement already satisfied: CFFI>=1.0 in /usr/local/lib/python3.10/site-packages (from sounddevice<0.5.0,>=0.4.5->whispering==0.6.2) (1.15.1)
Collecting torch==1.12.1
  Using cached torch-1.12.1-cp310-none-macosx_10_9_x86_64.whl (133.8 MB)
Requirement already satisfied: more-itertools in /usr/local/lib/python3.10/site-packages (from whisper<EMAIL_ADDRESS>(8.14.0)
Collecting transformers>=4.19.0
  Using cached transformers-4.23.1-py3-none-any.whl (5.3 MB)
Collecting numpy
  Downloading numpy-1.23.4-cp310-cp310-macosx_10_9_x86_64.whl (18.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.1/18.1 MB 13.7 MB/s eta 0:00:00
Collecting ffmpeg-python==0.2.0
  Using cached ffmpeg_python-0.2.0-py3-none-any.whl (25 kB)
Collecting future
  Using cached future-0.18.2.tar.gz (829 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/site-packages (from CFFI>=1.0->sounddevice<0.5.0,>=0.4.5->whispering==0.6.2) (2.21)
Collecting huggingface-hub<1.0,>=0.10.0
  Using cached huggingface_hub-0.10.1-py3-none-any.whl (163 kB)
Collecting pyyaml>=5.1
  Using cached PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl (197 kB)
Requirement already satisfied: filelock in /usr/local/lib/python3.10/site-packages (from transformers>=4.19.0->whisper<EMAIL_ADDRESS>(3.8.0)
Collecting regex!=2019.12.17
  Using cached regex-2022.9.13-cp310-cp310-macosx_10_9_x86_64.whl (293 kB)
Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/site-packages (from transformers>=4.19.0->whisper<EMAIL_ADDRESS>(21.3)
Requirement already satisfied: requests in /usr/local/lib/python3.10/site-packages (from transformers>=4.19.0->whisper<EMAIL_ADDRESS>(2.28.1)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1
  Using cached tokenizers-0.13.1-cp310-cp310-macosx_10_11_x86_64.whl (3.8 MB)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/local/lib/python3.10/site-packages (from packaging>=20.0->transformers>=4.19.0->whisper<EMAIL_ADDRESS>(3.0.9)
Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/site-packages (from requests->transformers>=4.19.0->whisper<EMAIL_ADDRESS>(3.4)
Requirement already satisfied: charset-normalizer<3,>=2 in /usr/local/lib/python3.10/site-packages (from requests->transformers>=4.19.0->whisper<EMAIL_ADDRESS>(2.1.1)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/site-packages (from requests->transformers>=4.19.0->whisper<EMAIL_ADDRESS>(2022.9.24)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/site-packages (from requests->transformers>=4.19.0->whisper<EMAIL_ADDRESS>(1.26.12)
Building wheels for collected packages: whispering, future
  Building wheel for whispering (pyproject.toml) ... done
  Created wheel for whispering: filename=whispering-0.6.2-py3-none-any.whl size=15365 sha256=9a951c453a143f2c4e3dc076f97e25bef80a4120d6c047670b051a2abd6e8e7d
  Stored in directory: /private/var/folders/_9/53wvt37d1jq7x6y7gwgvrstr0000gn/T/pip-ephem-wheel-cache-uk73_iyy/wheels/9c/2f/59/aebc0923ee68b8514881120d69857bf05ec7bcd24774360fe5
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491058 sha256=1133a6853c21db8a256dd827c2c179329e4f1f8a943a3685b754a11b5039cb5f
  Stored in directory: /Users/fc/Library/Caches/pip/wheels/dc/16/09/eb08b4e34e6b638f113d2018cf0b22de1d8dca22a3a71873f7
Successfully built whispering future
Installing collected packages: tokenizers, websockets, typing-extensions, tqdm, regex, pyyaml, numpy, future, torch, sounddevice, pydantic, huggingface-hub, ffmpeg-python, transformers, torchaudio, whisper, whispering
Successfully installed ffmpeg-python-0.2.0 future-0.18.2 huggingface-hub-0.10.1 numpy-1.23.4 pydantic-1.10.2 pyyaml-6.0 regex-2022.9.13 sounddevice-0.4.5 tokenizers-0.13.1 torch-1.12.1 torchaudio-0.12.1 tqdm-4.64.1 transformers-4.23.1 typing-extensions-4.4.0 websockets-10.3 whisper-1.0 whispering-0.6.2
fc@Claudios-MacBook-Pro ~ % whispering --language en --model tiny
[2022-10-18 12:25:30,075] transcriber._set_dtype:35 WARNING -> FP16 is not supported on CPU; using FP32 instead
Using cache found in /Users/fc/.cache/torch/hub/snakers4_silero-vad_master
[2022-10-18 12:25:31,509] cli.transcribe_from_mic:56 INFO -> Ready to transcribe

Same behavior. Something flashes a couple of time, after 10 sec or so, prompt gets into Ready to transcribe.

@fantinuoli Sorry, I mean the traceback of whispering.
Do you still get TypeError: unsupported operand type(s) for +: 'float' and 'NoneType' ?

Okay. Not error. And the model is responding. I had to wait 60+second to see a response (only a partial one). I did not wait so long before. Interesting enough, offline whisper does not take that long.
I am on a average Mac (Intel Core i5, 16GB). Is it possible to inference the model in real-time also on CPU, or only GPU is required for (near) real-time processing?
fc@Claudios-MacBook-Pro ~ % whispering --language en --model tiny
[2022-10-18 12:48:11,887] transcriber._set_dtype:35 WARNING -> FP16 is not supported on CPU; using FP32 instead
Using cache found in /Users/fc/.cache/torch/hub/snakers4_silero-vad_master
[2022-10-18 12:48:13,095] cli.transcribe_from_mic:56 INFO -> Ready to transcribe
67.50->74.50     intrapet to be here, this is quite e.

I'm not sure that the machine spec is enough but whispering seems to work as expected.
Please check CPU usage.
Currently Whispering performs VAD and takes some time to start transcription.
https://github.com/shirayu/whispering#parse-interval
If a speech segment is determined as "silence", it will not be transcribed.
Try running with --vad 0 to disable VAD.


Python v3.8 compatability

On Python v3.8, you need to install opencv-python==<IP_ADDRESS>, where the function is called "drawMarker" instead of "generateImageMarker"

This is a hacky fix. I will provide something better.


Created files to be translated into Chinese.

This PR is intended as a continuation of this discussion in the forum, an attempt to translate some of the content into Chinese.
These files themselves are just copies of the original English notes. However, they are intended to serve as a starting point for community members who want to translate them into English.
When we get some progress with the translation, we can start looking into how to best integrate them into the course website.

Thanks for starting the PR.
I have forgotten the process of doing PR. Given this PR is already made, does it mean I only need to add Chinese to the CN.mds and then do git push to the master?
Could anyone write a quick guide (code snippet) here? or point to the available guide online? (sorry for being a little lazy)
Thanks