pristine___: your top artists are limited because of the mapping?
2020-10-23 29710, 2020
pristine___
I have 9 top artists in the last week.
2020-10-23 29715, 2020
pristine___
So yeah, I guess so
2020-10-23 29739, 2020
ruaok
you have 3 listens in the last week.
2020-10-23 29758, 2020
ruaok
there is not meaningful way for us to generate recommendations from that.
2020-10-23 29723, 2020
zas
if you want to provide a value updated each hour even if we query every minute, we need the timestamp in the json: it has to stay constant over 1 hour, and updated on value update: this way only one value will be stored per hour, but imho that's not great for calculating rates (24 values / day), or to detect spikes of activity
ruaok: then daily jams are pretty cool, I just have to listen to more music (idk why I thought I have 9 artists in the last week)
2020-10-23 29712, 2020
ruaok
a friend of mine who also uses the office has started listening to his daily jams too.
2020-10-23 29703, 2020
alastairp
zas: right. reading this it says that it will return the difference, or zero. Does this mean that the difference between 84 and 9 will be 0? this means that we will lose at least 9 from the count. I don't know how important this is for our stats at the moment
2020-10-23 29710, 2020
shivam-kapila
ruaok: anyway I can play it on alexa
2020-10-23 29730, 2020
shivam-kapila
Any way*
2020-10-23 29745, 2020
alastairp
of course, if we're lucky enough that telegraf reads 84, 0, 9, we'll get that count from 0 to 9
2020-10-23 29747, 2020
ruaok
you mean is amazon supported on brainzplayer?
2020-10-23 29703, 2020
alastairp
and it's true that we don't know how much we're missing between 84 and 0
2020-10-23 29720, 2020
shivam-kapila
not amazon necessarily. Spotify works
2020-10-23 29726, 2020
zas
alastairp: you misread, it will return only positive or zero differences, but nothing if negative
2020-10-23 29728, 2020
pristine___
ruaok: nice. Okay so I remember now, I didn't submit listens because I wanted to check if recs are repeated if I listen to same artist for two/three weeks. Sorry for all the confusion.
2020-10-23 29738, 2020
zas
NON_NEGATIVE_DIFFERENCE() behaves the same as the DIFFERENCE() function but NON_NEGATIVE_DIFFERENCE() returns only positive differences or differences that equal zero.
2020-10-23 29718, 2020
zas
in practice, it just ignores points leading to negative difference, because... they shoudln't happen
2020-10-23 29755, 2020
alastairp
but they do happen, for example in your case of counting bytes received since reboot. this will cause a negative difference
2020-10-23 29708, 2020
zas
yes, they do, but they are ignored
2020-10-23 29734, 2020
zas
that's a non-ssue since reboots aren't supposed to happen often
2020-10-23 29737, 2020
alastairp
but it means that in the case of a counter going down, it won't get counted again until 2 poll periods
2020-10-23 29702, 2020
zas
yes, this is why you need a better resolution (1 minute) instead of 1 hour
2020-10-23 29705, 2020
alastairp
if you think that it won't be a problem to store numerical data for each minute, then perhaps that's the easiest thing to do, then
2020-10-23 29737, 2020
zas
it isnt a problem if occurences of negative difference are rare...
2020-10-23 29754, 2020
alastairp
it will only happen if redis data is cleared
2020-10-23 29749, 2020
zas
exactly, and if we collect values every minute, it will mean an approximation over a short time (<3minutes)
2020-10-23 29746, 2020
zas
counters working like that aren't rare, in fact most are like this
2020-10-23 29747, 2020
alastairp
just building a new test now
2020-10-23 29752, 2020
zas
but there are cases we want negative difference: think about disk space used, it can increase or decrease, and we still have one integer value provided (the actual space used at time t)
2020-10-23 29701, 2020
zas
influx/telegraf don't care: they store timestamp and integer, that's at the end when we actually represent the data on graphs that we decide how to handle it
2020-10-23 29733, 2020
zas
and this is when we add units
2020-10-23 29756, 2020
alastairp
I guess I was too concerned with storage in influx
2020-10-23 29711, 2020
zas
for example, we collect number of bytes sent since boot, but we draw mean bandwith in Mbits/s from that
is it much work to set up a temporary telegraf -> influx -> granfa pipeline to see that this works, or do you think that we should just wait until we have actual stats being collected?
2020-10-23 29747, 2020
zas
nope, I will proceed
2020-10-23 29754, 2020
alastairp
thank you!
2020-10-23 29708, 2020
zas
a thing you could add: a tag to indicate which instance it is
2020-10-23 29755, 2020
zas
this is a constant value in your json: like id: "beta.lb", server: "lemmy" or the like
2020-10-23 29717, 2020
alastairp
ok
2020-10-23 29744, 2020
zas
we can indicate this json key is a tag, then it can be used to display data for a set of tags (like same data for 2 servers over the same time period)
2020-10-23 29722, 2020
zas
telegraf automatically add tags for host it runs on for example, but for this case I'll use telegraf-services which runs on yehudi atm
2020-10-23 29735, 2020
MusicbrainzB0T2 joined the channel
2020-10-23 29723, 2020
alastairp
done, tagged with the domain name, which I think makes sense at the moment
Hi! I've got a release that Picard thinks is not _multiartist, but I'm pretty sure it is... I've had a brief look at album.py around line 362 and can't figure out its reasoning...
but the whole configuration is generated from consul template
2020-10-23 29723, 2020
alastairp
ruaok: oh? out of interest what part? Because it returns paths instead of filenames?
2020-10-23 29738, 2020
zas
it means we could automatically find the url from the actual container
2020-10-23 29745, 2020
ruaok
yes, then I need to parse that back out... nonsense. the code works fine now.
2020-10-23 29755, 2020
ruaok
good enough.
2020-10-23 29705, 2020
zas
if the stats page isn't available from worldwide for example
2020-10-23 29710, 2020
alastairp
sure, I was just recommending it as a way of avoiding the if .endswith("py")
2020-10-23 29734, 2020
alastairp
but if it adds additional complexity then sure, no problem
2020-10-23 29745, 2020
BrainzGit
[troi-recommendation-playground] mayhem merged pull request #16 (main…add-local-patches-dir): Add support for loading patches from the patches directory in the current directory. https://github.com/metabrainz/troi-recommendation…
2020-10-23 29752, 2020
ruaok calls it good enough
2020-10-23 29746, 2020
zas
alastairp: in the dashboard I add new listens per minute graph so you can see how it works
2020-10-23 29706, 2020
Mineo
zoeb: that album has _multiartist set to 1 for me. if you can reproduce your behaviour without any scripts or plugins, please open a bug report at https://tickets.metabrainz.org/
2020-10-23 29718, 2020
zoeb
Hmm, maybe it's a setting I've changed somewhere... Thank you for checking!
alastairp: you're great at tossing me down rabbit-holes with your PR comments.
2020-10-23 29720, 2020
alastairp
ruaok: so I guess the question is why do we need the cli `test` subcommand. If the `pytest` binary is in the path and all the cli command does is pass the args directly to pytest, is it needed?
2020-10-23 29748, 2020
ruaok
teh cli command does not pass arguments as you had hoped.
2020-10-23 29711, 2020
ruaok
click magic foo is deep.
2020-10-23 29731, 2020
alastairp
right, so I'm asking what's the point of having `troi test` anyway?
2020-10-23 29732, 2020
ruaok
and another half hour evaporated making it as you suggested, before I gave up on that one too.
2020-10-23 29739, 2020
alastairp
when it's just as easy to run `pytest`
2020-10-23 29713, 2020
ruaok
just felt right to me.
2020-10-23 29734, 2020
ruaok
it is more easily discoverable by someone wanting to run tests.
2020-10-23 29749, 2020
ruaok
if you feel really strongly, I can remove it.
2020-10-23 29752, 2020
alastairp
in the current case, there's nothing stopping us from using pytest, so if it's not possible to make click do what we want I can still use that
2020-10-23 29746, 2020
ruaok
sure, detailed use cases use pytest. if a random user would like to run tests, they can do so via the command line
2020-10-23 29702, 2020
alastairp
perhaps that's good enough then
2020-10-23 29741, 2020
ruaok
oh, here is a difference, alastairp
2020-10-23 29757, 2020
ruaok
running pytest is only possible if you have a virtualenv installed.
2020-10-23 29722, 2020
ruaok
`python -m troi.cli test` should work even without creating a venc
2020-10-23 29727, 2020
ruaok
*venv
2020-10-23 29744, 2020
ruaok
keeping in line with yesterdays's convo of not having to install troi with -e
2020-10-23 29749, 2020
alastairp
mm, that made me realise something - does this make pytest an install-time dependency of troi?
2020-10-23 29713, 2020
alastairp
I'm not sure I follow you about needing a venv - do you mean that you just need pytest installed on the $PATH?
2020-10-23 29743, 2020
ruaok
> mm, that made me realise something - does this make pytest an install-time dependency of troi?
2020-10-23 29744, 2020
ruaok
yes
2020-10-23 29704, 2020
ruaok
the key about the venv is that you need to `pip install -e`for the troi modules to be resolved correctly if the troi module is not installed, no?
2020-10-23 29712, 2020
alastairp
I guess it's a development framework, not a standalone library in its own right, so I guess that's not unreasonable
2020-10-23 29726, 2020
alastairp
ah, right
2020-10-23 29732, 2020
ruaok
we can always change it later.
2020-10-23 29744, 2020
alastairp
I guess the more specific question is, will `pytest` put . in sys.path or not?
2020-10-23 29703, 2020
ruaok
unsure.
2020-10-23 29736, 2020
alastairp
keep in mind that this is how we run tests in every other brainz, we just invoke `pytest` in the current directory and it finds stuff
2020-10-23 29752, 2020
alastairp
so i'm pretty sure that it'll do the right thing without having to install
2020-10-23 29753, 2020
ruaok
ahhh, that is good to know.
2020-10-23 29704, 2020
alastairp
you're talking about the case where you git clone troi; cd troi, right?
2020-10-23 29748, 2020
zoeb has left the channel
2020-10-23 29752, 2020
ruaok
yes
2020-10-23 29723, 2020
_lucifer
is a UI also on the roadmap for troi ?
2020-10-23 29754, 2020
alastairp
in that case you'll have to run pip install -r requirements.txt anyway to make sure you have all the dependencies - that's either going to install into a venv if you have one activated, or into /usr/local/lib
2020-10-23 29755, 2020
ruaok
it is something that monkey would like to play with, yes.
> But now this introduces a subtle problem: in order to load the test modules from the tests directory, pytest prepends the root of the repository to sys.path, which adds the side-effect that now mypkg is also importable.