Giter Site home page Giter Site logo

Comments (9)

matthchr avatar matthchr commented on July 18, 2024

Hi @wirehell can you expand more on this? Where are you looking for the JobStats and not seeing them? Have you tried turning on "use stats during list" in the options menu?

from azure-batch-samples.

wirehell avatar wirehell commented on July 18, 2024

For tasks the statistics is there:
taskstatistics
But not for jobs:
jobstatistics

from azure-batch-samples.

matthchr avatar matthchr commented on July 18, 2024

@wirehell Are you refreshing your resources after enabling the "use stats during list" (either by refreshing the individual item or by refreshing the list of jobs?). If you do not refresh after checking the "use stats during list" box then the statistics don't show up.

Also, JobStatistics takes a bit to aggregate, you won't see it immediately after the first task in the job is run, it will take some time (I think 15m).

I looked into this a bit more on our server though and it seems your job doesn't have stats even now. We are looking into why that is.

from azure-batch-samples.

matthchr avatar matthchr commented on July 18, 2024

@wirehell Sorry for the long response -- there was a bug in the service where some jobs were not having statistics aggregated for them correctly (so you would see task level statistics but not job level statistics).

A fix has been rolled out, so all new jobs statistics will work (new jobs should have statistics). There is no issue in BatchExplorer, this was an issue with the underlying service.

from azure-batch-samples.

wirehell avatar wirehell commented on July 18, 2024

Ah, I see. Thanks.

from azure-batch-samples.

Malondron avatar Malondron commented on July 18, 2024

Hi,

the issue seems to persist. Both using the BatchExplorer and the usual batch rest API, the tasks have statistics, but the jobs don't.

from azure-batch-samples.

nmontmarquette avatar nmontmarquette commented on July 18, 2024

@matthchr Probably not directly related to the original issue, how do you get statistics for jobs or tasks? I am using the Python API. When querying jobs with the list method, I feel like you have to supply something in the JobListOptions in the expand parameter. I have some hard time finding up-to-date documentation on that.

from azure-batch-samples.

darylmsft avatar darylmsft commented on July 18, 2024

We will get you a clear answer in Python, but because it is late on a Friday I will add enough non-Python information in the hopes you can be unblocked. The <job, task> statistics are considered "associated entities" and such entities are more expensive to fetch and, thus, are not returned by default. In the context of C# this is discussed here. The REST API for ListJobs shows the expand clause here.

These sources implicate the JobListOptions in Python (with expand set to stats).

We will get you a sample fragment in Python to show how this is done but until then hopefully the above will help.

from azure-batch-samples.

annatisch avatar annatisch commented on July 18, 2024

Hi @nmontmarquette,
In the Python SDK this can be done with the JobGetOptions (or taskGetOptions) where you can set the expand clause that @darylmsft described:

options = batch.models.JobGetOptions(expand='stats')
job = batch_client.job.get(job.id, job_get_options=options)
print(job.stats)

The same syntax is used for the select clause.
If you want to select or expand multiple attributes, you can specify comma-separated values:

options = batch.models.JobGetOptions(expand='stats', select='id,state')
job = batch_client.job.get(job.id, job_get_options=options)

from azure-batch-samples.

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.