git process for building upon Edge does not work as described

Docs page https://juxt.pro/edge/docs/setup.html "How to build your own project upon Edge" provides instructions that seem to be incorrect.
Step 1: Using our Enterprise github a project named crux-imdb is created.
Step 2: Clone the newly created crux-imdb, and enter its directory.
git clone git@github.corp.rlws.com:pauwhi/crux-imdb.git
cd crux-imdb
ls -lh
total 4.0K
-rw-rw-r-- 1 pauwhi pauwhi 35 Jun 25 08:42 README.md

Step 3: Add Edge to your project.
git remote add edge https://github.com/juxt/edge.git
git pull edge master
warning: no common commits
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 4643 (delta 7), reused 17 (delta 2), pack-reused 4614
Receiving objects: 100% (4643/4643), 2.24 MiB | 3.80 MiB/s, done.
Resolving deltas: 100% (2353/2353), done.
From https://github.com/juxt/edge
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> edge/master
fatal: refusing to merge unrelated histories

The idea that Edge is NOT a template, rather tooling that can be updated in the future, is FANTASTIC, but the git workflow to accomplish this goal is currently unclear.
How does one resolve the 'fatal: refusing to merge unrelated histories' error?

When you created the repo, did you allow github to create an initial commit? That would account for this issue.  You can pass --allow-unrelated-histories to pull to allow it to work (although you will have to resolve conflicts in .gitignore potentially).

Yes, Enterprise github created a README.md file and committed it.
Using Enterprise github, a repository can be created without the creation of the README.md, and with no commit, an empty repository.  The key is to NOT check the Initialize this repository with a README checkbox on the Enterprise github repository creation page.
I assume that a future execution of git pull edge master will fetch and merge any changes into my project.
This is FANTASTIC!  Much better than a lein template approach.

Yeah, it's easier not to initialize the repo with a README.  Although, in transitioning to Edge on projects I've used the unrelated-histories trick a few times!

I assume that a future execution of git pull edge master will fetch and merge any changes into my project.

There's a script in bin/update-edge that will do this for you, without assuming you've done git remote add.  It will also do a "migration" if necessary (e.g. when I moved dependencies around, it rewrote them in your deps.edn).
I'll open a follow-up issues to track this sidenote for Github and also documenting the unrelated histories technique.

A colleague proposed the following git workflow, which "hides" the Edge commit history:
Step 1: Using Enterprise github's UI, create a project repository with a committed README.md file.
Step 2: Clone the project repository locally, and change to its directory.
git clone git@github.corp.rlws.com:pauwhi/crux-imdb.git
Cloning into 'crux-imdb'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), done.

cd crux-imdb

ls -lh
total 4.0K
-rw-rw-r-- 1 pauwhi pauwhi 35 Jun 25 09:45 README.md

Step 3: Using Enterprise github's UI, create an "update-edge" branch in the project repository, and check it out locally.
git pull origin
From github.corp.rlws.com:pauwhi/crux-imdb
 * [new branch]      update-edge -> origin/update-edge
Already up to date.

git checkout update-edge
Branch 'update-edge' set up to track remote branch 'update-edge' from 'origin'.
Switched to a new branch 'update-edge'

Step 4: Add Edge repository, and pull it into project repository.
git remote add edge https://github.com/juxt/edge.git

git pull edge master --allow-unrelated-histories
warning: no common commits
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 4643 (delta 7), reused 17 (delta 2), pack-reused 4614
Receiving objects: 100% (4643/4643), 2.24 MiB | 3.61 MiB/s, done.
Resolving deltas: 100% (2353/2353), done.
From https://github.com/juxt/edge
 * branch            master     -> FETCH_HEAD
 * [new branch]      master     -> edge/master
Merge made by the 'recursive' strategy.
 .gitignore                                                          |  10 +
...
 create mode 100644 lib/edge.test-utils/src/edge/test/system.clj
 create mode 100644 lib/graphql-ws/deps.edn
 create mode 100644 lib/graphql-ws/src/juxt/edge/graphql_ws/core.cljs

Step 5: Push the Edge commits into the project repository's 'update-edge' branch.
git push origin
Counting objects: 4645, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1642/1642), done.
Writing objects: 100% (4645/4645), 2.24 MiB | 18.32 MiB/s, done.
Total 4645 (delta 2355), reused 4641 (delta 2353)
remote: Resolving deltas: 100% (2355/2355), done.
To github.corp.rlws.com:pauwhi/crux-imdb.git
   b1f71d8..8b267b0  update-edge -> update-edge

Step 6: Using Enterprise github's UI, create a New pull request, and Squash and merge it.
Repeat as desired in the future.

I believe this is equivalent to git pull --squash --allow-unrelated-history https://github.com/juxt/edge.git


sst_importer: a metrics to show the number of inflight sst service tasks

What is changed and how it works?

Issue Number: Close #16583

What's Changed:
This PR add a new metrics to show the number of inflight sst service tasks.

Related changes

[ ] PR to update pingcap/docs/pingcap/docs-cn:
[ ] Need to cherry-pick to the release branch

Check List
Tests

[x] Unit test
[x] Integration test
[x] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Release note

Add a metrics to show the number of inflight sst service tasks

/merge


Add report mismatch/absence button

@dmitrysus explain more. button under 'links message'? what should do?

@alexshavelev44 it should resend given message to us so we could investigate

@dmitrysus is it ok?

That cool @alexshavelev44. Thanks! Sorry, GitHub did not sent me any emails about your PR, I think it's better to mention me using @

https://github.com/Ignisor/music-share-bot/pull/34


make generate fails on WSL

Please do not post any internal, closed source snippets on this public issue tracker!
Description
make generate fails on WSL with VirtualBox Docker (Surface Pro, Win 10).
Steps to Reproduce
orlade@SURFACE:~/dev/sysl$ make generate
docker run --rm -v /mnt/c/dev/sysl:/src -w /src anzbank/arrai bundle pkg/importer/spanner/import_migrations.arrai > pkg/importer/spanner/import_migrations.arraiz
time="2020-11-03T05:54:21Z" level=info msg="\"pkg/importer/spanner/import_migrations.arrai\": file not found"
time="2020-11-03T05:54:21Z" level=info msg="unable to start debug shell: standard input is not a terminal"
Makefile:68: recipe for target 'pkg/importer/spanner/import_migrations.arraiz' failed
make: *** [pkg/importer/spanner/import_migrations.arraiz] Error 1

Your Environment
docker image ls
anzbank/arrai              latest              b264b4953b52        7 days ago          649MB

(May or may not be relevant, but…) Is make generate invoked in Windows CI builds?


Add files via upload

@su0100mcdaniel file/lib/domains/edu/mcdaniel.txt: this request has an incorrect file path format, please ensure that you are familiar with     this repository rules located at the bottom of this page and change     your request accordingly. If you don't know how to change request, close it and open a new one.     If you are not able to make the pull request according the instructions, please send us an email to<EMAIL_ADDRESS>Please mention this request URL in the message.

@su0100mcdaniel Thank you for your patience while waiting for a review and processing your request. Pull request merged. Please start applying for JetBrains educational subscription at https://www.jetbrains.com/shop/eform/students in an hour, to allow the changes to propagate through JetBrains systems.


Add BatchWithFlusher to iavl tree

Closes #619

This Pr allow iavl tree to use BatchWithFlusher to limit size of commit to db. By including flushThreshold to nodeDB, we can configure the size limit of each commit batch.
This Pr changes nodeDB struct and NewMutableTreeWithOpts to replace uses of dbm.Batch to BatchWithFlusher
We'll have to make changes to sdk accordingly to adapt this changes.

will this be able to be part of the next release or should we wait for the next release (unclear when that will be)

ping

I figure out the deadlock issue is due to the mem db iterator being channel based, the iterator will lock the db during iteration which inturn cause the deadlock

The sdk doesn't use memdb anymore. Maybe we have our own memdb here

So I have run benchmark on a live osmosis node. Comparing normal iavl batch vs batch with flusher (flush to state at 100KB), the result is almost the same for the case of normal blocks ( blocks that don't cause heavy commit to state ) but for epoch blocks that cause heavy commit, the commit time is reduced by 25%.

![Uploading Screen Shot 2023-07-14 at 14.08.14.png…](running 10 blocks include epoch block with 100KB flush)

the benchmark also proves that iavl with batch is not state breaking. I've run 10000 blocks with no app hash error so far

amazing this is super useful!!

yes, we can have this on mainnets. Do we want the flush thresh hold to be configurable. If so then we have to change iavl.NewMutableTreeWithOpts which is used in sdk root multi logic, that means we also need to make changes to the sdk

here is the commit time of a osmosis epoch block :

Flush threshold
Commit time

25
27.17s

50
26.72s

100
26.8s

250
26.19s

500
27.5s

750
26.76s

1000
41.83s

no-flush
49.61s

thanks for pinging, I will finish this by tomorow

I've made a new PR for this
https://github.com/cosmos/iavl/pull/807


Webpack5 failed to cache with some special names like constructor

Bug report
What is the current behavior?
initial cache process will stuck after enabling cache strategy
If the current behavior is a bug, please provide the steps to reproduce.

add cache option to webpack configuration file
import globals.json in application code

What is the expected behavior?
initial cache process will work after enabling cache strategy
Other relevant information:
webpack version:  5.21.0
Node.js version: 10.15.3
Operating System: 10.0.19041 N/A Build 19041
Additional tools: N/A

Fix is on the way.
It was a one-line fix, but I found 3 other incorrect edge cases related to JSON importing.


Adding uclv.cu domain

This university use both domains, an older version with uclv.edu.cu an this new with uclv.cu

@mlmesa2 I have to close the request as a duplicate to ##6332
Regrettably, this request will not be processed further.


Unable to run extract-i18n command due to sourcemapping error

🐞 Bug report
Command (mark with an x)

[ ] new
[ ] build
[ ] serve
[ ] test
[ ] e2e
[ ] generate
[ ] add
[ ] update
[ ] lint
[x] extract-i18n
[ ] run
[ ] config
[ ] help
[ ] version
[ ] doc

Is this a regression?

Yes, the previous version in which this bug was not present was: 12.2.6 (the bug got introduced somewhere in a patch version of v12 as it's present in the latest version of v12 as well as all versions of v13)
Description
When running the extract-i18n command it fails as there is an invalid sourcemap in the dependency tree.
This is what the sourcemap looks like:
{"version":3,"sources":["webpack://[name]/webpack/universalModuleDefinition", ...rest], ...rest}

I'm also going to open an issue with the maintainers of the troublesome dependency to try and get them to fix it on their end, but I guess the CLI should handle invalid sourcemaps rather than crashing like this.
🔬 Minimal Reproduction
git checkout git@github.com:mattlewis92/source-map-bug.git
cd source-map-bug
npm i # Note: the dependency is a private npm dependency, if you can let me know your npm handle then I can grant you access so you can npm install it
npm run extract-i18n

🔥 Exception or Error
<EMAIL_ADDRESS>- Error: Module build failed (from ./node_modules/@angular-devkit/build-angular/src/babel/webpack-loader.js):
TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:371:5)
    at onParseError (node:internal/url:552:9)
    at new URL (node:internal/url:628:5)
    at normalizeSimplePath (/Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:301:26)
    at normalizePath (/Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:320:20)
    at resolve (/Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:386:26)
    at resolve$1 (/Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:418:16)
    at /Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:737:25
    at Array.map ()
    at buildSourceMapTree (/Users/mattlewis/Code/open-source/source-map-bug/node_modules/@ampproject/remapping/dist/remapping.umd.js:734:34)

🌍 Your Environment
Angular CLI: 13.1.3
Node: 16.13.1
Package Manager: npm 6.14.15
OS: darwin arm64

Angular: 13.1.2
... animations, common, compiler, compiler-cli, core, elements
... forms, language-service, localize, platform-browser
... platform-browser-dynamic, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1301.2
@angular-devkit/build-angular   13.1.3
@angular-devkit/core            13.1.2
@angular-devkit/schematics      13.1.2
@angular/cdk                    13.1.1
@angular/cli                    13.1.3
@angular/google-maps            12.2.1
@schematics/angular             13.1.3
ng-packagr                      13.1.2
rxjs                            7.4.0
typescript                      4.5.4
Anything else relevant?

My NPM username is alan.agius4.

My NPM username is alan.agius4.

Added you!

Indeed this is an issue with the vendor sourcemaps and the reason why this is only visible during i18n extraction in your project vendor sourcemaps are only used by the i18n extraction builder.
Likely @ampproject/remapping should not crash in this case.

I'm the maintainer of @ampproject/remapping. Unfortunately I get an error running npm install:
npm ERR! code E404
npm ERR! 404 Not Found - GET<EMAIL_ADDRESS>- Not found
npm ERR! 404
npm ERR! 404  '@clickup/gantt<EMAIL_ADDRESS>is not in this registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

Is @clickup/gantt a private package?
Can you comment whether there's a sourceRoot in this sourcemap? Is this the root map (ie, one that's directly passed to remapping()), or a transitive map (eg, a root map points to it)?

@jridgewell thanks for looking into this!

I'm jridgewell on npm, can you grant me access to the @clickup/gantt package?
Done!

Can you comment whether there's a sourceRoot in this sourcemap?

The sourceRoot property is set to an empty string in the sourcemap

Is this the root map (ie, one that's directly passed to remapping()), or a transitive map (eg, a root map points to it)?

It's the root map of the npm package

I'm still getting a 404 on @clickup/gantt.

I'm still getting a 404 on @clickup/gantt.

Did you accept the npm invite to the org? i'm not seeing you in there yet

Ha, didn't realize I needed to accept anything to get access. I'm looking into the error now.

I just published @ampproject/remapping v1.1.0, which should resolve the issue. Angular will need to update the packages that depend on it (they're currently pinned to v1.0.2).

Amazing, thank you so much for digging into this and releasing a fix so fast, it's really appreciated! ❤


*: fix broken headings

As best I can tell, these are all the headings in this repo that were
missing a newline.

@euank mind adding a rule to marker?

I'm open to fixing this in Jekyll, but afaik we are using the exact same engine that Github pages uses, and hence works with the previews on Github.

@crawford I think by common-mark it's fine either way, so it doesn't really make sense for marker to care.
If we did, it would presumably be a warning that it might not behave well for other markdown flavors, but this does seem more like a jekyll issue than a marker thing.

@euank According to the dingus, it is valid. Nevermind!


New version: prefix-dev.pixi version 0.22.0

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

Automatic Validation ended with:

Executable C:\Users\validator\AppData\Local\pixi\bin\pixi.exe returned exit code: 2

(Automated response - build 880.)


Improve exception handling

Rescue several types of errors and send the error message to the CLI

Linked CLI task

When RuntimeError, TypeError, NameError, ArgumentError, SyntaxError are raised, the error message is returned as json.


fix(activator): fix mebx password save to vault

Codecov Report

Merging #235 (09941ac) into master (e204b47) will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #235      +/-   ##
==========================================
+ Coverage   45.46%   45.48%   +0.01%
==========================================
  Files          50       50
  Lines        3000     2999       -1
  Branches      524      524
==========================================
  Hits         1364     1364
+ Misses       1459     1458       -1
  Partials      177      177

Impacted Files
Coverage Δ

src/WSManProcessor.ts
25.45% <0.00%> (ø)

src/actions/Activator.ts
55.00% <0.00%> (+0.30%)
: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 e204b47...09941ac. Read the comment docs.


UI: POC to move rendering to the CPU

runs incredibly poorly, need to optimize UI first. PC only atm.

Heads up, I think the fix for the onroad UI lag spike in the testing closet was to use the GPU to render the lane lines. It occurred when the lane lines had odd geometry which I didn't fully look into (lines too small/thin, etc.): https://github.com/commaai/openpilot/pull/28902

Submitted a PR for single-threaded cameraview:  https://github.com/commaai/openpilot/pull/30397


Sanity check extensions by inline their test code

stloyd@MacBook-Pro-2 spc-test % ./spc build gd --build-cli
     _        _   _                 _
 ___| |_ __ _| |_(_) ___      _ __ | |__  _ __
/ __| __/ _` | __| |/ __|____| '_ \| '_ \| '_ \
\__ \ || (_| | |_| | (_|_____| |_) | | | | |_) |
|___/\__\__,_|\__|_|\___|    | .__/|_| |_| .__/   v2.0-rc6
                             |_|         |_|
[11:45:50] [INFO] [EXEC] sysctl -n hw.ncpu
[11:45:50] [INFO] Build target: cli
[11:45:50] [INFO] Enabled extensions: zlib, gd
[11:45:50] [INFO] Required libraries: zlib, libpng
[11:45:50] [WARN] some extensions will be enabled due to dependencies: zlib
[11:45:52] [NOTI] lib [pkg-config] already built
[11:45:52] [NOTI] lib [zlib] already built
[11:45:52] [NOTI] lib [libpng] already built
[11:45:52] [INFO] enabling gd without library libavif
[11:45:52] [INFO] enabling gd without library libwebp
[11:45:52] [INFO] enabling gd without library libjpeg
[11:45:52] [INFO] enabling gd without library freetype
[11:45:52] [INFO] Entering dir: /Users/stloyd/Documents/spc-test/source/php-src
[11:45:52] [INFO] [EXEC] ./buildconf --force
[11:45:58] [INFO] Entering dir: /Users/stloyd/Documents/spc-test/source/php-src
[11:45:58] [INFO] Using configure: --with-zlib --enable-gd
(...)
[11:46:54] [INFO] cleaning up
[11:46:54] [INFO] Entering dir: /Users/stloyd/Documents/spc-test/source/php-src
[11:46:54] [INFO] [EXEC] make clean
[11:46:55] [INFO] building cli
[11:46:55] [INFO] Entering dir: /Users/stloyd/Documents/spc-test/source/php-src
[11:46:55] [INFO] [EXEC] make -j10 EXTRA_CFLAGS='-g -Os' EXTRA_LIBS='/Users/stloyd/Documents/spc-test/buildroot/lib/libpng16.a /Users/stloyd/Documents/spc-test/buildroot/lib/libz.a -lresolv' cli
[11:49:18] [INFO] [EXEC] dsymutil -f sapi/cli/php
[11:49:19] [INFO] [EXEC] strip sapi/cli/php
[11:49:19] [INFO] Deploying cli file
[11:49:19] [INFO] [EXEC] cp '/Users/stloyd/Documents/spc-test/source/php-src/sapi/cli/php' '/Users/stloyd/Documents/spc-test/buildroot/bin/'
[11:49:19] [INFO] running cli sanity check
[11:49:19] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "echo \"hello\";"
[11:49:19] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "assert(function_exists('gzcompress'));"
[11:49:19] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "assert(function_exists('gd_info'));\$info = gd_info();assert(\$info['PNG Support'] ?? false);assert(\$info['GIF Create Support'] ?? false);assert(\$info['GIF Read Support'] ?? false);"
[11:49:19] [INFO] Build complete, used 209.285 s !
[11:49:19] [INFO] Static php binary path: /Users/stloyd/Documents/spc-test/buildroot/bin/php
[11:49:19] [INFO] License path: /Users/stloyd/Documents/spc-test/buildroot/license/

Alternative for #180
Fixes https://github.com/crazywhalecc/static-php-cli/issues/124

Tested with dom extension too (with small fix):
[12:50:14] [INFO] running cli sanity check
[12:50:14] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "echo \"hello\";"
[12:50:15] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "assert(function_exists('curl_init'));"
[12:50:16] [INFO] [EXEC] /Users/stloyd/Documents/spc-test/buildroot/bin/php -r "assert(class_exists('\\DOMDocument'));\$doc = new DOMDocument();\$doc->loadHtml('<meta charset=\"UTF-8\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">Hello');assert(\$doc->getElementById('app')->nodeValue === 'Hello');"
[12:50:16] [INFO] Build complete, used 201.601 s !
[12:50:16] [INFO] Static php binary path: /Users/stloyd/Documents/spc-test/buildroot/bin/php
[12:50:16] [INFO] License path: /Users/stloyd/Documents/spc-test/buildroot/license/

Is it a better way to escape?
$test = str_replace(
    ['<?php', 'declare(strict_types=1);'],
    '',
    file_get_contents(ROOT_DIR . '/src/globals/tests/' . $ext->getName() . '.php')
);

[$ret] = shell()->execWithResult(BUILD_ROOT_PATH . '/bin/php -r ' . escapeshellarg(trim($test)));

Unfortunately, this escapes too much, we need to escape just: $ & ", while this command escapes much more along with > etc.

I feel that even though it escapes a lot of content and easily causes parameter redundancy, it is indeed safer and can prevent errors caused by misuse of \" when adding new tests in the future.

TBH. I would prefer writing some kind of additional tool to validate tests in dev, rather than fighting with unescaping the strings, especially since this will be something provided by the library, not from outside.
Here is a comparison: https://3v4l.org/58omP


Add patch default and clean up patch

Pull request
Description
Sketch of event defaulting as part of #1090. default as part of patch is less invasive and problematic then defaulting for the whole expression language since:

it is contained to the patch operation
it has no averse side effects to other possible implementations
no new keywords are introduced
it mirrors the already existing merge operation so is familiar in concept

This PR:

Add default => {...} to patch (mirroring merge => {...})
Add default "key" => "value" (mirroring merge "key" => {...} but non recursive)
Update patch to enforce string keys as part of the gramer instead of creating runtime errors

Related

RFC
Related Issues: #1090
Related docs PR

Checklist

[ ] The RFC, if required, has been submitted and approved
[ ] Any user-facing impact of the changes is reflected in docs.tremor.rs
[ ] The code is tested
[x] Use of unsafe code is reasoned about in a comment
[ ] Update CHANGELOG.md appropriately, recording any changes, bug fixes, or other observable changes in behavior
[ ] The performance impact of the change is measured (see below)

Performance

Coverage decreased (-0.1%) to 83.846% when pulling afe35e166731a8eb7b29a8439608dd522032c677 on patch-default into 0a6c8a59783113d9350ccd3e0a552be982ce188a on main.


fix UnboundLocalError

I'm finetuning LLaMA 3.1 8B using transformers==4.42.3 and unsloth==2024.8. I hit an error because not is_model and not is_peft is true (expected with transformers 4.42.3), but the error message seems odd:
---------------------------------------------------------------------------
UnboundLocalError                         Traceback (most recent call last)
Cell In[4], line 1
----> 1 model, tokenizer = FastLanguageModel.from_pretrained(
      2     model_name = model_name,
      3     max_seq_length = max_seq_length,
      4     dtype = dtype,
      5     load_in_4bit = load_in_4bit,
      6     # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf
      7 )

File /data/miniconda3/envs/py310/lib/python3.10/site-packages/unsloth/models/loader.py:178, in FastLanguageModel.from_pretrained(model_name, max_seq_length, dtype, load_in_4bit, token, device_map, rope_scaling, fix_tokenizer, trust_remote_code, use_gradient_checkpointing, resize_model_vocab, revision, *args, **kwargs)
    171     raise RuntimeError(
    172         "Unsloth: Your repo has a LoRA adapter and a base model.\n"\
    173         "You have 2 files `config.json` and `adapter_config.json`.\n"\
    174         "We must only allow one config file.\n"\
    175         "Please separate the LoRA and base models to 2 repos."
    176     )
    177 elif not is_model and not is_peft:
--> 178     raise RuntimeError(autoconfig_error or peft_error)
    179 pass
    181 # Get base model for PEFT:

UnboundLocalError: local variable 'autoconfig_error' referenced before assignment

This is because:
When an exception has been assigned using as target, it is cleared at the end of the except clause. This is as if
except E as N:
    foo

was translated to
except E as N:
    try:
        foo
    finally:
        del N

This means the exception must be assigned to a different name to be able to refer to it after the except clause. Exceptions are cleared because with the traceback attached to them, they form a reference cycle with the stack frame, keeping all locals in that frame alive until the next garbage collection occurs.
check this doc

OOO nice catch!! Thanks so much - tbh I kinda didn't know about the variable clearing!

Hi Daniel. Unfortunately having a similar problem here. Training LLama 3 8B via Linux Ubuntu (to bypass Triton dep w/ Bin Wheel). Seems like I am now falling into a RuntimeError(autoconfig_error or peft_error). Here is the actual error (when running the whole model):
File "/usr/local/lib/python3.10/dist-packages/unsloth/models/loader.py", line 178, in from_pretrained
raise RuntimeError(autoconfig_error or peft_error)
UnboundLocalError: local variable 'autoconfig_error' referenced before assignment
Is it a problem with the model I am feeding? model_name = "unsloth/llama-3-8b-bnb-4bit",
Or is it truly a variable assignment problem?

I'm also getting the same UnboundLocalError: local variable 'autoconfig_error' referenced before assignment error when loading a fine-tune of Gemma 2 on Debian.


definition of  GO:0071704 organic substance metabolic process

It's now "the chemical reactions and pathways involving an organic substance, any molecular entity containing carbon" which would appear to include classic intermediary metabolism, which it does, as is_a children, but also metabolism of carbon-containing macromolecules like proteins, RNA, and DNA, which it does not. That distinction seems fine, so could something be added to the organic substance definition to make it explicit, something like Michael Ashburner's distinction between directly or indirectly encoded molecules and unencoded ones. That may not exactly conform to ChEBI, but neither does a silent decision to treat RNA, DNA, and proteins as not containing carbon atoms. If a revised definition would break things, could a comment be added?

@deustp01 : DNA, RNA, and protein metabolism trace their parentage to 'organic substance metabolic process'.  Where's the missing link?


Support only run the initial test run (dry run)

Question

Since our stryker run takes around 2 hours to complete we currently only run it on the default branch.
It would be nice if we could still execute just the initial test run in branches to avoid that it fails on master and we need to figure out why it broke/revert...
Stryker environment

+--<EMAIL_ADDRESS>

+--<EMAIL_ADDRESS>
Additional context

My hopes are that running unit tests normally is enough. You generally want to share the test runner configuration with stryker using jest.config.js, .mocharc.json, etc. That way, Stryker should have no issues running your tests.
That being said, there are still slight differences for Stryker vs your test runner. I think this will work: npx stryker run -m not-exists.js.
We might want to add a --dry-run in the future, to only run the dry run.

Ok, i just checked what -m means and it refers to https://stryker-mutator.io/docs/stryker-js/configuration#mutate-string
So it would also work yo have an additional config file with "mutate": [], right?
I wonder if we can pass an "empty glob/list" from the cli instead of a non existing file?
Most likely will experiment with this very soon.
As a side note: maybe it's worth documenting this behavior of the option? Something like

Passing a glob that matches no files will cause a "dryrun": The configuration will be read and the tests will be run once, but no files will be mutated.

(I'm very curios about the expected exit code when using this approach...)

Great, that's what I was afraid of. Please open an issue for the instrumentation error, we'll use this issue to track progress on the dry-run feature

We probably still want this feature.