Ollama at all?

is there a working example for using Ollama? Or is it not supposed to work? Did try, but without any success.
Thanks in advance

Embeddings are not working with Olamma... I was able to get things working with Ollama for the entities and openai for embeddings.

Working config can be found here: https://github.com/microsoft/graphrag/issues/339#issuecomment-2206149531

Ollama works as expected
GRAPHRAG_API_KEY=123
GRAPHRAG_API_BASE=http://<IP_ADDRESS>:11434/v1
# GRAPHRAG_LLM_MODEL=llama3:instruct
GRAPHRAG_LLM_MODEL=codestral
GRAPHRAG_LLM_THREAD_COUNT=4
GRAPHRAG_LLM_CONCURRENT_REQUESTS=8
GRAPHRAG_LLM_MAX_TOKENS=2048

GRAPHRAG_EMBEDDING_API_BASE=http://<IP_ADDRESS>:11435/v1
GRAPHRAG_EMBEDDING_MODEL=mxbai-embed-large

:11435 is a dead-simple proxy that converts HTTP requests from OAI to Ollama format
API shapes

OAI
JSON.stringify({
  object: "list",
  data: [
    ...results.map((r, i) => ({
      object: "embedding",
      index: i,
      embedding: r.embedding,
    })),
  ],
  model,
  usage: {
    prompt_tokens: 0,
    total_tokens: 0,
  },
})

Ollama
JSON.stringify({
  model,
  prompt: input,
})

Ollama works as expected
GRAPHRAG_API_KEY=123
GRAPHRAG_API_BASE=http://<IP_ADDRESS>:11434/v1
# GRAPHRAG_LLM_MODEL=llama3:instruct
GRAPHRAG_LLM_MODEL=codestral
GRAPHRAG_LLM_THREAD_COUNT=4
GRAPHRAG_LLM_CONCURRENT_REQUESTS=8
GRAPHRAG_LLM_MAX_TOKENS=2048

GRAPHRAG_EMBEDDING_API_BASE=http://<IP_ADDRESS>:11435/v1
GRAPHRAG_EMBEDDING_MODEL=mxbai-embed-large

:11435 is a dead-simple proxy that converts HTTP requests from OAI to Ollama format
API shapes
OAI
JSON.stringify({
  object: "list",
  data: [
    ...results.map((r, i) => ({
      object: "embedding",
      index: i,
      embedding: r.embedding,
    })),
  ],
  model,
  usage: {
    prompt_tokens: 0,
    total_tokens: 0,
  },
})

Ollama
JSON.stringify({
  model,
  prompt: input,
})

Sorry for what might be obvious... but how do you run this proxy? When I run ollama serve it only listen on the default port and not on 11435
What do you use to run this proxy?

@bmaltais, no worries!
11435 is a proxy server written in JS/Node to specifically map request/response between OAI and Ollama formats, I didn't list the whole code as it's pretty much from the Node docs

@bmaltais, no worries!
11435 is a proxy server written in JS/Node to specifically map request/response between OAI and Ollama formats, I didn't list the whole code as it's pretty much from the Node docs

This is what I was afraid of ;-) I guess I will wait for something to be built by someone. I don't understand enough about node.js to build this.

Ollama works as expected
GRAPHRAG_API_KEY=123
GRAPHRAG_API_BASE=http://<IP_ADDRESS>:11434/v1
# GRAPHRAG_LLM_MODEL=llama3:instruct
GRAPHRAG_LLM_MODEL=codestral
GRAPHRAG_LLM_THREAD_COUNT=4
GRAPHRAG_LLM_CONCURRENT_REQUESTS=8
GRAPHRAG_LLM_MAX_TOKENS=2048

GRAPHRAG_EMBEDDING_API_BASE=http://<IP_ADDRESS>:11435/v1
GRAPHRAG_EMBEDDING_MODEL=mxbai-embed-large

:11435 is a dead-simple proxy that converts HTTP requests from OAI to Ollama format
API shapes

Can you please explain how did you do this..for embeddings api..

It works with change the file in /opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/llm/openai/openai_embeddings_llm.py by
`# Copyright (c) 2024 Microsoft Corporation.
Licensed under the MIT License
"""The EmbeddingsLLM class."""
from typing_extensions import Unpack
from graphrag.llm.base import BaseLLM
from graphrag.llm.types import (
EmbeddingInput,
EmbeddingOutput,
LLMInput,
)
from .openai_configuration import OpenAIConfiguration
from .types import OpenAIClientTypes
import ollama
class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]):
"""A text-embedding generator LLM."""
_client: OpenAIClientTypes
_configuration: OpenAIConfiguration

def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
    self.client = client
    self.configuration = configuration

async def _execute_llm(
    self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
) -> EmbeddingOutput | None:
    args = {
        "model": self.configuration.model,
        **(kwargs.get("model_parameters") or {}),
    }
    # embedding = await self.client.embeddings.create(
    #     input=input,
    #     **args,
    # )
    # inputs = input['input']
    # print(inputs)
    embedding_list = []
    for inp in input:
        embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
        embedding_list.append(embedding["embedding"])
    # return [d.embedding for d in embedding.data]
    return embedding_list`

It works with ollama embedding by changing the file in /opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/llm/openai/openai_embeddings_llm.py with
from typing_extensions import Unpack
from graphrag.llm.base import BaseLLM from graphrag.llm.types import ( EmbeddingInput, EmbeddingOutput, LLMInput, )
from .openai_configuration import OpenAIConfiguration from .types import OpenAIClientTypes
import ollama
class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]): _client: OpenAIClientTypes _configuration: OpenAIConfiguration
def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
    self.client = client
    self.configuration = configuration
async def _execute_llm(
    self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
) -> EmbeddingOutput | None:
    args = {
        "model": self.configuration.model,
        **(kwargs.get("model_parameters") or {}),
    }
    # embedding = await self.client.embeddings.create(
    #     input=input,
    #     **args,
    # )
    # inputs = input['input']
    # print(inputs)
    embedding_list = []
    for inp in input:
        embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
        embedding_list.append(embedding["embedding"])
    # return [d.embedding for d in embedding.data]
    return embedding_list

Can you please provide the complete /opt/anaconda3/envs/graphrag/lib/python3.11/site-packages/graphrag/llm/openai/openai_embeddings_llm.py replacement code.

@SpaceLearner Does it work when you try to query? I adapted your code to work with langchain, is create the embeddings... que when I try to query I get an error.
This is my version:
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""The EmbeddingsLLM class."""

from typing_extensions import Unpack

from graphrag.llm.base import BaseLLM
from graphrag.llm.types import (
    EmbeddingInput,
    EmbeddingOutput,
    LLMInput,
)

from .openai_configuration import OpenAIConfiguration
from .types import OpenAIClientTypes

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]):
    """A text-embedding generator LLM."""

    _client: OpenAIClientTypes
    _configuration: OpenAIConfiguration

    def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
        self.client = client
        self.configuration = configuration

    async def _execute_llm(
        self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
    ) -> EmbeddingOutput | None:
        args = {
            "model": self.configuration.model,
            **(kwargs.get("model_parameters") or {}),
        }
        # embedding = await self.client.embeddings.create(
        #     input=input,
        #     **args,
        # )
        # return [d.embedding for d in embedding.data]

        ollama_emb = OllamaEmbeddings(**args)
        embedding_list = []
        for inp in input:
            embedding = ollama_emb.embed_documents([inp])
            # embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
            embedding_list.append(embedding[0])
        return embedding_list

@SpaceLearner Does it work when you try to query? I adapted your code to work with langchain, it create the embeddings... but when I try to do a local query I get an error.
This is my embeddings version:
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""The EmbeddingsLLM class."""

from typing_extensions import Unpack

from graphrag.llm.base import BaseLLM
from graphrag.llm.types import (
    EmbeddingInput,
    EmbeddingOutput,
    LLMInput,
)

from .openai_configuration import OpenAIConfiguration
from .types import OpenAIClientTypes

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]):
    """A text-embedding generator LLM."""

    _client: OpenAIClientTypes
    _configuration: OpenAIConfiguration

    def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
        self.client = client
        self.configuration = configuration

    async def _execute_llm(
        self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
    ) -> EmbeddingOutput | None:
        args = {
            "model": self.configuration.model,
            **(kwargs.get("model_parameters") or {}),
        }
        # embedding = await self.client.embeddings.create(
        #     input=input,
        #     **args,
        # )
        # return [d.embedding for d in embedding.data]

        ollama_emb = OllamaEmbeddings(**args)
        embedding_list = []
        for inp in input:
            embedding = ollama_emb.embed_documents([inp])
            # embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
            embedding_list.append(embedding[0])
        return embedding_list

This the error:
Error embedding chunk {'OpenAIEmbedding': "'NoneType' object is not iterable"}
Traceback (most recent call last):
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\__main__.py", line 75, in <module>
    run_local_search(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\cli.py", line 154, in run_local_search
    result = search_engine.search(query=query)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\search.py", line 118, in search
    context_text, context_records = self.context_builder.build_context(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\mixed_context.py", line 139, in build_context
    selected_entities = map_query_to_entities(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 55, in map_query_to_entities
    search_results = text_embedding_vectorstore.similarity_search_by_text(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\vector_stores\lancedb.py", line 118, in similarity_search_by_text
    query_embedding = text_embedder(text)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 57, in <lambda>
    text_embedder=lambda t: text_embedder.embed(t),
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\llm\oai\embedding.py", line 96, in embed
    chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\numpy\lib\function_base.py", line 550, in average
    raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized

I suspect the query embeddings code also need to be modified...

same issue with query

It seems I have it working now. It returns nothings if I set llm to llama3, but works ok when switching to mistral.
Does it support pdf?

To change the openai request format to the one supported by ollama, setting only requires the base_url parameter, for example, api_base: http://localhost:8000/v1
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
from socketserver import ThreadingMixIn
from urllib.parse import urlparse, parse_qs
from queue import Queue
import requests
import argparse
from ascii_colors import ASCIIColors
Directly defining server configurations
servers = [
("server1", {'url': 'http://localhost:11434', 'queue': Queue()}),
# Add more servers if needed
]
Define the Ollama model to use
ollama_model = 'qwen2:7b'
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--port', type=int, default=8000, help='Port number for the server')
args = parser.parse_args()
ASCIIColors.red("Ollama Proxy server")
class RequestHandler(BaseHTTPRequestHandler):
    def _send_response(self, response):
        self.send_response(response.status_code)
        for key, value in response.headers.items():
            if key.lower() not in ['content-length', 'transfer-encoding', 'content-encoding']:
                self.send_header(key, value)
        self.send_header('Transfer-Encoding', 'chunked')
        self.end_headers()

        try:
            for chunk in response.iter_content(chunk_size=1024):
                if chunk:
                    self.wfile.write(b"%X\r\n%s\r\n" % (len(chunk), chunk))
                    self.wfile.flush()
            self.wfile.write(b"0\r\n\r\n")
        except BrokenPipeError:
            pass

    def do_GET(self):
        self.log_request()
        self.proxy()

    def do_POST(self):
        self.log_request()
        self.proxy()

    def proxy(self):
        url = urlparse(self.path)
        path = url.path
        get_params = parse_qs(url.query) or {}

        if self.command == "POST":
            content_length = int(self.headers['Content-Length'])
            post_data = self.rfile.read(content_length)
            post_data_str = post_data.decode('utf-8')
            try:
                post_params = json.loads(post_data_str)
            except json.JSONDecodeError:
                post_params = {}

            post_params['model'] = ollama_model
            post_params = json.dumps(post_params).encode('utf-8')
        else:
            post_params = {}

        # Find the server with the lowest number of queue entries.
        min_queued_server = servers[0]
        for server in servers:
            cs = server[1]
            if cs['queue'].qsize() < min_queued_server[1]['queue'].qsize():
                min_queued_server = server

        if path == '/api/generate' or path == '/api/chat':
            que = min_queued_server[1]['queue']
            que.put_nowait(1)
            try:
                post_data_dict = {}

                if isinstance(post_data, bytes):
                    post_data_str = post_data.decode('utf-8')
                    post_data_dict = json.loads(post_data_str)

                response = requests.request(self.command, min_queued_server[1]['url'] + path, params=get_params,
                                            data=post_params, stream=post_data_dict.get("stream", False))
                self._send_response(response)
            except Exception:
                pass
            finally:
                que.get_nowait()
        else:
            # For other endpoints, just mirror the request.
            response = requests.request(self.command, min_queued_server[1]['url'] + path, params=get_params,
                                        data=post_params)
            self._send_response(response)

class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
    pass

print('Starting server')
server = ThreadedHTTPServer(('', args.port), RequestHandler)  # Set the entry port here.
print(f'Running server on port {args.port}')
server.serve_forever()

if name == "main":
main()

@SpaceLearner Does it work when you try to query? I adapted your code to work with langchain, it create the embeddings... but when I try to do a local query I get an error.
This is my embeddings version:
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""The EmbeddingsLLM class."""

from typing_extensions import Unpack

from graphrag.llm.base import BaseLLM
from graphrag.llm.types import (
    EmbeddingInput,
    EmbeddingOutput,
    LLMInput,
)

from .openai_configuration import OpenAIConfiguration
from .types import OpenAIClientTypes

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]):
    """A text-embedding generator LLM."""

    _client: OpenAIClientTypes
    _configuration: OpenAIConfiguration

    def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
        self.client = client
        self.configuration = configuration

    async def _execute_llm(
        self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
    ) -> EmbeddingOutput | None:
        args = {
            "model": self.configuration.model,
            **(kwargs.get("model_parameters") or {}),
        }
        # embedding = await self.client.embeddings.create(
        #     input=input,
        #     **args,
        # )
        # return [d.embedding for d in embedding.data]

        ollama_emb = OllamaEmbeddings(**args)
        embedding_list = []
        for inp in input:
            embedding = ollama_emb.embed_documents([inp])
            # embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
            embedding_list.append(embedding[0])
        return embedding_list

This the error:
Error embedding chunk {'OpenAIEmbedding': "'NoneType' object is not iterable"}
Traceback (most recent call last):
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\__main__.py", line 75, in <module>
    run_local_search(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\cli.py", line 154, in run_local_search
    result = search_engine.search(query=query)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\search.py", line 118, in search
    context_text, context_records = self.context_builder.build_context(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\mixed_context.py", line 139, in build_context
    selected_entities = map_query_to_entities(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 55, in map_query_to_entities
    search_results = text_embedding_vectorstore.similarity_search_by_text(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\vector_stores\lancedb.py", line 118, in similarity_search_by_text
    query_embedding = text_embedder(text)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 57, in <lambda>
    text_embedder=lambda t: text_embedder.embed(t),
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\llm\oai\embedding.py", line 96, in embed
    chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\numpy\lib\function_base.py", line 550, in average
    raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized

I suspect the query embeddings code also need to be modified...

hack the file C:\Users\user-name\miniconda3\Lib\site-packages\graphrag\query\llm\oai\embedding.py
with the fellowing contents(tips: only fix--method localparam, the --method global still error😅):
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""OpenAI Embedding model implementation."""

import asyncio
from collections.abc import Callable
from typing import Any

import numpy as np
import tiktoken
from tenacity import (
    AsyncRetrying,
    RetryError,
    Retrying,
    retry_if_exception_type,
    stop_after_attempt,
    wait_exponential_jitter,
)

from graphrag.query.llm.base import BaseTextEmbedding
from graphrag.query.llm.oai.base import OpenAILLMImpl
from graphrag.query.llm.oai.typing import (
    OPENAI_RETRY_ERROR_TYPES,
    OpenaiApiType,
)
from graphrag.query.llm.text_utils import chunk_text
from graphrag.query.progress import StatusReporter

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbedding(BaseTextEmbedding, OpenAILLMImpl):
    """Wrapper for OpenAI Embedding models."""

    def __init__(
        self,
        api_key: str | None = None,
        azure_ad_token_provider: Callable | None = None,
        model: str = "text-embedding-3-small",
        deployment_name: str | None = None,
        api_base: str | None = None,
        api_version: str | None = None,
        api_type: OpenaiApiType = OpenaiApiType.OpenAI,
        organization: str | None = None,
        encoding_name: str = "cl100k_base",
        max_tokens: int = 8191,
        max_retries: int = 10,
        request_timeout: float = 180.0,
        retry_error_types: tuple[type[BaseException]] = OPENAI_RETRY_ERROR_TYPES,  # type: ignore
        reporter: StatusReporter | None = None,
    ):
        OpenAILLMImpl.__init__(
            self=self,
            api_key=api_key,
            azure_ad_token_provider=azure_ad_token_provider,
            deployment_name=deployment_name,
            api_base=api_base,
            api_version=api_version,
            api_type=api_type,  # type: ignore
            organization=organization,
            max_retries=max_retries,
            request_timeout=request_timeout,
            reporter=reporter,
        )

        self.model = model
        self.encoding_name = encoding_name
        self.max_tokens = max_tokens
        self.token_encoder = tiktoken.get_encoding(self.encoding_name)
        self.retry_error_types = retry_error_types

    def embed(self, text: str, **kwargs: Any) -> list[float]:
        """
        Embed text using OpenAI Embedding's sync function.

        For text longer than max_tokens, chunk texts into max_tokens, embed each chunk, then combine using weighted average.
        Please refer to: https://github.com/openai/openai-cookbook/blob/main/examples/Embedding_long_inputs.ipynb
        """
        token_chunks = chunk_text(
            text=text, token_encoder=self.token_encoder, max_tokens=self.max_tokens
        )
        chunk_embeddings = []
        chunk_lens = []
        for chunk in token_chunks:
            try:
                embedding, chunk_len = self._embed_with_retry(chunk, **kwargs)
                chunk_embeddings.append(embedding)
                chunk_lens.append(chunk_len)
            # TODO: catch a more specific exception
            except Exception as e:  # noqa BLE001
                self._reporter.error(
                    message="Error embedding chunk",
                    details={self.__class__.__name__: str(e)},
                )

                continue
        chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
        chunk_embeddings = chunk_embeddings / np.linalg.norm(chunk_embeddings)
        return chunk_embeddings.tolist()

    async def aembed(self, text: str, **kwargs: Any) -> list[float]:
        """
        Embed text using OpenAI Embedding's async function.

        For text longer than max_tokens, chunk texts into max_tokens, embed each chunk, then combine using weighted average.
        """
        token_chunks = chunk_text(
            text=text, token_encoder=self.token_encoder, max_tokens=self.max_tokens
        )
        chunk_embeddings = []
        chunk_lens = []
        embedding_results = await asyncio.gather(*[
            self._aembed_with_retry(chunk, **kwargs) for chunk in token_chunks
        ])
        embedding_results = [result for result in embedding_results if result[0]]
        chunk_embeddings = [result[0] for result in embedding_results]
        chunk_lens = [result[1] for result in embedding_results]
        chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)  # type: ignore
        chunk_embeddings = chunk_embeddings / np.linalg.norm(chunk_embeddings)
        return chunk_embeddings.tolist()

    def _embed_with_retry(
        self, text: str | tuple, **kwargs: Any
    ) -> tuple[list[float], int]:
        try:
            retryer = Retrying(
                stop=stop_after_attempt(self.max_retries),
                wait=wait_exponential_jitter(max=10),
                reraise=True,
                retry=retry_if_exception_type(self.retry_error_types),
            )
            for attempt in retryer:
                with attempt:
                    embedding = (
                        OllamaEmbeddings(
                            model=self.model,
                        ).embed_query(text)
                        or []
                    )
                    return (embedding, len(text))
        except RetryError as e:
            self._reporter.error(
                message="Error at embed_with_retry()",
                details={self.__class__.__name__: str(e)},
            )
            return ([], 0)
        else:
            # TODO: why not just throw in this case?
            return ([], 0)

    async def _aembed_with_retry(
        self, text: str | tuple, **kwargs: Any
    ) -> tuple[list[float], int]:
        try:
            retryer = AsyncRetrying(
                stop=stop_after_attempt(self.max_retries),
                wait=wait_exponential_jitter(max=10),
                reraise=True,
                retry=retry_if_exception_type(self.retry_error_types),
            )
            async for attempt in retryer:
                with attempt:
                    embedding = (
                        await OllamaEmbeddings(
                            model=self.model,
                        ).embed_query(text) or [] )
                    return (embedding, len(text))
        except RetryError as e:
            self._reporter.error(
                message="Error at embed_with_retry()",
                details={self.__class__.__name__: str(e)},
            )
            return ([], 0)
        else:
            # TODO: why not just throw in this case?
            return ([], 0)

Errors when using --method global occurs on my situation as well, and my observation was that the response of llama3 is not aligned such that even the system prompt requires it to answer in json but it includes some filler sentences in the beginning/end of its response. A fix could be in line 233 of .../site-packages/graphrag/query/structured_search/global_search/search.py add this as the first line of the function:
search_response = search_response[max(0, search_response.find("{")):min(len(search_response), search_response.rfind("}") + 1)]
which in most of the time removes the filler sentences.
However, a disclaimer is that my llama3 sometimes even forgets to (where gpt rarely does) answer in the structure of json at all for queries like "Can you give me a joke for people read about this".

this worked for me.
https://github.com/TheAiSingularity/graphrag-local-ollama

I'm making this thread as our official discussion place for Ollama setup and troubleshooting.
Thanks for the engagement and support, what an amazing community!

this is a temp hacked solution for ollama
https://github.com/s106916/graphrag

https://github.com/microsoft/graphrag/issues/339#issuecomment-2226998166

@SpaceLearner Does it work when you try to query? I adapted your code to work with langchain, it create the embeddings... but when I try to do a local query I get an error.
This is my embeddings version:
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""The EmbeddingsLLM class."""

from typing_extensions import Unpack

from graphrag.llm.base import BaseLLM
from graphrag.llm.types import (
    EmbeddingInput,
    EmbeddingOutput,
    LLMInput,
)

from .openai_configuration import OpenAIConfiguration
from .types import OpenAIClientTypes

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbeddingsLLM(BaseLLM[EmbeddingInput, EmbeddingOutput]):
    """A text-embedding generator LLM."""

    _client: OpenAIClientTypes
    _configuration: OpenAIConfiguration

    def __init__(self, client: OpenAIClientTypes, configuration: OpenAIConfiguration):
        self.client = client
        self.configuration = configuration

    async def _execute_llm(
        self, input: EmbeddingInput, **kwargs: Unpack[LLMInput]
    ) -> EmbeddingOutput | None:
        args = {
            "model": self.configuration.model,
            **(kwargs.get("model_parameters") or {}),
        }
        # embedding = await self.client.embeddings.create(
        #     input=input,
        #     **args,
        # )
        # return [d.embedding for d in embedding.data]

        ollama_emb = OllamaEmbeddings(**args)
        embedding_list = []
        for inp in input:
            embedding = ollama_emb.embed_documents([inp])
            # embedding = ollama.embeddings(model="nomic-embed-text", prompt=inp)
            embedding_list.append(embedding[0])
        return embedding_list

This the error:
Error embedding chunk {'OpenAIEmbedding': "'NoneType' object is not iterable"}
Traceback (most recent call last):
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\berna\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\__main__.py", line 75, in <module>
    run_local_search(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\cli.py", line 154, in run_local_search
    result = search_engine.search(query=query)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\search.py", line 118, in search
    context_text, context_records = self.context_builder.build_context(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\structured_search\local_search\mixed_context.py", line 139, in build_context
    selected_entities = map_query_to_entities(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 55, in map_query_to_entities
    search_results = text_embedding_vectorstore.similarity_search_by_text(
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\vector_stores\lancedb.py", line 118, in similarity_search_by_text
    query_embedding = text_embedder(text)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\context_builder\entity_extraction.py", line 57, in <lambda>
    text_embedder=lambda t: text_embedder.embed(t),
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\graphrag\query\llm\oai\embedding.py", line 96, in embed
    chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
  File "H:\llm_stuff\graphrag\venv\lib\site-packages\numpy\lib\function_base.py", line 550, in average
    raise ZeroDivisionError(
ZeroDivisionError: Weights sum to zero, can't be normalized

I suspect the query embeddings code also need to be modified...

hack the file C:\Users\user-name\miniconda3\Lib\site-packages\graphrag\query\llm\oai\embedding.py
with the fellowing contents(tips: only fix--method localparam, the --method global still error😅):
# Copyright (c) 2024 Microsoft Corporation.
# Licensed under the MIT License

"""OpenAI Embedding model implementation."""

import asyncio
from collections.abc import Callable
from typing import Any

import numpy as np
import tiktoken
from tenacity import (
    AsyncRetrying,
    RetryError,
    Retrying,
    retry_if_exception_type,
    stop_after_attempt,
    wait_exponential_jitter,
)

from graphrag.query.llm.base import BaseTextEmbedding
from graphrag.query.llm.oai.base import OpenAILLMImpl
from graphrag.query.llm.oai.typing import (
    OPENAI_RETRY_ERROR_TYPES,
    OpenaiApiType,
)
from graphrag.query.llm.text_utils import chunk_text
from graphrag.query.progress import StatusReporter

from langchain_community.embeddings import OllamaEmbeddings

class OpenAIEmbedding(BaseTextEmbedding, OpenAILLMImpl):
    """Wrapper for OpenAI Embedding models."""

    def __init__(
        self,
        api_key: str | None = None,
        azure_ad_token_provider: Callable | None = None,
        model: str = "text-embedding-3-small",
        deployment_name: str | None = None,
        api_base: str | None = None,
        api_version: str | None = None,
        api_type: OpenaiApiType = OpenaiApiType.OpenAI,
        organization: str | None = None,
        encoding_name: str = "cl100k_base",
        max_tokens: int = 8191,
        max_retries: int = 10,
        request_timeout: float = 180.0,
        retry_error_types: tuple[type[BaseException]] = OPENAI_RETRY_ERROR_TYPES,  # type: ignore
        reporter: StatusReporter | None = None,
    ):
        OpenAILLMImpl.__init__(
            self=self,
            api_key=api_key,
            azure_ad_token_provider=azure_ad_token_provider,
            deployment_name=deployment_name,
            api_base=api_base,
            api_version=api_version,
            api_type=api_type,  # type: ignore
            organization=organization,
            max_retries=max_retries,
            request_timeout=request_timeout,
            reporter=reporter,
        )

        self.model = model
        self.encoding_name = encoding_name
        self.max_tokens = max_tokens
        self.token_encoder = tiktoken.get_encoding(self.encoding_name)
        self.retry_error_types = retry_error_types

    def embed(self, text: str, **kwargs: Any) -> list[float]:
        """
        Embed text using OpenAI Embedding's sync function.

        For text longer than max_tokens, chunk texts into max_tokens, embed each chunk, then combine using weighted average.
        Please refer to: https://github.com/openai/openai-cookbook/blob/main/examples/Embedding_long_inputs.ipynb
        """
        token_chunks = chunk_text(
            text=text, token_encoder=self.token_encoder, max_tokens=self.max_tokens
        )
        chunk_embeddings = []
        chunk_lens = []
        for chunk in token_chunks:
            try:
                embedding, chunk_len = self._embed_with_retry(chunk, **kwargs)
                chunk_embeddings.append(embedding)
                chunk_lens.append(chunk_len)
            # TODO: catch a more specific exception
            except Exception as e:  # noqa BLE001
                self._reporter.error(
                    message="Error embedding chunk",
                    details={self.__class__.__name__: str(e)},
                )

                continue
        chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)
        chunk_embeddings = chunk_embeddings / np.linalg.norm(chunk_embeddings)
        return chunk_embeddings.tolist()

    async def aembed(self, text: str, **kwargs: Any) -> list[float]:
        """
        Embed text using OpenAI Embedding's async function.

        For text longer than max_tokens, chunk texts into max_tokens, embed each chunk, then combine using weighted average.
        """
        token_chunks = chunk_text(
            text=text, token_encoder=self.token_encoder, max_tokens=self.max_tokens
        )
        chunk_embeddings = []
        chunk_lens = []
        embedding_results = await asyncio.gather(*[
            self._aembed_with_retry(chunk, **kwargs) for chunk in token_chunks
        ])
        embedding_results = [result for result in embedding_results if result[0]]
        chunk_embeddings = [result[0] for result in embedding_results]
        chunk_lens = [result[1] for result in embedding_results]
        chunk_embeddings = np.average(chunk_embeddings, axis=0, weights=chunk_lens)  # type: ignore
        chunk_embeddings = chunk_embeddings / np.linalg.norm(chunk_embeddings)
        return chunk_embeddings.tolist()

    def _embed_with_retry(
        self, text: str | tuple, **kwargs: Any
    ) -> tuple[list[float], int]:
        try:
            retryer = Retrying(
                stop=stop_after_attempt(self.max_retries),
                wait=wait_exponential_jitter(max=10),
                reraise=True,
                retry=retry_if_exception_type(self.retry_error_types),
            )
            for attempt in retryer:
                with attempt:
                    embedding = (
                        OllamaEmbeddings(
                            model=self.model,
                        ).embed_query(text)
                        or []
                    )
                    return (embedding, len(text))
        except RetryError as e:
            self._reporter.error(
                message="Error at embed_with_retry()",
                details={self.__class__.__name__: str(e)},
            )
            return ([], 0)
        else:
            # TODO: why not just throw in this case?
            return ([], 0)

    async def _aembed_with_retry(
        self, text: str | tuple, **kwargs: Any
    ) -> tuple[list[float], int]:
        try:
            retryer = AsyncRetrying(
                stop=stop_after_attempt(self.max_retries),
                wait=wait_exponential_jitter(max=10),
                reraise=True,
                retry=retry_if_exception_type(self.retry_error_types),
            )
            async for attempt in retryer:
                with attempt:
                    embedding = (
                        await OllamaEmbeddings(
                            model=self.model,
                        ).embed_query(text) or [] )
                    return (embedding, len(text))
        except RetryError as e:
            self._reporter.error(
                message="Error at embed_with_retry()",
                details={self.__class__.__name__: str(e)},
            )
            return ([], 0)
        else:
            # TODO: why not just throw in this case?
            return ([], 0)

Thanks. For anyone who don't use langchain and just want to use ollama's embedding model, you can make these changes and it will work for global query answering:

change "from langchain_community.embeddings import OllamaEmbeddings" to "import ollama";
in the "_embed_with_retry" function, change the code block "embedding = (
OllamaEmbeddings(
model=self.model,
).embed_query(text)
or []
)" to "embedding = (ollama.embeddings(model="nomic-embed-text", prompt=text) or [])"
in the "_aembed_with_retry" function, change the code block "embedding = (
await OllamaEmbeddings(
model=self.model,
).embed_query(text) or [] ) to "embedding = (ollama.embeddings(model="nomic-embed-text", prompt=text) or [])"

And yes, when doing local query there will still be an error concerning another function in this same .py file.

I was able to get GraphRAG + Ollama up and running. However indexing took several hours.
Any ideas how to speed up indexing?
E.g. does it make sense to edit the parallelisation section in the yaml file somehow? What is the default num_threads since it is commented out in the initially created file?

Unfortunately how graphrag work at the moment is very very GPU demanding. I think this is what will keep it from being used by users on local computer.
graphrag take an hour to process one book that take 10 seconds to process on my custom RAG system for free.
and my custom system is using a query augmentation using RAG answers that produce better answers than graphrag (and even notebooklm) most of the time…

That is why I am looking for ways to speed it up. Anyone with ideas that go beyond the default settings?

Consolidating Ollama-related issues: https://github.com/microsoft/graphrag/issues/657

Unfortunately how graphrag work at the moment is very very GPU demanding. I think this is what will keep it from being used by users on local computer.
graphrag take an hour to process one book that take 10 seconds to process on my custom RAG system.
And my custom system is using a query augmentation strategy using RAG answers to the original question to produce a better question along with important keywords list back as the augmented question. This ensure better embedding matching across the whole document and produce better answer than graphrag (and even notebooklm) most of the time…
I can share the code if you are interested.

Your process sounds interesting care to share it?

Your process sounds interesting care to share it?

Been a while since I touched it. Was working pretty well. Let me see if I can push the code to github so you can have a look at it.

@Tipik1n Here is the repo: https://github.com/bmaltais/AIResearcher
Quick how to use:

Clone the repository

Navigate to the cloned repository directory:
cd <cloned-repo-name>

Create a new virtual environment:
python -m venv venv
./venv/Scripts/activate

Install required packages:
pip install -r requirements.txt

Obtain an API key from Google:
https://aistudio.google.com/app/apikey

Copy .env.sample to .env

Put the API key in the file

Put the material you want to query into the documents folder.

Import the documents: python importall.py

Query the documents: python research-main

To enhance the question type improve
Type the question
Here is the sample output of a question on "The Project Gutenberg eBook of A Room with a View":
(venv) PS H:\llm_stuff\AIResearcher> python .\importall.py
processing pg2641.txt

Chunking text

Inserting chunks into DB

Processed pg2641.txt
processing pg74070.txt

Chunking text

Inserting chunks into DB

Processed pg74070.txt
All documents have been processed and inserted into ChromaDB.
(venv) PS H:\llm_stuff\AIResearcher> python .\research-main.py

What now? ('quit' to exit, 'forget' to clear history, 'improve' to enable improvement): improve
Question improvement enabled.

What now? ('quit' to exit, 'forget' to clear history, 'no improve' to disable improvement): Tell me more about "A Room With A View"
Improving question with Gemini...

Improved question: Could you elaborate on the aspects of "A Room with a View" that you're interested in, such as its plot, characters, themes, or historical context?

Please provide a comprehensive response addressing these aspects.

A Room With A View, plot, characters, themes, historical context

Querying Gemini...

Gemini's answer:
## Delving into "A Room with a View": An Exploration of Plot, Character, Theme, and Historical Context

E.M. Forster's "A Room with a View" offers a rich tapestry of Edwardian social commentary interwoven with a compelling narrative of love, societal expectations, and self-discovery. Exploring the novel's plot, characters, themes, and historical context reveals a multifaceted work that continues to resonate with readers today.

**Plot:** The novel follows Lucy Honeychurch, a young woman from an upper-middle-class English family, on a journey of self-awakening during her travels through Italy. Initially confined by the rigid social conventions of Edwardian England, symbolized by the stuffy pension in Florence with a view of a courtyard, Lucy yearns for a more authentic experience. This desire manifests when she meets the unconventional and passionate George Emerson, who offers her a room with a view of the Arno River. This act, symbolic of embracing life's beauty and passion, throws Lucy's carefully constructed world into disarray. Upon returning to England, she becomes engaged to the epitome of Edwardian propriety, Cecil Vyse. However, George re-emerges, forcing Lucy to confront her true desires and choose between societal expectations and personal fulfillment.

**Characters:**

* **Lucy Honeychurch:**  The novel's protagonist embarks on a journey of self-discovery as she grapples with societal pressures and her own burgeoning desires.  Initially naive and confined by convention, she gradually sheds her inhibitions and embraces a more authentic self.
* **George Emerson:**  Representing passion and a rejection of societal norms, George acts as a catalyst for Lucy's transformation. He is depicted as an outsider, challenging the established order and encouraging Lucy to embrace life fully.
* **Cecil Vyse:**  Representing the rigid social order of Edwardian England, Cecil serves as a foil to George.  He is intellectual and aesthetically refined but lacks passion and genuine understanding of Lucy's inner self.
* **Charlotte Bartlett:**  Lucy's cousin and chaperone embodies the hypocrisy and social constraints placed upon women. While seemingly upholding propriety, she ultimately proves to be more adaptable and understanding than initially perceived.

**Themes:**

* **Societal Constraints vs. Individual Freedom:** The novel's central theme revolves around the conflict between societal expectations, particularly for women, and the pursuit of personal happiness and fulfillment. Lucy's struggle between conforming to societal norms and following her heart forms the crux of this exploration.
* **Vision and Perception:**  The recurring motif of "view" extends beyond physical sight to encompass one's perspective on life and society. Lucy's journey involves a gradual shift in her outlook as she learns to see beyond superficiality and embrace a more authentic way of life.
* **Passion vs. Propriety:** The contrasting characters of George and Cecil embody the dichotomy between passionate living and adherence to social decorum. Lucy's internal conflict revolves around reconciling these opposing forces and discovering her own path to fulfillment.
* **The Transformative Power of Italy:**  Italy, with its vibrant culture and relaxed social mores, acts as a catalyst for change and self-discovery for Lucy. It represents a departure from the rigidity of English society, offering a space for exploration and liberation.

**Historical Context:** Set in the Edwardian era (1901-1910), a time characterized by social change and burgeoning modernity, the novel reflects the anxieties and tensions of a society on the cusp of transformation. The stifling social codes, particularly those governing courtship and marriage, form a crucial backdrop for Lucy's journey.  The novel critiques the hypocrisy and limitations imposed by such conventions, particularly for women, who were often denied agency and autonomy.

**In conclusion**, "A Room with a View" remains a timeless exploration of societal pressures, self-discovery, and the search for personal fulfillment.  Through its compelling characters, engaging plot, and insightful commentary on societal norms, the novel continues to resonate with readers navigating the complexities of love, societal expectations, and the pursuit of an authentic life.

@Tipik1n Here is the repo: https://github.com/bmaltais/AIResearcher

i think this is a discussion w/ graphrag + ollama...??
please provide the instructions on how to run your prj via ollama 🙏🏻

@bmaltais

@Tipik1n Here is the repo: https://github.com/bmaltais/AIResearcher

i think this is a discussion w/ graphrag + ollama...?? please provide the instructions on how to run your prj via ollama 🙏🏻

Hi,
Unfortunatly it is not leveraging GraphRAG. I was just providing a link to a custom RAG solution that perform pretty well. As much as I like GraphRAG, it is too resource demanding for the added benefits.


fix typos in comments and help messages

s/compuate/compute/g
No-op otherwise

Thanks for the contribution!


Implement Changelog Message Feature in Inbox System

Implement a changelog message feature to our inbox system before the public launch of the dimension. The content should be in markdown format to enable the inclusion of release notes with images. The changelog message should also allow users to provide a short title and description for the preview. Include metadata such as the author and date published. Coordinate with the design team to ensure the feature is user-friendly and visually appealing.

test comment


Create new article new-article

Submitted via Learn Editor.

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


The "ResolveAssemblyReference" task failed unexpectedly.

I updated to Windows 2004 and this is going from bad to worse.  Now the build fails:
Severity	Code	Description	Project	File	Line	Suppression State
Error	MSB4018	The "ResolveAssemblyReference" task failed unexpectedly.
Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Unexpected CopyLocal flag.
   at Microsoft.Build.Tasks.CopyLocalStateUtility.IsCopyLocal(CopyLocalState state)
   at Microsoft.Build.Tasks.ResolveAssemblyReference.LogResults(ReferenceTable dependencyTable, List`1 idealAssemblyRemappings, List`1 idealAssemblyRemappingsIdentities, List`1 generalResolutionExceptions)
   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute(FileExists fileExists, DirectoryExists directoryExists, GetDirectories getDirectories, GetAssemblyName getAssemblyName, GetAssemblyMetadata getAssemblyMetadata, GetRegistrySubKeyNames getRegistrySubKeyNames, GetRegistrySubKeyDefaultValue getRegistrySubKeyDefaultValue, GetLastWriteTime getLastWriteTime, GetAssemblyRuntimeVersion getRuntimeVersion, OpenBaseKey openBaseKey, GetAssemblyPathInGac getAssemblyPathInGac, IsWinMDFile isWinMDFile, ReadMachineTypeFromPEHeader readMachineTypeFromPEHeader)
   at Microsoft.Build.Tasks.ResolveAssemblyReference.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	MyApp	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets	2084

I grabbed a clean clone and started to apply NuGet updates on-by-one to try to isolate the cause of my problems.

Microsoft.UI.Xaml v2.3.191125001 - prerelease => v2.4.3:  When I started with just this one update, I got the same build error: The "ResolveAssemblyReference" task failed unexpectedly.

So I started over with another clean clone:

Microsoft.VCRTForwarders.140 v1.0.4 => v1.0.6: OK
Microsoft.Windows.ImplementationLibrary v1.0.200519.2 => v1.0.200902.2: OK
Microsoft.Windows.CppWinRT v2.0.191111.2 => v2.0.201008.2: OK
Microsoft.UI.Xaml: v2.3.191125001 - prerelease => v2.4.3: OK when I did this last, or at least did it with all of the others.

I am mystified.


fix: start moving color constants into their own file

Description
This starts the work to be finished at a later time to streamline and simplify Composer's design language by pulling widely-used constants like colors, font sizes, and dimensions into their own authoritative files out in a "constants" directory. This particular PR just addresses some of the colors, with future work to be done on the rest of the colors as well as the other files with constants in them.
Task Item
refs #8014
refs #6873
Screenshots
Warning and error icons are now a consistent red and yellow wherever they appear.

Coverage increased (+0.001%) to 50.048% when pulling 2f1e99c2dc594dfbfc71e34f06e20a0e0ea83f02 on beyackle/exampleConsts into 6b3fab5eac8f9092d154e941fdb77f62d1db3e40 on main.

Closing this temporarily; will reopen or redo as needed in R15 when the designs are more settled.


feat: Support passing custom session duration to assume role

Add new plugin parameter role-session-duration that will set the lifetime of the oidc requested token and the duration-seconds of the assume role with web identity session.

@HugeIRL may we get a review?

Hey @RobinNil  / @mvollman,
We appreciate your patience on this and will check on this shortly.


Syncing speed is atrocious

In close to 3 days it only synced 9600 blocks.
In the last 16 hours the wallet synced ~100 blocks with plenty of nodes (and plenty of "PROCESS REVERSE/ERROR: CTransaction::CheckTransaction() : Error: Node does not have mint zerocoin to verify, please wait until" errors).
But, even without any errors in debug.log and after several restarts it's still painfully slow, sometimes slower than how fast new blocks being found.
If block verification really does requires this much CPU time, at least make it threaded because on 1 core it takes forever.
Win7x64, i7-6800K, SSD, 100Mbps DL.

I just do a quick -reindex test with below config.
server=1
defaultkey=1
logtimestamps=1
dns=1
listen=1
daemon=1
rpcallowip=*
txindex=1

Started at 5:21 pm and now  at 2.55am I'm at block 19955. Tested on an Ubuntu 16.04 VM with 1GB RAM, 2 cores.
2017-02-15 01:56:58 SetBestChain: new best=384f6d137ac5dc7bcfaffd987714092a101d0ab88bfd24347289af3453b2b5eb  height=19955  log2_work=43.516667  tx=105672  date=2017-02-07 17:37:58 progress=0.839488
But yes we know that problem due to the verification of zerocoin txs.
Could you add these lines to your config and do a reindex and tell me whether it helps? Thanks for your patience.
addnode=london.zcoin.io addnode=nyc.zcoin.io addnode=sf1.zcoin.io addnode=xzc.suprnova.cc

I decided to do a full resync instead (but saved my blockchain) and it went from 1 to 2500 iun about 45 minutes. Definitely a massive improvement.
 Was trying to import the blockchain data from znode.io which also seems to be down now. I'm on Windows 10 on Zcoin <IP_ADDRESS>.

I also have this issue on Windows 10 x64 creators update. One improvement would be to introduce multithreading as it maxes out one core on my system when it could use 6 or 12 (if using hyperthreading).

This is now solved with the new core update.
https://github.com/zcoinofficial/zcoin/tree/core_upgrade


Signup - User Feedback

provide user feedback when a verification email is sent

We have a modal designed for this but working on some code cleanup to enable that


meson: New build option to enable/disable tests

Ping?

lgtm otherwise :)

@FlyGoat @yinshiyou
please help me review the patch, thx.

LGTM, For MIPS Part.

Ping?

LGTM. resolve the conflicts please. thanks.


Fix a type casting error in text_input.dart

The numbers can be integers.
Fixes https://github.com/flutter/flutter/issues/109632
Pre-launch Checklist

[ ] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[ ] I read the Tree Hygiene wiki page, which explains my responsibilities.
[ ] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[ ] I signed the CLA.
[ ] I listed at least one issue that this PR fixes in the description above.
[ ] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

As a side note: I've searched as double throughout the flutter/flutter repo and it doesn't seem like we have other cases like this. PlatformView converts a method channel result from dynamic to double but it uses the standard codec.

@dkwingsmt @LongCatIsLooong
Is this not part of Flutter 3.3.0? I first see this error after upgrading Flutter stable.
(commenting here, since https://github.com/flutter/flutter/issues/109632 is closed and locked)
Error:
type '_Smi' is not a subtype of type 'double' in type cast

Stacktrace:
#0      _toTextPoint (package:flutter/src/services/text_input.dart:1513)
#1      TextInput._handleTextInputInvocation (package:flutter/src/services/text_input.dart:1827)
#2      TextInput._loudlyHandleTextInputInvocation (package:flutter/src/services/text_input.dart:1701)
#3      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:536)
#4      MethodChannel.setMethodCallHandler.<anonymous closure> (package:flutter/src/services/platform_channel.dart:529)
#5      _DefaultBinaryMessenger.setMessageHandler.<anonymous closure> (package:flutter/src/services/binding.dart:387)
#6      _invoke2.<anonymous closure> (dart:ui/hooks.dart:189)
#7      _rootRun (dart:async/zone.dart:1391)
#8      _CustomZone.run (dart:async/zone.dart:1293)
#9      _CustomZone.runGuarded (dart:async/zone.dart:1201)
#10     _invoke2 (dart:ui/hooks.dart:188)
#11     _ChannelCallbackRecord.invoke (dart:ui/channel_buffers.dart:42)
#12     _Channel.push (dart:ui/channel_buffers.dart:132)
#13     ChannelBuffers.push (dart:ui/channel_buffers.dart:329)
#14     PlatformDispatcher._dispatchPlatformMessage (dart:ui/platform_dispatcher.dart:599)
#15     _dispatchPlatformMessage (dart:ui/hooks.dart:89)

No but it will likely be included in the next stable release. See https://github.com/flutter/flutter/wiki/Where's-my-Commit%3F

@dkwingsmt @LongCatIsLooong Is there a plan to hotfix this into the stable branch?

Can this please be included in next release?

@dkwingsmt Would it be possible to have this hotfixed into 3.3 stable? We're seeing hundreds of these reports per day in our crash logs for a production app since moving to 3.3.
The fix appears to be scheduled for 3.4, but it's unclear when that release will happen.

I've submitted a CP request for this.

As a side note: I've searched as double throughout the flutter/flutter repo and it doesn't seem like we have other cases like this. PlatformView converts a method channel result from dynamic to double but it uses the standard codec.

It's part of [TextureAndroidViewController], since the error has been observed on iOS it's unlikely that to be the cause.

The thing is error log cant be represented by the last mile file name, so no one can trace it that where the actual issue is.


Add blue-prox-chat

We don't allow non maven central repositories in plugin hub plugins. Also no native code unless you are using official opus binaries. Also you are pulling in a lot of reflection plugins which I generally also disallow.

We don't allow non maven central repositories in plugin hub plugins. Also no native code unless you are using official opus binaries. Also you are pulling in a lot of reflection plugins which I generally also disallow.

Any easy way to get the versions of kryo and reflectasm into an allowed repo? Src is at https://github.com/thatgamerblue/kryo and https://github.com/thatgamerblue/reflectasm on the branches named as the versions, modifications are to remove most of the reflection and all the sun.misc.Unsafe usages

you can put it in central or you can just check in a binary jar to your repo, but I won't allow reflectasm since its too hard to verify runtime code gen.

you can put it in central or you can just check in a binary jar to your repo, but I won't allow reflectasm since its too hard to verify runtime code gen.

I'll see what I can do about removing reflectasm in that case, mind if I DM you on discord any other questions to not flood here and the dev channel in rl disc?

sure.

Should be good now I hope :)

kryo still has too much reflection in it for me. You are just using it as DataInputStream basically, so it should be pretty easily to just use that.

kryo still has too much reflection in it for me. You are just using it as DataInputStream basically, so it should be pretty easily to just use that.

moved kryo/kryonet into the source tree and deleted a whole bunch of it, i believe there's no reflection left outside of the regular rl client stuff, though im not 100% sure

Don't do this https://github.com/ThatGamerBlue/osrs-prox-chat/blob/a336be2ae9a10b5e2d1bf2b9ba1dec723e2eb49b/src/main/java/com/thatgamerblue/osrs/proxchat/client/ProxChatClientPlugin.java#L34
Also this comment is wrong, Client tick is fired ever 20ms, which is probably not what you want https://github.com/ThatGamerBlue/osrs-prox-chat/blob/a336be2ae9a10b5e2d1bf2b9ba1dec723e2eb49b/src/main/java/com/thatgamerblue/osrs/proxchat/client/ProxChatClientPlugin.java#L199
otherwise a336be2ae9a10b5e2d1bf2b9ba1dec723e2eb49b lgtm

restored the commented plugin name, and updated the comment to say 20ms, was a remnant from a less granular position system


Test positional and keyword argument passing

When functions support positional argument passing both passing the
argument by position and by keyword is part of the API. Using both call
methods in the unit tests for such arguments will detect possible future
backwards compatibility breakage.

Thanks!

Hm we really need to set up CI here, too


AutoPr-ContainerRegistry-ankurkhemani-REST Spec PrNumber 5854

Closing due to merge conflicts. @ankurkhemani Please regenerate the code manually and open a new PR


How to use AuthorizationEndpoint which contains query string parameters with OAuth.

Is there an easy way to use AuthorizationEndpoint which contains query string parameters?  For example below code doesn't work as i expect
    var facebookOptions = new FacebookOptions
    {
          //...
          AuthorizationEndpoint = FacebookDefaults.AuthorizationEndpoint + "?param1=param1",
    };

Only way i found to solve this problem is using event:
   var facebookOptions = new FacebookOptions
    {
          //...
          Events = new OAuthEvents()
            {
                OnRedirectToAuthorizationEndpoint = ctx =>
                {
                    ctx.HttpContext.Response.Redirect(ctx.RedirectUri + "&param1=param1");
                    return Task.FromResult(0);
                }
            }
    };

That's it for now. RE: https://github.com/aspnet/Security/issues/988

Related https://github.com/aspnet/Security/issues/990


How to remove hand motion animation?

How can I remove the hand motion animation in Java?
I found the below solution on GitHub, but these methods do not exist. is there any other way to hide or remove the hand motion?
       arFragment = (ArFragment) getChildFragmentManager().findFragmentById(R.id.ar_fragment);
       if (arFragment != null) {
                // hiding the plane discovery
                    arFragment.getPlaneDiscoveryController().hide();
                   arFragment.getPlaneDiscoveryController().setInstructionView(null);

       }

Use this It will help you
 arFragment.instructionsController.isEnabled = false


Remove participation websocket subscription

Checklist

[x] I tested all changes and all related features with different users (student, tutor, instructor, admin) on the test server https://artemistest.ase.in.tum.de.

Motivation and Context
We still use too many websocket subscriptions. In this PR, we remove the subscription for /topic/exercise/{exerciseId}/participation because it is not really necessary.
Description
When participating in an exercise, the invoked REST call already returns the changed participation. It does not really make sense to additionally send it via websocket, therefore we removed the websocket communication and now use the response and update the participation cache.
Steps for Testing

Log in to Artemis
Navigate to Course Administration
Create file-upload/modeling/text exercises
Start the exercises
Navigate back and forth in the course overview / exercise details / submission page: check that the submission/result state is correct
Create a submission and submit
Navigate back and forth in the course overview / exercise details / submission page: check that the submission/result state is correct

This actually also affects programming exercises in a couple of ways:

(Minor): If you click on "Show all results" the list is reversed compared to develop
If you submit something via the Code-Editor and go to another page before the new result comes in, you will never get the updated result on any page (it keeps on showing the building animation) except for the "Show all results" list on the exercise details page. The other components still show the old result. This gets only updated if you open the Code-Editor again.
(This is also on develop): Apparently, some other changes already partially broke the result component on develop, because there you won't keep on seeing the building animation if you leave the Code-Editor too "early", but you you will just see the old result. (Again, the exception is the "Show all results" list)

I noticed the following:

After having started an exercise, on the course overview and exercise detail page, the status says No Submission while on the submission page it says No graded result (the wording compared to the other two instances could insinuate that a submission has already been made but there is no graded result yet).

When submitting a file for a file upload exercise (or modeling exercise), the status stays as before at No graded result. Only when navigation back and forth, it has refreshed to Submitted, waiting for grading.
The updating seems to be generally broken here (or it never existed in the first place) as it is the same case after the tutor submitted his assessment (it stays as Submitted, waiting for grading for the student).

When starting a modeling exercise from the exercise page, everything on page refreshes correctly. However, when clicking on the back arrow, the course overview page still shows You have not started this exercise yet.

For the account artemis_test_user_2 I'm getting a 500 for the dashboard query.

I noticed the following:
1. After having started an exercise, on the course overview and exercise detail page, the status says `No Submission` while on the submission page it says `No graded result` (the wording compared to the other two instances could insinuate that a submission has already been made but there is no graded result yet).

2. When submitting a file for a file upload exercise (or modeling exercise), the status stays as before at `No graded result`. Only when navigation back and forth, it has refreshed to `Submitted, waiting for grading`.
   The updating seems to be generally broken here (or it never existed in the first place) as it is the same case after the tutor submitted his assessment (it stays as `Submitted, waiting for grading` for the student).
   ![OnPaste 20200108-160524](https://user-images.githubusercontent.com/7109225/71989048-390a8b00-3231-11ea-9405-5b79ab642d3e.png)

3. When starting a modeling exercise from the exercise page, everything on page refreshes correctly. However, when clicking on the back arrow, the course overview page still shows `You have not started this exercise yet`.

4. For the account `artemis_test_user_2` I'm getting a 500 for the dashboard query.
   ![OnPaste 20200108-160420](https://user-images.githubusercontent.com/7109225/71989062-3dcf3f00-3231-11ea-8516-d60ac442c47b.png)

Some analysis regarding @madwau findings:

This is actually not that trivial to solve. In our exercise-row and exercise-details components we have a big duplicated code block that specifies some additional status messages depending on the participation state. Only if those additional states do not apply, we display an updating-result component. On the submission page, we only have a jhi-result component, that does not get updated. We also don't have those additional status messages. If we want to make this consistent, I would suggest to have a separate PR that extracts those status messages to the result component or some other external component and then we have to decide on whether to also use an updating result on the submissions pages or not.

Partially the same reason as for 1.: The submission page only contains a static jhi-result

This is actually also the case for e.g. text exercises. The problem is, that the course overview uses the participations from the CourseCalculationService, which in turn gets all its entities from the for-dashboard call. We do not update those entities, so we would have to reload all exercises/participations, or create some shared cache or use and update the existing one.

@krusche How do you want to proceed? Should we create additional PRs, or just issues for now? Or should we solve some of these problems in this PR? As far as I could see, they are not caused by the changes of this PR.

@ungaralex Thanks for the analysis. Regarding 1 and 2: I think we recently changed from jhi-updating-result to jhi-result in the submission pages to reduce the amount of websocket subscriptions. This was e.g. part of 3b036bbb.
After resolving a lot of issues here and making sure old exercise (i.e. after due date) unsubscribe again, we can probably revert the changes in 3b036bbb if this resolves the issues mentioned by @madwau
Regarding 3: I think we should fix this with. Not sure why we get the participations from the CourseCalculationService in this case and not the updated ones from the ParticipationWebsocketService.
I will investigate 4, because this should never happen and seems to be related to another issue.
@ungaralex I would suggest that we try to resolve the issues in this PR as soon as possible so that the users experience is consistent again.

This is the exception regarding issue 4:
Jan 08 16:03:03 vmbruegge105 java[13994]: 2020-01-08 16:03:03.091 ERROR 13994 --- [nio-8080-exec-4] o.z.problem.spring.common.AdviceTraits   : Internal Server Error
Jan 08 16:03:03 vmbruegge105 java[13994]: java.lang.NullPointerException: null
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.function.BinaryOperator.lambda$maxBy$1(BinaryOperator.java:74)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReduceOps$2ReducingSink.accept(ReduceOps.java:123)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:558)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReferencePipeline.max(ReferencePipeline.java:594)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.domain.Exercise.findAppropriateSubmissionByResults(Exercise.java:674)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.domain.Exercise.filterForCourseDashboard(Exercise.java:603)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.web.rest.CourseResource.getAllCoursesForDashboard(CourseResource.java:326)

This is the exception regarding issue 4:
Jan 08 16:03:03 vmbruegge105 java[13994]: 2020-01-08 16:03:03.091 ERROR 13994 --- [nio-8080-exec-4] o.z.problem.spring.common.AdviceTraits   : Internal Server Error
Jan 08 16:03:03 vmbruegge105 java[13994]: java.lang.NullPointerException: null
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.function.BinaryOperator.lambda$maxBy$1(BinaryOperator.java:74)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReduceOps$2ReducingSink.accept(ReduceOps.java:123)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1654)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReferencePipeline.reduce(ReferencePipeline.java:558)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at java.base/java.util.stream.ReferencePipeline.max(ReferencePipeline.java:594)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.domain.Exercise.findAppropriateSubmissionByResults(Exercise.java:674)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.domain.Exercise.filterForCourseDashboard(Exercise.java:603)
Jan 08 16:03:03 vmbruegge105 java[13994]:         at de.tum.in.www1.artemis.web.rest.CourseResource.getAllCoursesForDashboard(CourseResource.java:326)

I guess the problem here is that the submission date is null. I am not sure how this can happen, because this should never be the case.

This was an isolated problem for this specific test user. artemis_test_user_2 had for some reason 2 submissions for the same exercise, one of them did not have a submission date which indicates submissions for exercises that have been started but not yet submitted. I checked that this problem does not occur for any other user on the test and production server.
I fixed the problem for artemis_test_user_2 by deleting the empty submission.

I changed jhi-result to jhi-updating-result in the submission pages for file, modeling and text exercises.
@ungaralex @madwau can you please test again if this solves the problems 1 and 2?

@ungaralex regarding 3: are you sure this is the case?
I just looked into the code. The course overview basically has multiple CourseExerciseRowComponents as children. ngOnInit in CourseExerciseRowComponent invokes participationWebsocketService.getParticipationForExercise
Shouldn't this be enough to get the latest participation?

I think I found why we have problem 3. There was a wrong return statement so the newly created participation was never added to the participationWebsocketService. I remove it in the last commit 06ea7c48 and will check if it works now.

Issues 1 and 2 still occur. Issues 3 and 4 are solved.

Issues 1 and 2 still occur. Issues 3 and 4 are solved.

I noticed this as well, but I think the difference between No submission and No graded result (issue 1) and between Submitted, waiting for grading and No graded result is not that big and I think this issue already exists on the current production version.
We previously only had No graded result and did not distinguish between different cases, so I would consider No submission and Submitted, waiting for grading as more detailed sub cases of No graded result.
Ideally, we fix this, but I would suggest that we fix this in a different PR. There is also a TODO in course-exercise-details.component.html in line 16 because much code is duplicated from course-exercise-row.component.html.
I guess we need a similar differentiation for all the submission pages for modeling, text and file upload exercises. However, we should not again duplicate the code, but rather extract this into its own component.
@madwau You already refactored some lines in the duplicated code. Could you create another PR and create a new component here? This component would basically include all code of course-exercise-row.component.html in the lines between 16 and 55 and the client would use this component in multiple places. We could call this component something like submission-result-status.

@HanyaElhashemy thanks for testing and for identifying these issues. I don't think they are related to the changes in this PR. Could you please quickly verify if these changes also occur on develop?
I guess we should fix them in a follow up PR

@HanyaElhashemy thanks for testing and for identifying these issues. I don't think they are related to the changes in this PR. Could you please quickly verify if these changes also occur on develop?
I guess we should fix them in a follow up PR

@krusche Oh, I am sorry next time I will check on 'develop' first before commenting. Error 1 and 3 are, as you said not related to these changes since they occur on develop. However, the 2nd error I reported does not occur on 'develop' .

Testing Observations:

Not sure if this is related here:
If I open Artemis in two Windows and start a (e.g. Text) exercise in one window, it does not switch state in the second window.

This is not a typical use case and it is too much overhead to support this at the moment. There is no websocket subscription before the exercise is started. We might add this again in the future.

@HanyaElhashemy thanks for testing and for identifying these issues. I don't think they are related to the changes in this PR. Could you please quickly verify if these changes also occur on develop?
I guess we should fix them in a follow up PR

@krusche Oh, I am sorry next time I will check on 'develop' first before commenting. Error 1 and 3 are, as you said not related to these changes since they occur on develop. However, the 2nd error I reported does not occur on 'develop' .

No problem. Could you enumerate the problems, so that we know what you exactly mean with 2nd error? Thanks

@HanyaElhashemy thanks for testing and for identifying these issues. I don't think they are related to the changes in this PR. Could you please quickly verify if these changes also occur on develop?
I guess we should fix them in a follow up PR

@krusche Oh, I am sorry next time I will check on 'develop' first before commenting. Error 1 and 3 are, as you said not related to these changes since they occur on develop. However, the 2nd error I reported (when you click on "start participation for exercise" in the tutor exercise dashboard to start assessing submissions) does not occur on 'develop' .

I would still suggest to fix these problems in another PR, so that we can merge this as soon as possible, otherwise it will become too large and merge conflicts will occur.
@ungaralex please look into the small coding issues mentioned by @jpbernius and answer them or fix them.

@HanyaElhashemy I was able to fix your problem 1.
Regarding problem 2, I think the bad request is ok here, because this user already started to participate in the grading process of this exercise and otherwise the user would have 2 tutor participations which would lead to problems in the database. Maybe this was related to the case that you had 2 browser windows open?

@madwau You already refactored some lines in the duplicated code. Could you create another PR and create a new component here? This component would basically include all code of course-exercise-row.component.html in the lines between 16 and 55 and the client would use this component in multiple places. We could call this component something like submission-result-status.

PR will be available here: https://github.com/ls1intum/Artemis/pull/1181


MapboxManager as a passthrough layer between components and MapBox API

Codifies the expectations set in WTT Camera Actions Spec
Fixes https://github.com/waterthetrees/wtt_front/issues/636 and https://github.com/waterthetrees/wtt_front/issues/633

@PGrad sweet, I love that we have the Lighthouse CI added. Is there a way to rerun these tests in case they're flaky?

@PGrad sweet, I love that we have the Lighthouse CI added. Is there a way to rerun these tests in case they're flaky?

If you click on "Details" you can re-run the job; I just re-started the Lighthouse job.

Ready for review @zoobot. Feel free to suggest more manual test cases

@PGrad sweet, I love that we have the Lighthouse CI added. Is there a way to rerun these tests in case they're flaky?

If you click on "Details" you can re-run the job; I just re-started the Lighthouse job. Documentation: https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs
A simple "re-run" button would be nice though.
E: it looks like now your PR is not passing best practices because some errors are being logged to console, I think related to issue #660?

Now getting
[webpack-cli] TypeError: Cannot create proxy with a non-object as target or handler
    at new WrappedPlugin (/home/runner/work/wtt_front/wtt_front/node_modules/speed-measure-webpack-plugin/WrappedPlugin/index.js:280:12)
    at /home/runner/work/wtt_front/wtt_front/node_modules/speed-measure-webpack-plugin/index.js:[51](https://github.com/waterthetrees/wtt_front/actions/runs/4777182030/jobs/8492707526#step:4:52):14
    at Array.map (<anonymous>)
    at SpeedMeasurePlugin.wrap (/home/runner/work/wtt_front/wtt_front/node_modules/speed-measure-webpack-plugin/index.js:44:45)
    at module.exports (/home/runner/work/wtt_front/wtt_front/webpack.config.js:1[53](https://github.com/waterthetrees/wtt_front/actions/runs/4777182030/jobs/8492707526#step:4:54):30)
    at loadConfigByPath (/home/runner/work/wtt_front/wtt_front/node_modules/webpack-cli/lib/webpack-cli.js:1439:37)
    at async WebpackCLI.loadConfig (/home/runner/work/wtt_front/wtt_front/node_modules/webpack-cli/lib/webpack-cli.js:1510:38)
    at async WebpackCLI.createCompiler (/home/runner/work/wtt_front/wtt_front/node_modules/webpack-cli/lib/webpack-cli.js:1785:22)
    at async WebpackCLI.runWebpack (/home/runner/work/wtt_front/wtt_front/node_modules/webpack-cli/lib/webpack-cli.js:1890:20)
    at async Command.<anonymous> (/home/runner/work/wtt_front/wtt_front/node_modules/webpack-cli/lib/webpack-cli.js:912:21)
Error: Process completed with exit code 2.

Do you know what's wrong? I'm inclined to ignore for now and investigate at a later point

LGTM when testing on local, This is a nice code cleanup.
Previously we'd added jumpTo after field testing and finding that flyTo animation is super laggy/annoying on mobile:
On mobile, we should use jumpTo(without animation). Not sure if that disappeared with some previous giant PRs but we should definitely use it/add it back in. https://docs.mapbox.com/mapbox-gl-js/api/map/#map#jumpto

Absolutely, should be easy to add that type of logic now with this passthrough layer. 👍

I just looked through PR history and jumpTo did get removed at some point in some giant PR. It is important to have jumpTo on mobile as flyTo is painful on mobile. Sorry I missed that previously. It's really not your fault it disappeared from our code base but if you can add it back in, it'll make zoom way better on mobile.

Just wanted to clarify - my initial interpretation was that flyTo is painful on mobile due to performance reasons. Is that true? Or is it something related to the small screen size? Because there are a couple ways to check for if a device is mobile and the one we use throughout the codebase is a screen size check. However, I think there needs to be a better "performance check" on a device to determine if we do map.jumpTo (and potentially remove 3d projections)


Fixed in v2.20.2

Unfortunately its still doing the same thing

@cubancrypto has your extension upgraded to 2.20.2?

Yes but I had to go back to the old version to send the transaction. Will get the new version and try again in a bit


Gerber

Any chances to get the Gerber file ? Thanks

Added to the pcb folder. Enjoy!

Added to the pcb folder. Enjoy!

Thanks a lot man! Would definitely buy some directly from you just to support your great work. Greetings from Spain.

U are welcome.


support for slashes in key names and advanced key transformation

This PR adds the following support:

slashes and other special characters in the key name: you now have the chance of filtering them out in your transform function
convenient ReadString and WriteString methods
updated test cases
advanced key transformation examples

Oh cool, this looks good. More detailed review coming...

Already corrected these style issues a few days ago. Any chance this can be merged?

:+1: :+1:


[SPARK-47799][BUILD] Add -g to javac compile parameters when using SBT package jar

What changes were proposed in this pull request?
This PR aims to add -g to javac compile parameters when using SBT package jar.

-g
Generates all debugging information, including local variables. By default, only line number and source file information is generated.

https://docs.oracle.com/en/java/javase/17/docs/specs/man/javac.html
Why are the changes needed?
maven-compiler-plugin defaults to debug=true, plexus-compiler-javac will add the parameter -g.
SBT does not have this behavior by default, which leads to some differences between the jars of maven and sbt builds, although the code logic is the same.
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#debug
https://github.com/apache/maven-compiler-plugin/blob/736da68adf543cf56cd82a68e5ad28d397ace2f4/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java#L734
https://github.com/codehaus-plexus/plexus-compiler/blob/6ae79d7f2feca3a02e75f7661468abac6a9a0a11/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java#L279-L285
Does this PR introduce any user-facing change?
No
How was this patch tested?
GA
./build/sbt common-utils/package

local test
Current

PR

Was this patch authored or co-authored using generative AI tooling?
No

Thanks dongjoon.

which decompiler did you use for you screenshot

I use jd-gui.
https://github.com/java-decompiler/jd-gui

Thank you for the info. :)


Make it possible to automatically create single-user groups

As part of the groups migration (https://github.com/zulip/zulip/issues/19525), we will want to make it easy to give permissions to administer a group or stream to its creator. This will require automatic creation of single-person groups.
Some permissions dropdowns will have an option labeled as "You". When a user selects this option, we should automatically create a single-person group containing just that user.

Group name (backend): user:{user_id}
@-mention permission: nobody (see #25927)

These groups should not be displayed in the group management UI.
Blockers:

[ ] Backend part of #25927

@sahil839 I'd like your thoughts on this, but I think we want is_system_group=True for these groups -- the idea being that they exist as an internals detail to allow us to have menus offering a "single user" or "single group" while still being able to be stored as a setting_name_group_id. (I feel like we had a #design conversation about this that we can refer to). And is_system_group should enable a lot of the policy things we want to have like not being editable in terms of either their settings or membership.
I think ideally from a data storage standpoint, we'd arrange things such that these groups are created on-demand when someone wants to use it in a setting (rather than when a user is created, which would entail increasing how many groups exist by a huge number, with all the clutter both in the database and the API that comes with that). The main downside of that is that we'll need to do something a bit awkward in the API to allow clients to request that such a group be created. Options include:

Adding a "get details for this group by name" endpoint that we'd query with "user:{user_id}" from the client that would have a success continuation of submitting the actual API request using the obtained group ID.
Making all of our permissions settings that accept a group_id also accept a group name string of this form.

I kinda prefer the second option, because it likely will make it easier for us to ensure the auto-creation step only happens if the acting user actually has permission to set a setting that it's needed for.
But in either case, the idea would be that we'd auto-create these system groups when they are explicitly needed for a permission; the end result should be that an organization like chat.zulip.org with 25K users probably has <50 of these user:{user_id} groups rather than 25K of them, and that seems worth doing some work to arrange.
We should probably post this technical proposal in "api design" for feedback before committing to implementing this as written.

Cross-posted that less message to https://chat.zulip.org/#narrow/stream/101-design/topic/New.20permissions.20model/near/1588807 for visibility.

Having is_system_group=True for these groups sounds good as we would not want them to be editable by membership. I am not sure about them being editable by settings though, as some of the organizations would want to have different value set for settings like "Who can mention this user group" for role based system groups. But we might not want to allow settings for single-user groups though.
Regarding the API and data storage details, I like the idea of creating the groups only when required sounds good and I agree that second option to make settings accept group name along with group ID is better. One point that we might need to think of is what we would do if a user is allowed to chagne a setting but not allowed to create user groups.

@zulipbot  claim

@lapaz17 @Ujjawal3 is already working on this issue. Sorry for the confusion as he was not assigned to the issue.

@zulipbot claim.

Closing as this plan was replaced by the one in #29557.


Support for collecting Go Expvar target metrics

What does this PR do?
Collect Go expvars from the target at runtime.
Motivation
This allows for analysis that involves introspection into the target application.
Related issues
SMP-461

I'm pleased with how straightforward this is.


Fixed #7764 - pass $recursive to Arrayable::toArray()

Would be great to have a test for the case it's fixing.

Merged: https://github.com/yiisoft/yii2/commit/c339ed2949ff90ed50cf1f6b4f3ac4216785208f

Thanks!


Kubernetes Install Failing

Hi,
When I did apply  kubectl apply -k . Getting the below error.
error: json: cannot unmarshal object into Go struct field Kustomization.patchesStrategicMerge of type patch.StrategicMerge
Syntax looks good. What is the cause of this error, Please suggest a solution.
Thank You

Somehow , the below part is causing an issue. When I comment out this section, am able to proceed with deployment. What is the problem in here.
Patch for Service with nodePort
patches:

path: ./nodePort.yaml
target:
kind: "Service"
name: "karavan"

Replace secret from.env if required
secretGenerator:

name: karavan
behavior: replace
options:
disableNameSuffixHash: true
envs:

.env

In addition ,  I need to update secret.yaml to have these key entries . Secret names with prefix "karavan" doesn't work. Please update and fix them as well.
git-repository:
git-username:
git-password:
git-branch:
image-registry:
image-group:
image-registry-username:
image-registry-password :


Bug fix (#111) and Code Cleanup

Review #111 . This PR provides a simple fix.
The rest of the changes are code cleaning and stylistics improvements.

@engshahrad All sounds good to me. Thanks!


Tools

[x] Swords
[x] Axes
[x] Pickaxes
[x] Shovels
[x] Hoes (don't invite House)
[ ] Textures
[ ] Pirate translation
[ ] Dutch translation
[x] Config (damage value, durability, enchantibility, etc.)

I'm willing to do this for you if you want :)
But maybe it's better for me to wait till the 1.9 version is "done"

If you're willing, it would help out a lot :) Even if it's a WIP when you open up a review, it can be expanded on (hopefully easily, it's been a while since I've done this :disappointed:)
(And thank you again, you're awesome)

Is 0.0.2 going to be 1.9?

Just pulled 1.9's changes in b86f1ee0694f39c6a9d5945da955f0b8838b67c7, looks like it will be now :+1:

Ah nice :)
I'll get to this at sometime, so you can concentrate at other awesome stuff for this mod :+1:

Thank you :+1:
I have an early shift at work tomorrow so I might grab some sleep now and try to sneak some changes in before I go in the morning, otherwise I'll be back tomorrow night :)

Funny cause for you it's now around 11PM (if my time-difference calculations are correct [cough internet]) but for me it's 2PM :)

10 PM, you were so close :p I hope you have a nice afternoon, Ravi - These last few days have been fun. I haven't had fun for a while, so thank you :+1:

Np m8 =)

I expect to have atleast a WIP of the tools on wednesday (6/4) ready
Oh btw don't expect much from the textures.
(I'm still in school so haven't got all time :-1: )

#20

Awesome, thanks :) I'll go check it out

Nice now I got my checklist =)

Congratulations, @ShadowCoder69 - Your first assigned issue :+1:
Good luck :D

Hey @ShadowCoder69 are you on Windows, Mac or a Linux distribution? Just checking in my coffee break so you'll get a chance to answer before I get home :-)

(Just woke up)
Currently on my phone (android), but my pc has windows 10

Shoudn't IABlocks be named IEBlocks?

I added a ConfigHandler in e49cadd, do you like it?

Alright, thanks

Oops. Yeah, sorry :p  I'll change that over in a sec

ConfigHandler looks great, thank you :+1:

Next commit will polish ConfigHandler a bit and acutually register the tools
Btw it is so damn painfull to see all that registers in IA/EBlocks and knowing they need to be replaced
(#24)

Renamed the IABlocks (d8b7b7e)

Still zombie, but I'll try to work on this for a while

Pretty much only translations and textures now :) Should be code-complete
(I'll try to do some textures on Monday :D)

Tonight I'm going to France (cause we're dutch people. And dutch people go to France. Mostly.), so I won't be doing very much for 2 weeks

:fr: :free: :frog: :poultry_leg: :mask: :phone: :ambulance: :hospital:
Enjoy your holiday, mate :D

Thx.
Btw, a really random question, you celebrate christmas in the summer right?

Yep :( It's way too humid then but hey, no (major) earthquakes ;D

So it's winter there right now...

Doesn't really feel like it right now, but yeah :) Feels like about 28 degrees because of the humidity (It rained for maybe an hour a little while ago)
Celsius:

Fahrenheit:

Huh, I never noticed it changed km/h to m/h. Nice

Still any interest in this mod?
Btw it's really funny to read this conversation. I was just thinking about the whole australian christmas thingy a couple of days ago 😂  Also it's weird to see you say "22°C feel like summer", in the Netherlands that's about the average summer temperature (maybe a bit colder), anything above 25°C and we just melt miserably in our home 🌞


User unable to access Team Calendar (can access other Team Calendars)

I have a user of the Calendar extension who is able to view calendars on multiple boards but when attempting to access a particular calendar they are not able to expand the "Select Team" dropdown
I have been unable to identify the cause of the issue as the user has a Basic License and is a Team Admin for the team calendar that they cannot view

any guidance on this issue would be greatly appreciated, thank you

@WIL14M thanks for reporting. We will investigate and get back. Can you share what Azure DevOps version you are using?

Thank you @MOlausson - We are using Azure DevOps SaaS

Just wanted to add that someone on my team is seeing the exact same issue.  Despite being on several teams, the team selection drop down is empty on the calendar screen.

Any updates to this issue ?

has there been any progress with this issue please?

I'm having the same issue.  Project had one team originally when the Calendar was installed. I then created a few more teams.  Calendar still worked for the default team. Never tested switching the team in the Calendar.  Once I deleted the default team that was working with the calendar, I now have an empty team select list as noted above.

@AminTi has there been any progress fixing this issue?  Even a estimated date would help. Thanks!

@MOlausson is there any progress on this item please?

Hi! , We are working on the team calendar,  @WIL14M  do you have time for a web session tomorrow ?.

hi @AminTi - yes, I should be able to join a session
if you are able to provide a time slot I will expand to the user(s) who raised the issue so that you have first hand information on the issue

10:00 or 11:00 Central European time ?

@AminTi - 10 today (11 Sept) if possible else tomorrow please

@AminTi - 10 today (11 Sept) if possible else tomorrow please

@AminTi - when if you next available time please?

@AminTi - 10 today (11 Sept) if possible else tomorrow please

@AminTi - when if you next available time please?

@AminTi  - Bump

@AminTi has there been any progress fixing this issue?

@AminTi I'm willing to join a web session if it's still considered helpful to resolve this issue. Let me know.

@ssgoodrow I am.  For clarity, I'm not the developer, just a user of the plugin that is experiencing the same bug

@AminTi - we could also use a session to conquer this issue, however, being based in the UK, the 4:30 call you are having with another user would be too late for my colleagues
Would you / a colleague be available for a call earlier in the day tomorrow or Friday?

Hi @WIL14M,
I have the same problem reported in my Issue as well.
https://github.com/microsoft/vsts-team-calendar/issues/483
It looks like this error comes up when a Team is deleted.
"The team with id 'e74c34ea-c8eb-422c-9b0c-b52e253048bd' does not exist, or you do not have permission to access it."
Unfortunately, I don't have a solution, but it's "nice" to see that everybody was left hanging by @AminTi .

Hi @WIL14M,
I have the same problem reported in my Issue as well. #483 It looks like this error comes up when a Team is deleted. "The team with id 'e74c34ea-c8eb-422c-9b0c-b52e253048bd' does not exist, or you do not have permission to access it." Unfortunately, I don't have a solution, but it's "nice" to see that everybody was left hanging by @AminTi .

I was able to get it to work doing the following.  I have no idea why this works.

Copy URL link of the Calendar page. Send it to everyone having the problem.
Have them use the URL link, which then took the user to the Calendar page.
From that point forward, user is able to access Calendar from within Azure.

@ssgoodrow I've followed your suggestions and copied the URL to the calendar page but am still seeing an empty team pulldown menu and a blank page.
When you use the copied URL do you have a list of teams in the pulldown menu?

Hi @WIL14M,
I have the same problem reported in my Issue as well. #483 It looks like this error comes up when a Team is deleted. "The team with id 'e74c34ea-c8eb-422c-9b0c-b52e253048bd' does not exist, or you do not have permission to access it." Unfortunately, I don't have a solution, but it's "nice" to see that everybody was left hanging by @AminTi .

I was able to get it to work doing the following. I have no idea why this works.
1. Copy URL link of the Calendar page. Send it to everyone having the problem.

2. Have them use the URL link, which then took the user to the Calendar page.

3. From that point forward, user is able to access Calendar from within Azure.

Thanks @ssgoodrow, this option worked for my colleague! @wookiefoot I believe someone else, who can see the calendar should send you the link. At least that's how it worked in my case.

@KristofKuli thanks for the suggestion.  In my case, no one on any of our teams can see the calendar.  Blank page with an empty "Select Team" pulldown menu.