ModuleNotFoundError("No module named 'nnsvs.transformer'")

I am trying nnsvs streamlit app, im getting this error - I am running on mac. I have installed all the dependencies
2024-02-21 17:04:17.207 Uncaught app exception
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/utils.py", line 644, in _locate
obj = getattr(obj, part)
^^^^^^^^^^^^^^^^^^
AttributeError: module 'nnsvs' has no attribute 'model'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/utils.py", line 650, in _locate
obj = import_module(mod)
^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/Users/talha/Documents/upwork/Richard_deCosta/nnsvs/nnsvs/model.py", line 10, in
from nnsvs.transformer.attentions import sequence_mask
ModuleNotFoundError: No module named 'nnsvs.transformer'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 134, in _resolve_target
target = _locate(target)
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/utils.py", line 653, in _locate
raise ImportError(
ImportError: Error loading 'nnsvs.model.MDN':
ModuleNotFoundError("No module named 'nnsvs.transformer'")
Are you sure that 'model' is importable from module 'nnsvs'?
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "/Users/talha/Documents/upwork/Richard_deCosta/nnsvs/streamlit_demo/app.py", line 33, in
engine = create_svs_engine(models[voice_option])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/talha/Documents/upwork/Richard_deCosta/nnsvs/nnsvs/pretrained/init.py", line 54, in create_svs_engine
return dynamic_import(model_registry[name]["target"])(model_dir, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/talha/Documents/upwork/Richard_deCosta/nnsvs/nnsvs/svs.py", line 138, in init
self.timelag_model = instantiate(self.timelag_config.netG).to(device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 226, in instantiate
return instantiate_node(
^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 333, in instantiate_node
target = _resolve_target(node.get(_Keys.TARGET), full_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/hydra/_internal/instantiate/_instantiate2.py", line 139, in _resolve_target
raise InstantiationException(msg) from e
hydra.errors.InstantiationException: Error locating target 'nnsvs.model.MDN', set env var HYDRA_FULL_ERROR=1 to see chained exception.
full_key: netG

Never mind. I somehow downloaded the source code which did not had transformers in it.
I redownloaded the git. Now its working.
Can you share a guide to install a new model? I saw the english support model but cant seem to see a installation guide

Bro, Can you explain how this model works mean I want to know how the data is flowing in the training phase and how I have to prepare my data to train the model. and I have a doubt that is this model can work for the custom language?.


[Text Analytics] Intersections converted to interfaces

Regenerated using the code gen as updated in https://github.com/Azure/autorest.typescript/pull/1420. This addresses one feedback received earlier.

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-ai-text-analytics

@witemple-msft good observation! However, I already have a swagger transform for properties.projectName.description and properties.deploymentName.description in swagger/readme.md and I am not getting any warnings when I run autorest so I am not sure why autorest didn't apply it. @joheredi and @sarangan12, any idea why?

I am adding a description for those parameters in future swaggers in https://github.com/Azure/azure-rest-api-specs/pull/19488 and this problem should be fixed when I generate with them. I still not sure why swagger transforms didn't work but I leave that to Jose and Sarangan to look at.


Chat with multiple model via @

chat with multiple model available with @
for example:

setup : above chat box rather than pick 1 model able to pick group model (group model set in the setting)
use: type prompt in prompt box with @modelname to get answer from that model:
hello who are you? what base model are you? @mistral @llama2 @mixtral
or
@mistral @llama2 @mixtral hello, who are you? what base model are you?
then it answer:
mistral: i am mistral how can i help you today? llama2: i am llama2 is there anything else you want to know about my existence? mixtral: i am mixtral we are mixture of expert trained in various experts, is there anything more you like to know?

Hey, thank you for the suggestion. It is possible to add, but it will be slow since Ollama needs to load different models for each message, one after another.


Correction for raw affiliation AGIR, UR4294, UFR of Pharmacy, Jules Verne University of Picardie, 80037, Amiens, France

Correction needed for raw affiliation AGIR, UR4294, UFR of Pharmacy, Jules Verne University of Picardie, 80037, Amiens, France
raw_affiliation_name: AGIR, UR4294, UFR of Pharmacy, Jules Verne University of Picardie, 80037, Amiens, France
new_rors: 01gyxrk03
previous_rors: 01sjmsj73;01gyxrk03
works_examples: W3205546279
contact: d30b20f2fe94907ecbc987b44cbb67a2:b9061f2bbdc7128467c7d6ce03a74b04 @ u-picardie.fr

This issue was accepted and ingested by the OpenAlex team on 2024-10-10. The new affiliations should be visible within the next 7 days.


Fast forward to test-infra latest

This PR has not yet been deployed to the Prow cluster.
I have had to make a number of changes to the config.yaml file, mostly around properly quoting string-bool values.
/cc @simonswine

I have also changed tarmak job templates to not include always_run and instead opted to include those in the presubmit config itself, to make the job configuration simpler. Take a look at the latest commit to see this change: https://github.com/jetstack/test-infra/pull/214/commits/fb3a65491f8170a19e0ebddf862031f236db9182

This lgtm. We potentially should get the fix for the run_after_success issues in?
/lgtm

Yep I will do that today and hopefully get the tarmak PRs resolved/merged!
On Fri, 13 Jul 2018 at 08:37, Christian Simon<EMAIL_ADDRESS>wrote:

This lgtm. We potentially should get the fix for the run_after_success
issues in?
/lgtm
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jetstack/test-infra/pull/214#issuecomment-404752625,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAMbP7VCAAW00tnqNg8RwJu9cCpQT1pFks5uGE5CgaJpZM4VM9wI
.

I've now rolled this out to production. It took a few extra changes to our config, although nothing major.
Merging.


Implemented tag system

The tag system, and everything else implemented, follows the conventional C# analyzers and common formatting.
Changes include:

Created the Tag Model

Implemented the Tag Model as a DbSet

Created the services relating to Tags in DataAccessLayer

Implemented the service via commands in GeneralModule

I went ahead and did all this in the most recent commit, along with editing the tag commands to match the naming changes in the DataAccessLayer.

All the changes requested by Directoire have just been commited.


Enable to call dynamic link functions from tx or query directly

Now, dynamic link functions can be called by only other contracts. Enable it from tx or query directly.

without #255, read-only dynamic linked functions can be called via tx. Consider that it is ok or should be solved.

3/23-

I think it is unnecessary. I think it's enough the callee function for dynamic link only be called by dynamic link caller.


Upgrade bats version to the recent one

FYI, while investigating #5, I was able to use it with bats 1.1.0 without issue.


Update README.md

Recognize Contributors

Thanks, but I don't think it's necessary here, the info can be seen here https://github.com/tiangolo/full-stack-fastapi-template/graphs/contributors, including how much each contributor has done, etc. It also only heavily highlights commits and not contributions with other things, like answering questions in issues/discussions, which are in many cases even more important. So I'll pass on this one, but thanks for the interest! :coffee:


Not able to implement library getting error kotlin-android-extensions

Kotlin Android Extensions is deprecated, which means that using Kotlin synthetics for view binding is no longer supported.
how can I implement it without adding id 'kotlin-android-extensions'
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4-M1-release-101.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.4-M1-release-101/kotlin-android-extensions-runtime-1.4-M1-release-101.pom
       - https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.4-M1-release-101/kotlin-android-extensions-runtime-1.4-M1-release-101.pom
       - https://jitpack.io/org/jetbrains/kotlin/kotlin-android-extensions-runtime/1.4-M1-release-101/kotlin-android-extensions-runtime-1.4-M1-release-101.pom
     Required by:
         project :app > com.github.poovamraj:PinEditTextField:1.2.5

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

Any help would be highly appreciated.

Can you try using the new version of the library?
implementation 'com.github.poovamraj:PinEditTextField:1.2.6'

@Miteshmakwana73 can you confirm the new fix works?

For this fix works now!

@hans-de-clercq Thanks for notifying 😄 Closing this ticket now

@poovamraj working thanks


add rules

LGTM. need to describe how to view the document on dev local env.

Will be provided in the next pr, relying on the rooch-network build
This is the current previewable address
https://rooch-network-github-4t5zgvtbi-rooch.vercel.app/zh-CN/docs/introduction


Forge <IP_ADDRESS>6  is the latest compatible build ( no visible entity creation after that )

Not working for me JIM.

MC 1.12.2

davincisvessels-1.12-6.340-full

movingworld-1.12-6.342-full

Forge version 1.12.2 - <IP_ADDRESS>2

Assembling a ship deletes its blocks and no ship entity is either made or visible ( Only vanilla blocks used for testing ). After re-logging the blocks which attempted assembly was made are again in their place before the attempted assembly.

After re-logging on the server the player position resets to the position when attempted ship assembling was made

Server console spouts NO errors or warnings whatsoever.

Was really hyped to see Archimedes ship continued. Hope to narrow this down to a potential mod conflict as other sources report at least a working mod!
MODLIST::
https://pastebin.com/YFF3emjL
EDIT/UPDATE ::
So.. I've created a new profile in attempt to find the mod causing the issue.
Same forge, and mod settings as above but this time Davinci's Vessel and Moving world were the only mods beside forge.
The issue persists. I conclude that my problem isn't causes by my modlist. It has to be either a yet unsupported forge version issue or an issue within davincisvessels or movingworld itself.
There isn't really much help I can give you on that one author :/
EDIT/UPDATE ::
My assumptions were correct!
Tried a random older FORGE version.. <IP_ADDRESS>1  works. Attempting to find the latest compatible forge version author - we can do it!
EDIT/UPDATE ::
Build 1.12.2-<IP_ADDRESS>6 is the latest forge this mod is working on.  From  version 2537 on my issue is present. Forge's changelog for 2537 isn't making any logical sense to me in regard to why this mod stopped working correctly from there on.
Forge build changelog ::
Build 1.12.2-<IP_ADDRESS>7:
JDLogic:
Fix resource loading on some mac systems when SplashProgress is enabled
(#4082)

With Forge 1.12.2 - <IP_ADDRESS>6 the issue is resolved.


Outsource styling in actual CSS file

While it isn't a problem if the overall DOM structure of the player is created by the JS routine, I think it is bad practice to have the full CSS styling for the player dynamically injected into the site via the JS routine, rather than having a dedicated CSS file.
Having a dedicated CSS file would also make it much easier to customize certain aspects of the player layout directly.
Other than that, this is a great little player!

You should not edit compiled CSS file directly, the proper way is to edit original CSS file.
Dynamically injecting is a common practice, which can make APlayer easier to use, especially in componentized project.


[Feature] Kubediff

Describe the solution you'd like

Diff capability
Additional context

What scope should this cover?

Single file?
Single file with multiple resources in one file?
Kustomize whole overlays?
Complete folders?

@mosheavni Could you expand on the use case?
Please take a look at https://github/ramilito/kubediff and compare it with the way you are currently working?

sure
I set  the env var KUBECTL_EXTERNAL_DIFF to kdiff
kdiff is an executable that looks like this:
#!/bin/bash
nvim -c "DirDiff $1 $2"

the flow looks like this:

Implemented in #96!
You can use both Kubediff or DirDiff


docs: add testing guide for cypress

What kind of changes does this PR include?

New or updated content

Description

Closes #2168

Thanks! I will wait for an explicit go-ahead from you before I even START my read-through!

@sarah11918 Fell free to proceed with your review


raise RuntimeError("Cannot add middleware after an application has started")

Thanks in advance for this tool, it is something I was looking for some time age. I was trying to initialize EasyAuthClient on new fastapi lifespan like this
@asynccontextmanager
async def lifespan(app: FastAPI):
    # Startup
    await EasyAuthClient.create(
        app,
        token_server='<IP_ADDRESS>',
        token_server_port=8090,
        auth_secret='abcd1234',
        default_permissions={'groups': ['users']}
    )
    print("startup fastapi")
    yield
    # shutdown

and I get this message error

Do you have any idea how to run EasyAuthClient in lifespan also there is a way to use client as depends?

Using client as Depends is not an option explicitly right now.
Creating a client is no longer required inside an event loop or supported after an FastAPI app has started due to changes in latest releases of FastAPI. See the latest example in docs and readme for latest usage. If you referenced the medium post, I still need to update that.

Thanks for the information @codemation


Added option to specify a callback for slide change

Wrote this option so that I'll be able to write a function when a change is initiated on the slide.
ex:
The slider had next and previous buttons controlling the slide as well as links the changes the slide. The links has an active state that needed to toggle through if the next or previous buttons were clicked.  With this option I was able to tie them together. Very useful for sliders that have indicators that tell you what slide you are on.

Many thanks! One friend had already suggested this in the past but I was too lazy to implement it. Now it's there :smiley:
I'll manually merge this, add some tests and create a v0.5.0 release!

Awesome :+1:


New-WebServiceProxy Support?

Just curious when New-WebServiceProxy would be supported?

Dupe https://github.com/PowerShell/PowerShell/issues/2240


"This message will only appear once; if it occurs multiple times for the same location, please report on GitHub."

Mod Version: lootr-fabric-1.20-<IP_ADDRESS>
Fabric Loader: 0.16.5
[04:40:59] [Server thread/ERROR]: Loaded a data file with no size: 'lootr/8/85/855e1acd-1093-4320-b83b-161aa78214cc' located in dimension 'ResourceKey[minecraft:dimension / minecraft:overworld]' at 'class_2338{x=1984, y=86, z=204}'. Sizes will be guessed and updated in future. This message will only appear once; if it occurs multiple times for the same location, please report on GitHub.
[04:40:59] [Server thread/INFO]: Resized inventory with key 'lootr/8/85/855e1acd-1093-4320-b83b-161aa78214cc' in dimension 'ResourceKey[minecraft:dimension / minecraft:overworld]' at location 'class_2338{x=1984, y=86, z=204}' from 9 slots to 27 slots.
[04:40:59] [Server thread/INFO]: Resized inventory with key 'lootr/8/85/855e1acd-1093-4320-b83b-161aa78214cc' in dimension 'ResourceKey[minecraft:dimension / minecraft:overworld]' at location 'class_2338{x=1984, y=86, z=204}' from 9 slots to 27 slots.
[04:40:59] [Server thread/INFO]: Resized inventory with key 'lootr/8/85/855e1acd-1093-4320-b83b-161aa78214cc' in dimension 'ResourceKey[minecraft:dimension / minecraft:overworld]' at location 'class_2338{x=1984, y=86, z=204}' from 9 slots to 27 slots.

That should be fine! If this is the initial, first time that you've loaded that version of the mod in that world, it's not an issue.
If you still see the message at a later point, please comment on this issue.


Invalid Format. Multiple 400 errors detected. Please wait for 1 minute before trying again.

After I changed the model according to the suggestion in this issue（ https://github.com/circlemind-ai/fast-graphrag/issues/48 ）, I ran the following code and got this error. I adjusted the parameters of the embedding model twice, but the result did not change. It seems that there is an error in llm_service, but I don’t know how to fix it. Please give some suggestions
error log:
(base) hygx@hygx:~/code/ragflow$  cd /home/hygx/code/ragflow ; /usr/bin/env /home/hygx/code/ragflow/venv/bin/python /home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 48458 -- /home/hygx/code/ragflow/main.py
Extracting data:   0%|                                                                                | 0/1 [00:00<?, ?it/s]Error during information extraction from document: Error code: 418 - {'error_msg': 'Invalid Format. Multiple 400 errors detected. Please wait for 1 minute before trying again.'}
Extracting data: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:11<00:00, 11.85s/it]
Error during query: Error code: 418 - {'error_msg': 'Invalid Format. Multiple 400 errors detected. Please wait for 1 minute before trying again.'}
Traceback (most recent call last):
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/instructor/retry.py", line 222, in retry_async
    response: ChatCompletion = await func(*args, **kwargs)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/openai/resources/chat/completions.py", line 1661, in create
    return await self._post(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/openai/_base_client.py", line 1843, in post
    return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/openai/_base_client.py", line 1537, in request
    return await self._request(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/openai/_base_client.py", line 1638, in _request
    raise self._make_status_error_from_response(err.response) from None
openai.APIStatusError: Error code: 418 - {'error_msg': 'Invalid Format. Multiple 400 errors detected. Please wait for 1 minute before trying again.'}

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/instructor/retry.py", line 217, in retry_async
    async for attempt in max_retries:
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/tenacity/asyncio/__init__.py", line 166, in __anext__
    do = await self.iter(retry_state=self._retry_state)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/tenacity/asyncio/__init__.py", line 153, in iter
    result = await action(retry_state)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/tenacity/_utils.py", line 99, in inner
    return call(*args, **kwargs)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/tenacity/__init__.py", line 419, in exc_check
    raise retry_exc from fut.exception()
tenacity.RetryError: RetryError[<Future at 0x7f7658767910 state=finished raised APIStatusError>]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 71, in <module>
    cli.main()
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 501, in main
    run()
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 351, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 310, in run_path
    return _run_module_code(code, init_globals, run_name, pkg_name=pkg_name, script_name=fname)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 127, in _run_module_code
    _run_code(code, mod_globals, init_globals, mod_name, mod_spec, pkg_name, script_name)
  File "/home/hygx/.vscode-server/extensions/ms-python.debugpy-2024.14.0-linux-x64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 118, in _run_code
    exec(code, run_globals)
  File "/home/hygx/code/ragflow/main.py", line 244, in <module>
    print(grag.query("Who is Scrooge?").response)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_graphrag.py", line 157, in query
    return get_event_loop().run_until_complete(_query())
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 641, in run_until_complete
    return future.result()
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_graphrag.py", line 153, in _query
    raise e
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_graphrag.py", line 149, in _query
    answer = await self.async_query(query, params)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_graphrag.py", line 175, in async_query
    extracted_entities = await self.information_extraction_service.extract_entities_from_query(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_services/_information_extraction.py", line 47, in extract_entities_from_query
    entities, _ = await format_and_send_prompt(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_llm/_base.py", line 43, in format_and_send_prompt
    return await llm.send_message(prompt=formatted_prompt, response_model=response_model, **args)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_utils.py", line 49, in wait_func
    result = await func(*args, **kwargs)
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/fast_graphrag/_llm/_llm_openai.py", line 90, in send_message
    llm_response: T_model = await self.llm_async_client.chat.completions.create(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/instructor/client.py", line 387, in create
    return await self.create_fn(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/instructor/patch.py", line 161, in new_create_async
    response = await retry_async(
  File "/home/hygx/code/ragflow/venv/lib/python3.10/site-packages/instructor/retry.py", line 248, in retry_async
    raise InstructorRetryException(
instructor.exceptions.InstructorRetryException: Error code: 418 - {'error_msg': 'Invalid Format. Multiple 400 errors detected. Please wait for 1 minute before trying again.'}

my code:

    DOMAIN = "Analyze this story and identify the characters. Focus on how they interact with each other, the locations they explore, and their relationships."

    EXAMPLE_QUERIES = [
        "What is the significance of Christmas Eve in A Christmas Carol?",
        "How does the setting of Victorian London contribute to the story's themes?",
        "Describe the chain of events that leads to Scrooge's transformation.",
        "How does Dickens use the different spirits (Past, Present, and Future) to guide Scrooge?",
        "Why does Dickens choose to divide the story into \"staves\" rather than chapters?"
    ]

    ENTITY_TYPES = ["Character", "Animal", "Place", "Object", "Activity", "Event"]

    grag = GraphRAG(
        working_dir="./book_example",
        domain=DOMAIN,
        example_queries="\n".join(EXAMPLE_QUERIES),
        entity_types=ENTITY_TYPES,
        config=GraphRAG.Config(
        llm_service=OpenAILLMService(model="deepseek-chat", base_url="https://api.deepseek.com/v1", api_key="sk-XXXXX"),
        embedding_service=OpenAIEmbeddingService(
            model="text-embedding-3-small",
            base_url="https://aihubmix.com/v1",
            api_key="sk-XXXXX",
            embedding_dim=512,  # the output embedding dim of the chosen model
        )
    )
    )

    with open("./book.txt") as f:
        grag.insert(f.read())

    print(grag.query("Who is Scrooge?").response)

Hello,
this looks like an error within the language model's api call. It seems like the model of your choice ("deepseek-chat") doesn't support the chat interface used by this repo. However without more information about the errors received it is challenging to understand what is exactly the cause of this. Is there some kind of dashboard on deepseek where you can check to see the list of errors?

Hello, if I'm not mistaken, it looks from the other issues that you opened and are now resolved, that this problem was solved. If so could you resolve this issue as completed?

Hello, if I'm not mistaken, it looks from the other issues that you opened and are now resolved, that this problem was solved. If so could you resolve this issue as completed?

thank you.


Downloading photo gallery

When doing update of already saved offline cache, is it really necessary to download photos again? It's problem especially with caches which requires to post photo with the log, like earth caches. The result is downloading a lot of photos, which takes a lot of time. But the photos are already downloaded once, so why download all of them again and again?

Photos can change. I have CO here who changes images almost every day.

Log-images should stay the same.

This is something we could work towards, at least. Besides the image url we could store the time of the last request and then check for changes first (if the server supports it) before download/re-download.

After spending some time thinking about how to fix this and trying out some tests, I was ready to insert my fix. That is when I realized that images are no longer downloaded on Refresh. This is due to change in #1231.
Before the fix, clicking Refresh was really storing the cache, so all data was downloaded.
Now, clicking Refresh just removes the cache from the cache cache and searches for it. The search stores it to the database.
So, this issue is fixed.
But, now a Refresh doesn't refresh the images (unless they have a different URL). Do we want refresh to download images if they have been modified? (gc.com supports modified headers which can be compared to file stored date)

For me, having the images stay the same until the cache is deleted and re-downloaded would be ok because avoiding the slow download is the bigger issue for most people. If we could recognize modified images using http headers, this would make it more precise, but also need an additional request for every image in the cache, cache log and so on, right?

Yes, it would be a call to a function like this for every image
public static long requestLastModifiedDate(String url) {
    return ((HttpURLConnection) new URL(url).openConnection()).getLastModified();
}


Should this repository be archived?

I'm wondering if this repo should be archived, otherwise it may be good to update the dependencies for not having the Githbu banner warning about the potential security vulnerability.

Hello @ifraixedes , this banner must be an old one or an error... the website was removed time ago, so currently the repo has not dependencies, only the README.md

Hello @ifraixedes , this banner must be an old one, and can be dismissed.
The website was removed time ago, so currently the repo has not dependencies, only the README.md
On the other hand, perhaps we should talk about what to do with the Node community

Thanks @jseijas for your answer.
I didn't check the why, basically I get this repo in the list of the weekly email of security vulnerability on repos that I have rights.
I'm not sure what GH actually checks.
I close the issue an you may want to open a new one to talk about the Node Community.

I found a way to dismiss the alert saying that's inappropriated, so I did so.


Return false from handleKeyboard if keycode is equal to not allowed direction

I'm swiping between pretty heavy canvas data, and thought about optimizing navigation with keyboard. So I lock swipes in "onTransitionStart " and then on "onTransitionEnd" I unlock swipes again. This way I  (and with my updated code in handleKeyboard) I can disable stacking of slideTo-calls.
Next slideTo if holding down arrow key will be called when current transition is done.

Ok, thanks


real need of Azure DPS and key rotation

I am working on device side of things using Azure Device SDK(azure-iot-sdk-c) using HSM/x509. Coming from LwM2M bootstrapping, my initial (incorrect) assumption  was credentials used for authenticating with Azure DPS and Azure IoT Hub were different. I also (wrongly) assumed that, Azure DPS generated and shares the certificates to be used for communicating with Azure IoT Hub.
But inspecting device SDK source samples, I see that Azure DPS never shares any authentication certificates or keys. All it shares is the device ID and IoT Hub URL. Device basically connects to IoT Hub using the x509 certificates embedded into the device HSM by the manufacturer in factory setup.
That being the case, why use Azure DPS? Why not use manufacturer/operator added certificates to directly connect to Azure IoT Hub and hardcode the IoT Hub endpoint in the device? Even now we are hardcoding Azure DPS endpoint. What is the advantage with DPS?

Is it that we can change IoT Hub endpoint at will(possibly based on geolocation)?
Unlike LwM2M bootstrapping, I see no key rotation in place. All communications are made using manufacturer embedded  x509 certificates in HSM. Did I miss anything? Ideally with DPS key rotation was possible. Why not implemented? Is key rotation just a concept not of any real use. I can see a primary and secondary keys in Azure IoT Hub device. But even they are not use while using DPS.
The docs strongly suggests HSM. But azure-iot-sdk-c is incapable of taking real advantage of HSM as it cannot directly access keys in HSM (say PKCS11 API). The Azure SDK expects soft keys, which is as good as no keys at all. It doesn't protect anything should an attacker gain login. He can copy all with out leaving a trace.

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

ID: fd8ddf46-09f2-cc99-4e95-e6c834edcc46
Version Independent ID: c1db7c54-781a-a2cf-a7a0-900576a7fa57
Content: IoT Hub Device Provisioning Service - Auto-provisioning concepts
Content Source: articles/iot-dps/concepts-auto-provisioning.md
Service: iot-dps
GitHub Login: @BryanLa
Microsoft Alias: bryanla

Hello @kiranpradeep, thank you for your feedback. Let me go through some of your questions, but before I want to point out that the Azure IoT Reference Architecture Guide can clarify many of your questions and others coming along while you architect your solution.

I am working on device side of things using Azure Device SDK(azure-iot-sdk-c) using HSM/x509. Coming from LwM2M bootstrapping, my initial (incorrect) assumption was credentials used for authenticating with Azure DPS and Azure IoT Hub were different. I also (wrongly) assumed that, Azure DPS generated and shares the certificates to be used for communicating with Azure IoT Hub.
But inspecting device SDK source samples, I see that Azure DPS never shares any authentication certificates or keys. All it shares is the device ID and IoT Hub URL. Device basically connects to IoT Hub using the x509 certificates embedded into the device HSM by the manufacturer in factory setup.
That being the case, why use Azure DPS? Why not use manufacturer/operator added certificates to directly connect to Azure IoT Hub and hardcode the IoT Hub endpoint in the device? Even now we are hardcoding Azure DPS endpoint. What is the advantage with DPS?

I believe this document explains very well when to use and why use DPS. If you have read that document before and still have some questions please detail them more. You can hardcode the IoTHub endpoint in the device but that will not allow you the same flexibility (multitenancy, solution isolation, geo-sharding, reprovisioning, and more). Check this blog post  as well.

Is it that we can change IoT Hub endpoint at will(possibly based on geolocation)?

Yes

Unlike LwM2M bootstrapping, I see no key rotation in place. All communications are made using manufacturer embedded x509 certificates in HSM. Did I miss anything? Ideally with DPS key rotation was possible. Why not implemented? Is key rotation just a concept not of any real use. I can see a primary and secondary keys in Azure IoT Hub device. But even they are not use while using DPS.

I am not sure if I understood the question but DPS allows you "Secure attestation support for both X.509 and TPM-based identities.". Please read also IoT Hub Device Provisioning Service security concepts and let us know if that document helps clarify your question?

The docs strongly suggests HSM. But azure-iot-sdk-c is incapable of taking real advantage of HSM as it cannot directly access keys in HSM (say PKCS11 API). The Azure SDK expects soft keys, which is as good as no keys at all. It doesn't protect anything should an attacker gain login. He can copy all with out leaving a trace.

Can you post that that issue\concern on azure-iot-sdk-c repository? Product Group developing C SDK will answer you directly there.
Thank you

@kiranpradeep follows the input from Product Group to your question:

DPS does support key rotation – that’s why there’s a primary and secondary cert option in the enrollment.
You can’t roll the endorsement key because it’s a value inherent to the TPM and is not made to be rolled (changing the EK is equivalent to getting a new TPM and installing that in the device). However, devices provisioning with a TPM will have their IoT Hub credentials rolled whenever the device talks to DPS.

Adding @nberdy for futher clarification if needed.

Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.
Thank you for your time.


several accessibility bugs in layout

MDL version: 1.0.0
Browser: Chrome
Browser version: 43
Operating system: Ubuntu
Operating system version: 14.04
URL:
http://www.getmdl.io/templates/android-dot-com/index.html
http://www.getmdl.io/components/index.html#layout-section
What steps will reproduce the problem:

open page
press [TAB]
navigation should be closed by pressing [ESC]

What is the expected result?
drawer button will be focused. With a press on [Enter] the drawer navigation will be opened.
What happens instead of that?
Another element will be focused. E.g. in the Android template the search input field will be focused. Here seems to be the next glitch. The links in the horizontal navigation will be focused after the search field. So the element order not match witch the tab order.
My proposal for a solution:

the .mdl-layout__drawer-button should be a button, not a div
add missing aria attributes (aria-expanded to the button, aria-hidden to the navigatio. Maybe aria-owns to the button, iam not shure about that)
drawer navigation items get tabindex of -1, if drawer nav is closed and 0 if drawer nav is open
the html elements of the navigation elements (links and search input) should be in the right order in the markup and not be positioned by to many css magic (order change with flexbox)
close navigation on pressing [ESC]

What is the state of the bug? I could create an PR for that, if this is desired.

Hey @tschiela,
sorry for the missing response. Nothing has been done yet, but it will be addressed once we get around to it. However, PRs are greatly appreciated. So if you want to take care of this, feel free to go ahead :)


fix: lock metric parser version

Description
This PR prevents installation of the lastest version of https://github.com/stackrox/prometheus-metric-parser
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
Here I tell how I validated my change
CI
$ . scripts/ci/lib.sh; get_prometheus_metrics_parser
Usage:
  prometheus-metric-parser [command]

Available Commands:
  compare     Compare takes two metrics files and compares them takes all the metrics and outputs them as key value pairs. It will average histograms
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  single      Single takes all the metrics and outputs them as key value pairs. It will average histograms

Flags:
  -h, --help   help for prometheus-metric-parser

Use "prometheus-metric-parser [command] --help" for more information about a command.
$ which prometheus-metric-parser
$ROOT/.gotools/bin/prometheus-metric-parser

Reminder for reviewers
In addition to reviewing code here, reviewers must also review testing and request further testing in case the
performed one does not seem sufficient. As a reviewer, you must not approve the change until you understand the
performed testing and you are satisfied with it.

/retest


add as a new Silver sponsor

pointing to : https://www.multiplayer.app/

[](https://www.figma.com/file/lUekznwtGCqHDvasC1vrnp/Nodejsconf?type=design&node-id=367-2&mode=design&t=OIiwMJXFSrfycnrt-0)


How can i train a pixelcnn with pytorch framwork?

in the pixeldefend defense package, the pixelcnn is not available during training, does there are some sources for me to train a new pixelcnn realted to my dataset ?

I'm converting this issue into a discussion under the Discussions tab above.


chore(starknet_integration_tests): use run_until for block await

Stack:

#2373 ⬅
#2329
#2332
#2328

⚠ Part of a stack created by spr. Do not merge manually using the UI - doing so may have unexpected results.

This change is


Closing this issue as it does not follow the issue template. Please file a new issue that follows the template, which gives the team the information needed to investigate.

Closing this issue as it does not follow the issue template. Please file a new issue that follows the template, which gives the team the information needed to investigate.
Originally posted by @crisbeto in https://github.com/angular/components/issues/23670#issuecomment-1003029688
Hello, may I know where to find the issue template?

When you press the "New issue" button, the text field is prefilled with the issue template.


New name suggestions

A new name would be nice, instead of QTCord.

Preferably not anything with QT in it, and maybe even no “cord.” I just named it QTCord because there was a GTKCord

Cordial Client?

It's fine for now.


A->B and B->A Transforms are Both Positive

We are trying to troubleshoot some issues using perses on some ligand transformations. We're testing a single forward and backward transformation ( A-> B and B -> A) which is the most trivial closed cycle. Our intuition tells us that the magnitudes of these two transformations should be equal and opposite to each other, and this is what we see with the experimental data. Right now, the calculated ddGs are not adding up to zero, but instead are both very positive. Can you help shed some light on this? Could this be a units problem? This is what the mm_graph looks like:
OutEdgeDataView([(9, 10, {'calc_DDG': 5.18712727908637, 'calc_dDDG': 0.4801874381154462, 'exp_DDG': -0.9193053246474641, 'exp_dDDG': 0.0}), (10, 9, {'calc_DDG': 11.124917041483098, 'calc_dDDG': 0.4120190004511572, 'exp_DDG': 0.9193053246474641, 'exp_dDDG': 0.0})])

There are a number of things that could be going wrong here, including apparently good convergence that is actually poor.
We're not yet to the advanced state with perses as we were with YANK in being able to automatically generate "simulation health reports" that make it easy to diagnose issues without disclosing chemical information about the transformation, so we'll need to ask you to find a public example that you can share your input files for. Can you upload a ZIP file and also provide a conda env export dump of your conda environment?
Our funding for this project is from other partners that we have to prioritize, but we try to give a "best effort" in helping other folks out when we can.

Thank you! We are working on putting something together.

Awesome---that will help immensely.

@mikemhenry @ijpulidos : We should add some A->B and B->A consistency tests (likely just ligand in solvent, not complex) to our GPU CI as well. We can start with examples we already have, but can add a public example from @casebeerVRTX once provided.

We appreciate the help and we have been trying on some public data so it will be easier to debug. However, we've made a few modifications to perses.
To run perses on membrane proteins with lipids treated as solvent and not ligands, we worked with @dominicrufa last summer. We prepared the protein + membrane system outside of perses and then used modeller to add waters and ions. After this, we saved a pickle of the topology and numpy array of the positions.
The examples provided are from the following paper, a Nav 1.7 protein with Arylsulfonamide inhibitors.
from simtk.openmm.app import PDBFile
from simtk.openmm import app
from simtk import unit
from simtk.openmm import Platform
from simtk.openmm import LangevinIntegrator
from simtk.openmm.app import ForceField, PDBFile, PME, Modeller
# This is receptor + membrane
pdb = PDBFile("tmp2.pdb")
modeller = Modeller(pdb.topology, pdb.positions)
forcefield = ForceField(*['amber/ff14SB.xml', 'amber/tip3p_standard.xml', 'amber/lipid17.xml'])
# This works with the included POPC
system = forcefield.createSystem(pdb.getTopology(), nonbondedMethod=PME)
modeller.addSolvent(forcefield, model='tip3p', numAdded=65000,
ionicStrength=0.150*unit.molar, positiveIon='Na+', negativeIon='Cl-', neutralize=True)
def write_pickle(object, pickle_filename):
"""
write a pickle
arguments
object : object
picklable object
pickle_filename : str
name of pickle
"""
import pickle
with open(pickle_filename, 'wb') as f:
pickle.dump(object, f)
write_pickle(modeller.topology, "openmm.pickle")
_positions = modeller.positions / unit.nanometers
import numpy as np
np.savez("positions.z", positions=_positions)

We then modified relative_setup to omit solvation and added the class attributes for receptor_topology and receptor_positions to the RelativeFEPSetup class. If those are defined, we depickle the files we prepared outside of perses and set self._receptor_positions_old, self._receptor_topology_old, and self._receptor_md_topology_old.
def depickle(pickle_filename):
"""
load a pickle
arguments
pickle_filename : str
name of pickle
returns
pickle : loaded pickle object
"""

import pickle
with open(pickle_filename, 'rb') as f:
pickle = pickle.load(f)
return pickle

Inside of setup_relative_calculation.py we added an option to use the Monte Carlo barostat. We also added options to directly pass the receptor topology and receptor positions to RelativeFEPSetup.
(We have not merged in new commits to perses so we are out of date ~6 months.)
In run.yaml we're loading the Lipid17 FF to handle POPC. Other than that, I think things are fairly standard.
Attached are the conda environment, receptor PDB, ligand sdf, pickle, numpy positions, yaml file, and run.py.
2edge_test.zip
env_2edge.txt

To make things a little more concrete and fix some copy/paste indentation issues, here is a diff between perses commit ac5cd56e138383b557ecfd5d0fc780bef193ec0d and our modified version.

diff --git a/perses/app/relative_setup.py b/perses/app/relative_setup.py
index bb594799..a0232675 100644
--- a/perses/app/relative_setup.py
+++ b/perses/app/relative_setup.py
@@ -49,6 +49,8 @@ class RelativeFEPSetup(object):
                  forcefield_files,
                  phases,
                  protein_pdb_filename=None,
+                 receptor_topology=None,
+                 receptor_positions=None,
                  receptor_mol2_filename=None,
                  pressure=1.0 * unit.atmosphere,
                  temperature=300.0 * unit.kelvin,
@@ -376,10 +378,11 @@ class RelativeFEPSetup(object):
             _logger.info(f"setting up complex phase...")
             self._setup_complex_phase(protein_pdb_filename,receptor_mol2_filename,mol_list)
             self._complex_topology_old_solvated, self._complex_positions_old_solvated, self._complex_system_old_solvated = self._solvate_system(
-            self._complex_topology_old, self._complex_positions_old,phase='complex',box_dimensions=self._complex_box_dimensions, ionic_strength=self._ionic_strength)
+            self._complex_topology_old, self._complex_positions_old,phase='complex',box_dimensions=self._complex_box_dimensions, ionic_strength=self._ionic_strength, run_solvate=False)
             _logger.info(f"successfully generated complex topology, positions, system")

             self._complex_md_topology_old_solvated = md.Topology.from_openmm(self._complex_topology_old_solvated)
+            print(f"dumbwaiter found {self._complex_md_topology_old_solvated.n_atoms} atoms!")

             _logger.info(f"creating TopologyProposal...")
             self._complex_topology_proposal = self._proposal_engine.propose(self._complex_system_old_solvated,
@@ -557,8 +560,36 @@ class RelativeFEPSetup(object):
             protein_pdbfile.close()
             self._receptor_positions_old = pdb_file.positions
             self._receptor_topology_old = pdb_file.topology
+            print(f"from app.pdbfile, topology got pbcs like: {pdb_file.topology.getPeriodicBoxVectors()}")
             self._receptor_md_topology_old = md.Topology.from_openmm(self._receptor_topology_old)

+        if self.receptor_topology:
+
+            def depickle(pickle_filename):
+                """
+                load a pickle
+                arguments
+                    pickle_filename : str
+                        name of pickle
+                returns
+                    pickle : loaded pickle object
+                """
+                import pickle
+
+
+                with open(pickle_filename, 'rb') as f:
+                    pickle = pickle.load(f)
+                return pickle
+
+            depickled = depickle(self.receptor_topology)
+            f = np.load(self.receptor_positions)
+
+            self._receptor_positions_old = f["positions"] * unit.nanometers
+            self._receptor_topology_old = depickled
+            print(f"from app.pdbfile, topology got pbcs like: {depickled.getPeriodicBoxVectors()}")
+            self._receptor_md_topology_old = md.Topology.from_openmm(self._receptor_topology_old)
+
+
         elif receptor_mol2_filename:
             self._receptor_mol2_filename = receptor_mol2_filename
             self._receptor_mol = createOEMolFromSDF(self._receptor_mol2_filename)
@@ -578,6 +609,7 @@ class RelativeFEPSetup(object):
                 self._complex_md_topology_old = self._complex_md_topology_old.join(spectator_topology)
                 n_atoms_spectators += spectator_topology.n_atoms
         self._complex_topology_old = self._complex_md_topology_old.to_openmm()
+        self._complex_topology_old.setPeriodicBoxVectors(depickled.topology.getPeriodicBoxVectors())

         n_atoms_total_old = self._complex_topology_old.getNumAtoms()
         n_atoms_protein_old = self._receptor_topology_old.getNumAtoms()
@@ -778,7 +810,7 @@ class RelativeFEPSetup(object):
             pass
         return new_positions * unit.nanometers

-    def _solvate_system(self, topology, positions, model='tip3p',phase='complex', box_dimensions=None,ionic_strength=0.15 * unit.molar):
+    def _solvate_system(self, topology, positions, model='tip3p',phase='complex', box_dimensions=None,ionic_strength=0.15 * unit.molar, run_solvate=True):
         """
         Generate a solvated topology, positions, and system for a given input topology and positions.
         For generating the system, the forcefield files provided in the constructor will be used.
@@ -795,6 +827,8 @@ class RelativeFEPSetup(object):
             solvent model to use for solvation
         box_dimensions : tuple of Vec3, default None
             if not None, padding distance will be omitted in favor of a pre-specified set of box dimensions
+	run_solvate : bool, default True
+	    whether to solvate the existing modeller.model or not.

         Returns
         -------
@@ -808,13 +842,13 @@ class RelativeFEPSetup(object):
         # DEBUG: Write PDB file being fed into Modeller to check why MOL isn't being matched
         from simtk.openmm.app import PDBFile
         modeller = app.Modeller(topology, positions)
+        print(f"input topology of phase {phase} has box vectors: {topology.getPeriodicBoxVectors()}")
         # retaining protein protonation from input files
         #hs = [atom for atom in modeller.topology.atoms() if atom.element.symbol in ['H'] and atom.residue.name not in ['MOL','OLD','NEW']]
         #modeller.delete(hs)
         #modeller.addHydrogens(forcefield=self._system_generator.forcefield)
         _logger.info(f'box_dimensions: {box_dimensions}')
         _logger.info(f'solvent padding: {self._padding._value}')
-        run_solvate = True
         if phase == 'solvent':
             self._padding = 9. * unit.angstrom
         if phase == 'vacuum':
@@ -829,16 +863,26 @@ class RelativeFEPSetup(object):
                 modeller.addSolvent(self._system_generator.forcefield, model=model, padding=self._padding, ionicStrength=ionic_strength)
             else:
                 modeller.addSolvent(self._system_generator.forcefield, model=model, ionicStrength=ionic_strength, boxSize=box_dimensions)
+
         solvated_topology = modeller.getTopology()
-        if phase == 'complex' and self._padding._value == 0. and box_dimensions is not None:
-            _logger.info(f'Complex phase, where padding is set to 0. and box dimensions are provided so setting unit cell dimensions')
-            solvated_topology.setUnitCellDimensions(box_dimensions)
+        if not run_solvate:
+            solvated_topology.setPeriodicBoxVectors(topology.getPeriodicBoxVectors())
+        print(f"pulled solvated topology with phase {phase} and got pbcs like: {solvated_topology.getPeriodicBoxVectors()}")
+
+        if run_solvate:
+            if phase == 'complex' and self._padding._value == 0. and box_dimensions is not None:
+                _logger.info(f'Complex phase, where padding is set to 0. and box dimensions are provided so setting unit cell dimensions')
+                solvated_topology.setUnitCellDimensions(box_dimensions)
+            else:
+                _logger.info(f"complex phase is pre-solvated: getting cell dimensions {solvated_topology.getUnitCellDimensions()}")
+
         solvated_positions = modeller.getPositions()

         # canonicalize the solvated positions: turn tuples into np.array
         solvated_positions = unit.quantity.Quantity(value = np.array([list(atom_pos) for atom_pos in solvated_positions.value_in_unit_system(unit.md_unit_system)]), unit = unit.nanometers)
         _logger.info(f"\tparameterizing...")
         solvated_system = self._system_generator.create_system(solvated_topology)
+        print(f"solvated system uses pbcs: {solvated_system.usesPeriodicBoundaryConditions()}")
         _logger.info(f"\tSystem parameterized")

         if self._trajectory_directory is not None and self._trajectory_prefix is not None:
@@ -847,6 +891,8 @@ class RelativeFEPSetup(object):
                 PDBFile.writeFile(solvated_topology, solvated_positions, outfile)
         else:
             _logger.info('Both trajectory_directory and trajectory_prefix need to be provided to save .pdb')
+
+        #raise Exception(f"terminating...")

         return solvated_topology, solvated_positions, solvated_system

diff --git a/perses/app/setup_relative_calculation.py b/perses/app/setup_relative_calculation.py
index 350c3b24..208ec060 100644
--- a/perses/app/setup_relative_calculation.py
+++ b/perses/app/setup_relative_calculation.py
@@ -335,8 +335,11 @@ def run_setup(setup_options, serialize_systems=True, build_samplers=True):
         _logger.info(f"\tPulling receptor (as pdb or mol2)...")
         # We'll need the protein PDB file (without missing atoms)
         try:
-            protein_pdb_filename = setup_options['protein_pdb']
-            assert protein_pdb_filename is not None
+            receptor_topology = setup_options['receptor_topology']
+            receptor_positions = setup_options["receptor_positions"]
+            assert receptor_topology is not None
+            assert receptor_positions is not None
+            protein_pdb_file = None
             receptor_mol2 = None
         except KeyError:
             try:
@@ -438,6 +441,8 @@ def run_setup(setup_options, serialize_systems=True, build_samplers=True):
         _logger.info(f'Box dimensions: {setup_options["complex_box_dimensions"]} and {setup_options["solvent_box_dimensions"]}')
         fe_setup = RelativeFEPSetup(ligand_file, old_ligand_index, new_ligand_index, forcefield_files,phases=phases,
                                           protein_pdb_filename=protein_pdb_filename,
+                                          receptor_topology=recptor_topology,
+                                          receptor_positions=receptor_positions,
                                           receptor_mol2_filename=receptor_mol2, pressure=pressure,
                                           temperature=temperature, solvent_padding=solvent_padding_angstroms, spectator_filenames=setup_options['spectators'],
                                           map_strength=setup_options['map_strength'],
@@ -565,6 +570,25 @@ def run_setup(setup_options, serialize_systems=True, build_samplers=True):
                                                interpolate_old_and_new_14s = setup_options['anneal_1,4s'],
                                                rmsd_restraint=setup_options['rmsd_restraint']
                                                )
+
+            # replace the htf with a membrane barostat
+            if phase == 'complex':
+                from simtk import openmm
+                _logger.info("querying hybrid system forces to add barostat...")
+                hsystem = htf[phase].hybrid_system
+                _logger.info(f"hybrid system forces are {hsystem.getForces()}")
+                found_bar = False
+                for force_idx in range(hsystem.getNumForces()):
+                    _logger.info(f"querying force index {force_idx} with force {hsystem.getForce(force_idx)} and name {hsystem.getForce(force_idx).__class__.__name__}")
+                    if hsystem.getForce(force_idx).__class__.__name__ == 'MonteCarloBarostat':
+                        hsystem.removeForce(force_idx)
+                        found_bar=True
+                        break
+                assert found_bar, f"no MonteCarloBarostat was found."
+                barostat = openmm.MonteCarloMembraneBarostat((setup_options['pressure'] * unit.atmosphere).value_in_unit(unit.bar), 0., temperature.value_in_unit(unit.kelvin), openmm.MonteCarloMembraneBarostat.XYAnisotropic, openmm.MonteCarloMembraneBarostat.ZFixed, 25)
+                htf[phase].hybrid_system.addForce(barostat)
+
+

         for phase in phases:
            # Define necessary vars to check energy bookkeeping
diff --git a/perses/rjmc/geometry.py b/perses/rjmc/geometry.py
index 5a4563eb..eea17ee0 100644
--- a/perses/rjmc/geometry.py
+++ b/perses/rjmc/geometry.py
@@ -460,6 +460,7 @@ class FFAllAngleGeometryEngine(GeometryEngine):
         integrator = openmm.VerletIntegrator(1*unit.femtoseconds)
         atoms_with_positions_system_integrator = openmm.VerletIntegrator(1*unit.femtoseconds)
         final_system_integrator = openmm.VerletIntegrator(1*unit.femtoseconds)
+        final_system_integrator2 = openmm.VerletIntegrator(1*unit.femtoseconds)
         context = openmm.Context(growth_system, integrator, platform)
         growth_system_generator.set_growth_parameter_index(len(atom_proposal_order)+1, context)

@@ -490,7 +491,7 @@ class FFAllAngleGeometryEngine(GeometryEngine):
             _logger.debug(f'\t{f} : {e}')
         atoms_with_positions_methods_differences = abs(atoms_with_positions_reduced_potential - sum([i[1] for i in atoms_with_positions_reduced_potential_components]))
         _logger.debug(f'Diffence in energy on adding unique atoms: {atoms_with_positions_methods_differences}')
-        assert atoms_with_positions_methods_differences < ENERGY_THRESHOLD, f"the difference between the atoms_with_positions_reduced_potential and the sum of atoms_with_positions_reduced_potential_components is {atoms_with_positions_methods_differences}"
+        #assert atoms_with_positions_methods_differences < ENERGY_THRESHOLD, f"the difference between the atoms_with_positions_reduced_potential and the sum of atoms_with_positions_reduced_potential_components is {atoms_with_positions_methods_differences}"

         # Place each atom in predetermined order
         _logger.info("There are {} new atoms".format(len(atom_proposal_order)))
@@ -639,6 +640,7 @@ class FFAllAngleGeometryEngine(GeometryEngine):
                 final_system.getForce(force_names['NonbondedForce']).setUseDispersionCorrection(False)
             _logger.info(f"{direction} final system defined with nonbonded interactions.")
         final_context = openmm.Context(final_system, final_system_integrator, platform)
+        final_context2 =  openmm.Context(final_system, final_system_integrator2, platform)
         final_context.setPositions(_positions)

         state = final_context.getState(getEnergy=True)
diff --git a/perses/samplers/multistate.py b/perses/samplers/multistate.py
index c5ef0800..c8eca3bd 100644
--- a/perses/samplers/multistate.py
+++ b/perses/samplers/multistate.py
@@ -48,7 +48,8 @@ class HybridCompatibilityMixin(object):
         thermodynamic_state_list = []
         sampler_state_list = []

-        context_cache = cache.ContextCache()
+        context_cache = cache.global_context_cache #why was this not specified like this before?
+        print("context cache is using platform: {context_cache.platform.getName()}")

         if n_replicas is None:
             _logger.info(f'n_replicas not defined, setting to match n_states, {n_states}')

Hello,
We have continued to try to debug this issue, and unfortunately have not had much luck. We have tried changing the number of REPEX cycles, the number of MD steps, the number of lambda windows, adding a backbone restraint, plotting replica mixing, doing a visual trajectory analysis, and examining the DDG as a function of time.
I am still working with the protein and ligands specified in the sdf file that I sent earlier. My expectation is that any two reciprocal transformations would sum to 0. I’m looking at a particular transformation (9->10 and 10->9), one of many that does not sum to zero.
Here is a summary of a bunch of things I tried:

This is the 10 -> 9 transformation.

It appears as if none of these changes resulted in significant progress towards getting the two transformations to sum to zero. Below is a graph of all the DDG results along with the experimental values on the far right.

Looking more closely at simulation 9, which has 1000 REPEX cycles, 1000 MD steps, 4 fs timesteps, and 11 lambda windows, meaning 44ns of simulation time per transformation, I plotted the replica mixing and the DDG over time.
Here is the replica mixing (complex on left and solvent on right) for 10 -> 9.

Here is the replica mixing (complex on left and solvent on right) for 9 -> 10.

Qualitatively, they seem to be mixing.
Here is a plot of the ddG over time of the 10 -> 9 and the 9 -> 10 transformation. Again, qualitatively, it seems to be close to equilibrium.

We also tried to run this protein without the lipids (just in solvent) using the non-lipid modified perses. Even though we would not expect the predicted values to match the experimental values because there’s lipids near the binding site, we wanted to test if the two reciprocal transformations would sum to 0. At the moment, we are getting the following error:
AssertionError: the difference between the atoms_with_positions_reduced_potential and the sum of atoms_with_positions_reduced_potential_components is 38.51413189283903
I realize that debugging the lipid-modified perses may pose some challenges, but I was hoping you might be able to suggest what else to check as we’re working on this issue.

I wanted to follow up with this issue since it is now resolved. We ended up rebasing the lipid-version of perses to the most recent version, and changed the atom mapping strategy because the same ring was getting mapped incorrectly. This doesn't solve the issue of both of these being positive, but we were able to find a work around.
Thank you!


LVB API no longer uses IDs

Looks like the LVB API no longer provides station IDs in the AJAX response:
$ curl https://www.l.de/ajax_de?mode=autocomplete&q=Herman&poi=&limit=10
{"stations":[{"name":"Leipzig, Hermann-Liebmann-Str.\/ Eisenbahnstr.","lat":"51.345578950648","lng":"12.406472923894","distance":"2.272732820253887"},{"name":"Leipzig, Dr.-Hermann-Duncker-Str.","lat":"51.333249688312","lng":"12.305794850988","distance":"4.849646498628953"}]}

/fahrplan/abfahrten now uses the whole name instead:

The lvb.departures test is wrong at that point: Providing the ID results in the departures of a different station.

It seems, they complete removed the API, at least the https://www.l.de/verkehrsbetriebe/fahrplan/ doesn't use the form data call anymore, I only see some reiseauskunft.insa.de and some hafas-client library code calls.


ENH: plot_3d_montage

Closes #440
Code is getting there. If MNE-Python's montage functions are used, autodetection works:
    view_map = {
        'left-lat': np.arange(1, 13),
        'right-lat': np.arange(13, 25),
    }
    fig = mne_nirs.visualisation.plot_3d_montage(
        use['h'].info, view_map=view_map, subjects_dir=subjects_dir)

NIRx doesn't use the same positions as the builtin MNE-Python montage, so we need to do more for this case:
    view_map = {
        'left-lat': np.r_[np.arange(1, 13),
                          np.arange(58, 74),
                          np.arange(75, 78)],
        'caudal': np.r_[42,
                        np.arange(45, 58),
                        74,
                        np.arange(78, 85)],
        'right-lat': np.r_[np.arange(13, 42), 43, 44],
    }
    fig = mne_nirs.visualisation.plot_3d_montage(
        info, view_map=view_map, subjects_dir=subjects_dir)

The modified example has the same problem:
view_map = {
    'left-lat': np.r_[np.arange(1, 27), 28],
    'caudal': np.r_[27, np.arange(43, 53)],
    'right-lat': np.r_[np.arange(29, 43), 44],
}

fig = mne_nirs.visualisation.plot_3d_montage(
    raw.info, view_map=view_map, subjects_dir=subjects_dir)

Todo

[ ] Fix NIRx 10-20 detection
[x] Actually describe the view_map option (hemi-brainview keys)
[x] Add tests

Option 1
@rob-luke one option would be to make a function for NIRx that converts their 10-20 positions to MNE-Python's. Do they have standard 10-20 positions that then populate info? If so, we could come up with a lookup table, then people can do:
mne_nirs.something.convert_nirx_1020(raw.info, copy=False)

to update their channel positions. Users can even avoid making it permanent just by doing in their code before plotting:
plot_info = mne_nirs.something.convert_nirx_1020(raw.info)  # default is copy=True
mne_nirs.visualisation.plot_3d_montage(plot_info, ...)

Option 2
Another clean way to go would be, instead of 'auto', the default value could be src_det_names='standard_1020' to give a montage to load. Then in MNE-Python we can add a 'nirx' named montage, so then the call here would be src_det_names='nirx' or so. Or we just make nirx_montage = mne_nirs.something.get_montage('nirx') that you can then pass directly as src_det_names=nirx_montage to tell it which positions to look at to get the names.
I think my vote is for Option 2, because it nicely generalizes. You could imagine generalizing to get_montage('flow') or so. And then src_det_names=<str> could by convenience call the mne_nirs get_montage first, and if it doesn't exist, try loading the MNE-Python get_montage (like standard_1020)... and we could maybe even make auto detect the acq system and triage to the correct one (standard_1020 for Hitachi, nirx for nirx, flow for kernel flow, etc.).

This looks really cool @larsoner

@rob-luke one option would be to make a function for NIRx that converts their 10-20 positions to MNE-Python's. Do they have standard 10-20 positions that then populate info?

You can place your optode positions anywhere in a NIRX system, you are not restricted to 10-20 style locations. When i've built my montages I just click as close to the 10-20 positions as I can.  So there is not a direct mapping, does this make sense?
But in general, the NIRS community haven't used these standard positions as much as they could (and I have received much critisim in manuscript reviews for describing locations using "eeg" language). But I hope in the future the fNIRS community adopts standard locations more.
As most devices dont restrict users to 10-20 positions, I dont know if your option 2 will work. Instead of specifying positions using 10-20 naming, all the fNIRS data files I have used specify the locations using 3D coordinates. But I guess when using auto we could try and detect a standard position name, and if the distance/error is too great then just revert to the uninformative naming of S1 etc? I dont knot if I am being helpful here or not.

When i've built my montages I just click as close to the 10-20 positions as I can. So there is not a direct mapping, does this make sense?

Ahh so even if in experiment 1 you placed an electrode on the participant and clicked in their GUI as close to Cz as you can, these two could (probably will) end up with different X/Y/Z coordinates? Then in this case I think the solution here is probably all we want -- if the electrode positions match the standard MNE 10-20, use 10-20 names, otherwise rely on the user to either 1) set_montage using the MNE standard 10-20 locations if they want to standardize or 2) pass a mapping dict directly to say what S1, S2, ..., D1, D2, ... map to.
I'll move on to writing some tests and improving the docstring, then I think that's probably sufficient for this first PR.

Ahh so even if in experiment 1 you placed an electrode on the participant and clicked in their GUI as close to Cz as you can, these two could (probably will) end up with different X/Y/Z coordinates?

Correct. But I do this only once per project/montage, then apply the same montage to all measurements within a single experiment.

Any objection to adding an alias mne_nirs.viz that's the same as mne_nirs.visualisation? It bypasses the british/american English issue

I would have gone with vis 😉 But I agree we should go with viz for consistency with MNE etc
Ping me when its ready for review

Okay @rob-luke this is ready for review/merge from my end

@rob-luke done!
https://2158-254026779-gh.circle-artifacts.com/0/dev/generated/mne_nirs.visualisation.plot_3d_montage.html#mne_nirs.visualisation.plot_3d_montage

This is so great. Thanks @larsoner

Just added a changelog entry. Merging now, thanks.

Feel free to make it better. In particular, the short channel plotting is a bit ugly. Might want some way to disable short channel labeling, or maybe show it differently somehow...

Good ideas!


Update onnxruntime/trainer.py with recent huggingface change

What does this PR do?
This PR updates trainer.py and trainer_args.py to keep up with changes around deepspeed usage in transformers/trainer
Fixes #1133
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[x] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

related #1133

Hi @jingyanwangms, thanks a lot for the PR. Could you confirm which release of transformers this PR is updated to?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

Hi @jingyanwangms, thanks a lot for the PR. Could you confirm which release of transformers this PR is updated to?
@JingyaHuang Where can I find release information?

Hi @jingyanwangms,
Currently in Transformers, we are refactoring distributed training features using the Accelerate library. So it would be pretty important that we make sure all functions overwritten by ORTTrainer are compatible (which means that we need to apply all changes in transformers.Trainer instead of the bugged lines to ensure that those features can work correctly).
Do you mind applying all commits from transformers 4.27, until transformers 4.30.2 in functions overwritten by ORTTrainer?

How do I apply all commits from transformers 4.27 until 4.30.2? The latest optimum branch that I can find is v1.8.8.
Also, what are your thoughts on calling TrainingArguments.post_init with super.post_init instead of duplicating a lot of the logic in ORTTrainingArguments.post_init ?

@JingyaHuang can you please explain more on "apply all commit"?

@JingyaHuang can you please explain more on "apply all commit"?

I think @JingyaHuang mean, all the changes after the file optimum duplicated the training_args, e.g. compare that old commit with latest transformer training_args, apply all changes that is irrelevant to ORT.
If the effort is too big, maybe we can also just refactor the training_args post_init(), letting it just call transformers correposinding post_init() then do ORT specific things.
While either way it might break some other usages, I mean other examples script might also need a change accordingly. Hopefully there is no much things we need to do.

@JingyaHuang can you please explain more on "apply all commit"?

I think @JingyaHuang mean, all the changes after the file optimum duplicated the training_args, e.g. compare that old commit with latest transformer training_args, apply all changes that is irrelevant to ORT.
If the effort is too big, maybe we can also just refactor the training_args post_init(), letting it just call transformers correposinding post_init() then do ORT specific things. @JingyaHuang do you think this is feasible, or you had any concerns on this?
While either way it might break some other usages, I mean other examples script might also need a change accordingly. Hopefully there is no much things we need to do.
I'm going check recent transformers trainers.py commits as Peng suggested. @JingyaHuang please confirm if this is what you meant

@JingyaHuang a side note, when will transformers 5 come out? By then we can deprecate overriding post_init


Fixes linter issues, upgrades linter

upgrade to golangci-lint 1.50.1,
fix linter issues,
disable deprecated linters

Signed-off-by: Bernd Verst<EMAIL_ADDRESS>

Please fix CI, as
https://github.com/dapr/dapr/actions/runs/3448087615/jobs/5771538556#step:15:155


Angular CLI and monorepos (like lerna, yarn workspaces)

Bug Report or Feature Request (mark with an x)
- [x] bug report -> please search issues before submitting
- [x] feature request

Versions.
$ ng --version
    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/
@angular/cli: 1.3.0-beta.0
node: 6.10.1
os: darwin x64
@angular/animations: error
@angular/common: error
@angular/compiler: error
@angular/core: 4.3.1
@angular/forms: error
@angular/http: error
@angular/platform-browser: error
@angular/platform-browser-dynamic: error
@angular/router: error
@angular/cli: error
@angular/compiler-cli: error
@angular/language-service: error

This in itself manifests the error.
Repro steps.
A full repro can be found at GitHub repo spektrakel-blog/a-glimpse-at-yarn-workspaces
Initially, faced the "You seem to not be depending on @angular/core" error.
This goes down to a sanity check whether Angular is installed as a local dependency.
However, there are more errors with yarn workspaces, when dependencies from a workspace (or "sub-project", or "sub-package") are installed to the top-most node_modules directory of the workspaces root.
Then, it ends up w/ file structure:
Workspace root package.json:
  "workspaces": [
    "packages/*",
    "demo"
  ]

Demo workspace package.json:
{
  "name": "demo",
  "version": "0.0.0",
  "license": "MIT",
  "private": true,
  "dependencies": {
    "@angular/common": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4"
  }
}

Now, dependencies are installed to node_modules and not to demo/node_modules:
$ ls -a demo/node_modules/
.               ..              .bin            .yarn-integrity
$ ls -a node_modules/@angular
.                        common                   forms                    platform-browser-dynamic
..                       compiler                 http                     router
animations               compiler-cli             language-service         tsc-wrapped
cli                      core                     platform-browser

Then, running ng build from the demo folder errors:
$ cd demo
$ yarn build
yarn build v0.27.5
$ ng build
You seem to not be depending on "@angular/core". This is an error.
error Command failed with exit code 2.

As a workaround, it's possible to symlink "@angular/core":
$ mkdir -p ./node_modules/@angular
$ ln -sf ../../../node_modules/@angular/core ./node_modules/@angular/core
$ ls -l node_modules/@angular/core
lrwxr-xr-x  ... node_modules/@angular/core -> ../../../node_modules/@angular/core
$ cat<EMAIL_ADDRESS>{
  "name": "@angular/core",
  "version": "4.3.1",
  "description": "Angular - the core framework",
  "main": "./bundles/core.umd.js",
  ...
}

But then we only get one error further until:
$ yarn build
yarn build v0.27.5
$ ng build
Hash: a90d0476b33232a953c1
Time: 53409ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 177 kB {3} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {3} [initial] [rendered]
chunk    {2} main.bundle.js, main.bundle.js.map (main) 1.89 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

WARNING in ../~/<EMAIL_ADDRESS>(Emitted value instead of an instance of Error) Cannot find source file 'compiler.es5.ts': Error: Can't resolve './compiler.es5.ts' in '/Users/David/Projects/github/spektrakel-blog/a-glimpse-at-yarn-workspaces/node_modules/@angular/compiler/@angular'
 @ ../~/<EMAIL_ADDRESS>7:0-72
 @ ./src/main.ts
 @ multi ./src/main.ts

ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing thefunction or lambda with a reference to an exported function (position 194:50 in the original .ts file), resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol BrowserModule in<EMAIL_ADDRESS>resolving symbol BrowserModule in<EMAIL_ADDRESS>
Which suggests that Angular CLI isn't really meant to work w/ "sub-projects" like yarn worksapces.
The log given by the failure.
See above.
Desired functionality.
Angular CLI and webpack should resolve depndencies from "top-level" node_modules.
The sanity check should honor node's module resolution algorithm (looking up recursively up the file tree).
Mention any other details that might be useful.
Related to #6504
A related change was implemented in #6475 (resolve in all available node_modules), but it seems that it does not address this use case.

At this point, this is me primarily asking:
"How is Angular CLI meant to work with monorepos?"
It the answer is "please use Angular CLI from the monorepo root directory", I can live by that.

I'm not really familiar with the Yarn workspaces, but the CLI currently attributes meaning to the location both both .angular-cli.json and package.json.
It expects them to be in the same dir, assumes that dir is the project root, and that there's also a node_modules there. These requirements are pretty pervasive throughout the CLI.
So no, I don't think the CLI is currently well equipped to work in monorepos.
But that's not because we don't want it to, just because it wasn't ever much of a concern. If there's a reasonable way of making it work I'm all for it really.
I think some of the CLI users are using it with Lerna, but I don't know the details of it.
The important bits of monorepo support is that it's not really specific to any single setup (like Lerna or these Yarn workspaces), and that it doesn't compromise the current setup.

Regarding my original post: I need to check whether preserveSymlinks offers an easy solution / workaround. #7194 #7081

Regarding discussion:
What may happen in monorepos (at least in yarn workspaces) that they install "(workspace-)local" and "(project-)global" dependencies. Example:
|- aio
    |- node_modules
        |- @angular
            |- http # <- 4.3.2
    | package.json
|- node_modules
    |- @angular
        |- common # <- 4.3.2
| package.json
|- packages
   |- my-lib
       |- node_modules
           |- @angular
                |- common # <- 4.2.0
       | package.json

Let aside potential version conflicts (which are in the hand of the user).
The difficulty for the webpack build would be to resolve modules "by walking up the tree until it finds one". I remember from past custom webpack configs that you had to pass the location of the node_modules. Was it in resolve?
https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/models/webpack-configs/common.ts#L91
Is this even possible to resolve modules from different directories?

I think it's possible, yeah. But now that got me thinking how that happens with peer deps. In your example there's different versions of packages that really want the same version of the peer deps. So through node module resolution you'd end up getting the different versions.
But even though the module resolution might work, I think you'd get.... a static analysis error. Which is what you actually got initially:
$ yarn build
yarn build v0.27.5
$ ng build
Hash: a90d0476b33232a953c1
Time: 53409ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 177 kB {3} [initial] [rendered]
chunk    {1} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {3} [initial] [rendered]
chunk    {2} main.bundle.js, main.bundle.js.map (main) 1.89 MB [initial] [rendered]
chunk    {3} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

WARNING in ../~/<EMAIL_ADDRESS>(Emitted value instead of an instance of Error) Cannot find source file 'compiler.es5.ts': Error: Can't resolve './compiler.es5.ts' in '/Users/David/Projects/github/spektrakel-blog/a-glimpse-at-yarn-workspaces/node_modules/@angular/compiler/@angular'
 @ ../~/<EMAIL_ADDRESS>7:0-72
 @ ./src/main.ts
 @ multi ./src/main.ts

ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing thefunction or lambda with a reference to an exported function (position 194:50 in the original .ts file), resolving symbol NgModule in<EMAIL_ADDRESS>resolving symbol BrowserModule in<EMAIL_ADDRESS>resolving symbol BrowserModule in<EMAIL_ADDRESS>
This wasn't just an error finding a module, it was an error finding a module while using static analysis to find lazy loaded modules (we do that on every build, not just AOT).
So I ask... what happens in your setup when you install all the @angular/* packages at a given level, satisfying the peerdeps? It might just work.
And if that works the only thing we need to do to support it is to relax the You seem to not be depending on "@angular/core". This is an error. one, by performing some better @angular/core checks (https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/upgrade/version.ts#L85-L115).
See where it tries to use path join with the project root? We should be able to use node module resolution instead like https://github.com/angular/angular-cli/blob/master/packages/%40angular/cli/utilities/require-project-module.ts.

@filipesilva Ack.
|- demo
    | .angular-cli.json
    |- node_modules
        |- @angular # symlink to  ../../node_modules/@angular
|- node_modules
    |- @angular

$ ng build
WARNING in ../~/<EMAIL_ADDRESS>(Emitted value instead of an instance of Error) Cannot find source file 'compiler.es5.ts': Error: Can't resolve './compiler.es5.ts' in '/Users/David/Projects/github/spektrakel-blog/a-glimpse-at-yarn-workspaces/node_modules/@angular/compiler/@angular'
 @ ../~/<EMAIL_ADDRESS>7:0-72
 @ ./src/main.ts
 @ multi ./src/main.ts

So still the same error.
$ ng build --preserve-symlinks
Your global Angular CLI version (1.3.0-rc.3) is greater than your local
version (1.3.0-beta.0). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Hash: d97b10ba4761c0902221
Time: 19229ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 177 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 94.3 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.8 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

So with --preserve-symlinks the build is fine!
Also AoT / Prod build!
$ ng build --preserve-symlinks --aot --prod
Your global Angular CLI version (1.3.0-rc.3) is greater than your local
version (1.3.0-beta.0). The local Angular CLI version is used.

To disable this warning use "ng set --global warnings.versionMismatch=false".
Hash: 31d53744fb697d9b9f87
Time: 19407ms
chunk    {0} polyfills.3b4be225e7f6a233ebb3.bundle.js (polyfills) 177 kB {4} [initial] [rendered]
chunk    {1} main.a772681d78c70ca6637d.bundle.js (main) 101 kB {3} [initial] [rendered]
chunk    {2} styles.d41d8cd98f00b204e980.bundle.css (styles) 69 bytes {4} [initial] [rendered]
chunk    {3} vendor.e839d82f8b5326dc3f41.bundle.js (vendor) 761 kB [initial] [rendered]
chunk    {4} inline.6eaed4d70fc63a0f7481.bundle.js (inline) 0 bytes [entry] [rendered]

Ok, so this is progress. I take it the whole partial dep thing still won't work too well (for peer deps at least) but at least stuff seems to work if we tell webpack to pretend symlinks aren't really there.
BTW --preserve-symlinks was the work of @clydin, so big thanks to him for enabling this.

This was merged recently in TS and is probably available in nightly so I think the symlinks won't be required anymore: https://github.com/Microsoft/TypeScript/pull/16274

Same as #6083

just fyi, for packages that do not support the module hoisting done in yarn workspaces there is now a nohoist flag to prevent it https://yarnpkg.com/blog/2018/02/15/nohoist/

Not quite sure if this is related, but I get the following error:
Could not find API compiler-cli, function VERSION

I use lerna with yarn workspaces. I currently have the angular.json inside the subfolder of my web package:
~/packages/web/angular.json

working root package.json

I'm subscribing here, trying to use Yarn workspaces. nohoist indeed works as a temporary fix - at the expense of disk cost.

I'm having an issue I think related to this one. I'm trying Ivy, in a lerna workspace. With ng serve everything works fine. However, when I try to run ng run build throws:
Date: 2019-06-13T21:52:59.215Z
Hash: 55c7e38a65bd19305a57
Time: 9864ms
chunk {0} runtime-es5.9c308a63d02029c20228.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main-es5.4af9b61479361f268d39.js (main) 128 bytes [initial] [rendered]
chunk {2} polyfills-es5.76fb5c306a2dd7f67a99.js (polyfills) 68.1 kB [initial] [rendered]
chunk {3} styles.691cb89d8238aaa5586f.css (styles) 63.4 kB [initial] [rendered]

ERROR in ../../node_modules/@angular/material/toolbar/typings/toolbar-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of AppMaterialModule, but could not be
resolved to an NgModule class
../../node_modules/@angular/material/toolbar/typings/toolbar-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of AppMaterialModule, but could not be resolved
to an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/button/typings/button-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be resolved to an NgModule class
../../node_modules/@angular/material/card/typings/card-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be resolved to
an NgModule class
../../node_modules/@angular/material/form-field/typings/form-field-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be
resolved to an NgModule class
../../node_modules/@angular/material/input/typings/input-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be resolved to an NgModule class
../../node_modules/@angular/material/select/typings/select-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be resolved to an NgModule class
../../node_modules/@angular/material/tabs/typings/tabs-module.d.ts(8,22): error TS-996002: Appears in the NgModule.imports of SharedMaterialModule, but could not be resolved to
an NgModule class
../../node_modules/@angular/material/button/typings/button-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/card/typings/card-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be resolved to
an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/form-field/typings/form-field-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be
resolved to an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/input/typings/input-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/select/typings/select-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
../../node_modules/@angular/material/tabs/typings/tabs-module.d.ts(8,22): error TS-996003: Appears in the NgModule.exports of SharedMaterialModule, but could not be resolved to
an NgModule, Component, Directive, or Pipe class
src/app/shared/shared-material.module.ts(24,14): error TS-996002: Appears in the NgModule.imports of SharedModule, but itself has errors
src/app/shared/shared-material.module.ts(24,14): error TS-996003: Appears in the NgModule.exports of SharedModule, but itself has errors
src/app/shared/shared.module.ts(13,14): error TS-996002: Appears in the NgModule.imports of AuthModule, but itself has errors
src/app/app-material.module.ts(10,14): error TS-996002: Appears in the NgModule.imports of AppModule, but itself has errors

nohoist - this solution is not works for me.
because my repo is divided by two folders: apps and packages.
the @angular/* is in apps folder, so when I write import {} from<EMAIL_ADDRESS>then I got an error: Cannot find module<EMAIL_ADDRESS>Any ideas how to solve this problem? please

I think there have been recent updates to Angular because I'm using Ivy with no problems in a yarn workspace.
The only remaining issue for me was that ng update wasn't working in a monorepo. I opened a PR at #18610 to fix it.

@andreiepure Do your changes enable ng update to work with a project where dependencies are hoisted to the monorepo root instead of being installed in the same directory as angular.json?

@diminutivesloop as far as I remember, yes. That was the main reason behind opening that PR.

Angular now has direct support for monorepos, so that should fulfill this use case: https://angular.io/guide/file-structure#multiple-projects.
We don't directly support Yarn / Lerna workspaces, but Angular's built-in support with the CLI should satisfy the same use cases. If there are significant feature gaps that require Yarn / Lerna, then please file a separate issue about it and we can try to support those use cases directly.

Angular now has direct support for monorepos, so that should fulfill this use case: https://angular.io/guide/file-structure#multiple-projects.
We don't directly support Yarn / Lerna workspaces, but Angular's built-in support with the CLI should satisfy the same use cases. If there are significant feature gaps that require Yarn / Lerna, then please file a separate issue about it and we can try to support those use cases directly.

The most significant gap IMO is the ability to run multiple projects with one command, in the right order (dependencies) and in parallel if possible.
A while back I wrote a CLI that did exactly that on top of Angular CLI as an exercise, so I am pretty sure it should be doable.

Can't you already achieve that with nrwl? It comes with a myriad of commands for testing/linting/building only things that were affected and running things in parallel etc

Can't you already achieve that with nrwl/nx? It comes with a myriad of commands for testing/linting/building only things that were affected, running things in parallel, looking at dep graphs etc

But the question was about a significant feature missing in Angular CLI but is supported in other monorepo environments, so I think my point stands.

but Angular's built-in support with the CLI should satisfy the same use cases

If Angular CLI built-in support claims to satisfy the same use cases, I think a simple command to build a library with its dependencies should be maybe supported? 🤔

NX is good of course, but again if someone would like to use Angular as plain as it gets, I think this feature could be quite beneficial.

We're aware that having to ng build multiple projects in the right order can be quite annoying and easy to forget. We're planning to investigate what we can do to improve this, but don't have an expected timeline yet.

I'd be more than willing to help in this if help is needed. I can as well publish my private CLI for inspiration.
That CLI basically reads the source code and builds the dependency tree and then from that can execute the libraries the the proper order. As well I added the feature to run the builds in parallel when possible.


Colorful headings overrides Style Settings for H1 headings

Describe the bug
If you have Colorful Headings enabled AND H1 color in Style Settings, the H1 color selection in Style Settings is not shown. If you try to do the same for any other heading level, the H2, H3, H4, etc the color selection in Style Settings are shown.
To reproduce

Enable Colorful Headings
Customise the H1 color in Style Settings
Customise the H2 color in Style Settings

You will observe that the selected H1 color is not shown, while the H2 color is shown.
Expected behavior
That Style Settings override "Colorful headings" consistently.
Debug info (required):
SYSTEM INFO:
Obsidian version: v1.0.0
Installer version: v1.0.0
Operating system: Darwin Kernel Version 21.6.0: Mon Aug 22 20:20:07 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8110 21.6.0
Login status: not logged in
Insider build toggle: off
Live preview: off
Legacy editor: off
Base theme: dark
Community theme: Minimal
Snippets enabled: 0
Restricted mode: off
Plugins installed: 15
Plugins enabled: 12
1: Shortcuts extender v2.2.0
2: Pandoc Plugin v0.4.1
3: Smart Typography v1.0.18
4: Markdown prettifier v0.1.4
5: Style Settings v0.4.12
6: Ozan's Image in Editor Plugin v2.1.4
7: LanguageTool Integration v0.3.0
8: Advanced Tables v0.17.3
9: File Explorer Note Count v1.2.0
10: Recent Files v1.3.3
11: Minimal Theme Settings v6.0.5
12: Editor Syntax Highlight v0.1.3

The Colorful headings feature is essentially saying "use the color scheme colors for headings" so this is the intended effect

Understand that it might be intended, but the behaviour is inconsistent. I can't override H1, but I can override H2, etc.
It took me a lot of head scratching to work out what the problem was because I could customise all of the headings but not H1 while Colorful Headings was enabled.
I suggest you make the behaviour consistent.

I see. I will investigate that.

So I just tested this and I am not able to reproduce what you are describing. If "Colorful headings" is turned on I cannot change the heading colors for H2 etc in Style Settings

This issue should be fixed if you update the theme to 6.0.12


Actions: Enhancements to Open ID Connect support to enable secure cloud deployments at scale

Summary
Organisations want to standardise their security and deployment workflows using OpenID Connect (OIDC) based cloud policies to define access to specific resources in AWS, Azure, GCP, and other clouds. However this configuration experience is complex for our multi-cloud customers because each cloud has a different way of defining these.
Now, GitHub Actions provides an API that allows customers to customise the OIDC claims sent to each cloud. This allows customers to have a single configuration across all their clouds and meet their compliance and security needs - such as requiring that all deployments for a set of repositories use the same 'Deploy to Kubernetes' workflow that their DevSecOps team has pre-approved.
Intended Outcome

Enable enterprises to use reusable workflows and OIDC to enforce consistent deployments across repositories, organizations, or the enterprise.
Enable OIDC policies based on repo visibility to restrict only private repositories within an organization to assume the cloud role.
Enable robust and reliable OIDC claims with system generated GUIDs that do not change between renames of entities (ex: repository renames)
Support advanced OIDC policies based on custom combinations of claims (Eg: environment and branch, branch and actor etc.)

How will it work?
With the new API based OIDC configuration enabled by GitHub, developers can now customize the format of standard OIDC claims like “subject” and “Issuer” to further standardize and security harden their deployment steps across all the clouds.
We are also adding additional claims like repo ID and repo visibility into the OIDC token to enable more advanced OIDC policies.

🚢 This has shipped to dotcom: https://github.blog/changelog/2022-08-23-github-actions-enhancements-to-openid-connect-support-to-enable-secure-cloud-deployments-at-scale/. Leaving open to track for GHES release.