[ALLUXIO-3212] Configuration checker integration test

https://alluxio.atlassian.net/browse/ALLUXIO-3212

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19829/Build result: ABORTED[...truncated 4265 lines...][INFO] Alluxio Integration ................................ SUCCESS [  1.616 s][INFO] Alluxio Integration - Mesos ........................ SUCCESS [  6.865 s][INFO] Alluxio Assembly - Server .......................... SUCCESS [  5.478 s][INFO] Alluxio Integration Checker ........................ SUCCESS [ 26.185 s][INFO] Alluxio Core - Client - HDFS ....................... SUCCESS [ 14.715 s][INFO] Alluxio Core - Client - Runtime .................... SUCCESS [ 10.459 s][INFO] Alluxio Integration - FUSE ......................... SUCCESS [ 10.831 s][INFO] Alluxio MiniCluster ................................ SUCCESS [ 48.424 s][INFO] Alluxio Tests ...................................... FAILURE [  01:44 h][INFO] Alluxio Under File System - GCS .................... SKIPPED[INFO] Alluxio Under File System - HDFS ................... SKIPPED[INFO] Alluxio Under File System - Aliyun OSS ............. SKIPPED[INFO] Alluxio Under File System - S3A .................... SKIPPED[INFO] Alluxio Under File System - Swift .................. SKIPPED[INFO] Alluxio Under File System - Microsoft Azure Blob Storage SKIPPED[INFO] Alluxio Integration - YARN ......................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 01:59 h[INFO] Finished at: 2018-05-25T10:01:31-07:00Archiving artifacts[INFO] Final Memory: 145M/2242M[INFO] ------------------------------------------------------------------------
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19830/Build result: ABORTED[...truncated 4269 lines...][INFO] Alluxio Integration ................................ SUCCESS [  1.659 s][INFO] Alluxio Integration - Mesos ........................ SUCCESS [  7.102 s][INFO] Alluxio Assembly - Server .......................... SUCCESS [  5.210 s][INFO] Alluxio Integration Checker ........................ SUCCESS [ 26.200 s][INFO] Alluxio Core - Client - HDFS ....................... SUCCESS [ 14.128 s][INFO] Alluxio Core - Client - Runtime .................... SUCCESS [ 10.434 s][INFO] Alluxio Integration - FUSE ......................... SUCCESS [ 10.637 s][INFO] Alluxio MiniCluster ................................ SUCCESS [ 47.691 s][INFO] Alluxio Tests ...................................... FAILURE [  01:45 h][INFO] Alluxio Under File System - GCS .................... SKIPPED[INFO] Alluxio Under File System - HDFS ................... SKIPPED[INFO] Alluxio Under File System - Aliyun OSS ............. SKIPPED[INFO] Alluxio Under File System - S3A .................... SKIPPED[INFO] Alluxio Under File System - Swift .................. SKIPPED[INFO] Alluxio Under File System - Microsoft Azure Blob Storage SKIPPED[INFO] Alluxio Integration - YARN ......................... SKIPPED[INFO] ------------------------------------------------------------------------[INFO] BUILD FAILURE[INFO] ------------------------------------------------------------------------[INFO] Total time: 01:59 h[INFO] Finished at: 2018-05-25T11:16:27-07:00Archiving artifacts[INFO] Final Memory: 140M/2584M[INFO] ------------------------------------------------------------------------
Test FAILed.

Jenkins, test this please

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19835/Failed Tests: 2org.alluxio:alluxio-tests: 2alluxio.client.fs.FileSystemMasterClientIntegrationTest.masterUnavailablealluxio.client.fs.FileSystemMasterClientIntegrationTest.openClose
Test FAILed.

Jenkins, test this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19840/
Test PASSed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19842/Failed Tests: 1org.alluxio:alluxio-tests: 1alluxio.server.configuration.ConfigCheckerIntegrationTest.MultiMasters
Test FAILed.

Thanks Andrew!
@apc999  I enable the multiProcessCluster to support set node specific master/worker properties and create three multi processes clusters. In each cluster, nodes will have different values for one property (ConsistencyCheckLevel == WARN or ENFORCE). After all the nodes have registered their configuration with the leader master, we get Config Report and check if the report is expected. PTAL, thanks!

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19852/Failed Tests: 5org.alluxio:alluxio-tests: 5alluxio.client.cli.fsadmin.command.ReportCommandIntegrationTest.reportSummaryalluxio.client.meta.MetaMasterIntegrationTest.getMasterInfoWebPortalluxio.server.configuration.ConfigCheckerIntegrationTest.MultiNodesalluxio.server.configuration.ConfigCheckerIntegrationTest.MultiMastersalluxio.server.configuration.ConfigCheckerIntegrationTest.MultiWorkers
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19864/Failed Tests: 2org.alluxio:alluxio-tests: 2alluxio.client.fs.ConcurrentFileSystemMasterCreateTest.concurrentListFilesalluxio.client.fs.ImpersonationIntegrationTest.impersonationGroupAllowed
Test FAILed.

Jenkins, test this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/19865/
Test PASSed.


update dfx version 0.7.2 from 0.7.1

When I didnpm install in motoko/life,following message displayed,
 % npm install

added 3 packages, changed 9 packages, and audited 266 packages in 3s

3 high severity vulnerabilities

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

I did't npm audit fix cuz I couldn't check for dependencies and application behavior.

#104 is same issue about dfx version, he (or her ) may did  npm audit fix and changed some node.js packages version.
I was unaware of his pull request and proceeded to work on it.
Please reflect the pull request in the main branch as it seems okay.

Thanks for trying to fix this. I've independently updated the samples now (#108) so will close this PR.


fix: Select account provider dialog not closing

Description
The solution implemented basically does not toggle openAccountDialog off after selecting a git account until after a successful git account login since AccountSelectionDialog holds the state variable (openGitLogin) for openAccountLoginDialog to stay open
Related Issue

closes #931

Checklist

[x] I read and understood the contributing guide as well as the code of conduct
[x] My changes generate no new warnings
[x] My code builds and runs on my machine
[ ] I documented my code
[ ] Review requested

Screenshots

Note: Pay attention to the top of the recording, this is where I ctrl + up arrow to show that there isn't another account selection dialog hiding behind the preferences window similar to the video in the linked issue
https://user-images.githubusercontent.com/46465568/212588292-cc5984b6-c9c5-4611-a53d-7aac4b829522.mov

@allcontributors add @neilZon for bug


Arm Aarch64 jetson support

Hi team：
When can I compile the arm version of Apollo? Aarch64 or NVIDIA Jetson. thank you.
Or do you have a time plan, about when to support these.

Hi @yufeilongyuan, thanks for your interest in Apollo on ARM64 platforms.
Apollo on ARM64 was still a work-in-progress as of today, since there are still some  issues to fix to get it compiled. Even if compilation problems were all resolved,  making Apollo running on ARM64 boards still needs more work to do.


mqtt status topic sporadically went to offline and receive no updates, other topics are still updated without a problem

Describe the bug
As of version 0.114 maybe some version numbers earlier the evcc mqtt status sporadically wents to offline but the application is still running and other mqtt topics are still updated.
Steps to reproduce

Start evcc
Wait for days sometimes one or two weeks
mqtt topic goes to offline while application still online and other mqtt topics are updated
...

Configuration details
nothing special here

# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7080

log: info
levels:
  cache: error
#  proxy-5200: trace
# unique installation id
plant: 37116dbc07c1e508a3730dbd3a94e1d603da226e639d9daebc1832d03118c510

interval: 10s # control cycle interval

sponsortoken: ***

# sponsors can set telemetry: true to enable anonymous data aggregation
# see https://github.com/evcc-io/evcc/discussions/4554
telemetry: false

#modbusproxy:
#   - port: 5200
#     uri: <IP_ADDRESS>:502
mqtt:
  broker: localhost:1883
  topic: evcc

meters:
- type: template
  template: huawei-dongle-powersensor
  id: 2
  host: <IP_ADDRESS>
  port: 502
  usage: grid
  storageunit: 1
  modbus: tcpip
  name: grid1
- type: template
  template: huawei-dongle-powersensor
  id: 2
  host: <IP_ADDRESS>
  port: 502
  usage: pv
  storageunit: 1
  modbus: tcpip
  name: pv2
- type: template
  template: huawei-dongle-powersensor
  id: 2
  host: <IP_ADDRESS>
  port: 502
  usage: battery
  storageunit: 1
  modbus: tcpip
  name: battery3
- type: template
  template: huawei-dongle
  id: 3
  host: <IP_ADDRESS>
  port: 502
  usage: pv
  modbus: tcpip
  name: pv5
- type: template
  template: huawei-dongle
  id: 1
  host: <IP_ADDRESS>
  port: 502
  usage: pv
  modbus: tcpip
  name: pv6
- name: pv7
  type: custom
  power:
   source: mqtt
   broker: localhost:1883
   topic: Balkonkraftwerk/power
   scale: 1000
chargers:
- type: template
  template: keba
  host: <IP_ADDRESS>
  name: wallbox7

loadpoints:
- title: Garage
  charger: wallbox7
  mode: minpv
  phases: 3
  mincurrent: 6
  maxcurrent: 16
  resetOnDisconnect: true

site:
  title: Mein Zuhause
  meters:
    grid: grid1
    pv:
    - pv2
    - pv5
    - pv6
    - pv7
#    battery:
#    - battery3

Log details
...

What type of operating system are you running?
Linux
Version
evcc version 0.116.3

Unfortunately, nothing we could do without logfile or chance to look at the problem when it happens :(

@andig I have the exact same problem. I could see in the logs that this happens when there was a reconnect of my wifi. This results in the syslog message
avahi-daemon[666]: Registering new address record for <IP_ADDRESS> on wlan0.IPv4.
This is followed by the following entries and from there I have the same behavior as described in this issue.
 Erstens ist der Fehler anders, zweitens fehlen alle relevanten Daten für ein Ticket.


Prevent a possible race condition on config dropdown

Problem: query the index while it is being built is bad
Solution:
If there is an update available, spawn a task that queries the index while blocking new tasks from being started so there is only one task in case there is an update available

Merging with the theoretical bug, will be fixed in a separate PR


feat: Add retirement.psm1

Overview/Summary
Added implementation and tests for the retirement.psm1 module.

retirement.psm1

Get-WAFResourceRetirement
New-WAFResourceRetirementObject
Invoke-AzureRestApi
Get-AzureRestMethodUriPath

retirement.tests.ps1

Related Issues/Work Items

AB#36882

Breaking Changes

None

As part of this pull request I have

[x] Read the Contribution Guide and ensured this PR is compliant with the guide
[x] Checked for duplicate Pull Requests
[x] Associated it with relevant GitHub Issues or ADO Work Items (Internal Only)
[x] Ensured my code/branch is up-to-date with the latest changes in the main branch
[ ] Ensured PR tests are passing
[ ] Performed testing and provided evidence (e.g. screenshot of output) for any changes associated to ARG queries
[ ] Updated relevant and associated documentation (e.g. Contribution Guide, Docs etc.)

@kpoineal - Is this meet your design/expectations? Especially about New-WAFResourceRetirementObject, I implemented it as to create a new retirement object. Please let me know if this implementation does not meet your expectations.

Great job! There are a few things we can discuss but overall this is great. Thank you!


12/13 Publish

Docs Build status updates of commit 0367e1c:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

rd/nishith-pathak.yml
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Update gsuite-group-collection.md

Thanks for opening a Pull Request!
Here's a handy checklist to ensure your PR goes smoothly.

[x] I signed Google's Contributor License Agreement
[x] My code conforms to Google's python style.
[x] My PR at a minimum doesn't decrease unit-test coverage (if applicable).
[x] All of the unit-tests still pass
[x] Running pylint --rcfile=pylintrc passes.

These guidelines and more can be found in our contributing guidelines.

Thanks. I'll hold on including a screenshot until we can decide on screenshots in general with @Tabrarian

Adding cla: yes label, as the PR author is a googler at the time of this PR was created.


chore(deps): upgrade configuration

Upgrades project dependencies. See details in workflow run.

Automatically created by projen via the "upgrade-configuration-k8s-28-main" workflow

⚪ Backport skipped
The pull request was not backported as there were no branches to backport to. If this is a mistake, please apply the desired version labels or run the backport tool manually.
Manual backport
To create the backport manually run:
backport --pr 4172

Questions ?
Please refer to the Backport tool documentation


perf(parser): more efficient number parsing

Follow-on after #3296.
Make parsing binary/octal/hex numeric literals a little more efficient.
These changes all rely on that we know more than the compiler does - that strings passed to these parse_* functions can only contain a certain set of characters.

#3342  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @overlookmotel and the rest of your teammates on  Graphite

@DonIsaac Apologies for code golfing your PR! I got interested after seeing the link to Godbolt you posted in #3296, and wondered if we could push it any further.
Obviously makes little difference in real world as binary/octal/hex literals are rare in JS code, but why not? Though it might inform your approach if you're going to tackle decimal literals too, which are much more common.
I've included Godbolt links showing before/after in the code, if you're interested.

@overlookmotel LGTM

Thanks for reviewing @DonIsaac.


Bug: updateById does not use parameter value

Hi,
https://github.com/themadmrj/chat_ui_kit/blob/3d03ae5de83906d01a4cd78bff2758be2397a0c2/lib/src/utils/controllers.dart#L182
Item here is took from _items, and reinsert few lines after. Modified value pass as parameter is not used.
Can fix it on my futur PR: https://github.com/themadmrj/chat_ui_kit/issues/5#issue-792776713 if you want.

Good find, thnx a lot! It's fine I'll change it.

Good find, thnx a lot! It's fine I'll change it.


Error out when poetry -C argument is not a pyproject directory

Poetry's current handling of the --directory (or -C) argument does not protect against incorrectly specified paths (e.g. misspellings and simple mistakes).
In mono repo projects, and other cases where a parent directory has a pyproject.toml this can lead to commands being run in an unexpected package environment, leading to error prone and difficult to catch behaviour in multi package repositories.
This change retains the default behavior of poetry when no -C argument is specified (i.e. walking up the tree from the current directory) but ensures that the -C argument is valid when it is manually specified.
This prevents incorrectly typed directories from breaking builds & CI scripts, while retaining the current default behaviour, minimising change.
Some tests are also updated where they previously pass paths to pyproject.toml files to the cwd arg, (instead of project directories).

@radoering would you be free to review this?

I am currently busy preparing Poetry 1.8. I'll take a look after that's done. (The corresponding poetry-core has already been released at the beginning of February so you caught an unlucky timing.)

No problem at all. Thx!

We have to be careful not to accidentally introduce a breaking change and therefore evaluate all uses of create_poetry() with cwd != None in poetry-core and poetry:

usage
evaluation
remark

poetry.core.masonry.api (4x)
⚠❓
That could be a dangerous one, since it's the API. I'm not sure if we can assume that poetry-core is never called from a subdirectory.

poetry.console.application
⚠
If directory is not set, we explicitly pass the cwd. I think this PR will introduce an unwanted change in this case. However, we can make a downstream change to just pass None instead.

poetry.console.commands.self.self_command
✅
This one should be safe since we pass the directory of the pyproject.toml.

poetry.inspection.info
✅
This one should be safe since we pass the directory of the pyproject.toml.

poetry.installation.executor
✅
This one should be safe since we pass the directory of the pyproject.toml.

@radoering How can AI help with these concerns? I think the current state of the -C argument is not ideal and leads to significant issues when maintaining a large (i.e. multi-package) mono repo, still I am totally on board with backwards compatibility's important, even when the current implementation does not 100% match the documented (and arguably expected) behaviour.
Looking forward to hear more about the project's needs on this front.
Cheers,
Jay

Don't think this is the correct spot for handling an input validation from the poetry cli.
This should be handled at https://github.com/python-poetry/poetry/blob/d08c75afcc097b3b6a73c704f64f7cebbc2765c1/src/poetry/console/application.py#L123-L131

Sorry @abn , missed your Mar 5th response, that sounds great! I'll have a go when I'm able


message.user is not the actual facebook id

Hi, I am trying to use the facebook user id to get additional user information, but the user id returned from message.user is not the the correct id for that user.

It is because the Messenger platform creates a page-scoped id for each user for every page/bot they message (i.e. each user has a different id for each page).
sender.id or in Botkit's case fb_id is not a Facebook user id.

Check this documentation by Facebook.
This is my code for the same.
var senderId = message.user
getName: function(senderId) {
    request.get({
      headers: { 'content-type': 'application/x-www-form-urlencoded' },
      url: "https://graph.facebook.com/v2.6/" + senderId + "?fields=first_name&access_token=" +PAGE_TOKEN,
    }, function(err, response, body) {
      if (err) {
        return err
      }
      var name = JSON.parse(body).first_name
    });
  }

@alyssayc did that resolve your question?

@webtaculars Hmm not sure how can I match this info. For example in my wordpress instance I use social login I'm saving the app_scoped_id of the user. How can I determine if the chatbot user is the same person? I tried the userprofile trick but couldn't figure it out https://chatbotsmagazine.com/fb-messenger-bot-how-to-identify-a-user-via-page-app-scoped-user-ids-f95b807b7e46#.tb2fvatrj   in this request https://graph.facebook.com/v2.6/me?fields=picture&access_token=<APP_USER_ACCESS_TOKEN> what is the APP_USER_ACCES_TOKEN

You can't match this info because Facebook has (recently) designed the API such that the id of the user messaging your bot is not the same as the facebook id of that user. I.e. this identifier that you receive is only useful for identifying users interacting with your bot. If you need to access the actual facebook profile and other information, you would need to use FB's graph API instead.

Is there a way of getting the Facebook id ? if yes how can I do so ?


Update the libraries

Please update the libraries associated with the plugin
Most of them are deprecated and cause issues
I'm working on a project which has both lodash and underscorejs (latest)
And I've had to place hacks to get things working
:)

Feel free to make a pull request with the changes if you think everyone will benefit from them

Sure :+1:


Add colab demo to readme

Failed to put another demo of deepseek-vl 1.3b. It was fixed in #1427

So, we should add deepseek-vl 1.3b colab demo after lmdeploy released, shouldn't we?

So, we should add deepseek-vl 1.3b colab demo after lmdeploy released, shouldn't we?

Yes, this is the better way. Or, we can hack the codes of v0.3.0.

!pip install nest_asyncio

是不是等我们发新版之后，这个安装就不需要了呢？

So, we should add deepseek-vl 1.3b colab demo after lmdeploy released, shouldn't we?

Yes, this is the better way. Or, we can hack the codes of v0.3.0.

Let's choose the better way

这个 PR 延迟到 v0.4.0 发版之后。
等新版本发布后，验证 "pip install nest_asyncio" 是不是必须

Can we make offline jupter notebook files?

Can we make offline jupter notebook files?

I thought the pipy package could be modified in colab but I did not test it yet.


Upgrade to latest aws-sdk-php

Currently I have a bunch of conflicts trying to install this package :/

I'll try to look into this in the next couple of days.

ec2dns 2.0.1 now uses the latest v2 of aws/aws-sdk-php.

\o/


webrtc_streamer doesn't have attribute tobytes() to convert the captured image to img_bytes and make an API call

I am trying to build a face recognition system and I chose streamlit as my frontend UI to make API requests. I am using webrtc_streamer class to capture image live camera feed  and when I try to capture a frame and convert it into numpy array using cv2.imencode() or even when I try to convert it into image bytes using tobytes() function I am not able to do it because webrtc-streamer class doesn't have tobytes() attribute. Is there any fix such that my image capture from webrtc_streamer will be a numpy array class so that I can make the API call to flask server possible?

def login_page():
    st.title('User Login with Face ID')
    st.write('Use the camera feed below to capture your face image for login.')

     webrtc_streamer(
        key="streamer",
        video_frame_callback=transform,
        sendback_audio=False
    )

    if st.button('Login'):
        # Perform face recognition and login process here
        # Convert the image to bytes
        _, buffer = cv2.imencode('.jpg', image_capture.frame)
        image_bytes = buffer.tobytes()

        # image_bytes = image_capture.frame.tobytes()

        # Send the image to the recognize_face API endpoint
        # Convert the image to JPEG format
        # image_jpg = cv2.imencode('.jpg', image_capture.frame)[1].tobytes()

        # Send the image to the recognize_face API endpoint
        response = requests.post('http://localhost:5000/recognize_face', data = image_bytes)

        # Get the result from the response
        result = response.json()

There is also an alternative method I have tried

class ImageCapture(VideoTransformerBase):
    def __init__(self):
        self.frame = None

    def transform(self, frame):
        img = frame.to_ndarray(format="bgr24")
        return frame

def login_page():
    st.title('User Login with Face ID')
    st.write('Use the camera feed below to capture your face image for login.')

    image_capture = ImageCapture()
    webrtc_streamer(
        key="streamer",
        video_frame_callback=transform,
        sendback_audio=False
    )

    if st.button('Login'):
        # Perform face recognition and login process here

        # image_bytes = image_capture.frame.tobytes()

        # Send the image to the recognize_face API endpoint
        response = requests.post('http://localhost:5000/recognize_face', data = image_bytes)

        # Get the result from the response
        result = response.json()

Both the methods are giving the following errors:

First method Error:
cv2.error: OpenCV(4.9.0) /io/opencv/modules/imgcodecs/src/loadsave.cpp:1121: error: (-215:Assertion failed) !image.empty() in function 'imencode'
Second method Error:
AttributeError: 'WebRtcStreamerContext' object has no attribute 'tobytes'

I think you should walk through the tutorial in the README
In the first place, looks like you can use Streamlit's st.camera_input() for that purpose where you want a single image input to make the request.


Re-add re-broadcasting of transactions upon startup

https://github.com/itchysats/itchysats/pull/665 temporarily removed re-broadcasting from housekeeping due to the changes in the model.
Broadcasting is currently handled by wallet::Actor which doesn't actually align very well with the responsibilities of a wallet (tracking coins and keys to sign transactions).
We want to move this functionality to monitor::Actor which already has the responsibility of connecting to the blockchain interacting with it. monitor::Actor also already has a startup procedure in which it re-hydrates an aggregate from all CFD events to figure out, what needs to be done. Re-broadcasting transactions can nicely be added there IF broadcasting itself is made a responsibility of monitor::Actor.
Solve this issue in two steps:

Move TryBroadcastTransaction from wallet::Actor to monitor::Actor
Implement re-broadcasting of transactions as part of monitor::Actor's startup procedure

@thomaseizinger: What is the plan for the wallet balance? If it currently lives in the wallet::Actor but we're moving broadcasting to the "monitor" actor because it interacts with the blockchain, shouldn't we do the same with the balance?
Furthermore, if the wallet::Actor ends up only doing signing, does it still need to be an actor?

@thomaseizinger: What is the plan for the wallet balance? If it currently lives in the wallet::Actor but we're moving broadcasting to the "monitor" actor because it interacts with the blockchain, shouldn't we do the same with the balance?

Uhm, I think I would draw the line as follows:

A wallet is about tracking ownership of keys and as a result coins, deriving said keys & addresses.
Hiding this ownership behind an abstraction (actor) is useful. It allows us to safely access it concurrently via message passing, plus makes the implementation swappable.
The state of a wallet is secret and must be protected.

Computing the balance requires scanning the blockchain for keys / addresses. In theory, we could use an "offline" wallet from BDK and thus not have any IO in that actor. That would require us to re-implement quite a bit of BDK functionality so not sure if it is worth it.
The broadcasting of TX is literally just a pass-through function call and doesn't need any of the state that is needed for balance + signing. Considering how easy it is to move that one, I think it is worth moving.
Summary: I would keep the balance in wallet::Actor because:

It is convenient to implement that way
Scanning and reporting the balance is not actually part of the wallet::Actor's public API and thus it is not as critical to violate the "what belongs where" consideration here[^1]

[^1]: Putting stuff where it belongs is primarily useful because it allows us to hide implementation details and define coherent modules. Anything that violates this AND shows up in the public API will cause a lot more friction than something that is private. The fact that our wallet scans for new coins in the background and reports this to the UI is completely hidden from the rest of the system. Changing this (and testing for changeability is a good test for encapsulation) would be trivial because almost nothing in the system relies on where this happens only that it happens.


confusing values entry:  logLevel

Describe the bug
values entry: logLevel, specifically switching it  to  debug` does not have any effect and brings confusion to the chart users
To Reproduce
Steps to reproduce the behavior:

Use following values :

...
logLevel: debug
...
env:
  # LDAP_LOGLEVEL: "256"
...

Go execute any query
See logs

Expected behavior
Expected effect: same as when changing log level with  LDAP_LOGLEVEL environment variable
Additional context
looks like e648cf3 has removed this functionality

Hi,
Yeah I agree it's confusing and it's from the old osixia image and is not available now with the Bitnami one.
Would you prefer to have the field remove or still have it instead of the env var ? (And how much configuration room ?)

Hi,
Removing of logLevel would be sufficient to avoid confusion. Log verbosity still can be adjusted in env section


Propagate manual assessments for bugs w/o changes

Added to patch-lib-analyzer to propagate existing manual assessments (affected=false) for bug w/o construct changes (until now it was done for bug w/ construct changes even if no MOD methods/constructors was present). The propagation is done for library ids whose version:

is greater than the one of a library ids assessed as NOT affected,

and is not smaller than the one of a library ids assessed as affected.

[x] Tested just in one case until now.

[ ] Documentation

TODO: To be on the safe side it's better to avoid that affected=false gets propagated across major versions


Request for enthalpy calculation and excess enthalpy

Hello, I have learned the code for enthalpy calculation and excess enthalpy (https://github.com/BioSTEAMDevelopmentGroup/thermosteam/blob/master/thermosteam/free_energy.py), I have two questions about enthalpy calculation and excess enthalpy. Could I consult you about these two questions. Thank you for your help. Wish you a good day.
a)	For the same substance, will the selection of different phase states and reference phase states affect the enthalpy of the substance under specified conditions. For example, the phase state and the reference phase state of substance A can choose any of the liquid, gas or solid state. Does the above choice have any effect on the enthalpy of A under certain pressure and temperature and the specific phase state of A (for example, A is liquid under certain conditions, but it may change into gas after the temperature changes, but the phase state and the reference phase state of A choose only liquid state)? If not, For the existing chemical substances in corn stover model and the chemical substances added by me through bst.Chemical, can their phase states and reference phase states be randomly selected (of course, the reference phase of chemical added by bst. Chemical is always the phase at 25 C at 1 atm)? Will above selection influence the calculation of enthalpy values of the same substance in different phase states under specific conditions (only one phase state and reference phase state is selected)?
b)	For class PretreatmentReactorSystem, I set up a reaction inside XYLAN→Furfural + 2H2O. It seems that excess enthalpy (heat of mixing) was not taken into account when calculating the enthalpy flow in class PretreatmentReactorSystem. Why is excess enthalpy (heat of mixing) not taken into account? Such as the following class PretreatmentReactorSystem code, it seems to has the same Hnet result as 2 (Hf_Water + Cp_average_Water(T-Tref)) + Hf_Furfural + Cp_average_Furfural*(T-Tref) -hf_xylan-Cp_average_Xylan (T-Tref) times the amount of Xylan transformed, but if excess enthalpy (heat of mixing) is taken into account, the above results seem to be different. Because 2 (Hf_Water + Cp_average_Water(T-Tref)) + Hf_Furfural + Cp_average_Furfural(T-Tref) -hf_xylan - Cp_average_Xylan (T-Tref) times the amount of Xylan transformed is calculated as theoretical Hnet (i.e. Hnet when excess enthalpy or heat of mixing is not taken into account). However, there seems to be a heat of mixing when water and furfural are mixed. To illustrate the problem, here is the calculation procedure for Hnet when excess enthalpy is considered, and the class PretreatmentReactorSystem code (seems not to take into account excess enthalpy).
Calculation procedure for Hnet when excess enthalpy is considered:
XYLAN→Furfural + 2H2O
Hf_Water = -285825.0 J/mol
Cp_average_Water = 75.50243498981328 J/mol/K
Hf_Furfural = -201600.0 J/mol
Cp_average_Furfural =<PHONE_NUMBER>693366 J/mol/K
Hf_Xylan = -761906.4 J/mol
Cp_average_Xylan =<PHONE_NUMBER> J/mol/K
T = 373.91
Let's say we only have Xylan in the inlet stream (assuming that the molar flow is 6.16 kmol/h)
The enthalpy flow of inlet stream is : [-761906.4 J/mol+552.24(373.91-298.15)]6.16 kmol/h=-4435623 kJ/h
Theoretical outlet stream enthalpy flow is: [-201600.0+167.02(373.91-298.15)]6.16+[-285825.0+75.50(373.91-298.15)]12.32=-4614806 kJ/h
Theoretical Hnet is: -4614806 kJ/h+4435623kJ/h=-179183 kJ/h
If the excess enthalpy of Furfural and Water in the outlet stream is taken into account (assuming that mixing heat is 380 J/mol), the actual outlet enthalpy flow is: -4614806+380(6.16+12.32)= -4607783.6 kJ/h
Actual Hnet is: -4607783.6++4435623kJ/h=-172161 kJ/h
It seems that actual Hnet is different from theoretical Hnet.
The class PretreatmentReactorSystem code is as follows:
import biosteam as bst
bst.nbtutorial()
from biosteam import Unit
from biosteam import units
from thermosteam import MultiStream
import thermosteam as tmo
from biorefineries import cellulosic
cs = cellulosic.Biorefinery('corn stover ethanol')
chemicals_cs = cs.chemicals
bst.settings.set_thermo(chemicals_cs)
bst.main_flowsheet.set_flowsheet('corn stover_ethanol')
cornstover = bst.Stream(
'Cornstover',
Xylan=6.16,
P=9*101325,
T=100.758+273.15,
)
class PretreatmentReactorSystem(bst.units.design_tools.PressureVessel, Unit):
_N_ins = 1
_N_outs = 2
_graphics = bst.Flash._graphics
_units = {'Residence time': 'hr',
'Reactor volume': 'm3'}
def init(self, ID='', ins=None, outs=(), T=100.758+273.15, V=0, thermo=None,
tau=0.166, V_wf=0.8, length_to_diameter=2,
vessel_material='Stainless steel 316',
vessel_type='Horizontal',
reactions=None,
run_vle=True):
Unit.init(self, ID, ins, outs, thermo)
self._load_components()
vapor, liquid = self.outs
vapor.phase = 'g'
self.T = T
self.V = V
chemicals = self.chemicals
if reactions is None:
self.reactions = ParallelRxn([
#            Reaction definition                 Reactant    Conversion
Rxn('Xylan -> Furfural + 2 H2O',                 'Xylan',    1, chemicals),
# Rxn('Glucan + H2O -> GlucoseOligomer',           'Glucan',   0.0030, chemicals),
# Rxn('Glucan + H2O -> Glucose',                   'Glucan',   0.0990, chemicals),
# Rxn('Glucan -> HMF + 2 H2O',                     'Glucan',   0.0030, chemicals),
# Rxn('Xylan + H2O -> XyloseOligomer',             'Xylan',    0.0240, chemicals),
# Rxn('Xylan + H2O -> Xylose',                     'Xylan',    0.9000, chemicals),
# Rxn('Mannan + H2O -> MannoseOligomer',           'Mannan',   0.0240, chemicals),
# Rxn('Mannan + H2O -> Mannose',                   'Mannan',   0.9000, chemicals),
# Rxn('Mannan -> HMF + 2 H2O',                     'Mannan',   0.0500, chemicals),
# Rxn('Galactan + H2O -> GalactoseOligomer',       'Galactan', 0.0240, chemicals),
# Rxn('Galactan + H2O -> Galactose',               'Galactan', 0.9000, chemicals),
# Rxn('Galactan -> HMF + 2 H2O',                   'Galactan', 0.0500, chemicals),
# Rxn('Arabinan + H2O -> ArabinoseOligomer',       'Arabinan', 0.0240, chemicals),
# Rxn('Arabinan + H2O -> Arabinose',               'Arabinan', 0.9000, chemicals),
# Rxn('Arabinan -> Furfural + 2 H2O',              'Arabinan', 0.0500, chemicals),
# Rxn('Acetate -> AceticAcid',                     'Acetate',  1.0000, chemicals),
# Rxn('Furfural + 3 H2O  -> Tar',                  'Furfural',  1.0000, chemicals),
# Rxn('HMF + 3 H2O  -> 1.2 Tar',                   'HMF',       1.0000, chemicals),
# Rxn('Lignin -> SolubleLignin',                   'Lignin',    0.0500, chemicals),
# Rxn('Sucrose -> HMF + Glucose + 2H2O',           'Sucrose',   1.0000, chemicals)
])
else:
self.reactions = reactions
self.tau = tau
self.V_wf = V_wf
self.length_to_diameter = length_to_diameter
self.vessel_material = vessel_material
self.vessel_type = vessel_type
self.run_vle = run_vle
def _load_components(self):
thermo = self.thermo
self._multistream = MultiStream(None, thermo=thermo)
def _run(self):
feed = self.ins[0]
vapor, liquid = self.outs
liquid.copy_like(feed)
self. Reactions(liquid)
if self.T:
if self.run_vle:
ms = self._multistream
ms.copy_like(liquid)
ms.vle(T=self.T, V=self.V)
vapor.mol[:] = ms.imol['g']
liquid.mol[:] = ms.imol['l']
vapor.T = liquid.T = ms.T
vapor.P = liquid.P = ms.P
else:
liquid.T = self.T
Rxn = tmo.reaction.Reaction
ParallelRxn = tmo.reaction.ParallelReaction
R201 = PretreatmentReactorSystem('R201', cornstover)
A_sys = bst.main_flowsheet.create_system('A_sys')
A_sys.simulate()
R201.Hnet

@zasddsgg, when the state of a chemical is set (e.g., Chemical('Glucose', phase='l')), the reference phase also becomes 'l'. Unfortunately, the heat of formation is not updated automatically. I can introduce an error or a warning so that the user knows when they are setting the state of a Chemical something other than the reference state. In general, a single phase chemical should be at the reference phase.
Regarding heat of solution, it would be nice to have them in biosteam (but we do not yet). Still, heats of solution are usually negligible. Any contributions for heats of solution are certainly welcome.
By the way, I could not find the heat of solution of Furfural online... I have a feeling that 380 J/mol may be high for a liquid substance. Could you let me know your reference?
Thanks,

Thanks for your help.
a)For question a, may I confirm with you if my understanding is correct. When build up my own biorefinery process, the state of the chemicals imported from corn stover ethanol model has been set. So the reference phase of these chemicals has also been set. For chemicals not included in corn stover ethanol model, I will import the chemicals through bst.Chemicals and the state and reference phase of these chemicals is always the phase at 25 C at 1 atm, so the state and reference phase of these chemicals are also set. Do I need to change the phase and reference phase of above chemicals (both imported from corn stover ethanol and bst.Chemicals), or if I just use the default settings, will the right enthalpy be calculated?
b)In addition, how do I know if a single-phase chemical is in the reference phase that it would be. Besides, take ethanol, for example, the state and reference phase of ethanol is set to be liquid in the default settings, but in the process, ethanol may be converted into gaseous such as in Flash, so for both liquid state and gaseous state of ethanol in the process, will the right enthalpy of both liquid state and gaseous state of ethanol be calculated according to the default settings, in which the state of ethanol is set to be liquid.
c)For excess enthalpy (it is not heat of solution), just like in https://github.com/BioSTEAMDevelopmentGroup/thermosteam/blob/master/thermosteam/free_energy.py, it seems BioSTEAM has set excess enthalpy, but for reaction XYLAN→Furfural + 2H2O in class PretreatmentReactorSystem, it seems that excess enthalpy is not included when calculating Hnet, because the Hnet for class PretreatmentReactorSystem was the same as the results calculated according to 2 (Hf_Water + Cp_average_Water(T-Tref)) + Hf_Furfural + Cp_average_Furfural*(T-Tref) -hf_xylan-Cp_average_Xylan (T-Tref) times the amount of Xylan transformed. If excess enthalpy (enthalpy change in mixing process of H2O and Furfural) is included, like 380 J/mol (it is obtained in corn stover Aspen model built by Humbird et, al.), Hnet of class PretreatmentReactorSystem seems to be different from 2 (Hf_Water + Cp_average_Water(T-Tref)) + Hf_Furfural + Cp_average_Furfural*(T-Tref) -hf_xylan-Cp_average_Xylan (T-Tref) times the amount of Xylan transformed. I am a little confused about that. Could I consult you about that.
Thanks for your help. Wish you a good day.

@zasddsgg
a) The right enthalpy will always be calculated. Again, no need to change the reference phase. Setting the state of a chemical is only make sense if it does not go through any phase equilibrium.
b) Ethanol is not a single-phase chemical. The reference phase is an attribute: https://biosteam.readthedocs.io/en/latest/API/thermosteam/Chemical.html#thermosteam.Chemical.phase_ref
>>> from biorefineries.cellulosic import create_cellulosic_ethanol_chemicals
>>> chems = create_cellulosic_ethanol_chemicals()
>>> assert  chems.Ethanol.locked_state is None
>>> for phase in ('g', 'l', 's'): assert hasattr(chems.Ethanol.H, phase)

c)  Excess enthalpy for a pure component chemical is due to low temperatures and high pressures, nothing to do with solutions. I recommend double checking if that value (380 J/mol) is actually the heat of solution and how does Aspen calculate it.
Thanks,

One more thing, to include excess pure-component energies you can run the following:
bst.settings.set_thermo(chemicals)
bst.settings.mixture.include_excess_energies = True

Here is a longer example and with detailed explanations:
https://biosteam.readthedocs.io/en/latest/tutorial/Convergence.html#Importance-of-thermodynamic-property-package
You also need to run the following for including pure-component excess energies in utilities:
for i in bst.settings.cooling_agents + bst.settings.heating_agents: i.mixture.include_excess_energies = True

Thanks,

Thanks for your help.
a) May I confirm with you if my understanding is correct. For chemicals involved in phase equilibrium, such as water and ethanol, the phase and reference phase is the chemical's phase at 25 C and 1atm. For chemicals in corn stover ethanol model or impoted through bst.Chemicals, just use their default settings. For chemicals that don't participate in phase equilibrium, namely the single-phase chemical, if they are in the corn stover ethanol model or imported through bst.Chemicals,  just use the default phase state and reference phase state (the selection of solid or liquid state does not matter). Therefore, for all the chemicals, whether in corn stover ethanol model or imported through bst.Chemicals, I do not need to modify the phase state and reference state, just use the default setting.
b) The calculation method in Aspen is:
HLMX=∑_i▒x_i  HL_i+HLXS
HLMX is liquid mixture molar enthalpy, HL is liquid pure component molar enthalpy, HLXS is liquid mixture molar excess enthalpy. HLXS is calculated directly from the activity coefficient model.
HLMX times the molar flow of the liquid mixture, so the enthalpy flow of the liquid mixture is obtained, then plus the enthalpy flow of a solid, like XYLAN, and enthalpy flow of the stream is obtained.
So (∑_i▒x_i  HL_i+HLXS)* molar flow of the liquid mixture, namely liquid mixture enthalpy flow, is the pure component enthalpy flow plus liquid mixture excess enthalpy flow, but seems to be in BioSTEAM, only the pure component enthalpy flow is computed instead of considering liquid mixture excess enthalpy flow, this is the difference between BioSTEAM and Aspen plus.
To illustrate this problem, I have selected two feed cases.
The first case, the feed stream was only XYLAN, 6.16 kmol/h, and the outlet stream was 6.16 kmol/h Furfural and 12.32 kmol/h H2O.
The HLXS calculated by Aspen is 380 J/mol.
So liquid mixture excess enthalpy flow is 380*（6.16+12.32）=7022.4 kJ/h
Plus the enthalpy flow change of the pure component in the inlet and outlet stream, namely -179183 kJ/h (in this part, Aspen and BioSTEAM calculated the same results), the Hnet is -179183+7022.4=-172160.6 kJ/h
The second case.
The feed is 1000 kmol/h water, 6.16kmol /h XYLAN, then the outlet strean is 6.16kmol /h Furfural and 1012.32kmol /h H2O.
The HLXS calculated by Aspen was 68.8 J/mol.
So is liquid mixture excess enthalpy flow is 68.8*（1012.32+6.16）=70071 kJ/h.
Plus the enthalpy flow change of the pure component in the inlet and outlet stream, namely -179183 kJ/h (in this part, Aspen and BioSTEAM calculated the same results), the Hnet is -179183+70071=-109112 kJ/h.
In both cases, Hnet calculated by BioSTEAM is -179183 kJ/h.
It seems to be caused by liquid mixture excess enthalpy flow. Could I ask you if there is any setting for calculating liquid mixture excess enthalpy flow in BioSTEAM.
c) I added bst.settings.mixture.include_excess_energies = True in the code, calculated Hnet is still - 179183 kJ/h. I have a little confused for this, could I consult you for this.
Thanks for your help. Wish you a good day.

Thanks for your help.
a) For Hnet results between Aspen and BioSTEAM.
For both cases, since the feed consists of either Xylan or Xylan and water (only water is liquid and Xylan is solid), so excess mixture enthalpy flow in the inlet is 0. And the outlet stream contains Furfural and water, so there is excess mixture enthalpy flow. Therefore, the Hnet differences in the two feed conditions ultimately come from excess mixture enthalpy flow of the outlet stream.
In fact, Cp_average_XYLAN (solid state) simulated by Aspen is 174.45 J/mol/K, Hf_Xylan (25 ℃，solid state) -762420 J/mol, Cp_average_Furfural (liquid state) 155.44 J/mol/K，Hf_Furfural (25 ℃，liquid state) -199560 J/mol, Cp_average_Water (liquid state) 77.7 J/mol/K，Hf_Water (25 ℃，liquid state) -285800 J/mol.
In BioSTEAM, Cp_average_XYLAN (solid state) 552.24 J/mol/K，Hf_Xylan (25℃，solid state) -761906.4 J/mol, Cp_average_Furfural (liquid state) 167.02 J/mol/K，Hf_Furfural (25℃，liquid state)为-201600 J/mol, Cp_average_Water (liquid state) 75.50 J/mol/K，Hf_Water (25℃，liquid state) -285825 J/mol
It seems that the Cp_average_XYLAN (solid state) is quite different.
If the excess mixture enthalpy flow is excluded, the Hnet is calculated according to the Cp_average and Hf of Aspen and BioSTEAM respectively.
BioSTEAM calculated a Hnet of -179183 kJ/h.
Aspen calculated a Hnet of 9797.13 kJ/h.
This difference is mainly caused by Cp_average and Hf of each substance between BioSTEAM and Aspen.
I have tried the following two cases, and the temperature change is 75.758:
If Cp_average_XYLAN is changed from 552.24 of BioSTEAM to 174.45 (obtained in Aspen), and the remaining Cp_average and Hf parameters of BioSTEAM are adopted, Hnet is 2*( -285825+ 75.5075.758)+（-201600+167.0275.758）-（-761906.4+174.4575.758）= -2876.63 kJ/h.
If the Cp_average and Hf parameters of each substance obtained by Aspen are adopted, the Hnet calculated is 2( -285800+ 77.775.758)+（-199560+155.4475.758）-（-762420+174.45*75.758）= 9808.65 kJ/h
On this basis, if excess mixture enthalpy flow is taken into account, BioSTEAM's Hnet is still -179183 kJ/h.
For Aspen, if there is only 6.16 kmol/h Xylan in the feed, the Hnet is 9797.13+7022.4 (excess mixture enthalpy flow)=16819.53 kJ/h.
If the feed is 1000 kmol/h H2O and 6.16 kmol/h Xylan, then Hnet is 9797.13+70071 (excess mixture enthalpy flow)=79868 kJ/h.
The excess mixture enthalpy flow seems to have a significant impact on Hnet.
b) May I confirm with you if my understanding is correct. In saccharification.py of corn stover ethanol model ((https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/systems/fermentation/saccharification.py), energy_balance = False was set, this and bst.settings.mixture.include_excess_energies = False is play the same role, that is do not consider pure component excess energies for the gas phase. Since the corn stover model does not involve gas under low temperature and high pressure, so energy_balance=False is set, indicating that pure component excess energies for the gas phase is not considered. In this way, compared with energy_balance=True, it's the same calculation result, but it saves calculation time.
c) Excess energy will be taken into account for low temperature and high pressure gases, could I consult you what is the specific range of low temperatures and high pressures. For energy_balance=False set in saccharification.py, does that mean the default setting is energy_balance=True? If energy_balance=False is not set, will the emulation be performed at energy_balance=True? When the gas under low temperature and high pressure is not involved, energy_balance= False and energy_balance=True have no effect on the result, so If want to save calculation time, I need to manually set energy_balance=False.
Thanks for your help. Wish you a good day.

@zasddsgg.
a) Thanks so much for all the details, I will update Cp for Xylan, Glucan, and similar components. I plan on including excess mixture energies through activity coefficients by the end of the year.
b and c) When "energy_balance" is True, it means to also conserve enthalpy by solving for the temperature of the effluent. There is no need to perform an energy balance if the process is not adiabatic (which is the case for the Saccharification unit). Excess energies should be taken into account for low temperature and high pressure (10 atm or more, but not sure at what temperature) gases. You'll need to set bst.settings.mixture.include_excess_energies = True on your own to account for residual (excess) enthalpies for a gas.
Thanks,

Thank you very much for your help.
a) I carefully compared Cp and H of various chemicals in BioSTEAM and Aspen, and the results are as follows:
The values obtained by Aspen are in parentheses. T = 373.91，Tref = 298.15, Hf is at 25℃. The phase states of matter are also in parentheses.
Hf_Water(l)= -285825.0 J/mol（-285800），Cp_average_Water(l)= 75.50243498981328 J/mol/K（77.70）
Hf_Glucan(s) = -975708.8 J/mol（-976360），Cp_average_Glucan(s) = 677.747708 J/mol/K（45.75）
Hf_GlucoseOligomer(l) = -975708.8 J/mol（-994260），Cp_average_GlucoseOligomer(l) =<PHONE_NUMBER>0000004 J/mol/K(502.58)
Hf_Glucose(l) = -1271100.0 J/mol（-1280000），Cp_average_Glucose(l) =<PHONE_NUMBER>0000004 J/mol/K（502.58）
Hf_HMF(l) = 0 J/mol（-417330），Cp_average_HMF(l) =<PHONE_NUMBER>5967004 J/mol/K(230.13)
Hf_Xylan(s) = -761906.4 J/mol（-762420），Cp_average_Xylan(s) =<PHONE_NUMBER> J/mol/K（174.45）
Hf_XyloseOligomer(l) = -761906.4 J/mol（-791380），Cp_average_XyloseOligomer(l) = 204.77732 J/mol/K(476.67)
Hf_Xylose(l) = -1043700.0 J/mol（-1070000），Cp_average_Xylose(l) = 204.77732 J/mol/K（458.79）
Hf_Furfural(l) = -201600.0 J/mol（-199560），Cp_average_Furfural(l) =<PHONE_NUMBER>693366 J/mol/K(155.44)
Hf_Mannan(s) = -975708.8 J/mol（-976360），Cp_average_Mannan(s) = 677.747708 J/mol/K（45.75）
Hf_MannoseOligomer(l) = -975708.8 J/mol（-994260），Cp_average_MannoseOligomer(l) =<PHONE_NUMBER>0000004 J/mol/K(502.58)
Hf_Mannose(l) = -1271100.0 J/mol（-1280000），Cp_average_Mannose(l) =<PHONE_NUMBER>0000004 J/mol/K（502.58）
Hf_Galactan(s) = -975708.8 J/mol（-976360），Cp_average_Galactan(s) = 677.747708 J/mol/K（45.75）
Hf_GalactoseOligomer(l) = -975708.8 J/mol（-994260），Cp_average_GalactoseOligomer(l) =<PHONE_NUMBER>0000004 J/mol/K(502.58)
Hf_Galactose(l) = -1271100.0 J/mol（-1280000），Cp_average_Galactose(l) =<PHONE_NUMBER>0000004 J/mol/K（502.58）
Hf_Arabinan(s) = -761906.4 J/mol（-762420），Cp_average_Arabinan(s) =<PHONE_NUMBER> J/mol/K（174.45）
Hf_ArabinoseOligomer(l) = -761906.4 J/mol（-791380），Cp_average_ArabinoseOligomer(l)= 204.77732 J/mol/K(476.67)
Hf_Arabinose(l) = -1043700.0 J/mol（-1070000），Cp_average_Arabinose(l) = 204.77732 J/mol/K（476.67）
Hf_Acetate(s) = -103373.0 J/mol（-456330），Cp_average_Acetate(s) =<PHONE_NUMBER>0946124 J/mol/K（121.18）
Hf_AceticAcid(l) = -483580.0 J/mol（-457110），Cp_average_AceticAcid(l) =<PHONE_NUMBER>0946124 J/mol/K(80.50)
Hf_Tar(s) = -1043700.0 J/mol（-762420），Cp_average_Tar(s) = 204.77732 J/mol/K（174.45）
Hf_Lignin(s) = -452909.63200000004 J/mol（-453210），Cp_average_Lignin(s) =<PHONE_NUMBER>7999998 J/mol/K（207.46）
Hf_SolubleLignin(l) = -452909.63200000004 J/mol（-454840），Cp_average_SolubleLignin(l) =<PHONE_NUMBER>7999998 J/mol/K(269.79)
Hf_Sucrose(l) = -2221200.0 J/mol（-2010000），Cp_average_Sucrose(l) =<PHONE_NUMBER>2 J/mol/K (444.23)
Hf_Cellobiose(l) = -2012085.6 J/mol（-2010000）,Cp_average_Cellobiose(l) = 1430.7992863999998 J/mol/K(444.23)
Hf_NH3(g) = -45558.0 J/mol（-45898）,Cp_average_NH3(g) = -185.88026253631068 J/mol/K（36.71）
Hf_H2SO4(l) = -814000.0 J/mol（-793360）,Cp_average_H2SO4(l) =<PHONE_NUMBER>3878466 J/mol/K（89.56）
Hf_AmmoniumAcetate(l)= 0 J/mol（-647710）,Cp_average_AmmoniumAcetate(l) =<PHONE_NUMBER>5147285 J/mol/K（61.07）
Hf_AmmoniumSulfate(l) = -1180900.0 J/mol（-1210000）,Cp_average_AmmoniumSulfate(l) =<PHONE_NUMBER>8000002 J/mol/K（204.66）
Hf_Ethanol(l) = -277030.0 J/mol（-277510）,Cp_average_Ethanol(l) =<PHONE_NUMBER>761024 J/mol/K（139.76）
Hf_CO2(g) = -393474.0 J/mol（-393510）,Cp_average_CO2(g) = 38.7888690827739 J/mol/K（39.04）
Hf_DAP(l) = -1566900.0 J/mol（-1190000）,Cp_average_DAP(l) = 188.0 J/mol/K（61.07）
Hf_Protein(s) = -73713.712 J/mol（-73763）,Cp_average_Protein(s) = 95.46859920399999 J/mol/K（35.53）
Hf_CSL = -328408.04000000004 J/mol, Cp_average_CSL =<PHONE_NUMBER>0099997 J/mol/K
Hf_Z_mobilis(s) = -130412.72776000001 J/mol（-130500）,Cp_average_Z_mobilis(s) =<PHONE_NUMBER>5999999 J/mol/K（38.41）
Hf_Glycerol(l) = -668600.0 J/mol（-667410）,Cp_average_Glycerol(l) =<PHONE_NUMBER>860894 J/mol/K(204.08)
Hf_O2(g) = 0 J/mol（-3.73E-12）,Cp_average_O2(g) = 29.60447195902491 J/mol/K （29.57）
Hf_SuccinicAcid(l) = -940260.0 J/mol（-919790）,Cp_average_SuccinicAcid(l) =<PHONE_NUMBER>286106 J/mol/K（260.08）
Hf_Xylitol(l) = -1017318.68 J/mol（-1040000）,Cp_average_Xylitol(l) =<PHONE_NUMBER>999999 J/mol/K(285.08)
Hf_LacticAcid(l) = -668268.448 J/mol（-690500）,Cp_average_LacticAcid(l) =<PHONE_NUMBER>926937 J/mol/K(288.58)
The following parameters seem to vary considerably:
Cp_average_Glucan(s)，Hf_GlucoseOligomer(l)，Cp_average_GlucoseOligomer(l)，Hf_Glucose(l)
，Cp_average_Glucose(l)，Hf_HMF(l)，Cp_average_HMF(l)，Cp_average_Xylan(s)，Hf_XyloseOligomer(l)，Cp_average_XyloseOligomer(l)，Hf_Xylose(l)，Cp_average_Xylose(l), Hf_Furfural(l)，Cp_average_Furfural(l)，Cp_average_Mannan(s)，Hf_MannoseOligomer(l)，Cp_average_MannoseOligomer(l)，Hf_Mannose(l)，Cp_average_Mannose(l), Hf_Galactan(s)，Cp_average_Galactan(s), Hf_GalactoseOligomer(l)，Cp_average_GalactoseOligomer(l), Hf_Galactose(l)，Cp_average_Galactose(l) , Hf_Arabinan(s)，Cp_average_Arabinan(s) , Cp_average_ArabinoseOligomer(l)，Hf_Arabinose(l)，Cp_average_Arabinose(l) ，Hf_Acetate(s，Cp_average_Acetate(s)，Hf_AceticAcid(l)，Cp_average_AceticAcid(l) ，Hf_Tar(s)，Cp_average_Tar(s) ，Hf_SolubleLignin(l)，Cp_average_SolubleLignin(l), Hf_Sucrose(l)，Cp_average_Sucrose(l) , Hf_Cellobiose(l),Cp_average_Cellobiose(l) , Hf_NH3(g),Cp_average_NH3(g), Hf_H2SO4(l),Cp_average_H2SO4(l), Hf_AmmoniumAcetate(l),Cp_average_AmmoniumAcetate(l), Hf_AmmoniumSulfate(l),Cp_average_AmmoniumSulfate(l), Hf_Ethanol(l),Cp_average_Ethanol(l) , Hf_DAP(l),Cp_average_DAP(l) , Cp_average_Protein(s), Cp_average_Z_mobilis(s) , Hf_Glycerol(l),Cp_average_Glycerol(l), Hf_SuccinicAcid(l) ,Cp_average_SuccinicAcid(l) , Hf_Xylitol(l),Cp_average_Xylitol(l) , Hf_LacticAcid(l),Cp_average_LacticAcid(l)
The above differences seem to lead to Hnet differences, for example, for Xylan -> Furfural + 2 H2O, even if Cp_average_Xylan adopts Aspen's value of 174.45 J/mol/K, for the remaining chemicals, Hf and Cp_average_, using BioSTEAM's values, the calculated Hnet is -2876.63 kJ/h, while Aspen's Hnet is 9797.13 kJ/h. This difference seems to be due to the differences between BioSTEAM and Aspen in Hf_Xylan, Hf_ Furfural, Hf_ H2O, Cp_average_ Furfural, Cp_average_ H2O. This seemingly small difference between Hf and Cp ultimately results different Hnet between BioSTEAM and Aspen，in the same reaction, with BioSTEAM's Hnet being exothermic while Aspen's endothermic (even if the excess mixture enthalpy flow is excluded). I am a little confused for that.
Could you let me know the source of BioSTEAM's data on Hf and Cp_average? Because the difference between Hf and Cp_average seems to lead to different Hnet of each reaction, which ultimately results in a little big difference between BioSTEAM's calculated results and Aspen's.
b) May I confirm with you if my understanding is correct. Energy_balance is not the same as excess energies. Energy_balance refers to the equivalence of import and export enthalpy, namely whether the unit is adiabatic. Excess energies means that excess energies should be taken into account for gas in low temperature and high pressure. Set either Energy_balance=True or self.reactions.adiabatic_reaction is all OK because they plays the same role. I don't need to set both because they are all guaranteed to be adiabatic.
c) Is Energy_balance=True the default setting for all units?
Thanks for your help. Wish you a good day.

@zasddsgg,
a) A lot of the lignocellulosic heats of formation are taken directly from Humbird's 2011 corn stover report. I recently updated the heat capacities of lignocellulosic components to 1.364 J/g/K (which is common at 25C), but in the future it may be updated further to be more temperature dependent (https://www.sciencedirect.com/science/article/pii/S0016236113006856#f0005). The heat capacities listed in your aspen model seem to be too high (around 2.7 J/g/K?).

For references to heat capacity models, they are all listed here: https://thermo.readthedocs.io/thermo.heat_capacity.html. You'll need to check what model is being used for each chemical.
For references to heats of formation, they are all listed here: https://chemicals.readthedocs.io/chemicals.reaction.html

Also your calculation of the average heat capacity in BioSTEAM is incorrect for some chemicals. I hope you are not using the previous formulation I used which is only valid for components with a liquid reference phase. The following should work for all chemicals:
>>> import biosteam as bst
>>> bst.Chemical('SuccinicAcid').Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15)
182.12947374101495

b) Almost correct: if your unit is adiabatic, you should use the adiabatic_reaction method. The default for mixing is energy_balance=True.
c) Unit objects in general do not have have a energy_balance attribute. The energy_balance parameter is only for the Stream mix_from method. energy_balance=False is only used where it makes sense and is not an option for Unit objects.
Thanks,

Thank you very much for your help.
a)	Could I consult you is there a problem with the enthalpy I listed above obtained from the formula (call it formula a later) you used before?
b)	I did use the formula (formula a) you used before, but if there was a problem in the calculated heat capacity, why was the Hnet calculated for each reaction in the pretreatment reactor with the formula (formula a) the same as that in the class PretreatmentReactorSystem?
c)	I compared the Hf Settings in chemicals.py (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/chemicals.py) and the following several chemicals seem to be inconsistent with Humbird's 2011 corn stover report:
GlucoseOligomer’s Hf is -2332004.184=-975708.8 J/mol, while corn stover report is -192875.344.184=-806990.42 J/mol.
XyloseOligomer’s Hf is -1821004.184=-761906.4J/mol, while corn stover report is -149412.584.184=-625142.23J/mol
Xylose's Hf is called directly via tmo.Chemical, is -1043700 J/mol, while corn stover report is -216752.654.184=906893.09 J/mol
HMF's Hf is 0，while corn stover report is -79774.534.184=-333776.63 J/mol
d)	I used bst.Chemical('SuccinicAcid').Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15) (denoted as formula b) to calculate Cp of each substance:
For the following chemicals whose reference phase states are liquid state, the values of Cp obtained by formula b and formula a are different. Could I consult you which formula is going to work out? The values obtained by formula a are in parentheses.
Glucan, 302.66（677.75），lignin, 2537.07（207.53），Cellobiose，569.63（1430.8），Xylitol，270.63（635.97）
For the substance phase_ref='s' below, which one is right, formula b or formula a? The value obtained by formula a is in parentheses.
Glucose，302.66（245.73），Xylose，252.22（204.78），Mannose，302.66（245.73），Sucrose，569.63（466.89），AmmoniumAcetate，144.01（114.57），AmmoniumSulfate，197.19（180.24），SuccinicAcid，182.13（516.46）
For the substance phase_ref='g' below, which one is right, formula b or formula a? The value obtained by formula a is in parentheses.
NH3，88.52（-185.88），CO2，11526（38.79），O2, 33.86（29.6）
For the chemicals whose reference phase is the gas state, is the Cp_average calculated by formula b refers to the Cp_average of chemicals in the gas phase or liquid state?
For the chemicals whose reference phase is the liquid state, is the Cp_average calculated by formula b refers to the Cp_average of chemicals in the solid phase or liquid state?
For the chemicals whose reference phase is the solid state, is the Cp_average calculated by formula b refers to the Cp_average of chemicals in the solid phase or liquid state?
e)	For chemicals in corn stover ethanol model and imported through bst.Chemicals, how to check the Hf and Cp_average of chemicals?
f)	For Cp_average, if view Cp_average by formula b, is Cp_average obtained by formula b refers to the Cp_average of chemicals in the liquid state (It doesn't matter if the reference phase of chemical is liquid or solid or gas state)
g)	For formula b, I encounter the following error:
bst.Chemical('GlucoseOligomer').Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15)：Cause an error，LookupError: chemical 'GlucoseOligomer' not recognized.
For Xylan, XyloseOligomer, MannoseOligomer, Galactan, GalactoseOligomer, Arabinan, ArabinoseOligomer, Tar, SolubleLignin, DAP, Protein, CSL, and Z_mobilis are also the same errors.
For the above error, I used the chemicals in the corn stover ethanol model.
chemicals = cs.create_cellulosic_ethanol_chemicals()
chemicals.GlucoseOligomer.Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15)
But cause an error, AttributeError: 'HeatCapacitySolid' object has no attribute 'l'.
chemicals.Xylan.Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15) also cause error, AttributeError: 'HeatCapacityLiquid' object has no attribute 'l'
bst.Chemical('Mannan').Cn.l.T_dependent_property_integral(298.15, 373.15) / (373.15 - 298.15) also cause error, ValueError: math domain error
Could I consult you some suggestions for above errors?
h)	The Cp of Glucan set by default in chemical. py is 1.364 J/g/K, and 220 J/mol/K is obtained by multiplying its molecular weight 162g/mol, which is different from the Cp obtained by formula a (677) and formula b (302). The same is true for Xylitol, 1.364152=207 J/mol/K. It's a different Cp than formula a (636) and formula b (270). Also, Cellobiose, 1.364342=467 J/mol/K, different from formula a (1430) and formula b (570). Also, Glucose, 1.364*180=246 J/mol/K, different from formula b (302).
i)	Like Xylan and Glucose, BioSTEAM set the Xylan reference phase l, Glucose reference phase s, if I want to compare the difference in Hf and Cp_average of chemicals in class PretreatmentReactorSystem or fermentation system, between BioSTEAM and Aspen. For chemicals whose reference phase are l, such as Xylan, should I compare the Hf and Cp_average of these chemicals in liquid state or solid state (For different states of the same chemical, the chemical’s Hf and Cp_average seems to be different)? For chemicals whose reference phase are s, such as Glucose, should I compare Hf and Cp_average of these chemicals in liquid state or solid state? (Because Xylan in Aspen is solid state and Glucose is dissolved state)
j)	For class PretreatmentReactorSystem or fermentation system of XYLAN, Glucan this kind of material, should I view Hf and Cp_average of chemical in solid state (even if the chemical’s reference phase is liquid state). For substances like Glucose, xylose, should I check the Hf and Cp_average of them in the liquid state (even if the reference phase state is solid). For NH3, CO2 and O2, should I check the Hf and Cp_average of them in the gaseous state.
k)	The molecular weight of Glucan in corn stover ethanol model and Glucan in bst.Chemical seems to be different. The molecular weight of Glucan in corn stover ethanol model is 162, and that is 180 in bst.Chemical. Hf is also different. Hf of Glucan in corn stover ethanol model is -9.7571e+05 J/mol, which is consistent with the corn stover report, while the Hf of bst.Chemical('Glucan') is -1.4922e+06 J/mol.
I'm sorry for all the questions, because I think enthalpy and Cp are important for the accuracy of the results.
Thanks for your help. Wish you a good day.

Thank you very much for your advice and help. I have installed the latest biorefinery-park on github and checked the Cp_average and Hf of relevant components. May I confirm with you whether the Cp_average and Hf I checked and my understanding below are correct? Thanks for your help.
All the chemicals are imported via chemicals = cs.create_cellulosic_ethanol_chemicals().
For Cp_average：J/mol/K
Glucan，Mannan，Galactan，221.16
Xylan，Arabinan，180.20
Lignin，SolubleLignin，Xylitol，207.53
GlucoseOligomer，MannoseOligomer，GalactoseOligomer，Glucose，Mannose，Galactose，CellulaseNutrients，Extract，245.73
XyloseOligomer，ArabinoseOligomer，Xylose，Arabinose，Tar，204.78
Sucrose，466.89
CaSO4，185.70
AmmoniumSulfate，180.24
Cellulose，221.16
Cellobiose，466.89
The Cp_average of the above chemicals is obtained by chemical.Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) (when view Cp_average of single_phase chemical，no phase (l,g,s) between above chemical.Cn and T), since the above chemicals have been set Cp_cellulosic=1.364, therefore, Cp_average can also be viewed by chemical.Cn(298.15).
Water (l)，75.50
Furfural (l)，167.02
Ethanol(l), 130.66
Glycerol(l), 236.53
chemical.Cn.l.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is used for the above substance. For a substance that is not single_phase, the phase state needs to be specified after between above chemical.Cn and T. To view the Cp_average of Furfural in the gaseous state, chemical.Cn g.T. dependent_property_integral(298.15, 373.91)/(373.91-298.15) should be used.
HMF，195.13
Obtained by HMF.Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15). it has been set to be liquid phase for HMF (https://github.com/BioSTEAMDevelopmentGroup/Bioindustrial-Park/blob/master/biorefineries/cellulosic/chemic als.py), so the Cp_average of HMF under the specified phase state (for HMF, the specified phase state is set as liquid state) can be viewed through HMF.Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15), and since HMF has been specified the phase state as liquid, so no phase (l,g,s)  in HMF.Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15).
Acetate (l)，AceticAcid (l)，142.85
LacticAcid (l), 151.44
Obtained by Cn.l.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15).
SuccinicAcid (l)，182.27
Obtained by Cn.l.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15).
H2SO4(l), 100.12
AmmoniumAcetate(s), 126.77
CO2(g), 38.79
DAP(s), 188.0
Protein(l), 95.47
Z_mobilis(l), 102.94
O2(g), 29.60
Obtained by Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15). Since the above substance is the single_phase substance, the Cp_average of the substance viewed by Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is the Cp_average of the substance in the default reference phase state. For example, the default reference phase for AmmoniumAcetate is solid, therefore, the Cp_average viewed by Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is the Cp_average of solid-state AmmoniumAcetate. For H2SO4, the default reference phase state is liquid, so the Cp_average viewed by Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is the Cp_average of liquid-state H2SO4. For CO2, the default reference phase is gas state, so the Cp_average viewed by Cn.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is the Cp_average of gaseous CO2.
NH3(g)，36.72
The Cp_average viewed by NH3.Cn.g.T_dependent_property_integral(298.15, 373.91) / (373.91 - 298.15) is the Cp_average of gaseous NH3.
For Hf：J/mol
Glucan，Mannan，Galactan，-975708.8
Xylan，Arabinan,-761906.4
Lignin，-452909.63
GlucoseOligomer，MannoseOligomer，GalactoseOligomer，-975708.8
XyloseOligomer，ArabinoseOligomer，-761906.4
Glucose，Mannose，Galactose，CellulaseNutrients，Extract，-1271100.0
Xylose，Arabinose，Tar，-1043700
SolubleLignin，-452909.63
Xylitol，-1017318.68
Sucrose,-2221200.0
CaSO4，-1434500.0
AmmoniumSulfate，-1180900.0
Cellulose，-975709.05
Cellobiose，-2012085.6
Water，-285825.0
HMF，0
Furfural，-201600.0
Acetate，AceticAcid，-483580.0
SuccinicAcid，-940260.0
NH3，-45558.0
H2SO4，-814000.0
AmmoniumAcetate，0
Ethanol，-277030.0
CO2，-393474.0
DAP，-1566900.0
Protein，-73713.712
Z_mobilis，-130412.73
Glycerol，-668600.0
O2，0
LacticAcid，-668268.45
The Hf of above substances are obtained by chemical.Hf.
The Hf obtained by chemical.Hf is at 25 degrees, which is also the Hf of the chemical in the default reference phase state (default reference phase state can be viewed by calling the chemical directly).
For example, SuccinicAcid, phase_ref='s' is found by code chemicals. SuccinicAcid, so the Hf obtained by chemicals. SuccinicAcid.Hf is the Hf of SuccinicAcid at 25 degrees and at solid state.
Thanks for your help. Wish you a good day.


Mechanism of Repositioning: sell low valuable assets in exchange of high valuable assets (increase the turnover rate)

We found that during the backtesting period of the StockTrading demo, the number of stock adjustments was very small. Most stocks established a large position in the early stage of trading, and then the position was hardly adjusted. Very little repositioning. As the time increases, our portfolio has no different than the market index.
This picture shows the stock price (left column) and position (right column) of the backtest range we are looking at. Different colored lines in the right column represent the results of multiple trials. x-axis represents the time. We observe that many stocks are rarely rebalanced (3-year backtest interval).
We are asking for discussion to make the RL agent increase the turnover rate/repositioning frequency during the trading process.
Thanks.

I made the same observation on my real life testing. One explanation I heard is that if during the training period there is no benefit in selling the model will just not learn to do it because it’s not beneficial.
The other ‘issue’ is that over the last few years the market has been in an almost constant uptrend, so a buy and hold strategy may simply be the most effective, more beneficial then multiple trades back and forth in and out of a position.
I wonder if there is a link between the interval used to train the AI and the interval later used for paper trading (1 minute).
L

On Jan 16, 2022, at 6:20 AM, Bruce Yang @.***> wrote:
https://user-images.githubusercontent.com/31713746/149661247-0525bf74-966a-4a01-89e3-4c31d9379865.png
We found that during the backtesting period of the StockTrading demo, the number of stock adjustments was very small. Most stocks established a large position in the early stage of trading, and then the position was hardly adjusted. Very little repositioning. As the time increases, our portfolio has no different than the market index.
This picture shows the stock price (left column) and position (right column) of the backtest range we are looking at. Different colored lines in the right column represent the results of multiple trials. x-axis represents the time. We observe that many stocks are rarely rebalanced (3-year backtest interval).
We are asking for discussion to make the RL agent increase the number of handovers during the development process.
Thanks.
—
Reply to this email directly, view it on GitHub https://github.com/AI4Finance-Foundation/FinRL/issues/432, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABC5C7SWZAS3LTGNV6U73DUWLA2HANCNFSM5MCYOM3Q.
You are receiving this because you are subscribed to this thread.

能否通过对 奖励函数（Reward Function）的定义来改变智能体（Agent）的行为（Action），因为总体上股价是呈上升趋势的，所以智能体只有一开始持有股票，到回合结束也能获得不错的收益（奖励 Reward），因此如果在智能体【持有股票】的过程中会 持续的、定期的 扣取 管理费用，以此来减少智能体长期持有股票的累计奖励，激励智能体 能够 稍微频繁 交易，来增大 在回合内 赚取的 钱呢？ ------- 在训练环境中定义
通过训练环境中的定义，而测试环境中不受到 扣取 持有股票管理费的限制，能否在测试环境中，智能体不会总是长期持有股票，而是会中间过程中，能在预测到股票价格下跌的情况下，会选择抛售股票，再等预测到股票价格上涨的时机时，再买入来赚取更多的差价呢？
以上是我的设想，还需要后续实验的验证

Why this issue is closed.
I also find that the agent will no longger trading after buy a large position in the early stage of trading.
I also tried to change the fee to 0, in case that the agent will be more willing to do more trading, but in vain. In this case, the agent seems not to learn any reasonable strategy.

Now we have more discussions… Let me reopen it. LoL.

I guess that there are 2 reasons. Firstly, the factors can't explain the return very well, so the system fears to make transactions, it will hold the stocks because their price will rise in the long term. Secondly, the system should encourage to make transactions. We can update the environment, like @A5230171 said, to charge a fee for holding behavior.

I guess that there are 2 reasons. Firstly, the factors can't explain the return very well, so the system fears to make transactions, it will hold the stocks because their price will rise in the long term. Secondly, the system should encourage to make transactions. We can update the environment, like @A5230171 said, to charge a fee for holding behavior.

I tried to tuned the fee to 0 and add more factors. The agent still fears to make transactions.
Charge a fee for holding behavior seems to be a good idea.

Did anybody manage to overcome this


Fix channel resource leak in OT GRPC span exporter

Closes #62

Need time to fix tests. Maybe my change was not perfect.


Add Noita

I talked over the weighting with the other maintainer, Heinermann, and he was fine with it.
Tried generating with it with higher Noita rates and other games several times, and it worked even with extreme conditions, so looks good to me.

@ScipioWright Just checking with you if any of these options need to be updated to be up to date with AP version 0.4.2

Oh you're totally right, I need to make a minor update to this to add in some of the newer options. I'll do that later today, thank you for the reminder!

Converted to draft since I messed with it in-browser. Will test it once I get home and un-draft it then.

This is now ready, sorry for the delay!

I've verified that this runs and the game weight seems fine. I don't know enough about the game to comment on option weights, but we've chatted about them in Discord, so they are probably good to go.


live streaming of Gopro Max

Problem:
I am trying to live stream the Gopro Max to Mac; when I try to use FFmpeg with UDP, the streaming always freezes after ten seconds. It happens every time.
Moreover, I would like to confirm that the wireless live streaming quality is roughly 720p or less? And we couldn't connect the GoPro max to our laptop with a cable as USB ethernet connection to get a 1080p streaming. I would be really appreciate in advance!!!
Details:
I use the following command
ffplay -fflags nobuffer -f:v mpegts -probesize 8192 udp://:8554

GoPro Camera(s): Gopro Max
Firmware Version: latest firmware
Steps to reproduce: described abobve
Happens every time? [Y/N]: Y

Try increasing the camera's bitrate

Try increasing the camera's bitrate
where? is there a command for that? thanks!


Ruby-lsp should follow the ASDF_DIR environment variable.

I have checked that this feature is not already implemented

[x] This feature does not exist

Use case
People with custom ASDF installation will be able to use the ruby-lsp extension because it currently does not support it.
Description
The ruby-lsp already has support for the ASDF version manager, but it tries to guess where it is installed, looking for the common paths. As ASDF supports custom installation paths using the ASDF_DIR environment variable, the ruby-lsp should looking for it when trying to find the installation path.
Implementation
Just checking if the ASDF_DIR variable is set up.
if (process.env['ASDF_DIR']) {
      // Follow the ASDF_DIR if it was set up
      const possiblePath = vscode.Uri.joinPath(vscode.Uri.parse(process.env["ASDF_DIR"]), scriptName)

      try {
        await vscode.workspace.fs.stat(possiblePath);
        return possiblePath;
      } catch (error: any) {
        // Continue looking
      }
    }

I wasn't able to run the vscode extension test suite, can someone help me with that? It tries to find ruby at /opt/rubies/3.3.4 which do not exist, and I don't know how to specify the right ruby location.


start.gg call order too out of order?

dupe of https://github.com/jmlee337/replay-manager-for-slippi/issues/73


One page wechaty introduction

Wechaty changes a lot these days and maybe we should make a clear tutorial, one-page introduction and API doc these days, both support Chinese and English.
Thanks to https://github.com/Chatie/wechaty-getting-started/issues/19#issuecomment-401602671 pointing that the docs and tutorial make developer feel confusing and all his experience.
I write related todo list on scratch:
First Priority

[x] Wechaty-getting-started

[x] What wechaty do, what the project is trying to fix the problem.
[x] How to run the project, warning that for new accounts it may not works.
[x] Chinese version
[x] English version

[x] Example code
- [ ] ding-dong-bot
- [ ] room-bot

[x] contact-bot
[x] media-file-bot
[x] starter-bot
[x] tuling123-bot
[x] vedio-demo

[x] wechaty API doc

[x] Rewrite jsdoc https://github.com/Chatie/wechaty/pull/1458
[x] Using docsify to generate API page : https://github.com/qhduan/wechaty-doc
[x] Chinese version
[x] English version

[x] FAQ

[x] Why puppeteer is no more working for new accounts
[x] How to test the new version of wechaty
[x] What to do for new accounts

Seconde Priority

[ ] one-page introduction

[ ] getting-started
[ ] tutorial
[ ] blog

[ ] Blog
[ ] Related practice from other developers & blog
[ ] What is the best practice about the project
[ ] Blog template
[ ] Author stories: About the project background
[ ] Best practice

[ ] How to migrate from puppeteer(0.14) to padchat(0.18)

This Two part should move to wechaty repo instead of in wechaty-getting started.

[ ]  Explanation of related concepts, including puppet, puppeteer, padchat, etc

[ ] Puppet System
[ ] Wechaty-puppet-padchat
[ ] Wechaty-puppet-puppeteer
[ ] hostie
[ ] giftie
[ ] botie

[ ] Wechaty Introduction

[ ] How the whole project works

We have done all First Priority things and the others are the enhancement part, will keep it open when we finish the enhancement part until having a clear though.
Also, we have some bugs about the basic introduction, I will file a new one and we are trying to fix them as soon as possible.

Only left #17

Yes, I want to make it open. And will do the Second Priority  things in the next month.

Yes, I want to make it open. And will do the Second Priority  things in the next month.

Ok. So please update it in time and keep track on it until to can be closed.
Thank you very much.

I'll close this issue because there have another 12 months passed.


[WIP] Up minimum supported ruby version to 2.4.5

We should probably announce it on talk and have JoeV/GreggT mention in the sprint review so people know 2.3 on master will soon be impossible.  cc @jvlcek "Continued ruby 2.5 work to get travis testing on 2.5 and 2.4.  Soon, we will be raising on master if you try to bundle with ruby 2.3. Contact us on how to upgrade your ruby if you have any problems"

Yeah we usually announce a timeline with these things via a talk article, so let's decide on a timeframe, and then make the talk article.

Closed as newer Ruby versions already added to gemfile https://github.com/ManageIQ/manageiq/blob/master/Gemfile#L1-L2


Custom Variable Validation no longer experiemental in 0.13

terrascan version: 1.2.0
Operating System: Windows 10

Description
Trying to run terrascan on AzureRM Terraform configuration. The following message continues to show up even though Custom Variable Validation is no longer experimental in 0.13 (https://www.hashicorp.com/blog/custom-variable-validation-in-terraform-0-13):
Experimental feature "variable_validation" is active; Experimental features are subject to breaking changes in future minor or patch releases, based on feedback.

If you have feedback on the design of this feature, please open a GitHub issue to discuss it., and 1 other diagnostic(s)

What I Did
terrascan init
terrascan scan

Hey @tarunngc,
We have added support for terraform 0.13.x & 0.14.x in our latest terrascan release v1.3.0. Can you please try it out and see this issue still exists?

Hey @tarunngc,
We have added support for terraform 0.13.x & 0.14.x in our latest terrascan release v1.3.0. Can you please try it out and see this issue still exists?

Hi @kanchwala-yusuf
I tried v1.3.0 and the error no longer occurs as expected. Thanks for the quick response and help.

Hi @kanchwala-yusuf
I tried v1.3.0 and the error no longer occurs as expected. Thanks for the quick response and help.


feat: add collector-default to collect host info and log, e.g., dmesg

Longhorn 5073
Signed-off-by: Ray Chang<EMAIL_ADDRESS>Add collector-default to collect cluster host information and log includes syslog, dmesg, kernel log and kubelet log

@bk201 Please help review this.
cc @Vicente-Cheng

UPDATE:
After discussed this PR withLonghorn teammates. It can add a new parameter to specify the purpose of executing the collector script, for example, the incoming value is Longhorn to execute the collector-longhorn script. This can make it more flexible when adding other situations in the future. I will reupdate this PR.

Hi @bk201 @innobead @Vicente-Cheng @derekbit and @c3y1huang,
As mentioned in the comments, I modified this PR to accept one more parameter: SUPPORT_BUNDLE_REQUEST_PURPOSE to identify the purpose of the application request and then execute the corresponding collector.  Longhorn-manager will also be updated to pass the parameter with this PR.

@weizhe0422 instead of using the namespace to determine the collector, do you think it's better to have the option to specify the collector name explicitly (and use the original path to determine the collector, if the option is not specified)? I understand this requires a bit of modification from the Longhorn side, but it looks more elegant.

@weizhe0422 instead of using the namespace to determine the collector, do you think it's better to have the option to specify the collector name explicitly (and use the original path to determine the collector, if the option is not specified)? I understand this requires a bit of modification from the Longhorn side, but it looks more elegant.

:point_up: we should do it this way instead of an implicit convention.

Hi @innobead @bk201 I modified this PR to accept one more parameter: SPECIFY_COLLECTOR_SCRIPT to identify the purpose of the application request and then execute the corresponding collector. Longhorn-manager will also be updated to pass the parameter with Longhorn-manager PR#1754.

Please help to review this PR again. Thanks for helping.


Steps to Reproduce

Create a form page with title ~35 characters
Submit some data on front-end
Go to the Admin UI -> Forms -> Your form page title

Result

Too much empty space in header when a form page has a long title
Too much place for checkboxes in the submissions table

Expected result

I have no idea how to fix the header
I guess, it should be possible to make the column with checkboxes to have a fixed width

Screenshots
Viewport width 1280px-1215px (desktops):

Viewport width ~768px (iPad and other tablets):

Technical details

Wagtail version: 1.12 (from the master branch, commit e2b5dc384f1909d95991735a9ef034c0c4bb197e).
Browser version: Google Chrome 60.0.3112.90, MacOS 10.12.5 (16F73)

Proposed solution - we pull out the date search parts from the header completely.
wagtail/contrib/forms/templates/wagtailforms/index_submissions.html
All the search content would go under the
 instead of in the header.

        <form action="" method="get" novalidate>

                    {% for field in select_date_form %}
                        {% include "wagtailadmin/shared/field_as_li.html" with field=field field_classes="field-small" li_classes="col4" %}
                    {% endfor %}

                        <button type="submit" name="action" value="filter" class="button button-filter">{% trans 'Filter' %}</button>

        </form>

Note: we would need to ensure the form row is not centre aligned but other than that - it looks much better I think.

We will aim to get this resolved as part of the UX unification work in the header  - https://github.com/wagtail/wagtail/issues/8539
But in the mean time - marking as a good first issue for anyone to pick up.
Actions required

Pull out the form from the header and put into the main content

Remove any scss that no longer applies
With styling, fix the date from / date to text wrapping
With styling (or maybe utility classes), fix the centre alignment of the dates and ensure they are aligned to the left (start)
Might need to update the col classes to be better suited to this row being stand alone
Validate in multiple browsers
Update unit tests
Check the new location works
Bonus: Get rid of the inline script tag and put the JS into its own file.

Will be fixed by https://github.com/wagtail/wagtail/pull/8862 - new layout that streamlines the way the filtering shows.


added support for mongoid 6 beta release

In mongoid 6, origin seem to be removed and they replaced it various modules

@rodrigopinto if possible, have a look at PR.

👍

@rodrigopinto Yeah, it seem fantastic idea, will do it.

Probably you should also update the Readme.md

@gurix  OK , will update

@gurix  Update to mongoid-6.0.rc0 as well as Readme

👍

Closing this PR since beta support of mongoid 6 is already in master. See #179 for details.

@90yukke nice, would appreciate a new gem release as well 👍


Is the signal in an Output always originated from related Receivers?

Section 'Status of Output' dictates:

An Output has the following states that describe the signal at this Output:

no_signal when this Output is not producing any signal to a downstream counterpart (e.g. if the Output has associated Receivers, it may mean that one or more of these Receivers do not have a compliant incoming stream).
signal_present when the signal is present and stable.

Debug information expressed through debug property SHOULD assist no_signal state and MAY assist the other states.

It doesn't specify if the signal in question is produced by related Receivers or by something in the middle between them and the Output. We may want to describe these two cases separately. For instance, by adding the third, default_signal state.

The text "(e.g. if the Output has associated Receivers, it may mean that one or more of these Receivers do not have a compliant incoming stream)" seemed to indicate that no_signal and signal_present were referring to a signal originating from the Receiver.
The test plan actually only look at the state being or not "signal_present". Adding a "default_signal" state to indicate that without a signal from the Receiver, a default signal is produced on the output would not affect the test suite. Using such "default_signal" state should be optional to the devices because not all devices may support auto-generating a default signal.
Note that the same concept of a default signal applies to the Sender side ... except that there is no need for a default_signal state for an input. The input will indicate no_signal but a Controller may observe that the Sender state is for example "unconstrained" or "constrained", meaning that the Sender has a signal (default) to transmit.


Need help with resolving vulnerabilities in debug NPM package which is used within many of Microsoft Azure NPM packages

Package Name (Version): @azure/arm-logic (8.2.0), @azure/identity (3.1.3), @azure/service-bus (7.9.4).

Operating system: Ubuntu.

[ ] nodejs

version: 18.x

[ ] browser

name/version: N/A.

[ ] typescript

version: 5.0.2

Description
We are using a tool which detects vulnerabilities in the packages which we use in our Application. That tool has detected vulnerabilities in the "debug" NPM package which is being used by Microsoft official packages such as @azure/arm-logic, @azure/identity and @azure/service-bus. As we're not using the "debug" NPM package directly in our application, we cannot resolve this and hence we're seeking help from your side like if Microsoft has any plan to fix the vulnerability. Below is the summary:

Hello @nayansc568 - thanks for reaching out about this.
Azure SDK client libraries use semver range that includes minor versions of its dependencies. What this means to you is that you control transitive dependencies without a need for any upstream changes.
In your case, try the following:
debug-vuln main % npm ls debug
<EMAIL_ADDRESS>/home/maorleger/workspace/azure-sdk-experiments/debug-vuln
├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   ├─┬<EMAIL_ADDRESS>│   │ ├─┬<EMAIL_ADDRESS>│   │ │ └──<EMAIL_ADDRESS>│   │ └──<EMAIL_ADDRESS>│   └─┬<EMAIL_ADDRESS>│     └──<EMAIL_ADDRESS>└─┬<EMAIL_ADDRESS>  ├─┬<EMAIL_ADDRESS>  │ └─┬<EMAIL_ADDRESS>  │   └──<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └──<EMAIL_ADDRESS>
Yours should look similar with a few instances of<EMAIL_ADDRESS>(the vulnerable version) showing up.
Next, try npm update debug followed by npm ls debug - you should be able to confirm that debug has been updated to (as of today) 4.3.4 or 3.2.7
debug-vuln main % npm ls debug
<EMAIL_ADDRESS>/home/maorleger/workspace/azure-sdk-experiments/debug-vuln
├─┬<EMAIL_ADDRESS>│ └─┬<EMAIL_ADDRESS>│   ├─┬<EMAIL_ADDRESS>│   │ ├─┬<EMAIL_ADDRESS>│   │ │ └──<EMAIL_ADDRESS>deduped
│   │ └──<EMAIL_ADDRESS>│   └─┬<EMAIL_ADDRESS>│     └──<EMAIL_ADDRESS>deduped
└─┬<EMAIL_ADDRESS>  ├─┬<EMAIL_ADDRESS>  │ └─┬<EMAIL_ADDRESS>  │   └──<EMAIL_ADDRESS>deduped
  └─┬<EMAIL_ADDRESS>    └──<EMAIL_ADDRESS>
Hope this helps!


Add XcmTransfer trait

Changes

add XcmTransfer trait as initial abstraction over xtokens pallet to transfer native currencies and MultiAsset

implement XcmTransfer with some considerations:

I left some minor duplications in the XcmTransfer::transfer and the transfer dispatchable call, because I didn't wrap it in with_xcm_execution_transaction because I wasn't sure whether the  XcmTransfer trait also should use with_xcm_execution_transaction?
the return type is also XcmExecutionResult, which drops the used weight from Outcome, should the trait rather return Result<Outcome, DispatchError>?

Closes #537

I would prefer to have the XcmTransfer impl wrapped in with_xcm_execution_transaction. The transfer must be transactional anyway, or users lost their fund if XCM sending failed. It's better to do it in a lower level here instead of doing it everywhere.

XcmTransfer impl now uses with_xcm_execution_transaction
XcmTransfer trait functions return the Outcome directly:

instead of matching the outcome in do_transfer_multiasset, the dispatchable calls use ensure_complete

The unit tests are ready now. @mattsse Could you please merge master branch?

The unit tests are ready now. @mattsse Could you please merge master branch?

@shaunxw just merged master branch


expected magic word 00 61 73 6d, found 3c 21 44 4f @+0)

I was trying to integrate jeep-sqlite to my react app. I am getting the following error when running
Uncaught (in promise) RuntimeError: abort(CompileError: WebAssembly.instantiate(): expected magic word 00 61 73 6d, found 3c 21 44 4f @+0). Build with -s ASSERTIONS=1 for more info
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
import reportWebVitals from './reportWebVitals';
import { Provider } from 'react-redux';
import { store } from './store';
import { HTMLAttributes } from 'react';
import { defineCustomElements as jeepSqlite, applyPolyfills, JSX as LocalJSX } from "jeep-sqlite/loader";
import { Capacitor } from '@capacitor/core';
import { CapacitorSQLite, SQLiteConnection, SQLiteDBConnection } from '@capacitor-community/sqlite';
type StencilToReact = {
[P in keyof T]?: T[P] & Omit<HTMLAttributes, 'className'> & {
class?: string;
};
} ;
declare global {
export namespace JSX {
interface IntrinsicElements extends StencilToReact<LocalJSX.IntrinsicElements> {
}
}
}
applyPolyfills().then(() => {
jeepSqlite(window);
});
window.addEventListener('DOMContentLoaded', async () => {
const platform = Capacitor.getPlatform();
const sqlite: SQLiteConnection = new SQLiteConnection(CapacitorSQLite)
try {
if (platform === "web") {
const jeepEl = document.createElement("jeep-sqlite");
document.body.appendChild(jeepEl);
await customElements.whenDefined('jeep-sqlite');
await sqlite.initWebStore();
}
const ret = await sqlite.checkConnectionsConsistency();
const isConn = (await sqlite.isConnection("db_employee")).result;
var db: SQLiteDBConnection
if (ret.result && isConn) {
db = await sqlite.retrieveConnection("db_employee");
} else {
db = await sqlite.createConnection("db_employee", false, "no-encryption", 1);
}
await db.open();
let query = `
CREATE TABLE IF NOT EXISTS stream (
  id INTEGER PRIMARY KEY NOT NULL,
  name TEXT NOT NULL
);
`

const res: any = await db.execute(query);
console.log(`res: ${JSON.stringify(res)}`);
await db.close();
await sqlite.closeConnection("db_employee");

ReactDOM.render(
  <React.StrictMode>
    <Provider store={store}>
      <App />
    </Provider>
  </React.StrictMode>,
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorkerRegistration.unregister();
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();

} catch (err) {
console.log(Error: ${err});
throw new Error(Error: ${err})
}
});

@jkrrish-ac which version of jeep-sqlite are you running? Delete the sql-wasm.wasm file from your public folder then copy the sql-wasm.wasm file from node_modules/sql.js/dist then do npx cap sync then npm run build then npx cap copy and then npm start and it should work do this each time you update the jeep-sqlite

@jepiqueau  I am using v 1.3.4. Let me check this. Thanks for your prompt response

I checked and working fine now.

I am still having this issue running in the web. On android simulator it is working fine.

NVM. I put the file sql-wasm.wasm in the wrong location, should be in public/assets not just public.