Code for Ta-lib indicators

The documentation is excellent on how to code the indicators, however, I am lost as to how to find out the return values for the ta lib indicators and then what to do with them.
For example; the Talib-DEMA seems straight forward enough, pass in a time component, and using an inspect on the return array I see that it returns outReal; but what is this and what do I do with it remains a mystery. I can't find anything in the talib documentation either.
Does anyone know?

outReal is the result of the calculation, in the case of DEMA:
DEMA = ( 2 * EMA(n)) - (EMA(EMA(n)) ), where n= period

source
More info about the DEMA:

Thus, the DEMA still reflects a moving average while keeping pace with current, daily changes. Traders commonly utilize this tool to confirm what they see as reversal signals. For example, if DEMA (50) and DEMA (200) create a death cross amid increased selling pressure, the trader can confirm the price is likely entering a bearish trend. Meanwhile, if short-lived, the bearish trend may already be reversing by the time the EMA and SMA catch up. Therefore, DEMA is well-suited for short-term trend indications.

also the outReal array is an array that maps to previous candles (the last item in the array corresponds to the most recent candle). But you shouldn't have to deal with the array, as gekko will automatically take the last value of the array if you registered the talib indicator via gekko. If that doesn't answer your question, please let me know!

I think I must not be understanding how this works then - which is probably my fault :)
Please acknowledge that the code below is very much a work in progress, and I'm trying to understand the inputs and outputs for now.
This is far as I have got. I have made this method and passed in the following from config.js:
`// Bollinger bands settings:
//profit
config['talib-bbands'] = {
parameters: {
optInTimePeriod: 5,
optInNbDevUp: 2,
optInNbDevDn: 2,
optInMAType: 0
},
thresholds: {
down: -0.025,
up: 0.025
}
};
`
`// If you want to use your own trading methods you can
// write them here. For more information on everything you
// can use please refer to this document:
//
// https://github.com/askmike/gekko/blob/stable/docs/trading_methods.md
const util = require('util');
var config = require('../core/util.js').getConfig();
var settings = config['talib-bbands'];
// Let's create our own method
var method = {};
// Prepare everything our method needs
method.init = function() {
this.name = 'talib-bbands'
// keep state about the current trend
// here, on every new candle we use this
// state object to check if we need to
// report it.
this.trend = 'none';
// how many candles do we need as a base
// before we can start giving advice?
this.requiredHistory = config.tradingAdvisor.historySize;
var customBBSettings = settings.parameters;
console.log(util.inspect(settings.parameters));
// define the indicators we need
this.addTalibIndicator('mybb', 'bbands', customBBSettings);
}
// What happens on every new candle?
method.update = function(candle) {
// nothing!
}
method.log = function() {
// nothing!
}
// Based on the newly calculated
// information, check if we should
// update or not.
method.check = function() {
//upperband, middleband, lowerband = BBANDS(close, timeperiod=5, nbdevup=2, nbdevdn=2, matype=0)
var price = this.lastPrice;
var result = this.talibIndicators.mybb.result;
//var macddiff = result['outMACD'] - result['outMACDSignal'];
//  console.log(util.inspect(result, {showHidden: false, depth: null}))
var lower = result['outRealLowerBand'];
var medium = result['outRealmediumBand'];
var upper = result['outRealhighBand'];
// if(settings.thresholds.down > macddiff && this.trend !== 'short') {
//  this.trend = 'short';
// this.advice('short');
//} else if(settings.thresholds.up < macddiff && this.trend !== 'long'){
//  this.trend = 'long';
//  this.advice('long');
//}
}
module.exports = method;`
Your explanation is rather relevant and interesting:

also the outReal array is an array that maps to previous candles (the last item in the array corresponds to the most recent candle). But you shouldn't have to deal with the array, as gekko will automatically take the last value of the array if you registered the talib indicator via gekko. If that doesn't answer your question, please let me know!

It is possible I simply don't understand how to use this. So a few key answers may help me:

Do I need a new method to call a talib indicator?

How do I determine the direction of the market? It seems like Gecko does that but I'm struggling to understand where I see this for my method.

How does one chain multiple indicators at different thresholds of priority?

Would you mind formatting the code? It's not really readable atm.
As to your questions, I think it will be more clear by explaining Gekko terminology:
Within gekko, a trading method is a strategy, it is a piece of code that will take candles (via the update and check methods) and will eventually send out advice on what position to take in the market (long or short). This trading method can use a number of tools to figure out what to do, most trading methods (incl. the ones that come with gekko) use a strategy based around trend watching, the idea is that if the trading method things the current trend is UP it will advice to LONG (under the assumption that the price will go even higher).
These trading methods use a number of tools to try and predict this:

indiciators (gekko has a few native indicators, and exposes 100+ via TAlib)
thresholds: ex. MACD: some signal needs to do more than cross some other signal, it needs to go over with a threshold).
trendduration: if someone buys a lot of an asset, the price will go up but this doesn't have to mean that it's an uptrend. Methods can keep track of how long the price has been going up and only if it has been going up for X candles, really trigger the advice.

But you are free to come up what ever kind of other logic you want!

If you create your own method Gekko gives you easy access to add indicators, if you look at the talib-macd method:
It registers the indicator (using the talib library) MACD:
this.addTalibIndicator('mymacd', 'macd', customMACDSettings);

it fetches the result of the indicator:
var result = this.talibIndicators.mymacd.result;

The MACD indicator is based on a calculation that needs to be run every candle (and the result comes back async in a hard to work with format). So Gekko will do all that work for you, you only need to register it and handle the result. You can use all these talib indicators within your method.

Thanks for your response, I think that's what I'm doing in my talib-bband.js as above (I have tried to reformat it).

Could you maybe put it in a gist and give the link here?

talib-bbands.txt

I think I figured your problem out:

There was a bug in Gekko that caused Gekko to not correctly pass data to (for bbands) TAlib, I fixed that now.

You were expecting these properties:
var lower = result['outRealLowerBand'];
var medium = result['outRealmediumBand'];
var upper = result['outRealhighBand'];

However, Talib returns these properties:
var lower = result['outRealUpperBand'];
var medium = result['outRealMiddleBand'];
var upper = result['outRealLowerBand'];

This way your method will have the values lower, medium and upper filled. Let me know if that fixes your problems!

Ah I didn't have an issue, the values were all be returned just fine.
What I'm confused about is how do I see those values over time to see if a trend has changed?
Or in more reasonable terms for me (the noob) - what do I do with this ? :)

So different indicators have different opions about indicators and how to interpet them, you picked an interesting one, according to wikipedia:

Some traders buy when price touches the lower Bollinger Band and exit when price touches the moving average in the center of the bands. Other traders buy when price breaks above the upper Bollinger Band or sell when price falls below the lower Bollinger Band.

A lot of indicators (like MACD) are more generally agreed upon as to how to interpet them, but let's say you want to build your trading method with bbands so that:

buy when price touches the lower Bollinger Band
exit when price touches the moving average in the center of the bands.

For this you basically need to know 3 things:

price
var lower = result['outRealLowerBand'];
var medium = result['outRealMiddleBand'];

And with simple if checks you can check whether the market satisfies those conditions. You can use thresholds if you see that the conditions are met way to often for example. So after writing those if checks in your check function you can do this.advice.. as soon as they are true. And Gekko will run the check function on every candle and handle the advice (whatever you have configured to be listening to it, eg. paper trader or real trader).

Thanks for your help. Really useful. I now get exactly what's happening. I think Bollinger is not necessarily the right place to start but it's taught me a lot about how methods work in gecko.

Hey @thegamecat was the code in your file working at your end?
I tried running it and this is the error that I get:
/Users/AdityaNayak/Bots/trading/gekko/strategies/bbands.js:26
  var customBBSettings = settings.parameters;
                                 ^

TypeError: Cannot read property 'parameters' of undefined

You need to ensure your stratname is setup and has a corresponding entry in the config file.

Yup. Did that, any other pointers?

Look at what settings is being set to and why it isn't being found.

My apologise for not updating this thread earlier. I got it to work. It was a syntax issue. :)

Excellent, good job.

2017-11-23 21:59:44 (INFO):              Using the strategy: talib-bbands
{ optInTimePeriod: 5,
optInNbDevUp: 2,
optInNbDevDn: 2,
optInMAType: 0 }
/home/ubuntu/gekko-stable/core/talib.js:32
throw talibError + methodName + ' requires ' + paramName + '.';
^
Gekko was unable to configure talib indicator:
bbands requires optInTimePeriod.
xxx POST /api/backtest 500 3,768ms -
Error: non-error thrown: Child process has died.
at Object.onerror (/home/ubuntu/gekko-stable/node_modules/koa/lib/context.js:105:40)
at process._tickCallback (internal/process/next_tick.js:109:7)

@stamun8 looks like your not passing that config object you are logging to the indicator. Can you post your strat's init method?


Reconsider default huge page requirement for compute and memory IT classes

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:
/kind bug
/kind enhancement

What happened:
Using a compute or memory instance type requires a node with huge pages support, which is not a default setting, so out of the box, compute and memory instance types are unusable.
When trying to create a VM in one of these instance types, it fails with an unhelpful error that points to scheduling, but does not mention huge pages as the reason.
What you expected to happen:
Either better messaging to bring to light the lack of huge pages or another way to introduce to admins the ability to require huge pages in an instance type.
How to reproduce it (as minimally and precisely as possible):
Create a vm with compute or memory instance type on a cluster where nodes do not have huge page support.
Anything else we need to know?:
Huge pages make sense across the board for VM handling nodes, but fine tuning the number of huge pages per compute node is a per-cluster exercise, and fits better in a performance and tuning guide than a default.

I agree that hugepages likely doesn't make sense on the compute intensive class but disagree that the error shown on the VirtualMachine and VirtualMachineInstance are somehow unclear to users.
We expose requirements through labels currently but should also better document these in the description annotation with links to upstream documentation. Vendors could easily rewrite these downstream with downstream links so I really don't mind adding these.
@fabiand @cwilkers  @0xFelix  Thoughts?

I know that when I'm looking at that message, my first interpretation is that preemption is the culprit, and I'm wondering what that even means. I have heard from users on kubevirt-dev that they see the message about cloudinitdisk's lack of snapshot as the error being presented to them, so without a more direct message, any bit of text there can lead somebody on a wild goose chase.

I know that when I'm looking at that message, my first interpretation is that preemption is the culprit

It's likely easier to gork broken down into the initial scheduling failure reasons and then the follow up part about preemption:

0/6 nodes are available:

1 node(s) were unschedulable
2 Insufficient hugepages-2Mi
3 node(s) had untolerated taint {node-role.kubernetes.io/master: }.

preemption: 0/6 nodes are available:

2 No preemption victims found for incoming pod
4 Preemption is not helpful for scheduling..

and I'm wondering what that even means.

https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/#pods-are-preempted-unnecessarily
tl;dr Pods can have priority. Priority indicates the importance of a Pod relative to other Pods. If a Pod cannot be scheduled, the scheduler tries to preempt (evict) lower priority Pods to make scheduling of the pending Pod possible.

I have heard from users on kubevirt-dev that they see the message about cloudinitdisk's lack of snapshot as the error being presented to them, so without a more direct message, any bit of text there can lead somebody on a wild goose chase.

I think the ErrorUnschedulable Printable Status makes this abundantly clear to users what the issue is. Yes there's lots of details also listed that might trip up less seasoned k8s users and operators but that isn't something I think KubeVirt can really impact tbh.
IMHO it's a million times better than the scheduling errors we surfaced in openstack/nova, no valid hosts was so damn awful until we started providing more context to admins.
For this part if you still feel strongly enough please raise an issue against core kubevirt/kubevirt as this isn't something we can address in this repo.

Message:               0/6 nodes are available: 1 node(s) were unschedulable, 2 Insufficient hugepages-2Mi, 3 node(s) had untolerated taint {node-role.kubernetes.io/master: }. preemption: 0/6 nodes are available: 2 No preemption victims found for incoming pod, 4 Preemption is not helpful for scheduling..
I've always found this message very complicated to understand because it packs a lot of information into one line of text, but basically the information is there. As @lyarwood said, maybe it can be addressed in kubevirt/kubevirt, but unfortunately not here.
Regarding the issue of unusable compute and memory instance types out of the box, we should make it obvious that for default use cases the universal instance types should be used. Compute and memory intensive instance types are more performance orientated and need clusters with respective resources.


Moving an editor tab to a new group causes --wait to be released

I was just in an interactive rebase editing a commit message (COMMIT_EDITMSG file), and I moved it to a new group (so I could look more closely at the changes to write a better commit message) and it released the --wait on that file. Which caused the wrong commit message to be accepted and the rebase to continue.

I have no idea how to fix this though. Mainly driven by this ugly piece of code:
https://github.com/microsoft/vscode/blob/46f433cdf90a05137b9d2e32721dced9ea9c7735/src/vs/workbench/browser/editor.ts#L174-L174
The ugly part is that we are observing all opened editors for the resource but don't actually know which editor is the one to observe for the --wait files.

I have no idea how to fix this though. Mainly driven by this ugly piece of code:
https://github.com/microsoft/vscode/blob/46f433cdf90a05137b9d2e32721dced9ea9c7735/src/vs/workbench/browser/editor.ts#L174-L174
The ugly part is that we are observing all opened editors for the resource but don't actually know which editor is the one to observe for the --wait files.

I wonder if something like the Microtask emitter would help in this case since you'll have an open and close fired at roughly the same time. Although that's still really ugly

But yeah, that idea crossed my mind ;)

@lramos15 the IEditorService.onDidCloseEditor event now has a EditorCloseContext property that conveys more information why an editor was closed:
https://github.com/microsoft/vscode/blob/a6bd8dd06ccdc6a142e3c4efddb08537178a9d9a/src/vs/workbench/common/editor.ts#L736-L758
Maybe this is actually useful for the tabs model work too. The context bubbles up all the way from the model:
https://github.com/microsoft/vscode/blob/a6bd8dd06ccdc6a142e3c4efddb08537178a9d9a/src/vs/workbench/common/editor/editorGroupModel.ts#L393-L393
The fix is to ignore the close event when the context indicates a move:
https://github.com/microsoft/vscode/blob/a6bd8dd06ccdc6a142e3c4efddb08537178a9d9a/src/vs/workbench/browser/editor.ts#L175-L177

I'm not sure if this helps the tab model just because it will receive an open and then close event from two separate groups which is fine. Although we may fire two change events in that case.


"This field is required" shown for disabled fields

I have marked some fields as disabled. However when I try to submit the edit form I get "This field is required". I suggest either the required check is omitted (especially since there are actual values in the field) and / or if there is a work around the docs be updated.

How are you marking this as disabled?
I'm struggling to reproduce this.

P.S. I'm disabling the field by setting the 'readonly' attribute that's passed to the form field widget, e.g:
form_widget_args = {
    'id':{
        'readonly':True
    },
    'email':{
        'readonly':True
    },
}

I am using ``disabled: True.


After build is triggered, state is shown as failed

To reproduce, fire off a new build, make sure to catch the build list page while VCS operations are happening. Build will be in a failure state. This is a regression where we are setting the state of the build to failed without checking that the build has completed. This might be a byproduct of using multiple environments during the build process.

@davidfischer noted he also saw this in production, which means it might not even be related to the VCS changes

Mmm...
I'm not able to reproduce this in my local instance with master branch. I see the states: Triggered, Clonning and Installing without problem.

Same behaviour in .org production

@humitos I also experiment this behavior on my local instance:

Build any project
Enter to the build (failure is shown)
Wait ~5 seconds, reload the page
Build is continued and successful

@stsewd i get the same results as you once i click on the build, but the build list page is where i see a failure.

Another clue: I can reproduce on first build of the project, not afterwards though.

@humitos I think the problem is with a project without tags.
If I ran this command on a project without tags, the exit code is 1 (here the build is marked as failure).

Then on another step the exit code is forced to be 0 (here is when the build goes back to the normality)

Another clue: if I build the same project, the second build doesn't initially show the build as failing in the build list, but if I quickly select the build, it's in a failed state by the end of the VCS commands:

This also causes the page to stop loading the build commands from the API, as we halt this process with JS when a build has failed. Reloading the page, I see I failed on the next command.

I checked this again and I found something new:

I triggered a stable build
I kill my celery instance because it gets stucked
The build is in Triggered
I run celery again
I re-trigger the stable build
I get this error

Also, I have this crazy log in my debug.log
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING --- Logging error ---
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING Traceback (most recent call last):
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/doc_builder/backends/sphinx.py", line 148, in append_conf
    self.version.get_conf_py_path()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/builds/models.py", line 228, in get_conf_py_path
    conf_py_path = self.project.conf_dir(self.slug)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/models.py", line 557, in conf_dir
    conf_file = self.conf_file(version)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/models.py", line 553, in conf_file
    ProjectConfigurationError.NOT_FOUND
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING readthedocs.projects.exceptions.ProjectConfigurationError: A configuration file was not found. Make sure you have a conf.py file in your repository.
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING During handling of the above exception, another exception occurred:
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING Traceback (most recent call last):
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/tasks.py", line 399, in run_build
    outcomes = self.build_docs()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/tasks.py", line 583, in build_docs
    outcomes['html'] = self.build_docs_html()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/tasks.py", line 600, in build_docs_html
    html_builder.append_conf()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/doc_builder/backends/sphinx.py", line 151, in append_conf
    self._write_config(master_doc=master_doc)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/doc_builder/backends/sphinx.py", line 63, in _write_config
    safe_write(conf_file, conf_template)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/utils.py", line 125, in safe_write
    fh.write(contents.encode('utf-8', 'ignore'))
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING TypeError: write() argument must be str, not SafeBytes
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING During handling of the above exception, another exception occurred:
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING Traceback (most recent call last):
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/lib/python3.6/logging/__init__.py", line 995, in emit
    stream.write(self.terminator)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING OSError: [Errno 5] Input/output error
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING Call stack:
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/rtd3/bin/celery", line 11, in <module>
    sys.exit(main())
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/__main__.py", line 14, in main
    _main()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/celery.py", line 326, in main
    cmd.execute_from_commandline(argv)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/celery.py", line 488, in execute_from_commandline
    super(CeleryCommand, self).execute_from_commandline(argv)))
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/base.py", line 281, in execute_from_commandline
    return self.handle_argv(self.prog_name, argv[1:])
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/celery.py", line 480, in handle_argv
    return self.execute(command, argv)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/celery.py", line 412, in execute
    ).run_from_argv(self.prog_name, argv[1:], command=argv[0])
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/worker.py", line 221, in run_from_argv
    return self(*args, **options)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/base.py", line 244, in __call__
    ret = self.run(*args, **kwargs)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bin/worker.py", line 256, in run
    worker.start()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/worker/worker.py", line 203, in start
    self.blueprint.start(self)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bootsteps.py", line 119, in start
    step.start(parent)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/bootsteps.py", line 370, in start
    return self.obj.start()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/concurrency/base.py", line 131, in start
    self.on_start()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/concurrency/prefork.py", line 112, in on_start
    **self.options)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/concurrency/asynpool.py", line 422, in __init__
    super(AsynPool, self).__init__(processes, *args, **kwargs)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/pool.py", line 1007, in __init__
    self._create_worker_process(i)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/concurrency/asynpool.py", line 439, in _create_worker_process
    return super(AsynPool, self)._create_worker_process(i)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/pool.py", line 1116, in _create_worker_process
    w.start()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/process.py", line 124, in start
    self._popen = self._Popen(self)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/context.py", line 333, in _Popen
    return Popen(process_obj)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/popen_fork.py", line 24, in __init__
    self._launch(process_obj)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/popen_fork.py", line 79, in _launch
    code = process_obj._bootstrap()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/process.py", line 327, in _bootstrap
    self.run()
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/pool.py", line 289, in __call__
    sys.exit(self.workloop(pid=pid))
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/billiard/pool.py", line 358, in workloop
    result = (True, prepare_result(fun(*args, **kwargs)))
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/app/trace.py", line 537, in _fast_trace_task
    uuid, args, kwargs, request,
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/app/trace.py", line 374, in trace_task
    R = retval = fun(*args, **kwargs)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/.pyenv/versions/3.6.4/envs/rtd3/lib/python3.6/site-packages/celery/app/trace.py", line 629, in __protected_call__
    return self.run(*args, **kwargs)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/tasks.py", line 297, in run
    self.run_build(record=record, docker=docker)
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/projects/tasks.py", line 414, in run_build
    log.warning('No build ID, not syncing files')
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING File "/home/humitos/rtfd/code/readthedocs.org/readthedocs/doc_builder/environments.py", line 720, in __exit__
    msg='Build finished'))
[06/Mar/2018 15:39:29] celery.redirected:235[20794]: WARNING Message: '(Build) [discoin:stable] Build finished'
Arguments: ()

I have more clues...
First, the issue happen when RTD doesn't find a conf.py and raises ProjectConfigurationError. That exception is being handled by our code by creating a conf.py based in a template, so we call render_to_string that returns a django.utils.safestring.SafeText the one that we pass to safe_write which encodes it to utf8 and call fh.write with a django.utils.safestring.SafeBytes which fails.
So, at that time, I think the Build is marked as FAILED but since it's an intermediate step that "it's OK to failed" (ProjectConfigurationError is not a error to abort) RTD continue building the docs.
I'm not 100% sure yet, but I wanted to write this down before I forget :)

I just noticed that even after closing Celery, there were some celery process around and that probably made things goes that crazy.

OK, I have two suppositions here:

go crazy with celery processes
this happen when running django and celery with Py3 and the project doesn't have a proper index.rst (or raise ProjectConfigurationError for some other reason that is not that terrible to abort the build).

I created a PR at #3745 that should fix number 2). I've been trying to replicate the error on that branch and I wasn't able to. I'd like you to take a look and try to test it.
I'm not sure if 1) worth to test it, since it's an edge case and we shouldn't be running multiple celery processes. I will give it a try, though.


Problem with onMessage()

My App works flawlessly using the ol'<EMAIL_ADDRESS>But after upgrading to @socket.io/redis-adapter (I tried all versions from 7.0.0), the app gets this problem:
TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Set (<anonymous>)
    at RedisAdapter.onmessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:132:22)
    at /Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:80:22
    at Function._RedisCommandsQueue_emitPubSubMessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:231:9)
    at RedisCommandsQueue._RedisCommandsQueue_handlePubSubReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:286:100)
    at Object.onReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands[2022-07-04T11:34:36.512] [ERROR] [<IP_ADDRESS>:6767] ActorSystem - Going down because of an Uncaught Exception in Actor System! TypeError: object is not iterable (cannot read property Symbol(Symbol.iterator))
    at new Set (<anonymous>)
    at RedisAdapter.onmessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:132:22)
    at /Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@socket.io/redis-adapter/dist/index.js:80:22
    at Function._RedisCommandsQueue_emitPubSubMessage (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:231:9)
    at RedisCommandsQueue._RedisCommandsQueue_handlePubSubReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:286:100)
    at Object.onReply (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:53:125)
    at RESP2Decoder.write (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/RESP2/decoder.js:119:26)
    at RedisCommandsQueue.onReplyChunk (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/commands-queue.js:203:72)
    at RedisSocket.<anonymous> (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/index.js:340:84)
    at RedisSocket.emit (node:events:527:28)
    at Socket.<anonymous> (/Users/sudipto/Source/groupe/scalablePushNotifications/node_modules/@redis/client/dist/lib/client/socket.js:163:42)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons

For reference, I printed the opts right before the problem line # 131:
{ rooms: {}, except: {}, flags: {} }

For future readers:
I think that it's due to a version incompability, please check the table here: https://github.com/socketio/socket.io-redis-adapter#compatibility-table


GPU Support in nutanix cluster api provider

Verify as well as add more details/examples on how to use GPU in K8S Cluster created by Nutanix CAPI

#235


async version?

ideally supporting es7 async / await

👍 Pull request welcome :)

Why we need async noop3?
Since await can take over promisify/non-promisify function.
async function asyncFunc () {
  await noop3()
}

function syncFunc () {
  noop3()
}

What's diff?

// What's diff?

Non-blocking!!!!!

😂 All right, I believed.

async isn't real, closing issue


Bump the version string in Info.plist to match the actual version (1.2.0)

The string displayed is 1.0.1 but the actual version is already 1.2.0.

Thanks!


feat: Added Graham Scan Algorithm.

Description of Change
There is already a Jarvis’s Algorithm implementation for Convex Hull. But, The worst case time complexity of Jarvis’s Algorithm is O(n^2). Using Graham’s scan algorithm, we can find Convex Hull in O(nLogn) time. Following is Graham’s algorithm

Checklist

[x] Added description of change
[x] Added file name matches File name guidelines
[x] Added tests and example, test must pass
[x] Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
[x] Relevant documentation/comments is changed or added
[x] PR title follows semantic commit guidelines
[x] Search previous suggestions before making a new one, as yours may be a duplicate.
[x] I acknowledge that all my contributions will be made under the project's license.

Notes: Added Graham Scan Algorithm implementation for Convex Hull.

well

By the way looks like here's the error from the Windows CI 👀 https://github.com/TheAlgorithms/C-Plus-Plus/runs/4125807925?check_suite_focus=true#step:4:581

Could you please add back the files you removed from the numerical_methods folder?

Not really sure how to do that but here's what I propose, in any file just add a new line anywhere that makes no difference and commit it so then I'll have to update the branch and the files will come along.

By the way looks like here's the error from the Windows CI 👀 https://github.com/TheAlgorithms/C-Plus-Plus/runs/4125807925?check_suite_focus=true#step:4:581

oh thankss a lottt.

@Panquesito7 LGTM, all checks passed.

Will merge for now. If any of you (@amino19, @ayaankhan98, @mishraabhinn, or anyone else) have any objections, please comment here and make a separate PR to fix that. Thank you. 🙂


Enable CodeQL analysis on Hobbes

Hi Kevin,
Is this related to the optional unchecked array access in hobbes expressions?  I don't think that this tool is likely to flag that, since it's a couple of levels away from where the tool can see (we read this AST, then run type inference, then poke at the LLVM IRBuilder in a way that produces code that does or does not check array bounds as a side-effect.
The issue of bounds checking was discussed early on, and left optional for performance.  That option also works in a way that can be stratified so that you can have "trusted" inner code (where bounds checking isn't done) and then "untrusted" outer code for e.g. user queries.
HTH

Ah cool, it does look like an interesting tool.  If there’s anything I can help with there, please let me know!
Take care, stay safe from coronavirus.  :)

On Jun 9, 2020, at 12:34 PM, Kevin Elliott<EMAIL_ADDRESS>wrote:
Hi Kalani,
Yes that is correct. I understand this will unlikely catch the specific problem you mention, am interested to enable the github codeql tool out of general interest.
Kevin
On Tue, 9 Jun 2020 at 17:31, kthielen<EMAIL_ADDRESS><EMAIL_ADDRESS>wrote:
Hi Kevin,
Is this related to the optional unchecked array access in hobbes expressions? I don't think that this tool is likely to flag that, since it's a couple of levels away from where the tool can see (we read this AST, then run type inference, then poke at the LLVM IRBuilder in a way that produces code that does or does not check array bounds as a side-effect.
The issue of bounds checking was discussed early on, and left optional for performance. That option also works in a way that can be stratified so that you can have "trusted" inner code (where bounds checking isn't done) and then "untrusted" outer code for e.g. user queries.
HTH
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub https://github.com/Morgan-Stanley/hobbes/pull/363#issuecomment-641417601, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF745VCNSTH2LP4EPATOGG3RVZPWPANCNFSM4NZSDJJQ.
--
Kevin Elliott, Executive Director
Morgan Stanley | ISG Technology
20 Bank Street | Canary Wharf | Floor 04
London, E14 4AD
Phone: +44 20 7677-3292
<EMAIL_ADDRESS><EMAIL_ADDRESS>


How is this possible?

I see you're using js-function-reflector but does that mean you need to use babel-preset-es2015-reflector?

@ccorcos not directly, it's just a dependency of js-function-reflector but we don't use any feature of babel-preset-es2015-reflector. We could fork the library and remove that dependency if necessary. Is there any reason to justify that move?

No, I’m just curious how this works! Are you using Function.toString and
parsing text? How does this work?
On Sat, Nov 25, 2017 at 15:30 Wagner Leonardi<EMAIL_ADDRESS>wrote:

@ccorcos https://github.com/ccorcos not directly, it's just a
dependency of js-function-reflector but we don't use any feature of
babel-preset-es2015-reflector. We could fork the library and remove that
dependency if necessary. Is there any reason to justify that move?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/z-pattern-matching/z/issues/30#issuecomment-346973113,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABth3245_LnEChvIB-KNmI6nBLbaKqMmks5s6KMKgaJpZM4QqlII
.

Yes, that's the js-function-reflector approach. It was very hard to find such lib that works well with lambda, default arguments, and new stuff, any that was the only one I found which works well!

Isn't it going to break once you use a minifier though?


Feature suggestion for small language creators: keep .gitattributes linguist-language overrides with unknown name in languages bar

Gitea version (or commit ref): 1.14.0+dev-546-gdc66e4740
Git version: ???
Operating system: docker
Database (use [x]): should be irrelevant
Can you reproduce the bug at https://try.gitea.io: did not try, since it's not a bug
Log gist: not a bug

Description
I have a feature suggestion for small language creators: keep .gitattributes linguist-language overrides with unknown name in languages bar. This has also been suggested for the original linguist and GitHub here, but GitHub seems to query language names from a central database and isn't interested in adding extra code to allow repo-only entries indirectly created by .gitattributes entries.
Basically, when .gitattributes contains a line like this: *.h64 linguist-language=Horse64, and the language Horse64 isn't known to gitea / go-enry, then it would be cool if it still showed up with the name "Horse64" and any random color choice in the languages bar. I checked this on my own gitea instance (running 1.14.0) and right now this isn't the case, same as on GitHub the unknown language classification is just plain ignored and omitted.
Screenshots
Project with *.h64 linguist-language=Horse64 line and some .h64 files looks like this:

Mockup how this could look like with this feature:

Currently Gitea does not support reading gitattributes file

Currently Gitea does not support reading gitattributes file

And the language bar is not branch special.

Ah interesting. I'm actually not sure if it changes on GitHub for each branch or even commit you're looking at, but so far I would have assumed it probably does...? I never really paid attention to this detail though. If  this was just based on the main branch I still think it'd work sufficiently well for most projects though.

@ell1e maybe it would be easier to add this language to go-enry?
By the way, this line implies that the .gitattributes feature is planned, though. :wink:

@alexanderadam no, this is a general problem of quirky side languages, this just doesn't scale. So just "getting it added to {library that is meant for serious syntax highlighting/lang identification}" is usually not in anybody's interest. Nobody wants that filled up with small hobby languages that might be discontinued, yet these hobby languages have a real use in having their repos not completely wrongly annotated in statistics if they can help it via manual .gitattributes entries.

Currently Gitea does not support reading gitattributes file

Is this on the roadmap to support some time? I couldn't find an issue about it.
I generally vendor a lot of code into a big mono-repo and the language bar is pretty useless to me (and I wish it wasn't!). Being able to ignore subtrees with regards to the language statistics would be very nice.

Bump. I made a language and I want stats of code written in it be shown in sidebar of its repository.

should be fixed by #16773 ?


Function/tutorial for extracting a particularly family or genus or trait

Is your feature request related to a problem? Please describe.
@pieterarnold reached out and wanted to subset austraits to a particular family and trait (Proteaceae and SLA), I wrote
Describe the solution you'd like
A function like extract_trait/extract_dataset but perhaps more generalised to allow for different levels of taxon.
Describe alternatives you've considered
A vignette perhaps for doing this before we make major changes
# You'll see in austraits$taxa is where you'll find all the taxonomic info
austraits$taxa

# Will give you families
austraits$taxa$family

# Lets find all the Proteaceae
str_which(austraits$taxa$family, "Proteaceae") #Gives you all the indices for Proteaceae
str_which(austraits$taxa$family, "Proteaceae") %>% length() #1604 species

# Find the cooresponding taxon name for those that belong in Proteaceae
austraits$taxa %>% slice( str_which(austraits$taxa$family, "Proteaceae") ) # This code is equivilant to austraits$taxa[str_which(austraits$taxa$family, "Proteaceae"),]

austraits$taxa %>% slice( str_which(austraits$taxa$family, "Proteaceae") ) %>% nrow() #Matches to 1604- what we expected!

# Pull the taxon names from this taxa table
proteaceae_sp <- austraits$taxa %>% slice( str_which(austraits$taxa$family, "Proteaceae") ) %>% pull(taxon_name) #This code is equivalent to using $ to select a column

# Extract data for Proteaceae
proteaceae_sla <- austraits %>% extract_trait("specific_leaf_area", taxon_names = proteaceae_sp)

# Just some checking
proteaceae_sla$traits$trait_name %>% unique() #Only SLA

proteaceae_sla$taxa$family %>% unique() #Only Proteaceae

I haven't merged into master yet! Currently on 'upgrade' branch - 0f92323
Will close when we release the new upgrades


Updated makefile by adding .PHONY for make target

/cc @dgoodwin

Updated makefile for hive

@gyliu513 Please be more descriptive -- updated it to do what?

@gregsheremeta Done, thanks!

I don't even know what these do but it looks like they were missing on those targets. :)
/lgtm
/ok-to-test

@dgoodwin please refer to https://stackoverflow.com/questions/2145590/what-is-the-purpose-of-phony-in-a-makefile for some explanation :-)

Today I learned! Thanks. :)


add GC heap bucket stats ETW events

This change adds GC bucket stats ETW events. When enabled, emit the total
stats and also one event per bucket. (Tried combining all bucket stats in
an array, but the array data is hard to use without additional tooling.)
Event fields include the bucket type, sizeCat, usedBytes, totalBytes.
These events are relatively expensive, so using a separate new mask and
labelled the events to Verbose level.
Added same events for MemProtectHeap.

Thanks @atulkatti !


Using VGG nets

I'm trying to use the VGG-16 net with pretrained weights.
The link https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg16.pkl does not seem to be public?
@ebenolson : I can download the file if I log in with the information you gave me.
I'm not sure how i should pre-process my data to make the model work. I looked at the preprocessing description in the repo:

In the paper, the model is denoted as the configuration D trained with scale jittering. The input images  should be zero-centered by mean pixel (rather than mean image) subtraction. Namely, the following BGR values should be subtracted: [103.939, 116.779, 123.68].

I guess i should do something like (not tested):
MEAN_VALUE = np.array([103.939, 116.779, 123.68])   # BGR
def preprocess(img):
    # img is (channels, height, width), values are 0-255
    img = img[::-1]  # switch to BGR
    img -= MEAN_VALUE
    return img

Maybe we should at preprocess functions to the modelzoo?

Thanks, forgot to make that one public. Should be good now.
There's an example of preprocessing (for VGG_S) here, but your preprocess function looks correct to me. Are you having problems?
Adding something like that to the modelzoo files seems like a good idea to me.

I haven't gotten that far yet. I'll try it out and if it works I'll add a preprocessing function for VGG. Any clue why do they use BGR ?
The model setup is nice and so far very easy to use :)

Apparently it's because Caffe uses OpenCV which uses BGR. We could swap it in the weights, but I think that could confuse people who looked at the Caffe Model Zoo page.

I have a follow up question then. Have all of the models in the model zoo here been trained on BGR or just VGG? Do you think this will remain a standard?

I ran into an issue when trying to unpickle VGG19 normalized https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg19_normalized.pkl in python 3 - no problems in python 2. Is that a compatibility problem with pickle itself?

I ran into an issue when trying to unpickle VGG19 normalized

What issue?  What's the output you're getting?  Probably best to add a separate ticket, too.

In the MNIST example there is some trickery to make the dataset (pickle file) load properly in Python 3. I guess it's because Python 3 assumes utf-8 encoding unless otherwise instructed: https://github.com/Lasagne/Lasagne/blob/master/examples/mnist.py#L34-L45
Maybe the issue you're seeing is related to that.

Here were my attempts, before I decided to use numpy's save and load in order to get the data into python 3.
values = pickle.load(open('vgg19_normalized.pkl'))['param values']

output:
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input> in <module>()
----> 1 values = pickle.load(open('vgg19_normalized.pkl'))['param values']

/home/python3/python3_install/lib/python3.4/codecs.py in decode(self, input, final)
    317         # decode input (taking the buffer into account)
    318         data = self.buffer + input
--> 319         (result, consumed) = self._buffer_decode(data, self.errors, final)
    320         # keep undecoded input until the next call
    321         self.buffer = data[consumed:]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

using the mnist trickery:
values = pickle.load(open('vgg19_normalized.pkl', encoding='latin-1'))['param values']

output:
TypeError                                 Traceback (most recent call last)
<ipython-input> in <module>()
----> 1 values = pickle.load(open('vgg19_normalized.pkl', encoding='latin-1'))['param values']

TypeError: 'str' does not support the buffer interface

Reading as bytes:
values = pickle.load(open('vgg19_normalized.pkl', 'rb'))['param values']

output:
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-10> in <module>()
----> 1 values = pickle.load(open('vgg19_normalized.pkl', 'rb'))['param values']

UnicodeDecodeError: 'ascii' codec can't decode byte 0xbc in position 1: ordinal not in range(128)

Am I doing something wrong?

Am I doing something wrong?

Yes, you didn't correctly copy the MNIST trickery. It should be pickle.load(open('vgg19_normalized.pkl'), encoding='latin-1')['param values'], not pickle.load(open('vgg19_normalized.pkl', encoding='latin-1'))['param values']. The full and truthful MNIST trickery would even be:
with open('vgg19_normalized.pkl', 'rb') as f:
    values = pickle.load(f, encoding='latin-1')['param values']

In the discussion of #21, we've pondered converting the models to numpy's .npz format. That would avoid the compatibility and security issues around pickles (and maybe even reduce download traffic when saved with np.savez_compressed()).

Could/should we provide a layer for converting from RGB to (bhwc) to BGR (bchw) similar to
https://github.com/nicholas-leonard/dpnn/blob/master/Convert.lua

@ebenolson any ideas on how could we use a pre-trained ImageNet model to fine-tune a dataset of images with 4-channels? (RGB + NIR)
Would using PCA to transform the 4-channels into 3 would work? Are there any other ideas?

Would using PCA to transform the 4-channels into 3 would work?

I doubt so. The PCA components would probably be too different from RGB.

Are there any other ideas?

You could try extending the first-layer filter tensor to have 4 input channels, initialize the additional filters randomly with a carefully-chosen scale and then slowly train. If you fear this would destroy existing weights or not give the extra information enough consideration, you could try to add a separate branch and fuse the additional infrared information later. Good luck!

Hi!
I'm trying the ImageNet VGG16 example in Recipes, and I get the same error as henridwyer
---------------------------------------------------------------------------
UnicodeDecodeError                        Traceback (most recent call last)
<ipython-input-23-ac5b1f011bed> in <module>()
      1 import pickle
      2
----> 3 model = pickle.load(open('vgg_cnn_s.pkl'), encoding='latin-1')
      4 CLASSES = model['synset words']
      5 MEAN_IMAGE = model['mean image']

/usr/lib/python3.6/codecs.py in decode(self, input, final)
    319         # decode input (taking the buffer into account)
    320         data = self.buffer + input
--> 321         (result, consumed) = self._buffer_decode(data, self.errors, final)
    322         # keep undecoded input until the next call
    323         self.buffer = data[consumed:]

UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte

This happens both with and without the encoding='latin-1' parameter to pickle.load(). Am I doing something wrong? Can you also please post the correct md5sum to the pickle-file such that I can rule out any problems with the download? Thanks!

for py3, you the full statement is:
model = pickle.load(open('vgg_cnn_s.pkl', 'rb'), encoding='latin-1')

just in case, md5sum vgg_cnn_s.pkl = ed689def9ce11256d2faf3fa62371750

Thank you, Eben! That solved it.

Hey, the amazons3 link does not work again. I get a 403 error during wget.

https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg19.pkl sorry to ask again, how to login and download the vgg16.pkl and vgg19.pkl models?

They seem to be gone, I also need them to run a third-party network. Does anybody have a copy?

Hi!
I am facing an error with this "wget https://s3.amazonaws.com/lasagne/recipes/pretrained/imagenet/vgg19.pkl". The link isn't working anymore.

The link isn't working anymore.

Yes, unfortunately it was getting too costly, see #115. The post before links to academictorrents.com, does that work for you? We're happy to have them hosted somewhere else and update the URLs, if you know a good solution. (Zenodo?)

The link isn't working anymore.

Yes, unfortunately it was getting too costly, see #115. The post before links to academictorrents.com, does that work for you? We're happy to have them hosted somewhere else and update the URLs, if you know a good solution. (Zenodo?)

Hi!
The torrent has very few seeders, so I am not able to download the file.

@priyanshuvarsh Did you find any fix for your problem ?
I am getting same error as you now.
Can you please tell how to fix this ?

@davidtellez - Using that academic torrent link gives error as pointed out by @priyanshuvarsh .
Did you get any such error.
If possible can you share your vgg19 pickle file.
I need it urgently for my project.

Please follow the instructions in the readme. All files are still accessible, you will need an AWS account and a requester-pays client.


Violations Report Export Broken

Same on Badge, TMP, and local. Go to the subject page, select a date range that has violations, and try to export. Crash.
I compared to my recent work on Purchases for exporting and tried to duplicate the code in Violations/Report but the error just kept changing to something new.

working: Purchases, Calendar


haproxy metrics exposed by defaultBackend by ingress

I have issue that metrics of haproxy or haproxy-ingress are exposed to ingress on path /metrics. They shouldn't be exposed external by defaultBackend.
Values:
  defaultBackend:
    enabled: true
    resources:
      limits:
        cpu: 20m
        memory: 20Mi
      requests:
        cpu: 20m
        memory: 20Mi
    replicaCount: 2
  controller:
    haproxy:
      enabled: enabled
      image:
        repository: haproxy
        tag: "2.3.12"
        pullPolicy: IfNotPresent
    resources:
      limits:
        cpu: 2
        memory: 512Mi
      requests:
        cpu: 200m
        memory: 128Mi
    autoscaling:
      enabled: true
      minReplicas: 2
      maxReplicas: 10
      targetCPUUtilizationPercentage: 50
    serviceMonitor:
      enabled: true
    ingressClass: haproxy
    podAnnotations:
      prometheus.io/scrape: "true"
      prometheus.io/port: "10254"
          topologyKey: "kubernetes.io/hostname"
    extraArgs:
      publish-service: "haproxy-ingress/haproxy-ingress"
    securityContext:
      sysctls:
      - name: net.ipv4.ip_local_port_range
        value: "1024 65535"
    livenessProbe:
      failureThreshold: 10
    service:
      type: LoadBalancer
      labels:
        app.kubernetes.io/release: haproxy-ingress
    stats:
      enabled: true
    metrics:
      enabled: true
      embaded: false
    config:
      timeout-keep-alive: 620s
      config-global: |
        tune.bufsize 32768
        tune.maxrewrite 8192
      config-defaults: |
        option redispatch
      securityContext:
        privileged: true

Metrics are available on
http://ingress-domain.com/metrics
When ingress object has defined path /metrics it will display app metrics

Hi thanks for sharing this. The problem is the default image which has a /metrics uri, I'll look for another image and change the default option.
Since you're not using your own email, it should be safe to change defaultBackend/enabled to false or even remove the whole defaultBackend config - HAProxy Ingress has its own self generated 404 error page which doesn't have this problem.

Default image updated to k8s.gcr.io/defaultbackend-amd64:1.5, which doesn't implement a /metrics uri, and will be available in the next release. Closing.


chore: update dependencies

:tada: This PR is included in version 6.9.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Modal Dialog

What's the proper way to gray out background when opening a dialogue using the framework.  I have a few ideas but what would be the most ideal way using the framework.

Edson thanks that was easy.


update README, requirements.txt

remove escape chars from README.md, make it markdown friendly
requirements.txt makes dependency management easy

Merging pull requests from @paralax on README + adding the requirements.txt file.