Git Product home page Git Product logo

Comments (6)

sergioburdisso avatar sergioburdisso commented on May 17, 2024 2

This gif perfectly describes how I feel right now:

I don't know what I was thinking when I wrote that part of the code, maybe I was hungry and was thinking about eating some pizza (?) 🤦 lol.

Anyway, thanks for reporting this, I should update the documentation and replace "sanction" with "significance", and "sn_m" with "sg_m" (Note: if you have already done it yourself, do not hesitate to create a new Pull Request, it will be appreciated and received with love ❤️ :octocat:).

from pyss3.

angrymeir avatar angrymeir commented on May 17, 2024 2

Nice! \o/
Let me know if you find anything - I'll also have a look into it again later 🔍

from pyss3.

angrymeir avatar angrymeir commented on May 17, 2024 1

Ah nice 😄
I implemented the changes, however the tests for the latest commit fail for me at Job 1.2 and Job 1.4.

Are you sure this test is implemented correctly? To me it seems odd, that there is no path given...
Could you please help me to understand the problem here?

Btw: Is there a reason that only Job 1.2 and Job 1.4 perform server testing?

from pyss3.

sergioburdisso avatar sergioburdisso commented on May 17, 2024

That is really really super duper weird 😮, why failing with Python 3.5 and 3.7, and not 3.6? that is super weird 🤔.

Are you sure this test is implemented correctly? To me it seems odd, that there is no path given...

The path should be given by the mockers argument:

def test_main(mockers, mocker):

Which is defined here:
@pytest.fixture()
def mockers(mocker):
"""Set mockers up."""
mocker.patch("webbrowser.open")
mocker.patch.object(LT, "serve")
mocker.patch.object(SS3, "load_model")
mocker.patch.object(argparse.ArgumentParser, "add_argument")
mocker.patch.object(argparse.ArgumentParser,
"parse_args").return_value = MockCmdLineArgs

The last two lines above (line 64 and 65) return a mocked version of the "parse_args" which is defined here:
class MockCmdLineArgs:
"""Mocked command-line arguments."""
quiet = True
MODEL = "name"
path = dataset_path
path_labels = None
label = 'folder'
port = 0

There, in line 51, the path is being set (path = dataset_path). That's the way the path should be given, which explains why it worked for all the other jobs... but why not for those Job 1.2 and Job 1.4? mmm... what I can tell by the error log, somehow the path is (or has become) None there, would it be caused by the previous "ValueError: the default category must be 'most-probable', 'unknown', or a category name (current value is 'xxxxx')" error? I don't know, in which case I would try removing or commenting out this line:
serve_args["def_cat"] = 'xxxxx' # raise ValueError

But, as I said, it is weird, the server test is not "straightforward" because it has to use threads to run the server multiple times with different arguments sending (handcrafted) HTTP requests from the main test thread to those "server threads", could it be something related to the overlapping of those asynchronous tests, somehow? Anyhow, feel free to perform the Pull Request, we will merge it and then try to locally replicate the error to trace back where this error is originating. Don't worry, before releasing a new version with these patches, we will fix these test errors, what do you think?

from pyss3.

angrymeir avatar angrymeir commented on May 17, 2024

Ah okay now I understand where it gets its arguments from.

I just ran the tests on a plain 18.04 Ubuntu VM and all of them passed...
However ValueError: the default category must be 'most-probable', 'unknown', or a category name (current value is 'xxxxx'). still occurs - guess this doesn't have an impact on our failing tests.
Maybe it's due to the fact, that the Buildagents still use Ubuntu 16.04?

Then lets do the merge and figure out the problem after that :)

from pyss3.

sergioburdisso avatar sergioburdisso commented on May 17, 2024

Perfect! Thanks for your contribution!!!

I've merged the changes and updated the Contributions section to add "code" to your contribution types 👍.
Now I'll try to locally replicate the error before releasing the new version containing your patch. 🤞 🤞 🤞

(I've just sent you an invitation to be added as a contributor, so you can get direct access to this repository from now on 😎 )

from pyss3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.