Login widget causes "Notice: compact(): Undefined variable: options" for anonymous users

Problem
When I access my Pagekit site as anonymous user, I get an Whoops, looks like something went wrong. error in an unstyled page. After I enable the debug mode, I see the following backtrace.

 in login.php line 25
at ErrorHandler->handleError('8', 'compact(): Undefined variable: options', '/home/cu1oo7s7/public_html/app/system/modules/user/widgets/login.php', '25', array('widget' => object(Widget), 'app' => object(Application), 'user' => object(User), 'redirect' => '@page/1', 'last_username' => null))
at compact('widget', 'options', 'user', 'last_username', 'redirect') in login.php line 25
at ModuleManager->{closure}(object(Widget))
at call_user_func(object(Closure), object(Widget)) in Type.php line 15
at Type->render(object(Widget)) in PositionHelper.php line 104
at PositionHelper->getWidgets('sidebar') in PositionHelper.php line 42
at PositionHelper->exists('sidebar') in template.php line 76
at require('/home/cu1oo7s7/public_html/packages/pagekit/theme-one/views/template.php') in PhpEngine.php line 50
at PhpEngine->evaluate(null, null) in PhpEngine.php line 80
at PhpEngine->render('views:template.php', array('app' => object(Application), 'view' => object(View), 'params' => object(ArrObject), 'intl' => object(IntlModule), 'theme' => object(Module))) in DelegatingEngine.php line 43
at DelegatingEngine->render('views:template.php', array('app' => object(Application), 'view' => object(View), 'params' => object(ArrObject), 'intl' => object(IntlModule), 'theme' => object(Module))) in View.php line 211
at View->render('layout') in index.php line 121
at Module->{closure}(object(ControllerEvent), object(Request))
at call_user_func_array(object(Closure), array(object(ControllerEvent), object(Request))) in WrappedListener.php line 63
at WrappedListener->__invoke(object(ControllerEvent), object(Request))
at call_user_func_array(object(WrappedListener), array(object(ControllerEvent), object(Request))) in EventDispatcher.php line 123
at EventDispatcher->trigger(object(ControllerEvent), array(object(ControllerEvent), object(Request))) in TraceableEventDispatcher.php line 126
at TraceableEventDispatcher->trigger('controller', array(object(Request))) in HttpKernel.php line 148
at HttpKernel->handleController() in HttpKernel.php line 77
at HttpKernel->handle(object(Request)) in Application.php line 67
at Application->run() in app.php line 24
at require_once('/home/cu1oo7s7/public_html/app/system/app.php') in index.php line 42

Visiting the site as administrator doesn't cause any issue; the same is true when I disable the login widget.
Technical Details

Pagekit version: 1.0.18
Webserver: Apache
Database: MySQL 5.6.26-cll-lve
PHP Version: 7.3.8

I changed the PHP version used from the site to PHP 7.2.21. Now the homepage and the login widget are visible. It seems the issue is caused from the PHP version.
I will check if there are PHP extensions not enabled when I use PHP 7.3, but I think the problem is incompatibility with PHP 7.3.

These are the extensions PageKit lists for PHP 7.3.

Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2,  calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv,  pcntl, readline, Reflection, session, standard, shmop, SimpleXML,  mbstring, tokenizer, xml, litespeed, intl, uploadprogress, gd, fileinfo, sockets, uuid, zip, xmlwriter, yaml, json, igbinary, exif, apcu, imap,  mysqlnd, PDO, pdo_mysql, gmagick, dom, pdo_sqlite, Phar, xmlreader,  posix, xsl, Zend OPcache

These are the extensions listed by PageKit for PHP 7.2. The difference is mostly extensions that cPanel doesn't show for PHP 7.3, which I cannot enable.

Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, intl, brotli, gmagick, gd, fileinfo, sockets, uuid, zip, sodium, xmlwriter, yaml, json, igbinary, exif, sysvmsg, sysvshm, apcu, sysvsem, imap, mysqlnd, PDO, pdo_mysql, uploadprogress, dom, pdo_sqlite, Phar, xmlreader, posix, xsl, Zend OPcache

app/system/modules/user/widgets/login.php has line return $app['view']('system/user/widget-login.php', compact('widget', 'options', 'user', 'last_username', 'redirect'));. However, options is undefined and thus causes the error. Changing the line to return $app['view']('system/user/widget-login.php', compact('widget', 'user', 'last_username', 'redirect')); will solve the issue.


Link updates

Update a couple of links which can now be https, improving security.

Update actionfraud link to https
Update Tax Checker to direct www.gov.uk link

Actually, as you work in GDS, I'll merge this now. I'm guessing you don't have access to this repository.


Duplicate of nlupugla struct

This is simply a duplicate of #82198. CI seems to e stuck there maybe cache this is to check.

I'd suggest running the hook locally, I suspect something about these files breaks it, probably large comments or something


[Building from source with bazel] Failure when linking libm-libraries during compilation of flatbuffers

Issue type
Build/Install
Have you reproduced the bug with TensorFlow Nightly?
No
Source
source
TensorFlow version
2.17
Custom code
No
OS platform and distribution
Linux Debian 5.10.216-1 x86_64
Mobile device
No response
Python version
3.12
Bazel version
7.3.0
GCC/compiler version
clang 17.0.2
CUDA/cuDNN version
CUDA 12 /cuDNN 8
GPU model and memory
NVIDIA A2
Current behavior?
I'm trying to build tensorflow from source with bazel for use in a C++ project. I'm working in a conda environment wit the specifics mentioned above and try to compile the libraries with the following command:
bazel build //tensorflow:libtensorflow_cc.so //tensorflow:libtensorflow_framework.so
Bazel fails with the follwing error message:
ERROR: /my/home/path/cache/bazel/_bazel_myuser/45c6a78e7c7688232d885d39238fef70/external/flatbuffers/BUILD.bazel:84:10: Linking external/flatbuffers/flatc [for tool] failed: (Exit 1): clang-17 failed: error executing command (from target @flatbuffers//:flatc) /my/home/path/.conda/envs/poet/bin/clang-17 @bazel-out/k8-opt-exec-50AE0418/bin/external/flatbuffers/flatc-2.params
/usr/bin/ld: warning: /my/home/path/.conda/envs/poet/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/bin/ld: warning: /my/home/path/.conda/envs/poet/bin/../lib/gcc/x86_64-conda-linux-gnu/14.1.0/crtbeginS.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0010001
/usr/bin/ld: cannot find /lib64/libm.so.6 inside /
/usr/bin/ld: cannot find /usr/lib64/libmvec_nonshared.a inside /
/usr/bin/ld: cannot find /lib64/libmvec.so.1 inside /
clang-17: error: linker command failed with exit code 1 (use -v to see invocation)

I tried to add the following lines to .bazelrc to explicitly link the locations of the libraries that were not found. That did not change the error.
build:linux --linkopt=-L/mnt/beegfs/home/straile/.conda/envs/poet/x86_64-conda-linux-gnu/sysroot/lib64
build:linux --linkopt=-L/mnt/beegfs/home/straile/.conda/envs/poet/x86_64-conda-linux-gnu/sysroot/usr/lib64
build:linux --linkopt=-Wl,-rpath,/mnt/beegfs/home/straile/.conda/envs/poet/x86_64-conda-linux-gnu/sysroot/lib64
build:linux --linkopt=-Wl,-rpath,/mnt/beegfs/home/straile/.conda/envs/poet/x86_64-conda-linux-gnu/sysroot/usr/lib64

Any help on this issue is much appreciated.
Standalone code to reproduce the issue
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
git checkout r2.17
./configure
# [with CUDA version 12, cuDNN version 8, NCCL version 2.18, compute capabilities 8.6]
# I also had to add "linux:build --copt=-Qunused-arguments" to .bazelrc to ignore compile errors in protoc
bazel build //tensorflow:libtensorflow_cc.so //tensorflow:libtensorflow_framework.so

Relevant log output
No response

Hi @hanssssssssssssss ,

Apologies for the delay. This might be due to a version incompatibility. Please verify version compatibility using the attached documentation. Let me know if the issue persists.

Thank you!


Update to TF 1.0

Since the train.py is modified, the test.py should be modified, too.

good, thanks!


'Tensorsplits must equal 16'

I'm setting TensorSplits  = new LLama.Abstractions.TensorSplitsCollection([12F, 4F]);
Yet I get the above error despite them equaling 16.
I'm trying to distribute memory and load across 2 Cuda GPUs which is supposed to be supported by Llama.cpp now so that I can load a model with a large context length into GPU.

What is the exact text of the error you're getting?

Sorry, fixed the title which was supposed to be the exact error until auto-correct got involved.

Aha, yes I thought that might be the problem. The error is telling you that the length of the array must be 16 (because that's the maximum number of devices supported by llama.cpp).
So you'd want to do something like this:
TensorSplits = new LLama.Abstractions.TensorSplitsCollection([12F, 4F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]);

I've just opened a PR (#310) which would make your initial code work :)

Awesome! Thanks!


Make black and white figures configurable

Hi,
I really like the Odometer Plugin.
But I wonder if you could add a way to configure if a field is black or white. I would like to monitor state of charge of a battery and it would be wonderful if all numbers would have the same color (configurable either black or white).
Maybe also the color change would be good to be used as decimals separation, at the moment if I have a value of 49, then "4" is black and "9" is white background. would be great to have "4" and "9" in black background and maybe if it is 49.5, then the "5" in white.
What do you think?

Hi @MrIngenieur,
Thanks for taking time and checking the Plugin. I will surely evaluate and try to implement the changes you suggested.

@BroadwayBill Thanks for using the plugin and sharing the feedback. I will check and revert about SimplePanel.tsx. Also, feel free to share a PR for any code changes you would like to add.


chore: add suggestion for show image in submenu

User flow

User write /start and a list of dishes appears. It's just an Inline Keyboard with one button per dish
User clicks on any of the buttons (pizza, for example). The previous Inline Keyboard is removed and appears a photo with some empty caption and another Inline Keyboard to manage paginations, add to favorites, or other actions

Can you resolve the merge conflicts before I review?

I split up the changes in three commits. The middle one is the most important one.

947126a6a88f9290dcf6ca1b56f3c48607641158 only fixes formatting. It is not interesting.
ed528dc253d207b9c709d7cf082619b229883405 applies the real changes, here you can see how it should work
2930a6cef69db64fc2a8cc1e1371776bdc8c5bbb does a lot of renaming from dish to pizza, and some minor changes. It creates a large diff, so I did not want to include it right away, but it is not really that interesting.

You should maybe run the code and check if the user flow is what you're expecting it to be.

@KnorpelSenf I revert the changes but appear in diff because the .editorconfig (indent_size = 4) are applied and previously was committed without.


Update plist test files for newer clang versions

The latest generated plist test files for the plist parser is from clang 3.8.
New plist test files should be generated for the newer clang versions:

clang 3.9
clang 4.0
clang 5.0 trunk

Especially if the new notes feature will be available in clang #381.

Test file for clang 3.9 is missing.

New test files were added, with notes and macro expansions too (available since clang v8).


skip empty batch while inserting

Which issue does this PR close?

Closes #.
Rationale for this change

What changes are included in this PR?

Are there any user-facing changes?

Thanks @yjshen

Thank you very much for such a quick fix @yjshen  -- looks good to me. I'll merge this PR and polish up the fuzz tester and try and get it merged 🎉


browserstack screenshot feature

hi,
would you consider adding the new browser-stack screenshot feature to the grunt-task?
thanks

:+1:


CT - custom update group name

Description
I'm setting up Nebraska to control updates on Flatcar instances and want to make use of Update Groups to control when updates are available to specific customers.
I have done a script to convert some host details into an Ignition YML file, which I feed into CT using Docker. It looks like CT does not support custom update group names?

Setting the group name to "testgroup" or the ID of one of the Nebraska groups results in an error: "unknown update group".
Setting the group name to "stable" works fine.

Impact
Cannot set custom Update Groups for new machines via Ignition Script. Also read something on here about custom group names being overwritten with "stable" after upgrade; want to make sure that the custom group name is in the container-linux configuration properly.
Environment and steps to reproduce
Create YML file including a non-standard update group name:
update:
group: testgroup
Feed file into ct and see error.
Change the YML file to have a standard group name:
update:
group: stable
Feed file into ct and the error does not occur.

Worth noting that manually updating the JSON afterwards with the custom group name works fine; the new Flatcar machine has the name in /etc/flatcar/update.conf

Can you please share the config files you used? That should work and maybe we need to fix something in ct.
As workaround, you can directly use the file directive in CLC:
https://www.flatcar.org/docs/latest/setup/releases/update-strategies/#disable-automatic-updates
In the example you would replace SERVER=disabled with GROUP=mygroup.

Yes, thanks for reporting, the update: group: directive doesn't allow custom group names 🙀:
https://github.com/flatcar-linux/container-linux-config-transpiler/blob/flatcar-master/config/types/update.go#L51

Path forward is writing the file directly in the Butane config.


Cannot go past login page when accessed via Microsoft Teams's website tab

Hi, I have a working AzureChat and want to access its ui through Microsoft Teams.
I created a website tab which points to my AzureChat endpoint.
It shows a login page(first image), but clicking "Microsoft 365" button to login only redirects to a page below (second image) and won't let me login.

And then I read this article and learned logging in does not work well with MS Teams website tab.
So are there any ways to disable or bipass a login page? I just want to see a chat page on MS Teams, and security or privacy is not really that important at this moment.

@tforce7171, did you ever find a work around for your post above? I too am seeing the behavior where, on a newly deployed Azure Chat instance, I'm getting the loop of "Sign in with Azure Active Directory" and I sign in successfully, only to be directed back to the same blue button. However the difference is that I am not using Teams. I've tried it in Chrome and Edge (standard and incognito), but no luck.

No, I have not found a work around. But it seems like Teams website does not store cookies thus causing an issue. So may be looking into cookie settings might be an option.
By the way have you followed these steps?

Yes, I was going for the Azure AD Production setup. Thanks for the tip on the cookies. I may look into that further. But I found a newer Azure AI Chat project that I'm interested in testing and it seems to be more active. https://github.com/Azure-Samples/chat-with-your-data-solution-accelerator

Thanks for the info. I'll take a look at it.

I can confirm that this issue is fixed when User Email field is filled in as per @heguro's comment above.


Cursor Placement issue.

getpage snippet cursor not going to YourController.
Also, We got a controller using binding. We don't need GetX Inside the widget, right? (Maybe that's an option we can use other controllers).
Maybe we can create another snippet with getpagewithcontroller.

getbinding prints wrong snippet Some syntax issue

Running in Windows 7. Extension using the latest version. VS Code Latest Version.

Thanks for your information, sorry for the delay, I will correct it as soon as possible, probably tomorrow.
Somehow I was not notified of your problem.
Thank you for contributing.

I just uploaded version 3.1.4 to the marketplace, now it's fixed !!


ZeroClipboard never initialises

I'm trying to use ZeroClipboard in a floating context menu but it never seems to initialise and therefore the copy operation does not work. The context menu is created using React and is just a <div> element with absolute positioning.
Here is the relevant part of my React component:
           componentDidMount() {
                var menu = ReactDOM.findDOMNode(this.refs['contextMenu']);
                this.contextMenu = $(menu);
                this.contextMenu.mouseleave(this.mouseLeaveContextMenu);

                this.clipboard = new ZeroClipboard(this.contextMenu.find('a#copyUrlToClip'));
                console.log(this.clipboard);
                this.clipboard.on('ready', (event) => {
                    console.log('Ready');
                    this.clipboard.on('copy', (event) => {
                         event.clipboardData.setData('text/plain', this.props.copyTileUrlToClipboard(this.contextTile));
                    });
                    this.clipboard.on( 'aftercopy', function(event) {
                        console.log('Copied text to clipboard: ' + event.data['text/plain']);
                    } );
                    this.clipboard.on('error', (event) => {
                        console.log( 'ZeroClipboard error of type "' + event.name + '": ' + event.message );
                    });
                });

The first console.log outputs:
ZeroClipboard {id: "0"}

and the SWF is loaded but I never get the 'Ready' output from the ready event.

This was due to mismatched .js and .swf versions.


spirv-fuzz: Implement MaybeApplyTransformation helper function in fuzzer_pass.h

This function can be used to apply a transformation only if it is applicable and use it wherever this pattern is used (see issue #3530 ).

Some parts of the code implement a similar pattern, but then go on to perform other actions if the transformation was applicable.
Would it be useful to make the MaybeApplyTransformation function return true if the transformation was actually applied so that it can also be used in these situations?


Add docs for admin group without GitHub app.

https://deploy-preview-684--roadie.netlify.app/docs/getting-started/create-admin-group/


[BUG] transactionalPush Retrieve - error when no event configured

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When using "retrieve" for Transactional Push metadata, the command raises an error when no data is available.
Expected Behavior
Script returns 0 results for Transactional Push instead of raising an error and exiting with code 1.
Steps To Reproduce

Run 'mcdev retrieve {{instance/BU}} transactionalPush'
See error:
error:  - Retrieving transactionalPush failed:
error:     MCMS_UTM_Runtime: Unknown runtime exception (30000)
error:     endpoint: https://{{tenant}}.rest.marketingcloudapis.com/messaging/v1/push/definitions/$filter=status+neq+deleted&$pageSize=100&$page=1

Version
4.3.2
Environment

OS: Win11
Node: 19.3.0
npm: 9.2.0

Participation

[ ] I am willing to submit a pull request for this issue.

Additional comments

Issue when no push application isdefined i believe @JoernBerkefeld this should be checked before retrieving

ive seen this error before and assumed a provisioning issue on the BUs is happened on.
can you give me a hint on how to check that, @DougMidgley ?


New config: GLOBAL_MAX_ITERATIONS

What problem or use case are you trying to solve?
We now have MAX_ITERATIONS config, which limits the number of turns/steps/iterations an agent could interact with LLM. This is very useful as a safe guard for user's wallet.
With https://github.com/OpenDevin/OpenDevin/pull/1910, an agent could delegate to another agent - every time a delegate agent is instantiated, it would have MAX_ITERATIONS as limit. I have seen a case where my parent agent (due to a bug in prompt engineering) keeps delegating a task to a child agent, who exhausts MAX_ITERATIONS and then gets invoked again in the next turn of parent agent. This means we effectively have MAX_ITERATIONS * MAX_ITERATIONS as the global limit, in the worst case.
We should have another config, e.g. GLOBAL_MAX_ITERATIONS (or maybe FULL_TASK_MAX_ITERATIONS) to control the total number of steps to finish a task.
Describe the UX of the solution you'd like
Do you have thoughts on the technical implementation?
Describe alternatives you've considered
Additional context

Caveat: we also need to cap MAX_ITERATIONS to min(MAX_ITERATIONS, FULL_TASK_MAX_ITERATIONS - accumulated_iterations)

I would be happy to assist with this challenging task. Your documentation has helped me understand the problem very well. I have a question: Is there a way to address the prompt engineering issue that causes the parent agent to repeatedly delegate tasks? If so, where should I begin looking for the fix in the codebase?
Additionally, if I were to start setting the iterations for the agents, where would you recommend I should begin reading the code in the codebase?
Thank you very much!

@prithvi2226 Please go ahead!

Is there a way to address the prompt engineering issue that causes the parent agent to repeatedly delegate tasks? If so, where should I begin looking for the fix in the codebase

Yes but that's not what this issue is about.  And I don't think prompt engineering is enough. We should systematically detect that and rejects the delegate request. That's harder and broader than what this issue is asking for.

if I were to start setting the iterations for the agents, where would you recommend I should begin reading the code in the codebase

Search for every place where MAX_ITERATIONS appears. You would start by copying it and modifying it.

Thank you for the guidance, @li-boxuan ! I understand that addressing the prompt engineering issue is a broader task. For now, I will focus on implementing the GLOBAL_MAX_ITERATIONS configuration.
I will start by searching for every instance where MAX_ITERATIONS appears in the codebase and work on copying and modifying it to include the new configuration. If I have any further questions or run into any issues, I will reach out.
Thanks again for your help!

Hi @li-boxuan
Update on Changes Made to Address Global Max Iterations Issue
Objective: Implement a global_max_iterations cap to ensure no agent exceeds a predefined number of iterations, while allowing individual task-specific iterations to be lower if needed.
Summary of Changes:
opendevin/core/schema/config.py:
Added global_max_iterations attribute to AppConfig.
Updated command-line argument parsing to include global_max_iterations.
opendevin/core/main.py:
Ensured the agent respects the global_max_iterations by calculating the effective maximum iterations as the minimum of task-specific and global limits:
max_iterations = min(args.max_iterations, args.global_max_iterations)

Used max_iterations when initializing the AgentController.
opendevin/server/session/agent.py:
Passed global_max_iterations from the start event to the agent configuration.
Updated agent initialization to respect the global_max_iterations.
tests/integration/regenerate.sh:
Added an environment variable for global_max_iterations to ensure it is set during script execution:
global_max_iterations=${global_max_iterations:-50}

tests/unit/test_arg_parser.py:
Updated tests to include checks for the new global_max_iterations argument.
tests/unit/test_config.py:
Added tests to verify that global_max_iterations is correctly parsed and applied from both environment variables and configuration files.
Ensured global_max_iterations is respected when set from the command line or within configuration files.
opendevin/controller/state/state.py:
Updated the State class to handle the global_max_iterations in its attributes and methods, ensuring that any resumed or restored state respects this limit.
opendevin/controller/agent_controller.py:
Modified delegation logic to ensure that delegated agents also respect the global_max_iterations.
evaluation/swe_bench/run_infer.py:
Updated to parse and respect global_max_iterations from the command-line arguments.
Ensured that all task processing within the script respects this global limit.
evaluation/mint/env.py:
Modified the environment class to check for both task-specific and global iteration limits.
Added methods to calculate and enforce the effective maximum iterations.
Next steps that I would take:
Validation:
I wanted to confirm if these changes are correctly implemented and align with the desired behavior.
I also wanted to check if the changes ensure that global_max_iterations is enforced across different agents and tasks.
Future Changes:
I am going to apply similar updates to the remaining run_infer.py files and prompt.py file.
Ensure that any further changes continue to respect the global_max_iterations limit.
Question for Confirmation:
Am I on the right track with these changes to address the global_max_iterations issue?
Should I proceed with similar updates for the remaining run_infer.py files and prompt.py file?
By ensuring these updates, we aim to maintain a consistent and enforceable iteration limit across all agent activities, thereby adhering to the defined global cap. Please review and provide feedback or approval to continue with the remaining changes.

@prithvi2226 lol this reads like AI-generated. Did you use any AI tool to help you generate this summary? Regardless, this is too long of a proposal for a simple task. Please go ahead, create a PR, and let code talk.

@li-boxuan ! Hahaha Yeah, I had written some notes in my obsidian, and told gpt to rephrase it in a "polite and respectful" way. Btw yeah I will create a pull request later this evening, thanks for making it smoother!

Is GLOBAL_MAX_ITERATIONS really available? Tried for 20mins to use it until I figured out that only MAX_ITERATIONS works for me

Is GLOBAL_MAX_ITERATIONS really available? Tried for 20mins to use it until I figured out that only MAX_ITERATIONS works for me

No, we didn't add a config called GLOBAL_MAX_ITERATIONS. It's just MAX_ITERATIONS that limits the number of iterations per conversation.


Load logged value back into Julia?

Is there a convenient way to load the logged values?
For instance, I've logged a bunch of scalars in the usual way
using TensorBoardLogger, Logging
tb_logger = TBLogger("path/to/logfile")

function cb()
    with_logger(tb_logger) do
        @info "loss" Flux.data(loss())
    end
end

and now I want to plot/analyze those values back inside Julia. What's the recommended way to do this?

at the moment this is not supported.
It's true that It would be a nice feature.

Hm, okay, in the meantime I will also manually log these quantities into something like a BSON.
From the export section of TensorBoard GitHub it points to the train.summary function for exporting information from TensorBoard.

@jessebett you can probably use ProtoBuf.jl to load things out of the log event.pb files.
using the protocol buffer definitions included in TensorBoardLogger.jl
but better and easier I think would be to just export them out of TensorBoard, via the TensorBoard web-interface which lets you export to CSV or JSON

see https://stackoverflow.com/a/42358524/179081
I used it once when a reviewer requested that I add plots for the training loss to my paper, and I didn't want to rerun experiments.
Of course that is sub-ideal if you want to export a ton of them.
If you do want to log them into BSON, writting a BSON logging sink wouldn't be too hard.
(Though, I think BSON doesn't naturally support append, so maybe better would be Feather?)
Such a logging sink would be good to have in LoggingExtras.jl,
and then you would just use a DemuxLogger(TBLogger("logs_tb"), BSONLogger("logs_bson"))

Just for reference, reading back event files is quite easy:
using TensorBoardLogger

function read_event(f::IOStream)
    header = read(f, 8)
    crc_header = read(f, 4)

    # check
    crc_header_ck = reinterpret(UInt8, UInt32[TensorBoardLogger.masked_crc32c(header)])
    @assert crc_header == crc_header_ck

    # DATA
    data_len = first(reinterpret(Int64, header))
    data = read(f, data_len)
    crc_data = read(f, 4)

    # check
    crc_data_ck = reinterpret(UInt8, UInt32[TensorBoardLogger.masked_crc32c(data)])
    @assert crc_data == crc_data_ck

    pb = PipeBuffer(data)
    ev = TensorBoardLogger.readproto(pb, TensorBoardLogger.Event())
    return ev
end

fname="youreventfile"
f=open(fname, "r")

ev1 = read_event(f)
ev2 = read_event(f)
...

The slightly more complicated part would be restructuring the event files to extract the summaries. In principle we could add a method that dumps everything into a ValueHistories object....

@oxinabox I saw that TensorBoard web interface had the download option, but that is definitely too inconvenient for what I'm trying to do.
Is there an additional Logger that I can run that stores the values in a convenient to read format for this sort of use? At the moment there's nothing fancy going into these TensorBoard logs, just scalars. Though it would be nice if this could accommodate model check-pointing too. I'm wary of pushing to a custom array and saving that to a BSON during training because that is not very robust to cases where the server crashes.
@PhilipVinc I haven't taken a look at the inner workings of this. Is it interfacing the python API with PyCall? If so, could this expose the summary_iterator I posted above? Additionally, the option to download CSV or JSON on the web interface is presumably exposed in the API somewhere, maybe it is possible to access whatever that web interface is doing?

No, I avoid working with PyCall. I had created TensorBoardLogger exactly to avoid installing PyCall on the cluster where I run simulations. It is completely independent of Python and TensorBoard, as such you can't use it to call into the Python API.
I'm not familiar with summary_iterator, but the read_event(f::IOStream) function above simply takes as input the event file (as an IOStream) and recreates the protobuffer from it. You can have a look at this gist, which does exactly what you want.
The limit of that gist is that (i) (I believe) it won't work if you append to an existing log and (ii) it works only with scalars. Addressing those limits would be easy if there was a decent way to check if a field in a struct is undefined, but the macro @isdefined does not work (@oxinabox maybe you know something about it?)

isassigned IIRC

FYI I start implementing the loader based on read_event https://github.com/tkf/TensorBoardLoader.jl
@PhilipVinc Is it OK to redistribute your code snippet like this?
Something like TensorBoardLoader.loadscalars(DataFrame, "logdir") seems to work (where DataFrame can be replaced with any table-receiving function). Loading non-scalars shouldn't be hard but I haven't implemented high-level APIs yet.

Something like TensorBoardLoader.loadscalars(DataFrame, "logdir") seems to work (where DataFrame can be replaced with any table-receiving function

Why not make loadscalars return a Table directly, so can just use the constructor of DataFrame (or invoke any table-receiving function)
DataFrame(TensorBoardLoader.loadscalars("logdir"))
Also why a separate package, why not make a PR to this one?

Why not make loadscalars return a Table directly

That's a good question.  This is because Julia does not have a resource cleanup API for the iterators.  So, if you want to support lazy loading and close the files reliably, this has to use the callback interface (which is not so bad as you can use a do block).  I'd guess many people don't care about it and OK with letting the GC handle file close.  It's easy to add such an interface.  I just don't need it personally ATM.

Also why a separate package

It's heavily using my package Transducers.jl so I wasn't sure about selling it with a PR, considering that the iterator transforms are the major interface for this kind of task.  I also haven't used it enough to see if it makes sense to use lazy loader approach.

That's a good question. This is because Julia does not have a resource cleanup API for the iterators. So, if you want to support lazy loading and close the files reliably, this has to use the callback interface (which is not so bad as you can use a do block). I'd guess many people don't care about it and OK with letting the GC handle file close. It's easy to add such an interface. I just don't need it personally ATM.

Fair.
One option might be to default the type to either Tables.RowTable (i.e. Vector of NamedTuples),
or Tables.ColumnTable (i.e. NamedTuple of Vectors).
So it would be eagerly done and cleanup could be done ?

@PhilipVinc Is it OK to redistribute your code snippet like this?
Yes of course

Also why a separate package, why not make a PR to this one?
Eventually I will add support for de-serializing TB data to TBLogger (I have already a basis for this in the read-serialized branch, but I did not have that much time to finish it yet).
Eventually users will default to what is provided in the base package, I believe, unless your optional package provides something that really is worth the extra hops.

If you need this now and with your constraints, I understand, but otherwise does it make sense to implement this twice?
--
Having said that, I have the following questions:

So, if you want to support lazy loading and close the files reliably.
Is there any issue with not closing the files reliably, and letting the GC do the work? From the little I know computers can live with a couple (thousands) open files. And as we are opening them in read-only mode, is it that important to close them?

support lazy loading
Is this really needed for the case of TensorBoard scalar data? To my understanding you lazy-load things that take a lot of memory (or time) to load. Is this the case, especially for scalar data?

Is there any issue with not closing the files reliably,

I would need someone to confirm, but I think it might cause issues on Windows.
I recall something about windows making open files exclusive.
And you might want to be reading and writing?
Not sure though

And you might want to be reading and writing?

On Unix platforms I'm confident this is a non-issue because I used to do it often in C++ (open a fstream in a file, and write from there, read it from another process).
On Windows no idea. Please let me know.

Eventually users will default to what is provided in the base package, I believe, unless your optional package provides something that really is worth the extra hops.

@PhilipVinc I just needed this right now and so I hacked it up.  My intention was a friendly "hey I implemented this, you can use this if you need it now" and not causing any conflicts or confusion.

From the little I know computers can live with a couple (thousands) open files.

Quick googling showed me
https://discourse.julialang.org/t/massive-readstring-too-many-open-files/3426 (Linux)
https://superuser.com/questions/1356320/what-is-the-number-of-open-files-limits (Windows)

Is this really needed for the case of TensorBoard scalar data?

Maybe?  I actually don't care because transducers are lazy and efficient by default.  There is no trade off.

One option might be to default the type to either Tables.RowTable (i.e. Vector of NamedTuples),
or Tables.ColumnTable (i.e. NamedTuple of Vectors).

@oxinabox That sounds like a good API.  I need a good table integration for Transducers.jl and it would be nice to have some generic code for materializing a table (especially a column-oriented version) with the push-or-widen approach.  It'll be a nice case study.

Don't worry! I wasn't complaining at all. I just dislike wasting effort. Ignore me.

Quick googling showed me

Yes you are right. but with TB you will have a bunch of files. hardly even hundreds...
I'll still have a look at transducers.

I just dislike wasting effort.

I guess that's a typical instinct of good programmers. Sorry to set your nerves on edge.

with TB you will have a bunch of files

Maybe it can happen if someone builds a machine learning web service or something, using TB file loader? Also, IO close can cause other events like stop writing if it were a pipe. It makes sense to prefer a deterministic close. It's not hard to write code with reliable close so I think it's a good idea to just do it always.

Implemented in #57 , closing.


php-webdriver Not working on server even working fine on local machine

What are you trying to achieve? (Expected behavior)
I want to run selenium on aws with firefox and chrome browser
What do you get instead? (Actual behavior)
I have installed selenium 3.8.1 on my local machine with geckodriver and chromedriver and it is working fine when i hit the page from command line and browser but when i am install same configuration on aws i am getting following error.
PHP Fatal error:  Uncaught exception 'Facebook\WebDriver\Exception\WebDriverCurlException' with message 'Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","acceptSslCerts":false}}
-->
How could the issue be reproduced? (Steps to reproduce)

namespace Facebook\WebDriver;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
require_once('vendor/autoload.php');
// start Firefox with 5 second timeout
$host = 'http://<IP_ADDRESS>:4444/wd/hub'; // this is the default
#$driver = RemoteWebDriver::create($host, DesiredCapabilities::firefox());
#$capabilities = DesiredCapabilities::firefox();
#$driver = RemoteWebDriver::create($host, $capabilities, 5000);
$desired_capabilities = DesiredCapabilities::chrome();
$desired_capabilities->setCapability('acceptSslCerts', false);
$driver = RemoteWebDriver::create($host, $desired_capabilities);
// navigate to 'http://www.seleniumhq.org/'
$driver->get('http://www.seleniumhq.org/');
// adding cookie
$driver->manage()->deleteAllCookies();
$cookie = new Cookie('cookie_name', 'cookie_value');
$driver->manage()->addCookie($cookie);
$cookies = $driver->manage()->getCookies();
print_r($cookies);
// click the link 'About'
$link = $driver->findElement(
WebDriverBy::id('menu_about')
);
$link->click();
Details

Php-webdriver version:
PHP version:  php 5.6
Selenium server version: 3.8.1 and 3.6
Operating system:  ubuntu
Browser used + version:  mozila 58 and chrome

Please try Chrome to see if it works. If so, you may be impacted by #469 . If it will not work either, the problem must be somewhere else.


bug: pictures do not load after migration

@BitcoinMechanic are there any errors in the logs? What about in the console/network tabs?

This was a permissions issue likely related to my non-standard migration. Probably fine to close this.


Items component

I want to draw some tabs without use ItemSource, how to do this? What is the item component?

This style is not supported.
You can use like

but it's bad working - after dragged tab, tab redraw to initial state=(

Thanks @egorozh


Use xgboost to categorize a continuous variable, conditional on prediction and other covariates

Hello,
I'm doing causal inference using the virtual twins method (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3880775/). The literature on this and similar method focuses on categorical treatments, while in my case I have continuous ones.
To categorize such variables I tested two methods: Either I use a regression tree on the xgboost model predictions to find subsets the maximize the discrimination of the outcome, or, if the tree fails to find useful strata, I categorize the variable using quartiles.
The first method has the problem of not considering the other covariates, even if is trained on the full xgboost model predictions,  which do include the effect of all variables, not on the actual dichotomic outcome. The second method instead doesn't even consider the outcome.
Since xgboost internally do split the predictors among the trees, is there a theoretically robust method to use such rules to transform the continuous predictors in a categorical one with as few splits as possible which include information about the outcome and the covariates. A sort of simpler rule produced by collapsing all the xgboost tree rules related to the predictor of interest.
Thanks

@avinashbarnwal Are you familiar with the topic being discussed here? Are decision trees commonly used in causal inference?

@hcho3, i have heard about it. I have seen one R package vignette explaining it more clearly. I think we can see the performance difference between random forest and xgboost. I am not sure about how we can have internal splits based on that. Generally, researchers also Bayesian trees for internal splits.
Link - https://cran.r-project.org/web/packages/aVirtualTwins/vignettes/full-example.html

Yes, the context is similar. The problem is that the whole literature on the matter is based on a dichotomic treatment variable, while I need to extend it to continous ones. One method I thought of is to transform the variable in a categorical one using meaningful split points.


Feature/action link improvements

Description
Fixes DG-394

Codecov Report

Merging #181 into develop will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop     #181      +/-   ##
===========================================
+ Coverage    91.14%   91.15%   +<.01%
===========================================
  Files          126      126
  Lines         2101     2103       +2
===========================================
+ Hits          1915     1917       +2
  Misses         186      186

Impacted Files
Coverage Δ

...c/App/Documentation/components/ActionLink/index.js
100% <100%> (ø)
:arrow_up:

src/App/components/ActionLink/index.js
100% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Upgrade npm's dependencies to their newest version

This command allows npm to upgrade its dependencies to their latest version.

Sorry the computer glitched

The reason the tests keep failing is because yarn fails to get a file 3 times. It might have stopped the tests.

Never mind what I said.

I don't think the tests are looking good...


typos in method name and phpdoc

assertVersionGreaterThen() is already deprecated in favor of assertMinimumVersion().
We did not alone to fix the than/then-typo, but also to be more semantic correct.
assertVersionGreaterThen() should have been named assertVersionEqualsOrGreaterThan() from the beginning.
I cannot see a need for another alias to the new assertMinimumVersion().
Any reasons why the new method should be introduced?

We should, nonetheless, fix the typo in the deprecated tag, as to make the deprecation more visible (ie. PHPStorm automatically highlights deprecated methods, which is not currently true for this method due to the typo).
As for the wrapper method, I agree with @bcremer that we should not introduce it. The typo problem will be fixed once we remove the deprecated method.

Ok, you're right. But at least the typo in phpdoc should be fixed, so one can see in PhpStorm, that the method is deprecated.

Thank you @SvenHerrmann. I included your commit into the 5.1 branch.


Rust generic twitch drops are not accurately tracking progression

Watching channel that has own drop and generic drop does not progress generic one, however watching channel that was only generic drops enabled works as expected

The time remaining shown in the miner is mostly just a guess, because twitch itself doesn't report progress frequently or accurately. Also, these drops are progressing for me, are you sure they are actually not progressing?

It does seem like progress is reported less accurately than expected, I saw the real 50% on the 60 minute door, but it showed only ~5% on the 180min metal door.

the generic only progress once you get a drop from a streamer with their specific drop, they dont progress simultaneously

the generic only progress once you get a drop from a streamer with their specific drop, they dont progress simultaneously !

@Ardougne That still wouldn't explain a 1hr drop being half way done in TDM (30min) and a 3hr drop being at 5% (9min), while twitch correctly shows the second drop at 16%.

the generic only progress once you get a drop from a streamer with their specific drop, they dont progress simultaneously !

@Ardougne That still wouldn't explain a 1hr drop being half way done in TDM (30min) and a 3hr drop being at 5% (9min), while twitch correctly shows the second drop at 16%.

they arent tracking and not progressing as they should it seems. you should be getting progress on both at the same time as the streamer specific ones.

you should be getting progress on both at the same time as the streamer specific ones.

Not sure about this, as it never happened for me, even with the original TwitchDropsMiner.

I could also see it being the new priority system that changed the absolute priority value which could maybe cause a problem somewhere else. It definitely is progressing and I think @ywwa mistook inaccurate progress prediction for no progress.

It's really weird how some are accurate and some are not...

It definitely is progressing and I think @ywwa mistook inaccurate progress prediction for no progress.

I ran program for multiple hours (more than 2) And I am positive that no progression on generic drops is being made whilst watching steamer with 2 active drops (generic & streamer bound)
If the streamer drop is claimed and continue to watch same stream then generic drop progresses as intended
else only the streamer bound progresses
Always verified progress thru twitch.tv/inventory and not the program

Can confirm the base drops campaign won't progress if you're watching a stream with a unique campaign and you haven't completed the unique drop campaign.

I guess it's 2 things at the same time? The drop not progressing while another one is sounds to be more likely a twitch thing to me. That would also explain the inaccurate progress shown in TDM.'
Does anyone know whether the same thing happens when watching manually?

Does anyone know whether the same thing happens when watching manually?

When actually watching stream on twitch then both, generic and streamer drops progress at the same time

Does anyone know whether the same thing happens when watching manually?

When actually watching stream on twitch then both generic and streamer drops progress at the same time

Well, that's an issue then. I have no idea how to fix it, since the bot is already almost watching the stream as a human would.
Maybe it would have to be more frequent than every 20s, or maybe send the minute-watched thing again? If someone figures it out I'll fix it, but TDM does still seem to get the drops in time.

Something is just weird with the generic drop, I just had to watch like 2s of the stream to finish claiming the last6 one, because it was showing 0s remaining in the miner and wouldn't watch when it was at like 99.7%.

Afaik you can only get generic drops from a streamer after you've got their own unique drop. I believe this was changed a while back.
For me TDM is somehow farming the generic drops before it it farms the unique drops, which fails due to the above reason.

Does anyone know whether the same thing happens when watching manually?

When actually watching stream on twitch then both generic and streamer drops progress at the same time

@ywwa Are you sure this is the case, then? @L-Mustang claims the opposite.

Afaik you can only get generic drops from a streamer after you've got their own unique drop. I believe this was changed a while back.
For me TDM tries to farm the generic drops before it it farms the unique drops, which fails due to the above reason.

Also if this is the case it shouldn't really be an issue, because afaik the miner would still claim the drop it "accidentally" mined instead. At the latest in the hourly refresh.

Afaik you can only get generic drops from a streamer after you've got their own unique drop. I believe this was changed a while back.

Did they actually change something about overlapping drops?
Yesterday when I was checking thru website, both drops progressed for me at the same time 🤔

@L-Mustang ?

This is my claim history for this round of Rust drops (bar 1). The ones in the red boxes are generic drops, each requiring 1 hour, consecutively, up to a maximum of 5 hours. Pretty much all of these were claimed with TDM. Most of the generic drops are unlocked after all the streamer-specific drops have been claimed. The ones I unlocked early I recall due to TDM not switching to a different stream once unlocking the streamer-specific drop for said stream.

Oh so they've actually changed something not so long ago
Doesn't cancel the fact that for me generic and unique drops were progressing for some reason together,but w/e i guess
@Windows200000 Should this issue be closed now ?

@ywwa I'll leave this open, because TDM still reports progress incorrectly. I have no idea whether there is any way to fix this, because there might be no client-facing indication of "generic" progress being blocked. Unless this is a universal change applying to all campaigns.


Add a couple of missing global:: prefixes

was missing when writing out full name of an enum value
was missing in one case when writing out TagHelperAttribute type name

nit: updated CSharpTagHelperFieldDeclarationVisitor.WritePrivateField() to always include the prefix

no change in generated code but centralizes the prefix addition and reduces intermediate strings

/cc @NTaylorMullen
Will test MVC with these changes in place...

:shipit:

a8d4da9


ParrotOS Not supported

Issue Description
Does not support ParrotOS install needs to be updated (debian build)
Reproduction Steps

Try to install King Phisher on Parrot OS

Environment Details

Host OS: Newest ParrotOS Build.
King Phisher Version: current
Error Details / Stack Trace
Failed to detect the version of Linux
This installer only supports the following Linux distributions:

BackBox
CentOS
Debian
Fedora
Kali
Ubuntu

If the current version of Linux is one of these flavors but it is
not recognized, please open a support ticket and include the version.

thanks for escalating wolfthefallen, I looked at making the change myself but fell short, do you think this will get done or have a eta on a quick fix?

I'll be taking a look into on Monday, as ParrotOS is not an official OS that we support, I cannot give it a defendant time line.

Although ParrotOS is not officially supported by King Phisher the OS maintainers have it available through apt.
You can install King Phisher on ParrotOS by doing the following commands
sudo apt update
sudo apt install king-phisher

Once installed you can start the King Phisher server with sudo systemctl start king-phisher and you can start the client type in /usr/share/king-phisher/KingPhisher
If you have any issues with installing KingPhisher on ParrotOS please reach out to the maintainers of the ParrotOS.


Fix healer when model uses an ordering default scope

When using an ordering default scope in the model, the query generated by the healer with model.select(*positioning_columns).distinct is invalid:
ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select
list (PG::InvalidColumnReference)

With a default scope that orders the records, Rails automatically adds the default scope to all queries, including the SELECT DISTINCT above. This breaks the healer, because it does not add the default ordering scope to the select list. Unscoping the query before selecting removes the default query and makes the healer work. This should not impact other functionality, since any ordering required when healing must be passed explicitely anyway.

You'll need to rebase this as things have moved a bit in main. Can you also try using reselect and let's see how that tests out :)

Hi @LukasSkywalker, do you still want to progress this?


Disable vault spring boot

I have a spring boot project where I wanted to disable the vault conditionally.
      <dependency>             <groupId>org.springframework.vault</groupId>             <artifactId>spring-vault-core</artifactId>             <version>2.2.3.RELEASE</version>         </dependency>
The version I am using. How can I do that?
I have spring profile-based configurations in the code.

Spring Vault isn't controlling Spring Boot or the like. You can either disable the auto configuration, bootstrap context, or remove Vault from spring.config.import but all these are Spring Boot topics.


feat(modal): add backdrop and keyboard options

Closes #134
Add backdrop prop to modal with the following options

true show backdrop, close on click (default)
false hide backdrop
"static" show backdrop, do not close on click

Add keyboard prop to modal with the following options

true close on escape (default)
false do not close on escape

Add tests and docs

@TheSharpieOne That was super quick! Thanks!

great additions!


Project direction

Let's discuss direction for this project, so that people possibly joining in know that we have common goals.

Here are my desires:

Feed Docker Swarm containers for the whole cluster to Prometheus
Since this is somewhat critical part of the infrastructure, it should be stable enough (Glide or something for version pinning and set up a CI system for automatic builds). Keep code as simple and small as possible.
Provide a Consul Catalog -compatible API so Prometheus (and other projects) can consume container data (service names, IPs, ports, labels etc.) out-of-the-box.

Labels from Docker to Consul would be required for automatic loadbalancing discovery for https://github.com/containous/traefik

Keep it lean in RAM and CPU, so this can be ran on commodity DigitalOcean VMs and such

And nice to have features:

Provide a way to scrape container & host metrics

maybe as a feature toggle
OR another project
OR refer them to Cadvisor if it is deemed better and doesn't consume too much resources
We should at least advice users on how to achieve this because most users probably want this

I'm all for the above.
For me the consul api is the big win because of consul watch.
With regards to dependencies, how do you feel about the following:

https://github.com/urfave/cli for cli (just makes life a whole lot easier with args. Not really required but nice)
https://github.com/sirupsen/logrus for logging (sensible and widely used)
https://github.com/cskr/pubsub for event handling: This one might need explaining:

I'm picturing one eventwatcher that distributes events pubsub style to our main handler, a cataloger, which holds our source of truth of endpoints/tasks, and then any plugins and then the web api. The need for it at the web api side would be to get the long polling events. There are other ways to do this but a pub sub is quite nice as long as we don't have a huge number of concurrent requests from the web api.
Edit:
Just looking though, does traefik support swarm mode natively? Seems to!

I threw together a draft of how the pub sub would work: https://github.com/byrnedo/prometheus-docker-swarm/tree/feature/pubsub
Makes things surprisingly simple, and of course brings some intellectual overhead too.
Btw, don't take my enthusiasm for overbearing, I'm just doing this since I think it's fun, I'm not assuming that we agree on this

I think I was getting ahead of myself, thinking that since we'd build a Docker-to-Consul bridge, we might as well support the use cases for Consul discovery like Traefik reading from Consul, but didn't think that yeah Traefik can tap off directly to Swarm as well.. :D This kind of thinking is dangerous, since the focus should first be in serving the core need: get metrics endpoints from Docker Swarm tasks to Prometheus. In the beginning we can forget container/host metrics as well... let's just get the core idea working flawlessly, and if that takes off then maybe think of the nice to haves. :)
If we both agree that we should integrate to Prometheus via the Consul API, then that's awesome and let's start exploring on that concept. Like you said, a good idea would be to first understand the protocol and what kind of HTTP requests Prometheus makes to Consul API. Setting up Prometheus, real Consul and getting a tcpdump of the API interaction would be a great start in reverse engineering it (I found it a bit difficult to understand the protocol just by looking at Consul's source code - but perhaps I'm a bit simple :) ).
I'm using Glide in my other projects as well - it seems to be the de facto standard until go dep is officially released.
Logrus seems to be widely used so it's awesome.
https://github.com/urfave/cli seems to have more stars than https://github.com/spf13/cobra, but Cobra seems to be embraced by highly respected projects so if we need a CLI library, I'd vote for that.
I have no objections for a pub/sub system if we really need it (I understood that it's for a multi-recipient delivery in contrast to a "random" recipient with bare Golang channels if there are multiple consumers). I'm having a hard time understanding the need for multiple listeners for a topic, but perhaps I'll get it when I'll look at your pubsub branch soon. :)

Agreed. Basics first :)
I've seen cobra a lot but never used it, I can go for that.
Yeah, the multiple recipient possibilities are the reason. I was initially thinking of the consul long polling there, but it actually might tend itself well to writing plugins/extension since you'd just need to subscribe to a channel for events like 'endpoint.created' or 'endpoint.remove'.

I think consul could be stage 2 really. A more robust service discovery for prometheus is definitely goal #1 for now.

Did you ever find a way to allow the metrics path to be configurable btw? I see that it's set in the conf itself which I'm guessing one can't just generate with good conscience.

Did you ever find a way to allow the metrics path to be configurable btw? I see that it's set in the conf itself which I'm guessing one can't just generate with good conscience.

The metrics_path in the Prometheus configuration is just a default, unless it's overridden by a target. If you provide a __metrics_path__ label to Prometheus then that is used (https://prometheus.io/docs/operating/configuration/#relabel_config). I think I just didn't have time to implement the regex parsing for the path part in https://github.com/function61/prometheus-docker-swarm/blob/master/utils.go#L62 because I didn't know how to use capture groups with Golang regex yet :D (I think this literally was the first project I started to write in Golang).
The resulting file should look like this:
[
	{
		"targets": [
			"<IP_ADDRESS>:80"
		],
		"labels": {
			"job": "html2pdf",
			"__metrics_path__": "/foometrics"
		}
	}
]

I think we should populate that __metrics_path__ for clarity regardless of whether the path is default (/metrics) or not, so the file structure is always uniform and there's a clear mapping from Swarm's METRICS_ENDPOINT ENV var.

I think consul could be stage 2 really. A more robust service discovery for prometheus is definitely goal #1 for now.

I'd like to hear your thoughs on this. In my mind the robustness is achieved by emulating the Consul API.
If we don't use it, we have to to integrate via the file config option. That means that we must be able to write to the filesystem on the Prometheus process, either by:

Running this "bridge" binary in the same container

This is what we're doing now, and is dangerous because if you look at https://github.com/function61/prometheus-docker-swarm/blob/master/run.sh#L5, you'll see that if the bridge process dies, nobody will restart it.
I wouldn't want to have to include a process manager to guarantee that they're both running. IIRC Prometheus is a statically compiled binary, because that binary has to be compiled statically to work in Prometheus' container because there was no libc available (the only dependency of Golang-based binaries), and the only lightweight procman I found was https://github.com/mattn/goreman which requires libc unless we compile it ourselves..
And running multiple binaries in a container is not the "Docker way" IMO.
Also this hack is not good because the bridge and Prometheus versions cannot be upgraded separately, but instead for every Prometheus version we'd have to publish this bridge image because they're so deeply intertwined.

Or run in a separate container but still for the file writing part we'd have to have a bind mount that is seen by both containers (Prometheus and the bridge), which constrains both containers to reside in the same host machine, which requires you to specify placement constraints for these two Swarm Tasks... I don't like this.

So my thought process was: the bridge needs to be run in a separate container, and possibly on a different node => the integration needs to be over HTTP => the best out-of-the-box integration that works over HTTP was Consul.
WDYT?

Awesome with the explanation about the labels, had no idea they could be overwritten in the targets! :)
I do agree that without some http api then it's really clumsy. And I suppose the version you have right now does the file job simply and well even if it's polling. At least it's correct all the time, and getting millisecond precision on target metrics doesn't in my mind matter.
In my mind I would probably always run the file version with a mount shared by prometheus but it's hardly elegant or future-proof.
I also think that consul is probably a good a way as any to go. As we've said before it will make this more than just a docker prom bridge.
I guess my reason on it being a stage 2 was more just commitment and complexity, but in hindsight I think it's worth it really (and probably quite interesting).

If we both agree that we should integrate to Prometheus via the Consul API, then that's awesome and let's start exploring on that concept. Like you said, a good idea would be to first understand the protocol and what kind of HTTP requests Prometheus makes to Consul API. Setting up Prometheus, real Consul and getting a tcpdump of the API interaction would be a great start in reverse engineering it (I found it a bit difficult to understand the protocol just by looking at Consul's source code - but perhaps I'm a bit simple :) ).

At this point I definitely agree! I also tried looking through the code but it was not easy so I think you've the best idea. Also, one sneaky call to the kv store might change everything so best to get a detail view of the requests.
Shall we make a card with some investigation tasks for this, I kind of R&D to see if it's worth the trouble or possible?

Also, I just saw that actually the events that are swarm global are only for service create, update, remove. There still is a better way than polling the api, if on service change we start polling the internal dns on tasks.<service-net-alias>. Would be a lot quicker and less demanding on the docker engine.

Sorry for the slow reply, have been a bit busy lately!
I took a look at your "pubsub" branch. You seem to have removed the pub/sub feature now :D But I see the design it used to have on the older code tree when it still used to exist. It looked actually pretty nice. :) But of course if pub/sub is not required (I guess since you removed it) then less is simpler. :)
I also noticed that you started putting code in different packages (such as the plugins), which I like because I've been a fan of splitting separate concepts into their own packages where it makes sense to.. I'm not sure what the Golang ecosystems' vision of this is because I've seen many apps where packages have large amounts of files with obvious different concepts living in separate files but same package (= they can in theory depend on each other which I don't like), but to me many packages feels "the right way". :)

In my mind I would probably always run the file version with a mount shared by prometheus but it's hardly elegant or future-proof.

Yeah I don't like it because it forces us to pin Prometheus and this bridge to run on the same node. And that makes us more prone to failure because if the node running Prometheus dies, Swarm cannot just re-schedule Prometheus (or the bridge) to run on a different node. Ok in practice you still need to pin Prometheus to a node because it has state (unless you use Flocker or something for handling/migrating state) which we don't want to vanish if the container is restarted, but I wouldn't want to have one more reason to make container placement less flexible.
Also, before we waste more of your time I hope you're aware that if our goal is just to enable service discovery from Swarm in Prometheus, you could also use your effort and do it directly in Prometheus as a SD plugin. And the whole "emulate Consul" approach is just to support plugging Swarm data in without modifying Prometheus (which is not something we'd have to do if Swarm SD was written directly inside Prometheus). My goal was to make a proof-of-concept outside of Prometheus because it was quicker to code than learning how to develop against Prometheus' codebase, and maybe I was dreaming of integrating host/container metrics gathering in this one as well to have fewer and simpler/leaner components to operate than to add cadvisor and stuff. :)
That being said, if you still think that your time is well spent in this design (Consul-Swarm bridge outside of Prometheus with the added promise of more stuff like host/container metrics), I'm glad to work with you and give write access to the repo. :)

Also, I just saw that actually the events that are swarm global are only for service create, update, remove.

Darn it... Oh well back to polling then. I suppose via DNS is more efficient than polling for Docker's REST API like you said.

Another option might be to figure out the task ips based on the netmask and replicas (assuming they're predictably allocated)

I don't know how documented that would be, but in general it's not a good idea to rely on implementation details, unless they're clearly documented and promised that they're not going to change, and we don't have to code for all the surprising corner cases.. :)
I can't promise anything because this week looks a bit busy as well, but I've been thinking a bit about the setup of reverse engineering Consul's API: spin a fresh Consul, fresh Prometheus with it configured to connect to Consul's API. Register a task in Consul (and verify it shows up in Prometheus), then take a tcpdump capture and in Wireshark see the API requests it makes to Consul.. then document it here so we can learn together. I just don't have the time to set that up right now, but I could probably soon do it.
Also, I noticed that there's a Marathon SD plugin whose URLs are configurable and looks a lot simpler (uses polling instead of long polling) which is an API we probably could mock more easily, but then again it's not Consul (and therefore it's less usable if we'd be thinking about more projects benefiting from a generic Swarm-to-Consul bridge). But we could consider Marathon emulation as a quick proof-of-concept if it would benefit us before committing to the Consul part..

No worries at all, I'm the same!
About the pubsub: I got worried just about trying to avoid deadlocks and didn't really know the full capabilities of that little library so thought that simpler was better for now.
And with the packages; yeah, I'm not quite sure what best practice is with that. Maybe having larger packages promotes writing more encapsulated code (structs with methods vs plain functions).

Also, before we waste more of your time I hope you're aware that if our goal is just to enable service discovery from Swarm in Prometheus, you could also use your effort and do it directly in Prometheus as a SD plugin.

Thats a good point. I guess personally I was most interested in getting somthing that would provide targets to prometheus but also for templating other services. In the case of an load balancer it would be much better to be more frequent than polling I would think. But after you pointed me towards traefik, and after having a look at openresty, I think maybe I'd better just go with one of those.
Since docker doesn't support swarm task events (yet - there is some vague talk that it might be implemented, they are reluctant due to the amount of data that would be sent), the best one could do would be watching the dns entries. Downside is one wont get access to unhealthy targets AFAIK. Which feels a bit limiting.
My feeling now is to wait until or if docker starts shipping with task events, then make the POC into a reliable and fast termplater. Then after that is done, and we have a solid base, look at implementing some prometheus compatible api.

@byrnedo just a heads up, I made some progress: https://github.com/prometheus/prometheus/issues/1766#issuecomment-448962898
I realize that the mind share has probably moved to Kubernetes, but I haven't had the time to learn it and migrate to there. I'm now running promswarmconnect in production and it seems to work quite well.

@byrnedo I don't know where your response got lost (I got it in email), but I'm not seeing it anywhere. I pasted it here:

nice :) I've not been doing much on swarm lately but after having used k8s I might start doing so again. K8s is reallllllly heavy. I like how light swarm is.

I'm curious to hear about your experiences, since I'm interested about learning about k8s! In what regard do you consider it "heavy" - is it mentally hard to understand, or is it heavy on the server resources like RAM and CPU? Both?
I'm currently running a super small startup, so having the ability to use cheaper VMs with low overhead of the infrastructure layer is important to me.

Also, it would depend on my colleagues. If everyone was interested on getting their hands dirty, swarm could work. But if people just want it do work and do everything that's needed then k8s would be better.

Ahh haha that explains.. I replied to the email notification, so by extension I also replied to the wrong repo 🤦♂  😆  I was wondering why that happened, but now I know. :)
Oh, it's cool that k18s has reverse proxying, because with Swarm you pretty much have to bolt that on.. the port-based loadbalancing in Swarm doesn't get you far unless you're only running one HTTP service in your cluster! I'm using Traefik and i has worked great for me.
The default instances kops provisioned for you sound pretty beefy and expensive machines.. I'm left wondering what is the minimal recommended setup for k18s and the overhead of k18s regarding CPU/RAM.. I've tried Googling but haven't found anything clear. Perhaps it's not a problem since people are not talking about the overhead with cheap VMs..
p.s. I am closing this issue, since I think my design for this is "final" :)

Yeah, there could be a way to run it on less

https://twitter.com/jessfraz/status/1078059657694973954 interesting thread


Do not overwrite user's value of org-roam-db-location

This PR makes it so that org-roam-db-location is treated in the same way as org-roam-directory.

Thanks!


Catch up v4.1 release branch with main

The release/v4.1 branch which is used for all changes for the upcoming v4.1 release is behind the main branch.
This PR is for merging main into release/v4.1 to have the release branch be up to date with the current specification to minimize merge conflicts.

Ah, the merge conflicts on this protected branch are a bit of a hassle, I'm going to have to make another PR to resolve them. Stand by.


Extra indentation when using "lines-between-rulesets"

Consider the following CSS:
Before:
body {
    background-color: #111;
}.landing-page {
    color: black;
}

Expected behavior:
body {
    background-color: #111;
}

.landing-page {
    color: black;
}

After CSSComb:
body {
    background-color: #111;
}

    .landing-page {
    color: black;
}

Problem confirmed in Sublime and VS Code. So there is definitely something wrong when using
"block-indent": "    ",
"lines-between-rulesets": 1,

The rest of my configs:
                "remove-empty-rulesets": true,
                "always-semicolon": true,
                "color-case": "lower",
                "color-shorthand": true,
                "block-indent": "    ",
                "element-case": "lower",
                "eof-newline": true,
                "leading-zero": true,
                "quotes": "single",
                "sort-order-fallback": "abc",
                "space-after-colon": " ",
                "space-before-combinator": " ",
                "space-after-combinator": " ",
                "space-between-declarations": "\n",
                "space-before-opening-brace": " ",
                "space-after-opening-brace": "\n",
                "space-after-selector-delimiter": 1,
                "space-before-selector-delimiter": "",
                "space-before-closing-brace": "\n",
                "strip-spaces": true,
                "tab-size": true,
                "unitless-zero": true,
                "vendor-prefix-align": true,
                "lines-between-rulesets": 1

@henriquebs12 Change lines-between-rulesets to be true instead of 1. You just helped me solve my search for adding lines between rulesets. When I copied your code with a 1, I got the same issue you're running into. When I changed it to true, I got the expected output. Hope that helps, and thank you for indirectly helping me!

@henriquebs12 Never mind. It's a really weird behavior. When I set the value to 1 and run CSScomb, I get the issue. I set it to true instead and it makes it the expected output. If I leave it as true and paste in fresh CSS to be formatted, I don't get any lines between rulesets. I have to set it to 1 again, run CSScomb, and then set it to true and run CSScomb to get the correct output. Sorry about that. :/

Good day!
To correct the indention, I changed the value in the file lines-between-rulesets.js of 'runBefore ()' function:
from
get runBefore () {
    return 'block-indent';
},

to
get runBefore () {
    return 'tab-size';
},

After that, it began to work as it should! I hope that I will help someone ...


Allow copy/paste env vars

When creating containers with a lot of env variables... would be nice to be able to paste them in.
The workflow here being creating multiple containers with identical configuration on separate hosts.

In rancherio/ui#154 you can paste one or more lines of name=value pairs into any of the environment variable name fields.

All keys and values are trimmed on both sides.  Empty lines are ignored.
If there is an existing value for a name in the paste, the old value is overwritten
Any empty name+value pairs that happened to be in the list before are removed (because...reasons...)
A line with just a key (no "=") is allowed.  If the entire paste has no "=" then it is not a special paste and the string just replaces the name you pasted into.

v0.20.2
Failed - does not work in Firefox.  Works in Chrome and Safari

Fixed for firefox..

Version - master 3/9
Verified fixed


Dashboard usability changes

Pull requests into this repository require the following checks to be completed by the submitter and reviewers.
Changes in this PR:
Made the following usability changes to the shiny dashboard:

Dashboard Page

Moved the Info Modal down closer to the "Endpoints by Developer and FHIR Version"
Changed the FHIR Version  for endpoints that did not return a capability statement to "No Cap Stat"

Endpoint Page

Change the column name from "Valid Capability Statement" to "Capability Statement Returned" in endpoints table

Validation Page

Add an icon next to each entry in the validation failures to indicate whether it returned a capability statement or not
Grey-out rows that didn't return a capability statement
Submitter:

[x] Administrative tasks are complete.

This pull request describes why these changes were made.
The JIRA ticket links to this PR.
The JIRA ticket for this PR is: Lantern 445 JIRA Ticket

[x] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

[x] Code review has been performed.

Code diff has been done and checked to ensure only expected code is being committed.
A linter for the language has been run.

Primary Reviewer:

[ ] Code works.

Code has been run locally and the basic functionality affected by the PR has been checked.
Edge cases have been checked to ensure behavior is as expected.

[ ] Code review has been performed.

Code is maintainable, reusable, efficient, and correct.
Code accomplishes the tasks purpose.
Code follows style guidance appropriate for the language, including passing linter checks.
Code is well commented (which does not mean verbosely commented).

[ ] Tests are complete.

Tests are included and test edge cases.
Tests have been run locally and pass.

Merger:
Prior to merging, ensure that all checks have been completed. Delete the branch after the merge
is complete.

Two minor things:

The text for the Info modal on the Dashboard page should be updated so that it says "If a given FHIR endpoint returns an error or cannot be reached during the current query period, Lantern will report FHIR Version as 'No Cap Stat' and Developer information as 'Unknown'."
The validation details table does not seem to be showing the version field anymore? i'm assuming it's related to the 'No Cap Stat' change


maybe anyone having code for clamp meter 570s - app

maybe anyone having code for clamp meter AI-570s - app
https://www.amazon.de/AIOMEST-AI-570N-AI-570S-APP-Multimeter/dp/B0CCNYL38R

it looks like its the same model as:
https://www.amazon.com/BTMETER-BT-570CAPP-Multimeter-Measurement-Bluetooth/dp/B08C7LNHD2
bt-570s
and I think I've seen some open code that decodes this BLE stream.  if I find any links, I'll post here.


Cannot use object loaded by tf.saved_model.load() to create Keras model

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
MacOSX 10.13.6
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
N/A
TensorFlow installed from (source or binary):
binary
TensorFlow version (use command below):
VERSION='2.0.0-dev20190613'
GIT_VERSION='v1.12.1-4034-gb81b902c37'
Python version:
3.6.8
Bazel version (if compiling from source):
N/A
GCC/Compiler version (if compiling from source):
N/A
CUDA/cuDNN version:
N/A
GPU model and memory:
N/A

Describe the current behavior
The Keras code example in the documentation for the tf.saved_model.load() function raises an exception:
model = tf.keras.Model(...)
tf.saved_model.save(model, path)
imported = tf.saved_model.load(path)
outputs = imported(inputs)

Describe the expected behavior
I expect it to work as advertised. ;-)
Code to reproduce the issue
Here's the full code (I tried to add as little as I could):
import tensorflow as tf
from tensorflow import keras
import numpy as np

path = "my_saved_model"
X_train = np.random.rand(100, 5)
y_train = np.random.rand(100, 1)

model = keras.models.Sequential([keras.layers.Dense(1, input_shape=[5])])
model.compile(loss="mse", optimizer="sgd")
model.fit(X_train, y_train)

tf.saved_model.save(model, path)

imported = tf.saved_model.load(path)

inputs = keras.layers.Input(shape=[5])
outputs = imported(inputs) # Raises _SymbolicException (see stacktrace below) <<<!!!
model = keras.Model(inputs=[inputs], outputs=[outputs])

Stacktrace
Here's the full stacktrace:
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     60                                                op_name, inputs, attrs,
---> 61                                                num_outputs)
     62   except core._NotOkStatusException as e:

TypeError: An op outside of the function building code is being passed
a "Graph" tensor. It is possible to have Graph tensors
leak out of the function building context by including a
tf.init_scope in your function building code.
For example, the following function will fail:
  @tf.function
  def has_init_scope():
    my_constant = tf.constant(1.)
    with tf.init_scope():
      added = my_constant * 2
The graph tensor has name: input_1:0

During handling of the above exception, another exception occurred:

_SymbolicException                        Traceback (most recent call last)
<ipython-input-1-304bb0c5e2fc> in <module>
     16
     17 inputs = keras.layers.Input(shape=[5])
---> 18 outputs = imported(inputs) # Raises _SymbolicException <<<<<<<<<<<<<<!!!
     19 model = keras.Model(inputs=[inputs], outputs=[outputs])

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/saved_model/load.py in _call_attribute(instance, *args, **kwargs)
    399
    400 def _call_attribute(instance, *args, **kwargs):
--> 401   return instance.__call__(*args, **kwargs)
    402
    403

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py in __call__(self, *args, **kwds)
    431               *args, **kwds)
    432       # If we did not create any variables the trace we have is good enough.
--> 433       return self._concrete_stateful_fn._filtered_call(canon_args, canon_kwds)  # pylint: disable=protected-access
    434
    435     def fn_with_cond(*inner_args, **inner_kwds):

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py in _filtered_call(self, args, kwargs)
    600          if isinstance(t, (ops.Tensor,
    601                            resource_variable_ops.ResourceVariable))),
--> 602         self.captured_inputs)
    603
    604   def _call_flat(self, args, captured_inputs):

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py in _call_flat(self, args, captured_inputs)
    682     # Only need to override the gradient in graph mode and when we have outputs.
    683     if context.executing_eagerly() or not self.outputs:
--> 684       outputs = self._inference_function.call(ctx, args)
    685     else:
    686       self._register_gradient()

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py in call(self, ctx, args)
    451             attrs=("executor_type", executor_type,
    452                    "config_proto", config),
--> 453             ctx=ctx)
    454       # Replace empty list with None
    455       outputs = outputs or None

~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     68   except TypeError as e:
     69     if any(ops._is_keras_symbolic_tensor(x) for x in inputs):
---> 70       raise core._SymbolicException
     71     raise e
     72   # pylint: enable=protected-access

_SymbolicException:

Other info
I can actually call the imported object with tensors, as long as I pass the training argument:
>>> imported(tf.random.uniform([10, 5]), training=False)
<tf.Tensor: id=780, shape=(10, 1), dtype=float32, numpy=
array([[-0.7474083 ],
       [-0.25788566],
       [-0.48218375],
       [-0.60376763],
       [-1.4071536 ],
       [-0.45902687],
       [-0.07063864],
       [-0.9497912 ],
       [ 0.03344992],
       [-0.33686087]], dtype=float32)>

However, I cannot pass it the inputs tensor:
>>> imported(inputs, training=False)
...
~/miniconda3/envs/tf2/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     68   except TypeError as e:
     69     if any(ops._is_keras_symbolic_tensor(x) for x in inputs):
---> 70       raise core._SymbolicException
     71     raise e
     72   # pylint: enable=protected-access

_SymbolicException:

@ageron The documentation in the TF website mentions that
`The object returned by tf.saved_model.load is not a Keras object (i.e. doesn't have .fit, .predict, etc. methods).
Also it was mentioned that
Use tf.keras.models.load_model to restore the Keras model.
So, if you replace one line in your code, it works without any issues.
#imported = tf.saved_model.load(path)
imported = tf.keras.models.load_model(path)

May be we need to update docs to represent things clearly. Please let us know what you think? Thanks!

Indeed, everything works fine with tf.keras.models.load_model(path), thanks @jvishnuvardhan.
However, it's a bit odd that the function returned by tf.saved_model.load(path) cannot be used with Keras Input objects, since it can be used inside TF Functions:
[...]
>>> imported = tf.saved_model.load(path)
>>> imported(tf.constant([[1., 2., 3., 4., 5.]]))
<tf.Tensor: [...], numpy=array([[2.1844666]], dtype=float32)>
>>> @tf.function
... def my_tf_func(x):
...     y = x + 1.0
...     return 2.0 * imported(x)
...
>>> my_tf_func(tf.constant([[1., 2., 3., 4., 5.]]))
<tf.Tensor: [...], numpy=array([[4.368933]], dtype=float32)>

How can I use any arbitrary SavedModel in a Keras model?


Text visibility of Navbar improved

Earlier on hovering text of navbar of home page was not visible .. Now I have solved this issue.

Great work!!


Adding bones changes mesh coordinate system in GLTF viewer

Hello!
I am trying to make a simple sliding door animation for my GLTF viewer and keep running into this problem:
When i parent my objects (doors) with the separate bones (ctrl + p > Bone) in blender it all looks good, but if i export this scene to GLTF format and look at it in GLTF viewer - doors are misplaced as if coordinate system has changed. Misplacing happens even when there are no animations nor any actions made.
Is this a bug or am i doing something wrong?
This is what i have and what i get:
https://imgur.com/a/slVP6o2
My blender file:
https://blend-exchange.giantcowfilms.com/b/5024/

Found a couple issues with similar problems: #155 and #74 which i found very helpful.
Workaround to this problem is:

...to create joints and weights for this mesh and give full weight to the bone it is assigned to.

Glad you were able to work around the issue! Closing this bug but will leave #74 open to track.


fix: run db reset on postgres database

What kind of change does this PR introduce?
Bug fix
What is the current behavior?
Please link any relevant issues here.
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

31 of 42 (73.81%)  changed or added relevant lines in 2 files are covered.
14 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.2%) to 46.345%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

internal/db/reset/reset.go
30
41
73.17%

Files with Coverage Reduction
New Missed Lines
%

internal/start/start.go
1
32.28%

internal/db/reset/reset.go
6
84.03%

internal/db/diff/migra.go
7
42.2%

Totals

Change from base Build<PHONE_NUMBER>:
-0.2%

Covered Lines:
2270

Relevant Lines:
4898

💛  - Coveralls


feat(model): Implement Premium Button Style

This PR implements the new premium button style.
Refs:

https://github.com/discord/discord-api-docs/pull/6875

CI did not complete since tokio-macros got updated 5 days ago to version 2.4.0, this version it requires rust version 1.70 or later. And with that update it also has updated tokio, which also requires rust version 1.70 or later.
When manually downgrading tokio to version 1.38.1, using cargo update -p tokio@1 --precise 1.38.1, I am able to run the cargo +1.67 check --all-features --workspace --exclude book command and it completes successfully on my Mac.
Currently I see 2 options to fix this issue:

Manually downgrade tokio, where used, to version 1.38.1. This keeps the minimum rust version of 1.67.
Update the minimum rust version to 1.70.

Please let me know which option you think is the best, then I'll fix it.

We don't actually need to change our MSRV until we depend on tokio >1.38 with the new MSRV requirements. Could you instead add a new CI step pinning the offending package versions? cargo add "tokio@>=1.19.0,<1.39.0" for twilight-gateway etc.

i think you should just allow it in this case with #[allow(deprecated)]

That's 100% a Clippy bug. Does slapping #[allow(deprecated)] on it resolve the issue?

I've tried to put it above the enum and above the deprecation attribute, when trying to run it locally both cases don't give me any errors, but when attempting to run the CI on my own repo it just fails.

maybe its because different versions of rust are installed, could you check if local and ci have the same version of rust, it'd depend on the version of rust because its a rustc lint not a clippy lint
ci's use of cargo hack could also play a role so could you also try running the check with cargo hack locally if the rust toolchain versions are the same?

Im now trying something else with
#![allow(deprecated)]

in the top of the file, although it is probably not something I would like in production.

Okay, I just added #![allow(deprecated)] to the top of the file where the #[deprecated()] is located.
This seems to work.

checking your commit history, i dont see that you tried adding the allow attribute above the deprecated item and im pretty sure thats how it would be allowed:
#[allow(deprecated)]
#[deprecated(note = "This response type has been deprecated by Discord.")]
PremiumRequired = 10,

allowing the lint above the use statement suppresses the one thats triggered by the import itself, not the definition
could you allow the lint in this way and try again please

Nope didn't work, reverting the commit.

We can remove the #![allow(deprecated)] if Serde fixes this issue(https://github.com/serde-rs/serde/issues/2195)

ah its a serde error that explains it, its very likely that once this is merged it'll be forgotten about and the allow will stay there even after https://github.com/serde-rs/serde/issues/2195 gets merged, how should we go about handling this? should i create a draft pr that removes the allow?

ah its a serde error that explains it, its very likely that once this is merged it'll be forgotten about and the allow will stay there even after serde-rs/serde#2195 gets merged, how should we go about handling this? should i create a draft pr that removes the allow?

I would just it as is. It's highly likely that we'll remove the deprecated variant before or closely after the issue's resolved.

Okay I guess Clippy fails due to the revert of the Clippy fixes with the spacing, I'll redo the changes. To fix the CI.

As far as I am concerned this PR is good to get merged.

Okay I guess Clippy fails due to the revert of the Clippy fixes with the spacing, I'll redo the changes to fix the CI.

Sorry for the late reply/review
I'm asking this to the team because I'm not sure about what to do. This PR contains unrelated fixes of lints and formatting changes, but our CI seems to fail without these changes. Is this PR still good to merge?

Merge issue resolved.

That CI change should have been reverted with the recent MSRV bump to 1.79.


AllocStackToBox: fix a bug which results in a too early released captured variable

In case of a borrowed alloc_box, the optimization didn't look through the begin_borrow when calculating the final release of the box.
This resulted in inserting the destroy of the inserted alloc_stack too early.
rdar://97087762

@swift-ci smoke test macos


Update xor_tydi_qa url to v1.1

The dataset is updated and the old url no longer works. So I updated it.
I faced a bug while trying to fix this. Documenting the solution here. Maybe we can add it to the doc (CONTRIBUTING.md and ADD_NEW_DATASET.md).

And to make the command work without the ExpectedMoreDownloadedFiles error, you just need to use the --ignore_verifications flag.
https://github.com/huggingface/datasets/issues/2076#issuecomment-803904366

Just noticed while
load_dataset('local_path/datastes/xor_tydi_qa') works
load_dataset('xor_tydi_qa')
outputs an error:
FileNotFoundError: Couldn't find file at https://nlp.cs.washington.edu/xorqa/XORQA_site/data/xor_dev_retrieve_eng_span.jsonl
(the old url)
I tired clearing the cache .cache/huggingface/modules and .cache/huggingface/datasets, didn't work.

It seems like the error is not on your end. By default, the lib tries to download the version of the dataset script that matches the version of the lib, and that version of the script is, in your case, broken because the old URL no longer works. Once this PR gets merged, you can wait for the new release or set script_version to "master" in load_dataset to get the fixed version of the script.

@mariosasko Thanks! It works now.
Pasting the docstring here for reference.
    script_version (:class:`~utils.Version` or :obj:`str`, optional): Version of the dataset script to load:

        - For canonical datasets in the `huggingface/datasets` library like "squad", the default version of the module is the local version fo the lib.
          You can specify a different version from your local version of the lib (e.g. "master" or "1.2.0") but it might cause compatibility issues.
        - For community provided datasets like "lhoestq/squad" that have their own git repository on the Datasets Hub, the default version "main" corresponds to the "main" branch.
          You can specify a different version that the default "main" by using a commit sha or a git tag of the dataset repository.

Branch name didn't work, but commit sha works.

Regarding the issue you mentioned about the --ignore_verifications flag, I think we should actually change the current behavior of the --save_infos flag to make it ignore the verifications as well, so that you don't need to specific --ignore_verifications in this case.

@lhoestq I realized I forgot to change this:
https://github.com/huggingface/datasets/blob/fdbf5a97d3393f4a91e4cddcabe364029508f7ce/datasets/xor_tydi_qa/xor_tydi_qa.py#L72-L73
What should I do?

Oh indeed. Please open a PR to change this. This should be 1.1.0