PiecewiseConstantDecay doesn't work with Wrapping Optimizer on GPUs

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.5/2.6
Python version: 3.8
Bazel version (if compiling from source): NA
GCC/Compiler version (if compiling from source): NA
CUDA/cuDNN version: 11.2
GPU model and memory: 8.2

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:

TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior
When using the PiecewiseConstantDecay for an optimizer and wrapping optimizer, like:
lr_fn = PiecewiseConstantDecay()
opt = SGD(lr_fn)
opt = WrapOpt(opt)

We will hit the error of
InvalidArgumentError: Cannot assign a device for operation sequential_1/dense_1/Tensordot/ReadVariableOp: Could not satisfy explicit device specification '' because the node {{colocation_node sequential_1/dense_1/Tensordot/ReadVariableOp}} was colocated with a group of nodes that required incompatible device '/job:localhost/replica:0/task:0/device:GPU:0'. All available devices

Note, this error seems to be hit only when PiecewiseConstantDecay schedule is used on GPUs.
Describe the expected behavior
We shouldn't see such error when using PiecewiseConstantDecay on GPUs.
Contributing - Do you
want to contribute a PR? (yes/no): - Briefly describe your candidate solution
(if contributing):
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Below is the colab link and please repro it with Runtime=GPU.
https://colab.research.google.com/drive/1QPx4IqQNVpSR-ALfPYbjJjRUffyHo06G?usp=sharing
import tensorflow as tf
from tensorflow.keras import layers, optimizers, models
print(tf.__version__)
class OptimizerWrapper(optimizers.Optimizer):
  def __init__(self, optimizer, name=None, **kwargs):
    super(OptimizerWrapper, self).__init__(name, **kwargs)
    self._optimizer = optimizer

  def _create_slots(self, var_list):
    self._optimizer._create_slots(var_list)

  def _resource_apply_dense(self, grad, var):
    return self._optimizer._resource_apply_dense(grad, var)

  def _resource_apply_sparse(self, grad, var):
    return self._optimizer._resource_apply_sparse(grad, var)

  def get_config(self):
    return self._optimizer.get_config()

model = tf.keras.Sequential()
model.add(layers.Dense(8))
x = tf.constant(12., shape=(5, 1, 2, 4))
boundaries = [100000, 110000]
values = [1.0, 0.5, 0.1]
learning_rate_fn = optimizers.schedules.PiecewiseConstantDecay(
    boundaries, values)
#learning_rate_fn = optimizers.schedules.ExponentialDecay(
#    0.1, decay_steps=100000, decay_rate=0.96, staircase=True)
#learning_rate_fn = optimizers.schedules.PolynomialDecay(
#    0.1, 10000, 0.01, power=0.5)
opt = optimizers.SGD(learning_rate=learning_rate_fn, momentum=1.0)
opt = OptimizerWrapper(opt)

@tf.function
def train_step(x):
  with tf.GradientTape(persistent=True) as tape:
    y = model(x)
    loss = tf.reduce_mean(y)

  grads = tape.gradient(loss, model.variables)
  opt.apply_gradients(zip(grads, model.variables))
  return loss

for i in range(3):
  loss = train_step(x)
  print("Loss:", loss)

Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.
InvalidArgumentError                      Traceback (most recent call last)
<ipython-input-2-354cdd24a945> in <module>()
     45
     46 for i in range(3):
---> 47   loss = train_step(x)
     48   print("Loss:", loss)
     49

5 frames
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     58     ctx.ensure_initialized()
     59     tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
---> 60                                         inputs, attrs, num_outputs)
     61   except core._NotOkStatusException as e:
     62     if name is not None:

InvalidArgumentError: Cannot assign a device for operation sequential_1/dense_1/Tensordot/ReadVariableOp: Could not satisfy explicit device specification '' because the node {{colocation_node sequential_1/dense_1/Tensordot/ReadVariableOp}} was colocated with a group of nodes that required incompatible device '/job:localhost/replica:0/task:0/device:GPU:0'. All available devices [/job:localhost/replica:0/task:0/device:CPU:0, /job:localhost/replica:0/task:0/device:GPU:0].
Colocation Debug Info:
Colocation group had the following types and supported devices:
Root Member(assigned_device_name_index_=1 requested_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' assigned_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' resource_device_name_='/job:localhost/replica:0/task:0/device:GPU:0' supported_device_types_=[CPU] possible_devices_=[]

cc. @nluehr

@kaixih ,
I was able to reproduce the issue in TF v2.4 and v2.5. In nightly i wasn't able to find the issue.Please find the gist here.
Thanks!

@tilakrayal Thanks for trying this out.
Yes, it seems it is working on the colab with the nightly wheel. However, I can still see the error when I use the nightly-gpu docker on my machine. This is what I have tried:
(1) pull the tensorflow/tensorflow:nightly-gpu: I can see the version: 2.6.0-dev20210601 and still hit the error.
(2) pull the tensorflow/tensorflow:nightly: I can see the version: 2.6.0-dev20210601 and no error.
So, I have a feeling that the colab might not use the GPU env for the nightly wheel. Can you try it with docker images? Thanks.

Some updates:
When using the nightly-gpu docker image (ie. the above (1) container), if I disable GPU, the error is gone:
CUDA_VISIBLE_DEVICES= python error_repro.py

So, I suspect the colab might not use the GPU for some cases even if the GPU runtime is selected. Please let me know your thoughts. Thanks.

@kaixih,
Your code could be run successfully with GPU Runtime by commenting the Wrapper for Optimizer. Please find the Gist of working code.
Is there any specific reason for using the Wrapper for the Optimizer instead of the Optimizer ?

@rmothukuru Yes, I agree the original optimizer works fine. However, we are designing a wrapper optimizer to postprocess the variables after each updating and this design works fine with any other learning schedule or CPU env. Only the PiecewiseConstantSchedule + GPU will hit the error. We think our example is a legit use case and should be working.
Also, we found that when using the eager mode (by commenting out the @tf.function), this use case works fine. So, I believe it is a TF bug and the implementation of PiecewiseConstantSchedule might trigger some weird situation when using GPU + graph mode. What's your advise?

Here are some more info that might help:
To mimic the PiecewiseConstantDecay, I created this
class SimplePiecewiseConstantDecay(
    tf.keras.optimizers.schedules.LearningRateSchedule):
  def __init__(self, boundaries, values, name=None):
    super(SimplePiecewiseConstantDecay, self).__init__()
    if len(boundaries) != len(values) - 1:
      raise ValueError(
          "The length of boundaries should be 1 less than the length of values"
      )
    self.boundaries = boundaries
    self.values = values
    self.name = name

  def __call__(self, step):
    pred_fn_pairs = []
    pred_fn_pairs.append((step <= self.boundaries[0], lambda: self.values[0]))
    pred_fn_pairs.append((step > self.boundaries[-1], lambda: self.values[-1]))
    for low, high, v in zip(self.boundaries[:-1], self.boundaries[1:],
                            self.values[1:-1]):
      # Need to bind v here; can do this with lambda v=v: ...
      pred = (step > low) & (step <= high)
      pred_fn_pairs.append((pred, lambda v=v: v))

    # The default isn't needed here because our conditions are mutually
    # exclusive and exhaustive, but tf.case requires it.
    default = lambda: self.values[0]
    return tf.case(pred_fn_pairs, default, exclusive=True)

  def get_config(self):
    return {"boundaries": self.boundaries,
            "values": self.values,
            "name": self.name}

By using it instead of optimizers.schedules.PiecewiseConstantDecay in the original repro, we can still repro the error. From the log, I suspect the TF cannot correctly deal with the device assignment with the tf.case op in this use case.

I just played with the tf.case vs tf.cond and it confirms only the tf.case will hit the error:
  # This doesn't work!
  def __call__(self, step):
    pred_fn_pairs = []
    pred_fn_pairs.append((step <= self.boundaries[0], lambda: self.values[0]))
    pred_fn_pairs.append((step > self.boundaries[-1], lambda: self.values[-1]))
    default = lambda: self.values[0]
    return tf.case(pred_fn_pairs, default, exclusive=True)

  # This works fine!
  def __call__(self, step):
    def case0():
      return self.values[0]
    def case1_2():
        return tf.cond(step > self.boundaries[-1], lambda: self.values[-1],
                       lambda: self.values[0])
    return tf.cond(step <= self.boundaries[0], case0, case1_2)

See the colab link https://colab.research.google.com/drive/1KUu7HSX4J7nNvYEaEDXCUZhGgxkoGiWe?usp=sharing.

Any news @rmothukuru? Thanks.

I'm not sure what's causing the issue, but delegating apply_gradients in OptimizerWrapper solves the issue:
class OptimizerWrapper(optimizers.Optimizer):

  ...

  def apply_gradients(self,
                      grads_and_vars,
                      name=None,
                      experimental_aggregate_gradients=True):
    self._optimizer.apply_gradients(grads_and_vars, name,
                                    experimental_aggregate_gradients)

This is what tf.keras.mixed_precision.LossScaleOptimizer does, which is the only optimizer wrapper within Keras.
Still, this is a bad error message and this issue should be fixed. /CC @fchollet @tomerk, can either of you take a look or triage?

Thanks @reedwm for this WAR. It works for this repro script. However, in our real case, it may be not easy for us to delegate the apply_gradients() in the wrapper. Roughly, what we are trying to do is that for some vars, we need to prune them before updating. And this logic can be implemented natually in _resource_apply_dense(self, grad, var) like:
def _resource_apply_dense(self, grad, var):
  if var is elegible:
    self._optimizer._resource_apply_dense(...)
    new_var = prune(var)
    return var.assign(new_var)
  else:
    return self._optimizer._resource_apply_dense(...)

However, with the above delegating solution, it is not simple for us to insert the pruning in front of var updating. So, we are still looking forwards to more info on the root cause and solution of this issue.

As a workaround, delegating _prepare in OptimizerWrapper and adding an apply_state argument to _resource_apply_dense fixes the issue:
class OptimizerWrapper(optimizers.Optimizer):
  def __init__(self, optimizer, name=None, **kwargs):
    super(OptimizerWrapper, self).__init__(name, **kwargs)
    self._optimizer = optimizer

  def _prepare(self, var_list):
    return self._optimizer._prepare(var_list)

  def _create_slots(self, var_list):
    self._optimizer._create_slots(var_list)

  def _resource_apply_dense(self, grad, var, apply_state):
    return self._optimizer._resource_apply_dense(grad, var, apply_state)

  def _resource_apply_sparse(self, grad, var):
    return self._optimizer._resource_apply_sparse(grad, var)

  def get_config(self):
    return self._optimizer.get_config()

Still, this shouldn't be necessary. Will keep investigating.

I found the root cause. The issue occurs if an optimizer subclass creates a tf.string tensor in _resource_apply_dense. The reason is due to this colocation constraint in Optimizer. This forces everything in _resource_apply_dense to be placed on the GPU if the variable is on the GPU (which is the case for practically every model run on the GPU). However, string tensors can only be placed on the CPU, so the error occurs if a string tensor is created under that colocation constraint, which includes the call to _resource_apply_dense.
As you noticed, an error occurs when you use a PiecewiseConstantDecay (or any LearningRateSchedule that calls tf.case(..., exclusive=True)) with certain custom optimizers (such as your OptimizerWrapper). This is because tf.case creates a string tensor, since it creates an Assert op which takes in a string tensor. A LearningRateSchedule is called from _fallback_apply_state, which is called from _resource_apply_dense in many optimizers if the apply_state argument is not passed through.
/CC @fchollet @rohan100jain what do you think the best solution is here? Perhaps we should have the concept of a "soft colocation constraint", which allows ops to be placed on the CPU if the colocation constraint cannot be satisfied? Or we can have Keras simply not use a colocation constraint, as it is deprecated, and we could instead have grappler or some other optimization to move ops to the GPU if necessary to get optimal performance.

Also /CC @yuefengz, as the issue occurs with distribution.extended.colocate_vars_with.

Hi,
Thank you for opening this issue. Since this issue has been open for a long time, the code/debug information for this issue may not be relevant with the current state of the code base.
The Tensorflow team is constantly improving the framework by fixing bugs and adding new features. We suggest you try the latest TensorFlow version with the latest compatible hardware configuration which could potentially resolve the issue. If you are still facing the issue, please create a new GitHub issue with your latest findings, with all the debugging information which could help us investigate.
Please follow the release notes to stay up to date with the latest developments which are happening in the Tensorflow space.


[FEATURE] - EOS processing

Branch : https://github.com/LGouellec/kafka-stream-net/tree/eos

TODO : test 3 brokers

Test with 3 brokers OK


AttributeError: type object 'Export' has no attribute 'ImageCollection'

Hi! You are saving my life with these tools. Thank you in advance!
Sorry to ask but, I keep getting this error at the moment of exporting 10 images to my Drive. My code looks like this:
from geetools import batch
import ee
ee.Initialize()
zona_aire = ee.FeatureCollection("users/romeldrivera/zona_aire")
start = ee.Date.fromYMD(2018,1,1)
days = ee.List.sequence(0,9)
def one(d):
    return start.advance(d,'day')
startDates = days.map(one)
def three(img):
    return img.clip(zona_aire)
def two(m):
    start = ee.Date(m)
    end = ee.Date(m).advance(1,'day')
    date_range = ee.DateRange(start,end)
    MODISday = ee.ImageCollection('MODIS/006/MCD19A2_GRANULES').select('Optical_Depth_047').filterDate(date_range).map(three)
    return(MODISday.median())
daymap = two
list_of_images = startDates.map(daymap)
mt = ee.ImageCollection(list_of_images)
tasks = batch.Export.ImageCollection.toDrive(mt, 'AOD2018', scale=30, region=zona_aire.getInfo()["coordinates"])

I run that code and get
tasks = batch.Export.ImageCollection.toDrive(mt, 'AOD2018', scale=30, region=zona_aire.getInfo()["coordinates"])
AttributeError: type object 'Export' has no attribute 'ImageCollection'
I appreciate your time and attention!

Hi @rdriveras, you are welcome =)
I guess the only issue is the uppercase C, should be: batch.Export.imagecollection.toDrive
Let me know

Yeah! That was the issue, sorry for that. Thank you very much again!


feat: Handle request list user input

Add helper function to handle request list inputs.
Closes: #310

Sorry for the force-push. Due to my previous mainly Gerrit-based experience I was expecting this Rebase button in Github to do something more clean in the log...


obs-studio: 27.2.1 -> 27.2.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/obsproject/obs-studio/releases.
meta.description for obs-studio is: "Free and open source software for video recording and live streaming"
meta.homepage for obs-studio is: "https://obsproject.com"
meta.changelog for obs-studio is: ""
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
Warning: no invocation of /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2/bin/.obs-wrapped had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2/bin/.obs-ffmpeg-mux-wrapped had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2/bin/obs had a zero exit code or showed the expected version
Warning: no invocation of /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2/bin/obs-ffmpeg-mux had a zero exit code or showed the expected version
0 of 4 passed binary check by having a zero exit code.
0 of 4 passed binary check by having the new version present in output.
found 27.2.2 with grep in /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2
found 27.2.2 in filename of file in /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2

Rebuild report (if merged into master) (click to expand)

9 total rebuild path(s)

9 package rebuild(s)

9 x86_64-linux rebuild(s)
0 x86_64-darwin rebuild(s)

First fifty rebuilds by attrpath
obs-studio
obs-studio-plugins.looking-glass-obs
obs-studio-plugins.obs-gstreamer
obs-studio-plugins.obs-move-transition
obs-studio-plugins.obs-multi-rtmp
obs-studio-plugins.obs-ndi
obs-studio-plugins.obs-nvfbc
obs-studio-plugins.obs-websocket
obs-studio-plugins.wlrobs

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A obs-studio https://github.com/r-ryantm/nixpkgs/archive/187f86a227ad9afadb21f2b13057a6ff47cf1ff1.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2
ls -la /nix/store/hmldpa87kqh8i19kdgc39b0cc0sc2k6z-obs-studio-27.2.2/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package failed to build:

obs-studio-plugins.obs-ndi

8 packages built:

obs-studio
obs-studio-plugins.looking-glass-obs
obs-studio-plugins.obs-gstreamer
obs-studio-plugins.obs-move-transition
obs-studio-plugins.obs-multi-rtmp
obs-studio-plugins.obs-nvfbc
obs-studio-plugins.obs-websocket
obs-studio-plugins.wlrobs

Maintainer pings
cc @jb55 @MP2E @deviant for testing.

obs-studio builds for me. Only tested with wlrobs plugin.


Automatically parsing Tweets despite length limts

I have set the length limit well above the 240 character limit of Twitter, but it is still parsing tweets into links above a certain threshold.
From mastodon-bot.cljs I have set:
(def max-post-length 1000)
and from individual config.edn files I have set
:max-post-length 1000
I am using this Exclusively for Mirroring twitter accounts to their mastodon counterparts but it seems anything over about two hundred characters is parsed into a link.
Any suggestions? Or can I just remove the entire trim-text section?

Tweets aren't being trimmed at all at the moment since they're shorter than Mastodon limit. I just made a change to apply text trimming for tweets as well.

Tweets are being trimmed by Twitter API because the tweet_mode="extended" parameter is not being used. I fixed it and I can make a request when #10 is merged to avoid conflicts 😉


Added endpoints for mentor/mentee

Description
Added the endpoints for mentors and mentees to create new accounts.
Type of change
Please delete options that are not relevant.

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

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have removed unnecessary comments/console logs from my code
[x] I have made corresponding changes to the documentation if necessary (optional)
[x] My changes generate no new warnings
[x] I have checked my code and corrected any misspellings
[x] No duplicate code left within changed files
[x] Size of pull request kept to a minimum
[x] Pull request description clearly describes changes made & motivations for said changes

https://user-images.githubusercontent.com/81526595/142504010-e60420f6-6ab8-45ad-89d2-1f54c23bfb6f.mp4

Great job adding the endpoints. It's look very nice.

Perfect. Brief to the point and certainly needed. Let's get this merged

Endpoints tested and returns!

Looks good, ready to add this!

Fantastic work setting up the endpoints, looks good to merge.


[enhancement] Add ability to share scripts between different controllers

I understand that you can place code that runs on multiple actions of one controller in the init function, but for code that is shared between different controllers.
I might start developing this if it's ok :)

This might work. I was thinking that maybe it could follow the rails convention and automatically inherits from the ApplicationController (Where the shared code would reside) if there is one.
You're welcome o/

Alright. Let us see if more of this scenario comes up again to consider this change.
Thanks!!


Added minikube-none plugin

Makes it easier to run Minikube without a VM.

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


amdgpu version file missing when running via systemd

Previous issue was closed as fixed but the bug still exists.
Hi, this doesn't happen to me when running ollama as root directly in a shell, but it happens when I start ollama as a service (regardless of the user):
amnesia λ ~/ sudo systemctl status ollama
● ollama.service - Ollama Service
     Loaded: loaded (/etc/systemd/system/ollama.service; enabled; preset: disabled)
     Active: active (running) since Sun 2024-06-16 16:47:04 PDT; 39s ago
   Main PID: 7273 (ollama)
      Tasks: 18 (limit: 38365)
     Memory: 561.0M (peak: 615.8M)
        CPU: 5.644s
     CGroup: /system.slice/ollama.service
             └─7273 /usr/local/bin/ollama serve

Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.252-07:00 level=INFO source=amd_linux.go:304 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION="\"10.3.0\""
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.506-07:00 level=WARN source=amd_linux.go:48 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sy>
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.511-07:00 level=INFO source=amd_linux.go:304 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION="\"10.3.0\""
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.714-07:00 level=WARN source=sched.go:511 msg="gpu VRAM usage didn't recover within timeout" seconds=5.045401852
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.749-07:00 level=WARN source=amd_linux.go:48 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sy>
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.753-07:00 level=INFO source=amd_linux.go:304 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION="\"10.3.0\""
Jun 16 16:47:37 dead ollama[7273]: time=2024-06-16T16:47:37.964-07:00 level=WARN source=sched.go:511 msg="gpu VRAM usage didn't recover within timeout" seconds=5.295260429
Jun 16 16:47:38 dead ollama[7273]: time=2024-06-16T16:47:38.007-07:00 level=WARN source=amd_linux.go:48 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sy>
Jun 16 16:47:38 dead ollama[7273]: time=2024-06-16T16:47:38.012-07:00 level=INFO source=amd_linux.go:304 msg="skipping rocm gfx compatibility check" HSA_OVERRIDE_GFX_VERSION="\"10.3.0\""
Jun 16 16:47:38 dead ollama[7273]: time=2024-06-16T16:47:38.214-07:00 level=WARN source=sched.go:511 msg="gpu VRAM usage didn't recover within timeout" seconds=5.545797232

But somehow:
amnesia λ ~/ sudo ROCR_VISIBLE_DEVICES=0 HSA_OVERRIDE_GFX_VERSION="10.3.0" OLLAMA_DEBUG=1 ollama serve
Works fine and I can chat without issue. Here's my service file, please note I have tried with both the ollama user and the root user (and the ollama user is properly configured/in render & video group):
[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=root
Group=root
Restart=always
RestartSec=3
Environment="PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/usr/local/lib/baresip/modules"
Environment="ROCR_VISIBLE_DEVICES=0"
Environment="HSA_OVERRIDE_GFX_VERSION=\"10.3.0\""
[Install]
WantedBy=default.target

Both in the shell & run as a service they report using the same GPU (id=0, 6700XT):
level=INFO source=amd_linux.go:71 msg="inference compute" id=0 library=rocm compute=gfx1031 driver=0.0 name=1002:73df total="12.0 GiB" available="12.0 GiB"
Originally posted by @pulpocaminante in https://github.com/ollama/ollama/issues/4427#issuecomment-2171941948

Changing:
Environment="HSA_OVERRIDE_GFX_VERSION=\"10.3.0\""

To:
Environment="HSA_OVERRIDE_GFX_VERSION="10.3.0""

Fixes the issue.


Getting Katie Started

@ariel-phet @oliver-phet

[x] GitHub Email, GitHub Account, Join Organization
[x] Add Katie to the QA Team
[x] Make Katie Owner
[x] Add Katie to the Google Group
[x] Google Calendar
[x] Phases of Development
[x] GitHub Workflow
[x] How to Test & Tricks-of-the-Trade (simulation locations, query parameters, development tools, etc.)
[x] Practice Creating an Issue
[x] Introduce Test Server
[x] Introduce Website
[x] Website Account
[x] Picture for Website
[x] Slack
[x] Key
[x]<EMAIL_ADDRESS>[x] QA Book
[x] Finish All Administrative Paperwork
[x] W4 and Direct Deposit Up-to-Date on myCUinfo
[x] Picture for GitHub

I think we're done, closing.


no #no_std useful tag

https://github.com/LukaOber/serialmessage-rs/blob/070c1945857a5bc57b87849951ccfd3117b5a7e7/README.md?plain=1#L75
On crates.io there is no mention #no_std tag. Many people do use tags to find libraries. I even could skip attention to  this library, because no #no_std was mention in the header. Add it.

Sorry for the super late response. I added the tag and published a new version. Thanks for the suggestion.


New pattern: aws-fargate-opensearch

Issue #823, if available:
Description of changes:

Created new construct aws-fargate-opensearch

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
fixes #823

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: a34aa74932653ed107bb0777b4f88fc3c80dccf6
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: e29750c3520f641ae0694b567d98e5a041255236
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 1d7e35746822e00b00d4c6a9498a384a873d767c
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: f3ea038d9ae62bbe701df8f21df572f381f78c2a
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 5ecfbad075f762011b9581b7952697655441ab89
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 63818a65526c931a1bb42a1bf9044523b68c8be7
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 7182f98e84d3b7feda09ff9ea1d08ef2271805a4
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


[BUG] rdr2 heatmaps simply aren't working

Describe the bug
Whenever you click on an animal for the pro heatmaps, none of the spots appear like they would for the free options.
To Reproduce
Steps to reproduce the behavior:

go to
Helps to hide all but scroll down to the heatmaps section and click on any of them and they won't work.

This feature is not supported yet but working on it.

when will the update be ready?


Test Added basic setup

Signed-off-by: Dipankar Das<EMAIL_ADDRESS>
Fixes Issue

Changes proposed

Screenshots

Note to reviewers

First Integration testing


Channel's state tree

Pivotal story
State channels have state tree that is being updated accordingly.
Must be rebased on top of #1180  and #1184
What is left to do:

Remove initiator_balance and responder_balance and substitute them with accounts' tree in all closing transactions
Provide proof of inclusion for the accounts' tree for solo closing transactions (verifying that it is part of the tree having root state_hash of the last co-signded state)

These will be addressed in a subsequent PR tracked as Closing txs provide proof of work

Since new channel serialization introduces non-backwards compatible changes - both DB and protocol versions are bumped


jetty 11

or #552

Still working on this:
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ emissary ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.3, org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:3.1.3]:
[WARNING]   org/glassfish/jersey/jetty/internal/localization.properties
[WARNING] Found duplicate classes/resources in test classpath.

Still working on this:
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ emissary ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.3, org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:3.1.3]:
[WARNING]   org/glassfish/jersey/jetty/internal/localization.properties
[WARNING] Found duplicate classes/resources in test classpath.

@jpdahlke  @fbruton Added <ignoredResourcePatterns> to the pom for localization.properties, not sure if this is the correct way to handle this or not.

Still working on this:
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ emissary ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.3, org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:3.1.3]:
[WARNING]   org/glassfish/jersey/jetty/internal/localization.properties
[WARNING] Found duplicate classes/resources in test classpath.

@jpdahlke @fbruton Added <ignoredResourcePatterns> to the pom for localization.properties, not sure if this is the correct way to handle this or not.

I think this seems reasonable. We might need to do that for some of our other resources as well.

Still working on this:
[INFO] --- duplicate-finder-maven-plugin:1.5.1:check (default) @ emissary ---
[INFO] Checking compile classpath
[INFO] Checking runtime classpath
[INFO] Checking test classpath
[WARNING] Found duplicate and different resources in [org.glassfish.jersey.containers:jersey-container-jetty-http:3.1.3, org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-jetty:3.1.3]:
[WARNING]   org/glassfish/jersey/jetty/internal/localization.properties
[WARNING] Found duplicate classes/resources in test classpath.

@jpdahlke @fbruton Added <ignoredResourcePatterns> to the pom for localization.properties, not sure if this is the correct way to handle this or not.

I recommend the following approach instead that will scope the exclusion to the current conflicting dependencies.
        <plugin>
          <groupId>org.basepom.maven</groupId>
          <artifactId>duplicate-finder-maven-plugin</artifactId>
          <version>1.5.1</version>
          <configuration>
            <exceptions>
              <exception>
                <conflictingDependencies>
                  <dependency>
                    <groupId>org.glassfish.jersey.containers</groupId>
                    <artifactId>jersey-container-jetty-http</artifactId>
                    <version>${dep.jersey.version}</version>
                  </dependency>
                  <dependency>
                    <groupId>org.glassfish.jersey.test-framework.providers</groupId>
                    <artifactId>jersey-test-framework-provider-jetty</artifactId>
                    <version>${dep.jersey.version}</version>
                  </dependency>
                </conflictingDependencies>
                <resources>
                  <resource>org/glassfish/jersey/jetty/internal/localization.properties</resource>
                </resources>
              </exception>
            </exceptions>
            ```


Check github URLs for existing pull request links

This PR introduces actual checking of generated pull request links for their existence. If it encounters a redirect, it will probe the given Location as well.
This PR follows the original behaviour of first checking a possibly provided package name. If a PR with that package name does not exist, the script bails out immediately. Next it will probe a link generated from the composer package name. If that one fails as well, it will resort to trying out all remote URLs supplied by git. If everything fails, an exception will be thrown.

Thanks, @DASPRiD!


Page Default to dark mode?

Hi Travis,
Thanks for putting this up.
Amazed to see the amount of customization I can do with this.
I wanted to default my page to the dark mode and switch to light on toggle.
I tried updating the following line in NotionPage.tsx:
const darkMode = useDarkMode(false, { classNameDark: 'dark-mode' })
Updated false to true. On doing this, it started with the dark mode, but the dark mode css formatting went for a toss.
Can you please help me with this?
Thanks,
Neha

@nehakumarisaa , I believe changing the preferDarkQuery to light, should do the trick!
here's the change I made for reference :
https://github.com/Visakh47/TechnoBlogs/commit/fa68e5b86fc2db97b17d8e6883bf881270742e48

Thanks @Visakh47; yep, that's the easiest way to do what you're looking for.

Thank you @transitive-bullshit @Visakh47. The solution worked for me!!! :)


Rename protect screen and create translations

Rename protect screen to 'prevent screenshots' and create this as a translatable field in strings.xml

Blocked by #97


[BUG] fix problem with werkzeug.routing

werkzeug.routing does not contain 'NotFound' any more which imported in lambdarest/init.py
So after updating dependencies the project is not built.
Current workaround is to force werkzeug version to 2.1.2
https://github.com/sloev/python-lambdarest/blob/master/lambdarest/__init__.py#L6
@sloev could you look at it?

Looking forward to hear from you!
Pavel Kudinov

⚠ lambdarest is not maintained anymore, if anybody wanna take over, please contact me by email: johannes.valbjorn+lambdarest at the usual domain that rimes on email

@pa-kudinov should be fixed in 12.0.1, can you verify?


[FLINK-16854][legal] Correct dependency versions in the NOTICE file of module statefun-ridesharing-example-simulator

There are some dependencies with a wrong version in the NOTICE file:
com.google.code.findbugs:jsr305:3.0.2:compile (Remove compile)
org.hibernate.validator:hibernate-validator:6.0.17 (Version should be 6.0.17.Final)
org.jboss.logging:jboss-logging:3.3.2  (Version should be 3.3.2.Final)

CC @tzulitai

Thank you @hequn8128! LGTM, merging.


Can't package applications using pbuilder / pdebuild and cargo

This is really annoying, so I hope there is some kind of workaround. I use pdebuild/pbuilder to build all of my packages for SteamOS. If I log into the chroot, invoke the hook to add my sources (which contain verified cargo/rustc builds), I can invoke cargo fetch and cargo build --release perfectly fine under the root git directory. I'd really prefer to maintain clean-room environments. And before anyone asks, yes USENETWORK is set to "yes", or else the github submodules would not update.
Is this because of some environment error being in a chroot?
When I try to run the build against the debian, I get:
   debian/rules override_dh_auto_build
make[1]: Entering directory '/build/libretro-rustation-0.0.1+20160317git+bsos1'
cargo fetch
    Updating registry `https://github.com/rust-lang/crates.io-index`
An unknown error occurred

To learn more, run the command again with --verbose.
debian/rules:14: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 101
make[1]: Leaving directory '/build/libretro-rustation-0.0.1+20160317git+bsos1'
debian/rules:11: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Full build log:
https://gist.github.com/ProfessorKaos64/c881ff7a659e432e6e43

Could you try rerunning the Cargo step with -v? That should help print out more error information to diagnose.

Hmm...so a permission issue? However pdebuild builds as root user.
dh build --parallel
   dh_testdir -O--parallel
   dh_auto_configure -O--parallel
   debian/rules override_dh_auto_build
make[1]: Entering directory '/build/libretro-rustation-0.0.1+20160318git+bsos1'
cargo fetch -v
    Updating registry `https://github.com/rust-lang/crates.io-index`
Permission denied (os error 13)
debian/rules:14: recipe for target 'override_dh_auto_build' failed
make[1]: *** [override_dh_auto_build] Error 101
make[1]: Leaving directory '/build/libretro-rustation-0.0.1+20160318git+bsos1'
debian/rules:11: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debia

Could it be related to this issue?
https://forum.safenetwork.io/t/rust-and-debian-packaging/3797/5
But, what is odd, is I built the package just fine inside the chroot with debuild.

Update: found this to be an issue how $HOME is being interpreted (guessing because of cargo fetch pushes the registry to $HOME/.cargo)
I put this in debian/rules
export HOME=$(CURDIR)/debian/home-tmp

Sounds like Cargo could definitely produce a better error message here, but there's a number of ways to configure the CARGO_HOME value, so I don't think we'd want to fall back to various locations in the face of errors. If we had a better error message, however, it should facilitate diagnosis much more easily and could even suggest other locations.

Now the error message is better:
$ HOME=/dev/null cargo fetch
error: failed to acquire package cache lock

Caused by:
  failed to open: /dev/null/.cargo/.package-cache

Caused by:
  Not a directory (os error 20)

Should this error be closed then ?

Yea, I think the current error should provide enough context.


Update cron package to v3

This commit updates cron package version to v3 and uses github.com/robfig/cron/v3
instead of gopkg.in/robfig/cron.v2

Fixes #12
Description

Motivation and Context

[ ] I have raised an issue to propose this change (required)
[ ] My issue has received approval from the maintainers or lead with the design/approved label

How Has This Been Tested?

Types of changes

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

Checklist:

[ ] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[ ] I've read the CONTRIBUTION guide
[ ] I have signed-off my commits with git commit -s
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

😢

How Has This Been Tested?

😢

How Has This Been Tested?

Hey @viveksyngh, can you do a little testing on your PR over the weekend? It doesn't have to be extensive, just something to show it still works.

Hey @viveksyngh, can you do a little testing on your PR over the weekend? It doesn't have to be extensive, just something to show it still works.

@alexellis Updated with test results

@alexellis Updated with test results

Thank you for that 👍

Thank you for that 👍


Fix publish and add missing dependencies

Hi,
Here's what's included

Fix the publish to build only once the vendor instead of 2 times.
Fixed the build/publish to be aligned regarding the environment.

Now we use the NODE_ENV process variable. It's injected (see csproj/package.json)
Webpack does not use the env variable anymore and we also output what version we're producing (development or production).

Aligned the readme in the template itself to be the same as the root folder.

Fixed the in-page linking with the ToC.

Ajusted the license to be until 2016-2018
Lint-ing fixed. I added the missing libraries as dev-dependencies. Now you have full recognition within visual studio code if you don't have all the linting applied globally.

Fixed the spacing to be 2 (since standard was used). I used the eslint ... --fix to fix all.

Note: I would prefer to push only one commit, but I am not too confident in my rebasing skills ;).

Added the fix regarding the issue #79 .
Also I found out while publishing that the font-awesome were not being shaken. So I changed the way the import of icons was done. Now we have only the selected icons within the publish and nothing more.

I just merged in #80, it looks like it gave some minor conflicts here did you want to take a look and we can get this awesome PR in as well? :+1: 💯

Sorry for the delay ;). I will look tonight. (Japan time)

Update completed, please validate and then enjoy ;).

This is great! Merged it :100: :100:


[RMP]sample rmp ticket

Problem:

Goal:

Constraints:

Starting Point:

[ ] #528
[ ] #529

Closing


Tk

The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
maximum recursion depth exceeded

Thanks for raising this issue @sahad752 . Do you have idea about any alternate library to replace Tkinter to render captcha?

Great improvisation!
The UMANG api, however does not require a captcha for booking vaccine slots.
You can try this project out: Co-WIN-automated-slot-booking.

Great improvisation!
The UMANG api, however does not require a captcha for booking vaccine slots.
You can try this project out: Co-WIN-automated-slot-booking.

Thanks. Yeah, will look into it.


How to get this running on Nixos?

I suggest Nixos support should come in the future, but until then, is there some sort of workaround I can do to get this working on Nixos?

There is a nixos package


Support for bazel with example

It would be nice if support for Bazel can be added as well. It more of require listing the annotationProcessor classes which are used by plugins.

There are no plans to support it now.


debug方面，主要是想看到底发送了什么请求。

例行检查

[x] 我已确认目前没有类似 issue
[x] 我已确认我已升级到最新版本
[x] 我已完整查看过项目 README，已确定现有版本无法满足需求
[x] 我理解并愿意跟进此 issue，协助测试和提供反馈
[x] 我理解并认可上述内容，并理解项目维护者精力有限，不遵循规则的 issue 可能会被无视或直接关闭

功能描述
[GIN] 2023/08/04 - 19:37:18 | 200 |    8.213967ms |      <IP_ADDRESS> | PUT      "/api/channel/"
[SYS] 2023/08/04 - 19:38:05 | relay error (channel #11): invalid character 'd' looking for beginning of value
[GIN] 2023/08/04 - 19:38:05 | 500 | 28.509584165s |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[SYS] 2023/08/04 - 19:42:18 | relay error (channel #11): invalid character 'd' looking for beginning of value
[GIN] 2023/08/04 - 19:42:18 | 500 | 29.824198995s |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
代理服务器应该是有问题，但是我想通过反代抢救一下。
直接caddy反代接口是能用的，但是走one-api就会报错。
(mchs) {
        @event-stream header Accept text/event-stream
        @get method GET
        @post method POST
        @options method OPTIONS
}
:2000 {
        import mchs
        handle @event-stream {
                reverse_proxy <IP_ADDRESS>:8899 {
                        header_down Content-Type "text/event-stream; charset=utf-8"
                        header_down +Cache-Control no-cache
                }
        }
        handle @get {
                reverse_proxy <IP_ADDRESS>:8899 {
                        header_down Content-Type "application/json; charset=utf-8"
                        header_down +Cache-Control no-cache
                }
        }
        handle {
                reverse_proxy <IP_ADDRESS>:8899 {
                        header_down +Cache-Control no-cache
                }
        }
}

应用场景

报错贴报错信息

报错贴报错信息

客户端里报错的json？

看到你的日志了，你反代的什么接口？

另外你这 issue 标题也太随意了

看到你的日志了，你反代的什么接口？

openai

请求头、请求体、响应头、响应体我都不知道是什么鬼东西，完全不知道怎么搞了😣

先关了，我从你的描述里面看不出 One API 有什么问题

主要是我想看看one-api到底发了什么导致[SYS] 2023/08/04 - 19:38:05 | relay error (channel #11): invalid character 'd' looking for beginning of value
现在我根本不知道，发生了什么。

解析错误，上游返回了一个 d 开头的响应（估计是流模式），而 One API 希望它是一个可以解析的 json

没办法让日志显示请求头、请求体、响应头、响应体，现在这个日志来抓瞎了。

你应该先用 Postman 测试上游到底返回了什么

问题来了。
[GIN] 2023/08/04 - 19:37:18 | 200 | 8.213967ms | <IP_ADDRESS> | PUT "/api/channel/"
发送了什么呢？

你直接请求上游不可以吗

你直接请求上游不可以吗

不做反代，直接请求的话。
\n\n"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" `"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"proto"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`:"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" 这"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"使用"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"的"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"协"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"议"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"版本"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"，"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"如"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"HTTP"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"1"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"."},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"1"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"。\n\n"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" `"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"method"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`:"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" 这"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"HTTP"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"方法"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"，"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"如"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"GET"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"、"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"POST"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"等"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"。\n\n"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" `"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"host"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`:"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" 这"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"的"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"主"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"机"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"名"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"，"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"通"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"常"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"一个"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"URL"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"。\n\n"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" `"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"uri"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`:"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":" 这"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"的"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"统"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"一"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"资源"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"标"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"识"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"符"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"（"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"URI"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"），"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"它"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"是"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"对"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"资源"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"的"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"具"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"体"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"定"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"位"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"。\n\n"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"所"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"以"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"，"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"request"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"`"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"部"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"分"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"既"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"包"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"含"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"了"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"头"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"信息"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"，"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"也"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"包"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"含"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"了"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"其他"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"关"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"于"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"请求"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"的"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"详"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"细"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"信息"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{"content":"。"},"finish_reason":null}]}

data: {"id":"chatcmpl-7kUquKIjfvPfc34ZfBBSRJBxwLHWy","object":"chat.completion.chunk","created":1691316040,"model":"gpt-4-0613","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}

data: [DONE]

header 也贴一下，完整的

那个d不就是data的d吗

请求头
POST /v1/chat/completions HTTP/1.1
Host: <IP_ADDRESS>:8899
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
Accept: text/event-stream
Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://aio.local:3000/
Content-Type: application/json
x-requested-with: XMLHttpRequest
Authorization: Bearer bac
Content-Length: 2509
Origin: http://aio.local:3000
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache

响应头
HTTP/1.1 200 OK
date: Sun, 06 Aug 2023 10:02:21 GMT
server: uvicorn
access-control-allow-origin: *
access-control-allow-credentials: true
transfer-encoding: chunked

就是因为代理很逆天。
所以只能用反代修。
这就是为什么要
        handle @event-stream {
                reverse_proxy <IP_ADDRESS>:8899 {
                        header_down Content-Type "text/event-stream; charset=utf-8"
                        header_down +Cache-Control no-cache
                }
        }

解析错误，上游返回了一个 d 开头的响应（估计是流模式），而 One API 希望它是一个可以解析的 json

所以说，我挺想知道ONE_API到底发送了什么东西。
看能不能反代修一下。
@event-stream header Accept text/event-stream
@event-stream匹配条件可是只有Accept: text/event-stream
按理说不会发生这种情况。

我刚刚推送了新版本，等打包好后试一下

我容器能拿到主线版吗？

我刚刚推送了新版本，等打包好后试一下

One API v0.5.2-alpha.8解决了。

:2001 {
        import mchs
        handle @event-stream {
                reverse_proxy <IP_ADDRESS> {
                        header_down Content-Type "text/event-stream; charset=utf-8"
                        header_down +Cache-Control no-cache
                }
        }
        handle {
                reverse_proxy <IP_ADDRESS>
        }

}

curl -vi 'http://<IP_ADDRESS>/v1/chat/completions' -X OPTIONS -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0' -H 'Accept: */*' -H 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate' -H 'Access-Control-Request-Method: POST' -H 'Access-Control-Request-Headers: authorization,content-type,x-requested-with' -H 'Referer: http://aio.local:3000/' -H 'Origin: http://aio.local:3000' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'
* processing: http://<IP_ADDRESS>/v1/chat/completions
*   Trying <IP_ADDRESS>:80...
* Connected to <IP_ADDRESS> (<IP_ADDRESS>) port 80
> OPTIONS /v1/chat/completions HTTP/1.1
> Host: <IP_ADDRESS>
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
> Accept: */*
> Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
> Accept-Encoding: gzip, deflate
> Access-Control-Request-Method: POST
> Access-Control-Request-Headers: authorization,content-type,x-requested-with
> Referer: http://aio.local:3000/
> Origin: http://aio.local:3000
> Connection: keep-alive
> Pragma: no-cache
> Cache-Control: no-cache
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
HTTP/1.0 200 OK
< Server: BaseHTTP/0.6 Python/3.9.7
Server: BaseHTTP/0.6 Python/3.9.7
< Date: Sun, 06 Aug 2023 11:45:52 GMT
Date: Sun, 06 Aug 2023 11:45:52 GMT
< Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: content-disposition
Access-Control-Expose-Headers: content-disposition
< Access-Control-Max-Age: 1000
Access-Control-Max-Age: 1000
< Access-Control-Allow-Methods: *
Access-Control-Allow-Methods: *
< Access-Control-Allow-Headers: *
Access-Control-Allow-Headers: *
< Content-type: text/plain
Content-type: text/plain

<
* Closing connection

curl -vi 'http://aio.local:2001/v1/chat/completions' -X OPTIONS -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0' -H 'Accept: */*' -H 'Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3' -H 'Accept-Encoding: gzip, deflate' -H 'Access-Control-Request-Method: POST' -H 'Access-Control-Request-Headers: authorization,content-type,x-requested-with' -H 'Referer: http://aio.local:3000/' -H 'Origin: http://aio.local:3000' -H 'Connection: keep-alive' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache'
* processing: http://aio.local:2001/v1/chat/completions
*   Trying [fe80::4c23:26ff:feda:387a]:2001...
* Connected to aio.local (fe80::4c23:26ff:feda:387a) port 2001
> OPTIONS /v1/chat/completions HTTP/1.1
> Host: aio.local:2001
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/116.0
> Accept: */*
> Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3
> Accept-Encoding: gzip, deflate
> Access-Control-Request-Method: POST
> Access-Control-Request-Headers: authorization,content-type,x-requested-with
> Referer: http://aio.local:3000/
> Origin: http://aio.local:3000
> Connection: keep-alive
> Pragma: no-cache
> Cache-Control: no-cache
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Access-Control-Allow-Headers: *
Access-Control-Allow-Headers: *
< Access-Control-Allow-Methods: *
Access-Control-Allow-Methods: *
< Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: content-disposition
Access-Control-Expose-Headers: content-disposition
< Access-Control-Max-Age: 1000
Access-Control-Max-Age: 1000
< Content-Type: text/plain
Content-Type: text/plain
< Date: Sun, 06 Aug 2023 11:46:03 GMT
Date: Sun, 06 Aug 2023 11:46:03 GMT
< Server: Caddy
Server: Caddy
< Server: BaseHTTP/0.6 Python/3.9.7
Server: BaseHTTP/0.6 Python/3.9.7
< Transfer-Encoding: chunked
Transfer-Encoding: chunked

<
* Connection #0 to host aio.local left intact

不过这个代理就无法处理了。
浏览器里

其实我不太懂你具体的网络和上游设置，不过既然现在有 workaround，那就先不深究了

不反代直接丢one-api里就
podman logs one-api
[SYS] 2023/08/06 - 21:22:01 | One API v0.5.2-alpha.8 started
[SYS] 2023/08/06 - 21:22:01 | SQL_DSN not set, using SQLite as database
[SYS] 2023/08/06 - 21:22:01 | database connected
[SYS] 2023/08/06 - 21:22:01 | database migrated
[SYS] 2023/08/06 - 21:22:01 | REDIS_CONN_STRING not set, Redis is not enabled
[GIN] 2023/08/06 - 21:22:18 | 200 |  1.586014796s |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:23:10 | 401 |      493.61µs |      <IP_ADDRESS> | GET      "/api/channel/1"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:10 | 401 |     140.414µs |      <IP_ADDRESS> | GET      "/api/group/"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:10 | 401 |     182.322µs |      <IP_ADDRESS> | GET      "/api/channel/models"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:11 | 200 |     721.634µs |      <IP_ADDRESS> | GET      "/login?expired=true"
[GIN] 2023/08/06 - 21:23:11 | 200 |     547.934µs |      <IP_ADDRESS> | GET      "/api/status"
2023/08/06 21:23:14 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:14 | 200 |   96.112569ms |      <IP_ADDRESS> | POST     "/api/user/login"
[GIN] 2023/08/06 - 21:23:14 | 200 |     282.045µs |      <IP_ADDRESS> | GET      "/api/home_page_content"
[GIN] 2023/08/06 - 21:23:14 | 200 |     147.222µs |      <IP_ADDRESS> | GET      "/api/notice"
[GIN] 2023/08/06 - 21:23:28 | 200 |    2.571084ms |      <IP_ADDRESS> | GET      "/api/channel/?p=0"
[GIN] 2023/08/06 - 21:23:57 | 200 |  847.590278ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:24:54 | 200 |  835.862915ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"

浏览器请求里，看见一个200的POST请求，但没有响应体。
podman logs one-api
[SYS] 2023/08/06 - 21:22:01 | One API v0.5.2-alpha.8 started
[SYS] 2023/08/06 - 21:22:01 | SQL_DSN not set, using SQLite as database
[SYS] 2023/08/06 - 21:22:01 | database connected
[SYS] 2023/08/06 - 21:22:01 | database migrated
[SYS] 2023/08/06 - 21:22:01 | REDIS_CONN_STRING not set, Redis is not enabled
[GIN] 2023/08/06 - 21:22:18 | 200 |  1.586014796s |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:23:10 | 401 |      493.61µs |      <IP_ADDRESS> | GET      "/api/channel/1"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:10 | 401 |     140.414µs |      <IP_ADDRESS> | GET      "/api/group/"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:10 | 401 |     182.322µs |      <IP_ADDRESS> | GET      "/api/channel/models"
2023/08/06 21:23:10 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:11 | 200 |     721.634µs |      <IP_ADDRESS> | GET      "/login?expired=true"
[GIN] 2023/08/06 - 21:23:11 | 200 |     547.934µs |      <IP_ADDRESS> | GET      "/api/status"
2023/08/06 21:23:14 [sessions] ERROR! securecookie: the value is not valid
[GIN] 2023/08/06 - 21:23:14 | 200 |   96.112569ms |      <IP_ADDRESS> | POST     "/api/user/login"
[GIN] 2023/08/06 - 21:23:14 | 200 |     282.045µs |      <IP_ADDRESS> | GET      "/api/home_page_content"
[GIN] 2023/08/06 - 21:23:14 | 200 |     147.222µs |      <IP_ADDRESS> | GET      "/api/notice"
[GIN] 2023/08/06 - 21:23:28 | 200 |    2.571084ms |      <IP_ADDRESS> | GET      "/api/channel/?p=0"
[GIN] 2023/08/06 - 21:23:57 | 200 |  847.590278ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:24:54 | 200 |  835.862915ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:26:23 | 200 |     885.382µs |      <IP_ADDRESS> | GET      "/api/channel/1"
[GIN] 2023/08/06 - 21:26:23 | 200 |     732.376µs |      <IP_ADDRESS> | GET      "/api/channel/models"
[GIN] 2023/08/06 - 21:26:23 | 200 |     333.635µs |      <IP_ADDRESS> | GET      "/api/group/"
[GIN] 2023/08/06 - 21:26:42 | 200 |   11.037771ms |      <IP_ADDRESS> | PUT      "/api/channel/"
[GIN] 2023/08/06 - 21:27:03 | 200 |   529.98678ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"
[GIN] 2023/08/06 - 21:27:38 | 200 |    2.811687ms |      <IP_ADDRESS> | GET      "/"
[GIN] 2023/08/06 - 21:27:39 | 200 |     484.899µs |      <IP_ADDRESS> | GET      "/api/status"
[GIN] 2023/08/06 - 21:27:39 | 200 |       268.3µs |      <IP_ADDRESS> | GET      "/api/notice"
[GIN] 2023/08/06 - 21:27:39 | 200 |     281.817µs |      <IP_ADDRESS> | GET      "/api/home_page_content"
[GIN] 2023/08/06 - 21:27:42 | 200 |    1.373442ms |      <IP_ADDRESS> | GET      "/api/channel/?p=0"
[GIN] 2023/08/06 - 21:27:47 | 200 |  350.993729ms |      <IP_ADDRESS> | POST     "/v1/chat/completions?path=v1%2Fchat%2Fcompletions"

caddy反代后的http://localhost:2001填到代理地址里也一样。
对ONE-API就是不工作。


Request weights

Can you please release the pretrained weights of KasparNet so it could be used for experiments?

This is exactly what I need

This is exactly what I need


Adding Tournament cpp & WinRT APIs

Adding get_tournaments & get_tournament_details APIs
Added UnitTests for the tournament APIs

@adityatMS,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

:shipit:


importCargoLock: introduce alternative parameter lockFileContents

Motivation for this change
In restricted mode (and therefore with flakes) builtins.readFile may not be the result of builtins.toFile,
making it impossible to use a generated lockFile (with or without IFD),
and thereby causing evaluation to fail if system != builtins.currentSystem on Hydra
so the jobs are not delegated to eligible build machines that support that system.
This is done in a way that avoids rebuilds.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

cc @Mic92 @danieldk this looks pretty harmless.
diff LGTM to me

Test added :slightly_smiling_face:

@ofborg build tests.importCargoLock


vcpkg generates wrong path for windows toolchain

PS C:\Users\test\vcpkg> .\vcpkg integrate install
Applied user-wide integration for this vcpkg root.

All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/Users/test/vcpkg/scripts/buildsystems/vcpkg.cmake"
PS C:\Users\test\vcpkg> .\vcpkg integrate powershell

the slashes are forward when it should be backward for a windows env.

Have you actually tried using forward slashes when passing the -DCMAKE_TOOLCHAIN_FILE parameter? Did you get an error? What error did you get? It works fine for me - even with a combination of forward and backward slashes!
Many places that takes paths in Windows accept forward slashes too. This is especially true in CMake, where it's generally better to use forward slashes for consistency between different platforms. Unless you have a specific problem, this does not seem like a bug to me.

yes I did try,  the build gave different result in cmake with forward and backward slashes.

@aahmed-se
Could you provide the different result and the corresponding DCMAKE_TOOLCHAIN_FILE value to us?

Thanks for posting this issue. Please reopen this issue if it still be a problem for you.


Product sets: basic pdp (@W-12301851@)

For the 1st round of implementation, we aim to have a basic PDP working that supports a product set.
However, the original code assumed that there's only a single product on the page. For multiple products, we'll need to tweak how we save the swatches state (variation attributes) into the page url's search parameters. Otherwise, selecting a size, for example, would select that size for all of the child products.
With this PR.. for a single product, the page url would look something like this (still the same as before):
/product/25502228M?color=JJ0NLD0&size=9MD
For multiple products, the url is like this:
/product/Spring-look-2M?25565826M=color%3DJJGG3XX%26size%3D9LG&25518009M=color%3DJJ9LMXX
(Shopper has selected some swatches for the child products, whose ids are 25565826M and 25518009M)
Types of Changes

[ ] Bug fix (non-breaking change that fixes an issue)
[ ] New feature (non-breaking change that adds functionality)
[ ] Documentation update
[ ] Breaking change (could cause existing functionality to not work as expected)
[ ] Other changes (non-breaking changes that does not fit any of the above)

Breaking changes include:

Removing a public function or component or prop
Adding a required argument to a function
Changing the data type of a function parameter or return value
Adding a new peer dependency to package.json

Changes

(change1)

How to Test-Drive This PR
Example of a PDP with product set: navigate to this list http://localhost:3000/global/en-GB/category/womens-outfits
Checklists

General

[ ] Changes are covered by test cases
[ ] CHANGELOG.md updated with a short description of changes (not required for documentation updates)

Accessibility Compliance
You must check off all items in one of the follow two lists:

[ ] There are no changes to UI

or...

[ ] Changes were tested with a Screen Reader (iOS VoiceOver or Android Talkback) and had no issues
[ ] Changes comply with WCAG 2.0 guidelines levels A and AA
[ ] Changes to common UI patterns and interactions comply with WAI-ARIA best practices

Localization

[ ] Changes include a UI text update in the Retail React App (which requires translation)

@bendvc all right, this PR is ready for another review. Aside from the UI changes, here are some main changes since your last review:

Clearer argument name than isSetProduct: it's now isProductPartOfSet.
Added the parent product to the top of the page
Added-to-cart modal now shows the correct product metadata and correct variant image too


Relax opentracing dependency

The most current package version cannot be used with jaeger_client_python due to conflict in opentracing dependency versions
Jaeger python client has requirement
'opentracing>=1.2.2,<2'

(can be seen here https://github.com/jaegertracing/jaeger-client-python/blob/master/setup.py#L42)
while django_opentracing package has the following one
'opentracing>=1.1,<1.2',

I haven't found any specific code using opentracing dependency, which can be broken with a newer version.

Hey, patch looks correct - would you mind fixing the spaces extra spaces, though? We usually try to not mix style changes with functional ones ;)
As soon as this is done, I will issue a release ;)

Thanks a lot! Will issue a release in the next day(s) ;)

Hey @nothingelsematters7 I just released 0.1.19 to include this change ;)


Fix a bug in XAsyncSockets.py

The bug is in function IsSSL where the _socket object is tested to be an instance of SSLSocket. The correct is to test if the object is of class SSLContext.
https://github.com/jczic/MicroWebSrv2/issues/95
The SSLSocket attribute is not available in micropython for port esp32 and when initiating a simple GET crashes the server.
Unhandled exception in thread started by <bound_method>
Traceback (most recent call last):
File "MicroWebSrv2/libs/XAsyncSockets.py", line 131, in _processWaitEvents
File "MicroWebSrv2/libs/XAsyncSockets.py", line 587, in OnReadyForReading
File "MicroWebSrv2/libs/XAsyncSockets.py", line 830, in IsSSL
AttributeError: 'module' object has no attribute 'SSLSocket'

This is still not entirely fixed, I ran into issues on my ESP32 because SSLSocket is still used a few lines below it.
https://github.com/jczic/MicroWebSrv2/blob/7646c7535a4d1236ac98210a04cbb6ffba1c31bf/MicroWebSrv2/libs/XAsyncSockets.py#L835-L838
Replacing that will SSLContext as well (as actually checked in the function) works for me.

Ok @DracoTomes, that means that in MicroPython you have "SSLContext" as a socket attribute, otherwise the IF wouldn't go any further.
However, self._socket is in no way part of the SSLContext class. I will therefore also test "SSLSocket" as an attribute.
I know that the latest version of MicroPython implements SSL (TLS) with context and asynchronously, because this didn't exist before. But I haven't checked yet.
So I guess you don't use SSL in MicroPython at all?

https://github.com/jczic/MicroWebSrv2/commit/b6f0799d07b36c9ec1b7273908642c77680f2c1f

I'm running the newest 1.22.1 so it's probably something to do with the changes in newer version.

@DracoTomes : But it should work now, shouldn't it?

Oh yeah my bad. After implementing that change everything worked.

👍🏻


Bokeh package (using python-wrapper)

A bokeh package including figure methods and charts.

What I can see:

There are Variant output ports (should probably be Figure?)
Connecting the Figure output from a chart module to a plotting module errors out (actually different types?)
There are lots of ports. Looks like you duplicate ports for the types they accept, but most of these don't make sense or are not needed
tabledata integration? There is no real way to build the data in the format currently expected by bokeh
Usual dataflow problem: connecting same figure multiple times will yield wrong results, and this figure (!= Figure?) module at the top of the pipeline feels weird
"pass plot components to a figure module" instead of "applying plot modules to a figure object"?

There are Variant output ports (should probably be Figure?)

Yes, the common parent of Figure and Chart is Plot.

Connecting the Figure output from a chart module to a plotting module errors out (actually different types?)

Yes, I do not think you can combine charts with figure plotting operations. So we should probably have different types for those.

There are lots of ports. Looks like you duplicate ports for the types they accept, but most of these don't make sense or are not needed

Most properties can be at least an object, list of objects, or reference to a column in a dataframe, so I am not sure which we should remove.

tabledata integration? There is no real way to build the data in the format currently expected by bokeh

We probably need a way to convert tables into dataframes.

Usual dataflow problem: connecting same figure multiple times will yield wrong results, and this figure (!= Figure which crashes) module at the top of the pipeline feels weird
"pass plot components to a figure module" instead of "applying plot modules to a figure object"?

I wanted to use the existing bokeh methods as modules directly, because this is easy to export as a script in the wrapping framework, but this works bad for some libraries, like bokeh and matplotlib and other libraries that are not constructed to represent data flow.
It may be possible (without messing with updateUpstream) to extend the wrapping framework with a construction that works backwards: create a method call module first and connect it to the object module that it will be called on. All execution would happen in the plot module, and there would be no dataflow issues.


LoftQ + Unsloth ?

Reminder

[X] I have read the README and searched the existing issues.

Reproduction
train.py
Expected behavior
No response
System Info
No response
Others
Could you help with instructions on how to use LoftQ with Unsloth (or maybe without)?
I've succesfully ran scripts/loftq_init.py and got the copy of my model with adapter, but I'm not sure what to do with it.
I've tried option --adapter_name_or_path but Unsloth prints warning about adapters use.
That's a snippet from Unsloth docs:
# Do model patching and add fast LoRA weights
model = FastLanguageModel.get_peft_model(
    model,
    ...
    use_rslora = False,  # We support rank stabilized LoRA
    loftq_config = None, # And LoftQ
)

Will it work if I just load LoftQ adapters with CLI parameter?
--adapter_name_or_path /home/loftq/adapters

It should work


(refactor) Utility functions

Signed-off-by: Jerome Simeon<EMAIL_ADDRESS>

Coverage remained the same at 100.0% when pulling da857942b3e9db4421196d887caabaf1be960700 on jeromesimeon:ergo-0.7 into 1721ad12754d80f5b76109f09d463c5c4290e6dd on accordproject:ergo-0.7.


Optimize SQL reformatting

Add a few bits of caching:

Add sub-function to parse_sql with lru_cache, so that repeat calls with the same query are fast.
This saves a lot of processing in N+1 situations.
Cache constructed filter stacks in get_filter_stack().
This avoids recreating all the various sqlparse objects for each query.
Pre-compile the simplification regex.
The re module already uses an internal LRU cache of regexes, but this avoids recompiling if the regex ever drops out of that cache.

Building on top of #1571, this takes run time for the same tested view from ~1100ms to ~950ms, another ~15% saving.

After #1571 is merged, I'd like to rebase this and update the release note.

Thanks! That's awesome.


argument -append: invalid choice: '1' (choose from 0, 1) in sct_process_segmentation

Description
While using sct_process_segmentation, the parameter -append does not recognize 0 or 1, I think it is because 0 and 1 are recognized as string in the input and not as integrers. This was not an issue in anterior versions of SCT.

Steps to Reproduce

SCT v5.0.0

Run sct_process_segmentation on an image with the parameter

-append 1

Expected behavior:
Writing '1' or '0' in the shell as an argument of -append should be a valid choice.
Actual behavior:
(see screnshot above)

thank you for reporting this bug, @sandrinebedard. It might be caused by a regression when @joshuacwnewton refactored the parser?

You're absolutely right, @jcohenadad. The fix is simple, I'll open a PR right now and we can include it in 5.0.1.

Hi @sandrinebedard. v5.0.1 has been released with a fix for this issue included.
Thank you again for reporting this issue, and for helping to improve the quality of SCT. :slightly_smiling_face:


Re-train using Resnet101

Hi, I want to re-train the images using ResNet101
But I got this error:
RuntimeError: Given groups=1, weight of size [512, 1024, 3, 3], expected input[2, 2048, 64, 32] to have 1024 channels, but got 2048 channels instead
I just change this part in spinal_net.py:
self.base_network = resnet.resnet101(pretrained=pretrained)
Do you have any suggestions?
Thank you

You may update resnet.py with the PytorchVersion you are using.

You may update resnet.py with the PytorchVersion you are using.

Hi, I change the PyTorch to 1.1.0, I still got the same error.
Do you have tried to change the ResNet version?
Thank you


Fixes IE11 issue with select losing focus having selected an item.

This pull request includes a

[ x] Bug fix
[ ] New feature
[ ] Translation

The following changes were made

Changed from calling focus on the search input element to the select element.

If this is related to an existing ticket, include a link to it as  #4570 #3332.

I closed the pull request because one of the automated tests failed.

I did more testing and I don't see any issue even if the test fails. The input field might not have focus, but the select has had its focus call and thus everything works.

@ToreOlavKristiansen @jeznag can either of you confirm that this is still an issue in Select2 v4.0.5?  We fixed a more glaring issue with focus in 4.0.4., so I'm not sure if this is just another manifestation of that problem, or a separate issue specific to IE.  Thanks!

@alexweissman it is fixed in v4.0.5

@alexweissman it is improved in v4.0.5, but it is still a problem for multi-select: focus is lost when selecting an item in IE11. It works fine in Chrome.

Alright, I'll merge this in!

Actually, we need to fix the broken build.  If you believe that the failing tests do not reflect accurately on the expected behavior, then we need to change either your code or the tests 😛
I notice that #4958 is handling the focus correctly, so maybe for your solution to work, we just need to add some logic for searchHadFocus?  We can still leave out their check for isTagInput if you believe that is not actually necessary.

I will test some more tomorrow. In my test earlier today I did not alter base.js and it looked like Chrome was ok without it. If that is the case, I will add another pull request.

I tested. We need both changes. I modified to please the unit tests. I also fixed an obvious duplicate text issue in the Norwegian translation.

Awesome, thank you!  Not sure what happened with the Norwegian translation, I must have performed a bad merge conflict resolution 😕

We use the select2 control a lot and really appreciate all your hard work on it. I am glad to contribute. Thanks :)

Merged into develop for the 4.0.6-rc.1 pre-release.

Actually, one more question - did you try just checking searchHadFocus instead of isTagInput?

I did. Then everything appears to be working fine, but the unit tests fail on a check for "search" having focus.

Ah ok, I understand.  Everything is wrapped in if (searchHadFocus) anyway 👍

@ToreOlavKristiansen I'm still seeing a possibly related problem in #3168 - can you take a look?

@alexweissman I do get this issue in IE11. I wouldn't say it is related to the lost focus issue though.
I see that the selected items are cleared first and then IE gets the backspace key event and goes back. Should we check for a backspace key event when clearing the items and prevent it from bubbling up?

We could try that, but I'd like to know why this only seems to affect IE 😕

I see that having used backspace, it looks like the control has focus, but is not possible to start typing in Chrome. So the search textbox does not have focus. IE then probably figures since no input field has focus and goes back when it gets the backspace. The issue could be fixed by calling this.$element.focus(); having cleared the items. Then it is perhaps possible to start typing too.

It would seem that there are other issues related to IE losing focus too easily (#2503, for example).  Maybe it has ADHD 🙂
At any rate, #3394 claims to fix this.  Can you check it out?

No, that does not fix it.
I was able to fix it by adding this code as shown in the image:
```
evt.preventDefault();
var self = this;
window.setTimeout(function () {
self.$element.focus();
}, 0);
![image](https://user-images.githubusercontent.com/7925824/33791455-17a5a29e-dc8c-11e7-88b6-3cfd1334cfb8.png)

The prevent default on the event fixes the IE browser back issue. The focus fixes not being able to start typing for both IE and Chrome.

Interesting...I wonder what #3394 is trying to achieve, then.  Seems like it is doing something similar, but in search.js instead of allowClear.js.

Let me know if you want a pull request for this.

Yes, that would be great!

Here it is: #5161
I made the mistake of including the dist files. Will you be able to sort that out?
I don't use git often. I see that all my changes are included in the pull request, not just the allowClear.js modifications. Please let me know if I am doing something wrong here.

Thanks!  Yes, it would be more helpful if the PR didn't include changes to dist.  However, if they are in a separate commit, I can just cherry-pick the src commits.

@ToreOlavKristiansen The fix you gave in 5161 doesn't work either.


Document if changed files got excluded from build scope

The computation of changed files validates identified changes against the excludeFileList to exclude files from the build.
In verbose mode, the excluded changes should be documented as being excluded from the build list. Add the necessary else fork as well. See:
https://github.com/IBM/dbb-zappbuild/blob/9f2561711cb4adae85376b8513d69b4220f4a9f0/utilities/ImpactUtilities.groovy#L420-L455

Delivered via zAppBuild 3.8.0