{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "provenance": [] }, "kernelspec": { "name": "python3", "display_name": "Python 3" }, "language_info": { "name": "python" } }, "cells": [ { "cell_type": "code", "source": [ "!pip install litellm==1.67.2 -q" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/" }, "collapsed": true, "id": "lBcTL-cV2pbC", "outputId": "3f65af38-8ffe-4ee9-9082-d5f24c320fa6" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stdout", "text": [ "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/7.6 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[90m╺\u001b[0m\u001b[90m━━━\u001b[0m \u001b[32m6.9/7.6 MB\u001b[0m \u001b[31m208.3 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.6/7.6 MB\u001b[0m \u001b[31m114.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[?25h" ] } ] }, { "cell_type": "code", "source": [ "\n", "def enrich_df_with_duration_in_minutes(df, col_name, output_name):\n", " \"\"\"Creates a map from duration strings to approximate minutes.\"\"\"\n", " duration_map = {}\n", " minute = 1\n", " hour = 60 * minute\n", " day = 8 * hour\n", " week = 5 * day\n", " month = 4 * week # Approximation\n", " year = 12 * month # Approximation\n", "\n", " duration_map[\"10 minutes\"] = 10 * minute\n", " duration_map[\"30 minutes\"] = 30 * minute\n", " duration_map[\"1 hour\"] = 1 * hour\n", " duration_map[\"2 hours\"] = 2 * hour\n", " duration_map[\"4 hours\"] = 4 * hour\n", " duration_map[\"8 hours\"] = 8 * hour\n", " duration_map[\"16 hours\"] = 16 * hour\n", " duration_map[\"3 days\"] = 3 * day\n", " duration_map[\"1 week\"] = 1 * week\n", " duration_map[\"3 weeks\"] = 3 * week\n", " duration_map[\"6 weeks\"] = 6 * week\n", " duration_map[\"3 months\"] = 3 * month\n", " duration_map[\"6 months\"] = 6 * month\n", " duration_map[\"1 year\"] = 1 * year\n", " duration_map[\"3 years\"] = 3 * year\n", " duration_map[\"6 years\"] = 6 * year\n", " duration_map[\"10 years\"] = 10 * year\n", "\n", " df[output_name] = df[col_name].map(duration_map)\n", "\n", " assert df[output_name].isna().sum() == 0\n", "\n", " return df\n", "\n", "duration_map = {}\n", "minute = 1\n", "hour = 60 * minute\n", "day = 8 * hour\n", "week = 5 * day\n", "month = 4 * week # Approximation\n", "year = 12 * month # Approximation\n", "\n", "duration_map[\"10 minutes\"] = 10 * minute\n", "duration_map[\"30 minutes\"] = 30 * minute\n", "duration_map[\"1 hour\"] = 1 * hour\n", "duration_map[\"2 hours\"] = 2 * hour\n", "duration_map[\"4 hours\"] = 4 * hour\n", "duration_map[\"8 hours\"] = 8 * hour\n", "duration_map[\"16 hours\"] = 16 * hour\n", "duration_map[\"3 days\"] = 3 * day\n", "duration_map[\"1 week\"] = 1 * week\n", "duration_map[\"3 weeks\"] = 3 * week\n", "duration_map[\"6 weeks\"] = 6 * week\n", "duration_map[\"3 months\"] = 3 * month\n", "duration_map[\"6 months\"] = 6 * month\n", "duration_map[\"1 year\"] = 1 * year\n", "duration_map[\"3 years\"] = 3 * year\n", "duration_map[\"6 years\"] = 6 * year\n", "duration_map[\"10 years\"] = 10 * year\n", "\n", "duration_map\n" ], "metadata": { "id": "U5hXnJs4z2DI" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "Mc5jFL0yvU8G", "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "collapsed": true, "outputId": "3f524189-cae9-4911-a28c-82f584412ca4" }, "outputs": [ { "output_type": "execute_result", "data": { "text/plain": [ " Task \\\n", "0 Research equipment or component needs, sources... \n", "1 Prepare documentation or presentations, includ... \n", "2 Review material and labor requirements to deci... \n", "3 Perform administrative duties, such as authori... \n", "4 Write grant proposals to procure external rese... \n", "5 Maintain regularly scheduled office hours to a... \n", "6 Compile, administer, and grade examinations, o... \n", "7 Maintain regularly scheduled office hours to a... \n", "8 Compile, administer, and grade examinations, o... \n", "9 Maintain regularly scheduled office hours to a... \n", "10 Meet with parents and guardians to discuss the... \n", "11 Maintain regularly scheduled office hours to a... \n", "12 Maintain regularly scheduled office hours to a... \n", "13 Maintain regularly scheduled office hours to a... \n", "14 Write grant proposals to procure external rese... \n", "15 Prepare technical and research reports, such a... \n", "16 Collaborate with colleagues to address teachin... \n", "17 Compile, administer, and grade examinations, o... \n", "18 Maintain student attendance records, grades, a... \n", "19 Maintain regularly scheduled office hours to a... \n", "20 Initiate, facilitate, and moderate classroom d... \n", "21 Evaluate data processing proposals to assess p... \n", "22 Maintain regularly scheduled office hours to a... \n", "23 Manage subcontractor activities, reviewing pro... \n", "24 Participate in student recruitment, registrati... \n", "25 Conduct research in a particular field of know... \n", "26 Serve on academic or administrative committees... \n", "27 Locate suppliers, using sources such as catalo... \n", "28 Consult with institutions or associations rega... \n", "29 Compile bibliographies of specialized material... \n", "30 Maintain student attendance records, grades, a... \n", "31 Prepare course materials, such as syllabi, hom... \n", "32 Supervise loan personnel. \n", "33 Prepare nanotechnology-related invention discl... \n", "34 Provide professional consulting services to go... \n", "35 Prepare course materials, such as syllabi, hom... \n", "36 Assess or propose sustainability initiatives, ... \n", "37 Create debt management plans, spending plans, ... \n", "38 Maintain student attendance records, grades, a... \n", "39 Compile bibliographies of specialized material... \n", "40 Recommend or execute personnel actions, such a... \n", "41 Compile and prepare documentation related to p... \n", "42 Maintain student attendance records, grades, a... \n", "43 Attend meetings or seminars or read current li... \n", "44 Research the target audience of projects. \n", "\n", " Occupation \\\n", "0 Electrical and Electronic Engineering Technolo... \n", "1 Remote Sensing Technicians \n", "2 Cost Estimators \n", "3 First-Line Supervisors of Landscaping, Lawn Se... \n", "4 Biological Science Teachers, Postsecondary \n", "5 Area, Ethnic, and Cultural Studies Teachers, P... \n", "6 Family and Consumer Sciences Teachers, Postsec... \n", "7 Engineering Teachers, Postsecondary \n", "8 Social Work Teachers, Postsecondary \n", "9 Family and Consumer Sciences Teachers, Postsec... \n", "10 Special Education Teachers, Secondary School \n", "11 Anthropology and Archeology Teachers, Postseco... \n", "12 Architecture Teachers, Postsecondary \n", "13 Family and Consumer Sciences Teachers, Postsec... \n", "14 Philosophy and Religion Teachers, Postsecondary \n", "15 Industrial Ecologists \n", "16 Communications Teachers, Postsecondary \n", "17 Anthropology and Archeology Teachers, Postseco... \n", "18 Business Teachers, Postsecondary \n", "19 Anthropology and Archeology Teachers, Postseco... \n", "20 Sociology Teachers, Postsecondary \n", "21 Computer and Information Systems Managers \n", "22 Anthropology and Archeology Teachers, Postseco... \n", "23 Logisticians \n", "24 Agricultural Sciences Teachers, Postsecondary \n", "25 Engineering Teachers, Postsecondary \n", "26 Engineering Teachers, Postsecondary \n", "27 Procurement Clerks \n", "28 Registered Nurses \n", "29 Criminal Justice and Law Enforcement Teachers,... \n", "30 Foreign Language and Literature Teachers, Post... \n", "31 Atmospheric, Earth, Marine, and Space Sciences... \n", "32 Loan Officers \n", "33 Nanosystems Engineers \n", "34 Physics Teachers, Postsecondary \n", "35 History Teachers, Postsecondary \n", "36 Sustainability Specialists \n", "37 Credit Counselors \n", "38 Art, Drama, and Music Teachers, Postsecondary \n", "39 Family and Consumer Sciences Teachers, Postsec... \n", "40 First-Line Supervisors of Production and Opera... \n", "41 Production, Planning, and Expediting Clerks \n", "42 Environmental Science Teachers, Postsecondary \n", "43 Remote Sensing Scientists and Technologists \n", "44 Graphic Designers \n", "\n", " Occupation Description Lower bound Upper bound \\\n", "0 Apply electrical and electronic theory and rel... 30 minutes 3 days \n", "1 Apply remote sensing technologies to assist sc... 2 hours 1 week \n", "2 Prepare cost estimates for product manufacturi... 4 hours 1 week \n", "3 Directly supervise and coordinate activities o... 2 hours 8 hours \n", "4 Teach courses in biological sciences. Includes... 1 week 6 months \n", "5 Teach courses pertaining to the culture and de... 30 minutes 3 months \n", "6 Teach courses in childcare, family relations, ... 1 hour 2 hours \n", "7 Teach courses pertaining to the application of... 30 minutes 3 months \n", "8 Teach courses in social work. Includes both te... 1 hour 2 hours \n", "9 Teach courses in childcare, family relations, ... 30 minutes 3 months \n", "10 Teach academic, social, and life skills to sec... 4 hours 6 months \n", "11 Teach courses in anthropology or archeology. I... 30 minutes 3 months \n", "12 Teach courses in architecture and architectura... 30 minutes 3 months \n", "13 Teach courses in childcare, family relations, ... 30 minutes 3 months \n", "14 Teach courses in philosophy, religion, and the... 1 week 6 months \n", "15 Apply principles and processes of natural ecos... 1 week 6 months \n", "16 Teach courses in communications, such as organ... 2 hours 8 hours \n", "17 Teach courses in anthropology or archeology. I... 1 hour 2 hours \n", "18 Teach courses in business administration and m... 30 minutes 4 hours \n", "19 Teach courses in anthropology or archeology. I... 30 minutes 2 hours \n", "20 Teach courses in sociology. Includes both teac... 1 week 3 weeks \n", "21 Plan, direct, or coordinate activities in such... 1 hour 2 hours \n", "22 Teach courses in anthropology or archeology. I... 30 minutes 2 hours \n", "23 Analyze and coordinate the ongoing logistical ... 8 hours 3 months \n", "24 Teach courses in the agricultural sciences. In... 2 hours 8 hours \n", "25 Teach courses pertaining to the application of... 6 weeks 10 years \n", "26 Teach courses pertaining to the application of... 2 hours 8 hours \n", "27 Compile information and records to draw up pur... 1 hour 8 hours \n", "28 Assess patient health problems and needs, deve... 1 week 6 weeks \n", "29 Teach courses in criminal justice, corrections... 4 hours 1 week \n", "30 Teach languages and literature courses in lang... 1 hour 8 hours \n", "31 Teach courses in the physical sciences, except... 2 hours 3 days \n", "32 Evaluate, authorize, or recommend approval of ... 30 minutes 8 hours \n", "33 Design, develop, or supervise the production o... 3 days 6 months \n", "34 Teach courses pertaining to the laws of matter... 1 week 3 months \n", "35 Teach courses in human history and historiogra... 2 hours 3 days \n", "36 Address organizational sustainability issues, ... 8 hours 6 weeks \n", "37 Advise and educate individuals or organization... 8 hours 3 weeks \n", "38 Teach courses in drama, music, and the arts in... 30 minutes 2 hours \n", "39 Teach courses in childcare, family relations, ... 4 hours 1 week \n", "40 Directly supervise and coordinate the activiti... 1 hour 1 week \n", "41 Coordinate and expedite the flow of work and m... 4 hours 3 days \n", "42 Teach courses in environmental science. Includ... 30 minutes 2 hours \n", "43 Apply remote sensing principles and methods to... 1 week 6 months \n", "44 Design or create graphics to meet specific com... 8 hours 1 week \n", "\n", " dwas \n", "0 ['Estimate technical or resource requirements ... \n", "1 ['Prepare scientific or technical reports or p... \n", "2 ['Estimate costs of goods or services.'] \n", "3 ['Document work hours or activities.'] \n", "4 ['Write grant proposals.'] \n", "5 ['Advise students on academic or career matter... \n", "6 ['Administer tests to assess educational needs... \n", "7 ['Advise students on academic or career matter... \n", "8 ['Administer tests to assess educational needs... \n", "9 ['Advise students on academic or career matter... \n", "10 ['Discuss student progress with parents or gua... \n", "11 ['Advise students on academic or career matter... \n", "12 ['Advise students on academic or career matter... \n", "13 ['Advise students on academic or career matter... \n", "14 ['Write grant proposals.'] \n", "15 ['Prepare research or technical reports on env... \n", "16 ['Research topics in area of expertise.'] \n", "17 ['Administer tests to assess educational needs... \n", "18 ['Advise students on academic or career matter... \n", "19 ['Advise students on academic or career matter... \n", "20 ['Guide class discussions.'] \n", "21 ['Analyze data to determine project feasibilit... \n", "22 ['Advise students on academic or career matter... \n", "23 ['Supervise employees.'] \n", "24 ['Promote educational institutions or programs... \n", "25 ['Research topics in area of expertise.', 'Wri... \n", "26 ['Serve on institutional or departmental commi... \n", "27 ['Obtain information about goods or services.'] \n", "28 ['Advise communities or institutions regarding... \n", "29 ['Compile specialized bibliographies or lists ... \n", "30 ['Maintain student records.'] \n", "31 ['Develop instructional materials.'] \n", "32 ['Supervise employees.'] \n", "33 ['Prepare contracts, disclosures, or applicati... \n", "34 ['Advise educators on curricula, instructional... \n", "35 ['Develop instructional materials.'] \n", "36 ['Assess the cost effectiveness of products, p... \n", "37 ['Develop financial plans for clients.'] \n", "38 ['Maintain student records.'] \n", "39 ['Compile specialized bibliographies or lists ... \n", "40 ['Perform human resources activities.'] \n", "41 ['Compile data or documentation.', 'Record per... \n", "42 ['Maintain student records.'] \n", "43 ['Review professional literature to maintain p... \n", "44 ['Conduct market research.', 'Collect data abo... " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
TaskOccupationOccupation DescriptionLower boundUpper bounddwas
0Research equipment or component needs, sources...Electrical and Electronic Engineering Technolo...Apply electrical and electronic theory and rel...30 minutes3 days['Estimate technical or resource requirements ...
1Prepare documentation or presentations, includ...Remote Sensing TechniciansApply remote sensing technologies to assist sc...2 hours1 week['Prepare scientific or technical reports or p...
2Review material and labor requirements to deci...Cost EstimatorsPrepare cost estimates for product manufacturi...4 hours1 week['Estimate costs of goods or services.']
3Perform administrative duties, such as authori...First-Line Supervisors of Landscaping, Lawn Se...Directly supervise and coordinate activities o...2 hours8 hours['Document work hours or activities.']
4Write grant proposals to procure external rese...Biological Science Teachers, PostsecondaryTeach courses in biological sciences. Includes...1 week6 months['Write grant proposals.']
5Maintain regularly scheduled office hours to a...Area, Ethnic, and Cultural Studies Teachers, P...Teach courses pertaining to the culture and de...30 minutes3 months['Advise students on academic or career matter...
6Compile, administer, and grade examinations, o...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...1 hour2 hours['Administer tests to assess educational needs...
7Maintain regularly scheduled office hours to a...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...30 minutes3 months['Advise students on academic or career matter...
8Compile, administer, and grade examinations, o...Social Work Teachers, PostsecondaryTeach courses in social work. Includes both te...1 hour2 hours['Administer tests to assess educational needs...
9Maintain regularly scheduled office hours to a...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...30 minutes3 months['Advise students on academic or career matter...
10Meet with parents and guardians to discuss the...Special Education Teachers, Secondary SchoolTeach academic, social, and life skills to sec...4 hours6 months['Discuss student progress with parents or gua...
11Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes3 months['Advise students on academic or career matter...
12Maintain regularly scheduled office hours to a...Architecture Teachers, PostsecondaryTeach courses in architecture and architectura...30 minutes3 months['Advise students on academic or career matter...
13Maintain regularly scheduled office hours to a...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...30 minutes3 months['Advise students on academic or career matter...
14Write grant proposals to procure external rese...Philosophy and Religion Teachers, PostsecondaryTeach courses in philosophy, religion, and the...1 week6 months['Write grant proposals.']
15Prepare technical and research reports, such a...Industrial EcologistsApply principles and processes of natural ecos...1 week6 months['Prepare research or technical reports on env...
16Collaborate with colleagues to address teachin...Communications Teachers, PostsecondaryTeach courses in communications, such as organ...2 hours8 hours['Research topics in area of expertise.']
17Compile, administer, and grade examinations, o...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...1 hour2 hours['Administer tests to assess educational needs...
18Maintain student attendance records, grades, a...Business Teachers, PostsecondaryTeach courses in business administration and m...30 minutes4 hours['Advise students on academic or career matter...
19Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes2 hours['Advise students on academic or career matter...
20Initiate, facilitate, and moderate classroom d...Sociology Teachers, PostsecondaryTeach courses in sociology. Includes both teac...1 week3 weeks['Guide class discussions.']
21Evaluate data processing proposals to assess p...Computer and Information Systems ManagersPlan, direct, or coordinate activities in such...1 hour2 hours['Analyze data to determine project feasibilit...
22Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes2 hours['Advise students on academic or career matter...
23Manage subcontractor activities, reviewing pro...LogisticiansAnalyze and coordinate the ongoing logistical ...8 hours3 months['Supervise employees.']
24Participate in student recruitment, registrati...Agricultural Sciences Teachers, PostsecondaryTeach courses in the agricultural sciences. In...2 hours8 hours['Promote educational institutions or programs...
25Conduct research in a particular field of know...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...6 weeks10 years['Research topics in area of expertise.', 'Wri...
26Serve on academic or administrative committees...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...2 hours8 hours['Serve on institutional or departmental commi...
27Locate suppliers, using sources such as catalo...Procurement ClerksCompile information and records to draw up pur...1 hour8 hours['Obtain information about goods or services.']
28Consult with institutions or associations rega...Registered NursesAssess patient health problems and needs, deve...1 week6 weeks['Advise communities or institutions regarding...
29Compile bibliographies of specialized material...Criminal Justice and Law Enforcement Teachers,...Teach courses in criminal justice, corrections...4 hours1 week['Compile specialized bibliographies or lists ...
30Maintain student attendance records, grades, a...Foreign Language and Literature Teachers, Post...Teach languages and literature courses in lang...1 hour8 hours['Maintain student records.']
31Prepare course materials, such as syllabi, hom...Atmospheric, Earth, Marine, and Space Sciences...Teach courses in the physical sciences, except...2 hours3 days['Develop instructional materials.']
32Supervise loan personnel.Loan OfficersEvaluate, authorize, or recommend approval of ...30 minutes8 hours['Supervise employees.']
33Prepare nanotechnology-related invention discl...Nanosystems EngineersDesign, develop, or supervise the production o...3 days6 months['Prepare contracts, disclosures, or applicati...
34Provide professional consulting services to go...Physics Teachers, PostsecondaryTeach courses pertaining to the laws of matter...1 week3 months['Advise educators on curricula, instructional...
35Prepare course materials, such as syllabi, hom...History Teachers, PostsecondaryTeach courses in human history and historiogra...2 hours3 days['Develop instructional materials.']
36Assess or propose sustainability initiatives, ...Sustainability SpecialistsAddress organizational sustainability issues, ...8 hours6 weeks['Assess the cost effectiveness of products, p...
37Create debt management plans, spending plans, ...Credit CounselorsAdvise and educate individuals or organization...8 hours3 weeks['Develop financial plans for clients.']
38Maintain student attendance records, grades, a...Art, Drama, and Music Teachers, PostsecondaryTeach courses in drama, music, and the arts in...30 minutes2 hours['Maintain student records.']
39Compile bibliographies of specialized material...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...4 hours1 week['Compile specialized bibliographies or lists ...
40Recommend or execute personnel actions, such a...First-Line Supervisors of Production and Opera...Directly supervise and coordinate the activiti...1 hour1 week['Perform human resources activities.']
41Compile and prepare documentation related to p...Production, Planning, and Expediting ClerksCoordinate and expedite the flow of work and m...4 hours3 days['Compile data or documentation.', 'Record per...
42Maintain student attendance records, grades, a...Environmental Science Teachers, PostsecondaryTeach courses in environmental science. Includ...30 minutes2 hours['Maintain student records.']
43Attend meetings or seminars or read current li...Remote Sensing Scientists and TechnologistsApply remote sensing principles and methods to...1 week6 months['Review professional literature to maintain p...
44Research the target audience of projects.Graphic DesignersDesign or create graphics to meet specific com...8 hours1 week['Conduct market research.', 'Collect data abo...
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", " \n", " \n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "variable_name": "dataset", "summary": "{\n \"name\": \"dataset\",\n \"rows\": 45,\n \"fields\": [\n {\n \"column\": \"Task\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 30,\n \"samples\": [\n \"Compile and prepare documentation related to production sequences, transportation, personnel schedules, or purchase, maintenance, or repair orders.\",\n \"Conduct research in a particular field of knowledge and publish findings in professional journals, books, or electronic media.\",\n \"Provide professional consulting services to government or industry.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Occupation\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 37,\n \"samples\": [\n \"Computer and Information Systems Managers\",\n \"Industrial Ecologists\",\n \"Biological Science Teachers, Postsecondary\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Occupation Description\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 37,\n \"samples\": [\n \"Plan, direct, or coordinate activities in such fields as electronic data processing, information systems, systems analysis, and computer programming.\",\n \"Apply principles and processes of natural ecosystems to develop models for efficient industrial systems. Use knowledge from the physical and social sciences to maximize effective use of natural resources in the production and use of goods and services. Examine societal issues and their relationship with both technical systems and the environment.\",\n \"Teach courses in biological sciences. Includes both teachers primarily engaged in teaching and those who do a combination of teaching and research.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Lower bound\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 8,\n \"samples\": [\n \"2 hours\",\n \"8 hours\",\n \"30 minutes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Upper bound\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 10,\n \"samples\": [\n \"10 years\",\n \"1 week\",\n \"2 hours\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"dwas\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 29,\n \"samples\": [\n \"['Review professional literature to maintain professional knowledge.', 'Attend conferences or workshops to maintain professional knowledge.']\",\n \"['Obtain information about goods or services.']\",\n \"['Supervise employees.']\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" } }, "metadata": {}, "execution_count": 120 } ], "source": [ "\n", "import pandas as pd\n", "import math\n", "import litellm\n", "import json\n", "import os\n", "import wandb\n", "from google.colab import userdata\n", "\n", "os.environ['OPENAI_API_KEY'] = userdata.get('OPENAI_API_KEY')\n", "os.environ['GEMINI_API_KEY'] = userdata.get('GEMINI_API_KEY')\n", "\n", "# Download here: https://docs.google.com/spreadsheets/d/1IUgj9GKNpiRheiaoK1nu6nuXbQJfEfwLOmrl-mRD400/edit?gid=1131861571#gid=1131861571\n", "# Then run in Untilted0.ipynb to add the DWAs\n", "# OR fix the problem forever by adding DWAs in the ground truth\n", "dataset = pd.read_csv(\"groundtruth_with_dwas.csv\")\n", "\n", "train_dataset = dataset.iloc[:30].copy()\n", "#test_dataset = dataset.iloc[30:]\n", "\n", "train_dataset = enrich_df_with_duration_in_minutes(train_dataset, 'Lower bound', 'golden_lower')\n", "train_dataset = enrich_df_with_duration_in_minutes(train_dataset, 'Upper bound', 'golden_upper')\n", "\n", "def calc_loss(df):\n", " df['loss_lower'] = (df['pred_lower'] / df['golden_lower']).map(lambda x: math.log(x)).abs()\n", " df['loss_upper'] = (df['pred_lower'] / df['golden_upper']).map(lambda x: math.log(x)).abs()\n", "\n", " loss = df['loss_lower'].mean() + df['loss_upper'].mean()\n", " loss = loss / 2\n", " loss = math.exp(loss)\n", "\n", " return loss\n", "\n", "dataset" ] }, { "cell_type": "code", "source": [], "metadata": { "id": "laU3PJgP3Hlz" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "wandb.login()" ], "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 213 }, "id": "zQNFgBOaRgEJ", "outputId": "ada84882-af0a-499c-9b51-e1a382a2f9c7" }, "execution_count": null, "outputs": [ { "output_type": "stream", "name": "stderr", "text": [ "\u001b[34m\u001b[1mwandb\u001b[0m: Using wandb-core as the SDK backend. Please refer to https://wandb.me/wandb-core for more information.\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "application/javascript": [ "\n", " window._wandbApiKey = new Promise((resolve, reject) => {\n", " function loadScript(url) {\n", " return new Promise(function(resolve, reject) {\n", " let newScript = document.createElement(\"script\");\n", " newScript.onerror = reject;\n", " newScript.onload = resolve;\n", " document.body.appendChild(newScript);\n", " newScript.src = url;\n", " });\n", " }\n", " loadScript(\"https://cdn.jsdelivr.net/npm/postmate/build/postmate.min.js\").then(() => {\n", " const iframe = document.createElement('iframe')\n", " iframe.style.cssText = \"width:0;height:0;border:none\"\n", " document.body.appendChild(iframe)\n", " const handshake = new Postmate({\n", " container: iframe,\n", " url: 'https://wandb.ai/authorize'\n", " });\n", " const timeout = setTimeout(() => reject(\"Couldn't auto authenticate\"), 5000)\n", " handshake.then(function(child) {\n", " child.on('authorize', data => {\n", " clearTimeout(timeout)\n", " resolve(data)\n", " });\n", " });\n", " })\n", " });\n", " " ] }, "metadata": {} }, { "output_type": "stream", "name": "stderr", "text": [ "\u001b[34m\u001b[1mwandb\u001b[0m: Logging into wandb.ai. (Learn how to deploy a W&B server locally: https://wandb.me/wandb-server)\n", "\u001b[34m\u001b[1mwandb\u001b[0m: You can find your API key in your browser here: https://wandb.ai/authorize\n", "wandb: Paste an API key from your profile and hit enter:" ] }, { "name": "stdout", "output_type": "stream", "text": [ " ··········\n" ] }, { "output_type": "stream", "name": "stderr", "text": [ "\u001b[34m\u001b[1mwandb\u001b[0m: \u001b[33mWARNING\u001b[0m If you're specifying your api key in code, ensure this code is not shared publicly.\n", "\u001b[34m\u001b[1mwandb\u001b[0m: \u001b[33mWARNING\u001b[0m Consider setting the WANDB_API_KEY environment variable, or running `wandb login` from the command line.\n", "\u001b[34m\u001b[1mwandb\u001b[0m: No netrc file found, creating one.\n", "\u001b[34m\u001b[1mwandb\u001b[0m: Appending key for api.wandb.ai to your netrc file: /root/.netrc\n", "\u001b[34m\u001b[1mwandb\u001b[0m: Currently logged in as: \u001b[33mfelixdorn\u001b[0m (\u001b[33mfelixdorn-forevue\u001b[0m) to \u001b[32mhttps://api.wandb.ai\u001b[0m. Use \u001b[1m`wandb login --relogin`\u001b[0m to force relogin\n" ] }, { "output_type": "execute_result", "data": { "text/plain": [ "True" ] }, "metadata": {}, "execution_count": 66 } ] }, { "cell_type": "code", "source": [ "ALLOWED_DURATIONS = [\n", " \"10 minutes\",\n", " \"30 minutes\",\n", " \"1 hour\",\n", " \"4 hours\",\n", " \"8 hours\",\n", " \"16 hours\",\n", " \"3 days\",\n", " \"1 week\",\n", " \"3 weeks\",\n", " \"6 weeks\",\n", " \"3 months\",\n", " \"6 months\",\n", " \"1 year\",\n", " \"3 years\",\n", " \"6 years\",\n", " \"10 years\",\n", "]\n", "\n", "SCHEMA = {\n", " \"name\": \"get_time_estimate\",\n", " \"strict\": True,\n", " \"schema\": {\n", " \"type\": \"object\",\n", " \"properties\": {\n", " \"thinking\": {\"type\": \"string\"},\n", " \"lower_bound_estimate\": {\"type\": \"string\", \"enum\": ALLOWED_DURATIONS},\n", " \"upper_bound_estimate\": {\"type\": \"string\", \"enum\": ALLOWED_DURATIONS},\n", " },\n", " \"additionalProperties\": False,\n", " \"required\": [\"thinking\", \"lower_bound_estimate\", \"upper_bound_estimate\"],\n", " },\n", "}\n", "\n", "def run_llm(df, model, system_prompt, user_message_template):\n", " messages = [[\n", " {\"role\": \"system\", \"content\": system_prompt},\n", " {\"role\": \"user\", \"content\": user_message_template.format(row=row[1])},\n", " ] for row in df.iterrows()]\n", " responses = litellm.batch_completion(\n", " model=model,\n", " messages=[messages[0]],\n", " response_format={\"type\": \"json_schema\", \"json_schema\": SCHEMA},\n", " )\n", "\n", " lb_estimates = []\n", " ub_estimates = []\n", " for response in responses:\n", " lb_estimate = None\n", " ub_estimate = None\n", "\n", " if (\n", " hasattr(response, \"choices\")\n", " and response.choices\n", " and hasattr(response.choices[0], \"message\")\n", " and response.choices[0].message\n", " and hasattr(response.choices[0].message, \"content\")\n", " and response.choices[0].message.content\n", " ):\n", " raw_estimate = response.choices[0].message.content\n", " estimate = json.loads(raw_estimate)\n", " print(estimate)\n", " lb_estimate = estimate.get(\"lower_bound_estimate\")\n", " ub_estimate = estimate.get(\"upper_bound_estimate\")\n", " else:\n", " print(f\"Warning: Received non-standard or error response. Response: {response}\")\n", "\n", "\n", " df[\"pred_lower_text\"] = lb_estimate\n", " df[\"pred_upper_text\"] = ub_estimate\n", "\n", " df = enrich_df_with_duration_in_minutes(df, \"pred_lower_text\", \"pred_lower\")\n", " df = enrich_df_with_duration_in_minutes(df, \"pred_upper_text\", \"pred_upper\")\n", "\n", " return df" ], "metadata": { "id": "l1oimXx62N6m" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "datasets = {}\n", "\n", "def run(fn, **kwargs):\n", " run_data = wandb.init(\n", " project=\"sprint-econtain\",\n", " config=kwargs,\n", " )\n", "\n", " try:\n", " dataset = train_dataset.copy()\n", "\n", " print(f\"Running {run_data.name}\")\n", " fn(df=dataset, **kwargs)\n", " print(f\"Finished {run_data.name}\")\n", " loss = calc_loss(dataset)\n", "\n", " print(f\"Loss {run_data.name}:\", loss)\n", " wandb.summary[\"loss\"] = loss\n", "\n", " datasets[run_data.name] = dataset\n", " return dataset\n", " except Exception as e:\n", " wandb.log({\"error\": str(e)})\n", " raise e\n", " finally:\n", " wandb.finish()" ], "metadata": { "id": "_L2eZgnQRNBR" }, "execution_count": null, "outputs": [] }, { "cell_type": "code", "source": [ "SYSTEM_PROMPT = \"\"\"\n", "You are an expert assistant evaluating the time required for job tasks. Your goal is to estimate the 'effective time' range needed for a skilled human to complete the following job task **remotely**, without supervision[cite: 2, 8, 44].\n", "\n", "'Effective time' is the active, focused work duration required to complete the task[cite: 2]. Crucially, **exclude all waiting periods, delays, or time spent on other unrelated activities**[cite: 2, 3]. Think of it as the continuous, productive time investment needed if the worker could pause and resume instantly without cost[cite: 3]. This duration serves as a proxy for the level of 'agency' or sustained, coherent effort the task demands[cite: 11, 44].\n", "\n", "Provide a lower and upper bound estimate for the 'effective time'. These bounds should capture the time within which approximately 80% of instances of performing this specific task are typically completed by a qualified individual[cite: 2].\n", "\n", "- A **job task** is an occupation-specific unit of work.\n", "- **Detailed work activities (DWAs)** are the specific actions comprising the task.\n", "\n", "You MUST select your lower and upper bound estimates **only** from the following discrete durations:\n", "['10 minutes', '30 minutes', '1 hour', '2 hours', '4 hours', '8 hours', '16 hours', '3 days', '1 week', '3 weeks', '6 weeks', '3 months', '6 months', '1 year', '3 years', '10 years']\n", "\n", "Base your estimate on the provided task description, its associated activities, and the occupational context.\n", "\"\"\"\n", "\n", "USER_MESSAGE_TEMPLATE = \"\"\"\n", "Please estimate the effective time range for the following remote task:\n", "\n", "**Occupation Category:** {row[Occupation]}\n", "**Occupation Description:** {row[Occupation Description]}\n", "\n", "**Task Description:** {row[Task]}\n", "**Detailed Work Activities (DWAs):**\n", "{row[dwas]}\n", "\n", "Consider the complexity, required focus, and the typical steps involved as described in the DWAs when determining the active work duration.\n", "\"\"\"\n", "\n", "run(run_llm, model=\"openai/gpt-4.1-mini\", system_prompt=SYSTEM_PROMPT, user_message_template=USER_MESSAGE_TEMPLATE)" ], "metadata": { "id": "bTBfhLqN2EAv", "colab": { "base_uri": "https://localhost:8080/", "height": 1000 }, "outputId": "7e4a6e19-ff48-4572-bc6e-260ead9cded4", "collapsed": true }, "execution_count": null, "outputs": [ { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "Tracking run with wandb version 0.19.9" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "Run data is saved locally in /content/wandb/run-20250427_220954-ejfc7r5l" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "Syncing run clean-waterfall-29 to Weights & Biases (docs)
" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ " View project at https://wandb.ai/felixdorn-forevue/sprint-econtain" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ " View run at https://wandb.ai/felixdorn-forevue/sprint-econtain/runs/ejfc7r5l" ] }, "metadata": {} }, { "output_type": "stream", "name": "stdout", "text": [ "Running clean-waterfall-29\n", "{'thinking': 'The task involves researching equipment or component needs, including sourcing information such as competitive prices, delivery times, and operational costs, as well as estimating technical or resource requirements. This requires focused research, data gathering from multiple sources (like suppliers and technical databases), comparative analysis, and calculation of requirements likely documented for engineering review. For an experienced engineering technologist doing this remotely, the task can vary in complexity depending on how many components or pieces of equipment need evaluation. Typically, this kind of detailed research and estimation could be accomplished in a concentrated span ranging from a half hour (for simpler or single-item research) to up to 4 hours (for more involved multiple component analysis and detailed resource estimation). Thus, an effective time range of 30 minutes to 4 hours best captures typical variation in effort and complexity encountered during such tasks.', 'lower_bound_estimate': '30 minutes', 'upper_bound_estimate': '4 hours'}\n", "Finished clean-waterfall-29\n", "Loss clean-waterfall-29: 2.448567831499293\n" ] }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "

Run summary:


loss24.4857

" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ " View run clean-waterfall-29 at: https://wandb.ai/felixdorn-forevue/sprint-econtain/runs/ejfc7r5l
View project at: https://wandb.ai/felixdorn-forevue/sprint-econtain
Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)" ] }, "metadata": {} }, { "output_type": "display_data", "data": { "text/plain": [ "" ], "text/html": [ "Find logs at: ./wandb/run-20250427_220954-ejfc7r5l/logs" ] }, "metadata": {} }, { "output_type": "execute_result", "data": { "text/plain": [ " Task \\\n", "0 Research equipment or component needs, sources... \n", "1 Prepare documentation or presentations, includ... \n", "2 Review material and labor requirements to deci... \n", "3 Perform administrative duties, such as authori... \n", "4 Write grant proposals to procure external rese... \n", "5 Maintain regularly scheduled office hours to a... \n", "6 Compile, administer, and grade examinations, o... \n", "7 Maintain regularly scheduled office hours to a... \n", "8 Compile, administer, and grade examinations, o... \n", "9 Maintain regularly scheduled office hours to a... \n", "10 Meet with parents and guardians to discuss the... \n", "11 Maintain regularly scheduled office hours to a... \n", "12 Maintain regularly scheduled office hours to a... \n", "13 Maintain regularly scheduled office hours to a... \n", "14 Write grant proposals to procure external rese... \n", "15 Prepare technical and research reports, such a... \n", "16 Collaborate with colleagues to address teachin... \n", "17 Compile, administer, and grade examinations, o... \n", "18 Maintain student attendance records, grades, a... \n", "19 Maintain regularly scheduled office hours to a... \n", "20 Initiate, facilitate, and moderate classroom d... \n", "21 Evaluate data processing proposals to assess p... \n", "22 Maintain regularly scheduled office hours to a... \n", "23 Manage subcontractor activities, reviewing pro... \n", "24 Participate in student recruitment, registrati... \n", "25 Conduct research in a particular field of know... \n", "26 Serve on academic or administrative committees... \n", "27 Locate suppliers, using sources such as catalo... \n", "28 Consult with institutions or associations rega... \n", "29 Compile bibliographies of specialized material... \n", "\n", " Occupation \\\n", "0 Electrical and Electronic Engineering Technolo... \n", "1 Remote Sensing Technicians \n", "2 Cost Estimators \n", "3 First-Line Supervisors of Landscaping, Lawn Se... \n", "4 Biological Science Teachers, Postsecondary \n", "5 Area, Ethnic, and Cultural Studies Teachers, P... \n", "6 Family and Consumer Sciences Teachers, Postsec... \n", "7 Engineering Teachers, Postsecondary \n", "8 Social Work Teachers, Postsecondary \n", "9 Family and Consumer Sciences Teachers, Postsec... \n", "10 Special Education Teachers, Secondary School \n", "11 Anthropology and Archeology Teachers, Postseco... \n", "12 Architecture Teachers, Postsecondary \n", "13 Family and Consumer Sciences Teachers, Postsec... \n", "14 Philosophy and Religion Teachers, Postsecondary \n", "15 Industrial Ecologists \n", "16 Communications Teachers, Postsecondary \n", "17 Anthropology and Archeology Teachers, Postseco... \n", "18 Business Teachers, Postsecondary \n", "19 Anthropology and Archeology Teachers, Postseco... \n", "20 Sociology Teachers, Postsecondary \n", "21 Computer and Information Systems Managers \n", "22 Anthropology and Archeology Teachers, Postseco... \n", "23 Logisticians \n", "24 Agricultural Sciences Teachers, Postsecondary \n", "25 Engineering Teachers, Postsecondary \n", "26 Engineering Teachers, Postsecondary \n", "27 Procurement Clerks \n", "28 Registered Nurses \n", "29 Criminal Justice and Law Enforcement Teachers,... \n", "\n", " Occupation Description Lower bound Upper bound \\\n", "0 Apply electrical and electronic theory and rel... 30 minutes 3 days \n", "1 Apply remote sensing technologies to assist sc... 2 hours 1 week \n", "2 Prepare cost estimates for product manufacturi... 4 hours 1 week \n", "3 Directly supervise and coordinate activities o... 2 hours 8 hours \n", "4 Teach courses in biological sciences. Includes... 1 week 6 months \n", "5 Teach courses pertaining to the culture and de... 30 minutes 3 months \n", "6 Teach courses in childcare, family relations, ... 1 hour 2 hours \n", "7 Teach courses pertaining to the application of... 30 minutes 3 months \n", "8 Teach courses in social work. Includes both te... 1 hour 2 hours \n", "9 Teach courses in childcare, family relations, ... 30 minutes 3 months \n", "10 Teach academic, social, and life skills to sec... 4 hours 6 months \n", "11 Teach courses in anthropology or archeology. I... 30 minutes 3 months \n", "12 Teach courses in architecture and architectura... 30 minutes 3 months \n", "13 Teach courses in childcare, family relations, ... 30 minutes 3 months \n", "14 Teach courses in philosophy, religion, and the... 1 week 6 months \n", "15 Apply principles and processes of natural ecos... 1 week 6 months \n", "16 Teach courses in communications, such as organ... 2 hours 8 hours \n", "17 Teach courses in anthropology or archeology. I... 1 hour 2 hours \n", "18 Teach courses in business administration and m... 30 minutes 4 hours \n", "19 Teach courses in anthropology or archeology. I... 30 minutes 2 hours \n", "20 Teach courses in sociology. Includes both teac... 1 week 3 weeks \n", "21 Plan, direct, or coordinate activities in such... 1 hour 2 hours \n", "22 Teach courses in anthropology or archeology. I... 30 minutes 2 hours \n", "23 Analyze and coordinate the ongoing logistical ... 8 hours 3 months \n", "24 Teach courses in the agricultural sciences. In... 2 hours 8 hours \n", "25 Teach courses pertaining to the application of... 6 weeks 10 years \n", "26 Teach courses pertaining to the application of... 2 hours 8 hours \n", "27 Compile information and records to draw up pur... 1 hour 8 hours \n", "28 Assess patient health problems and needs, deve... 1 week 6 weeks \n", "29 Teach courses in criminal justice, corrections... 4 hours 1 week \n", "\n", " dwas golden_lower \\\n", "0 ['Estimate technical or resource requirements ... 30 \n", "1 ['Prepare scientific or technical reports or p... 120 \n", "2 ['Estimate costs of goods or services.'] 240 \n", "3 ['Document work hours or activities.'] 120 \n", "4 ['Write grant proposals.'] 2400 \n", "5 ['Advise students on academic or career matter... 30 \n", "6 ['Administer tests to assess educational needs... 60 \n", "7 ['Advise students on academic or career matter... 30 \n", "8 ['Administer tests to assess educational needs... 60 \n", "9 ['Advise students on academic or career matter... 30 \n", "10 ['Discuss student progress with parents or gua... 240 \n", "11 ['Advise students on academic or career matter... 30 \n", "12 ['Advise students on academic or career matter... 30 \n", "13 ['Advise students on academic or career matter... 30 \n", "14 ['Write grant proposals.'] 2400 \n", "15 ['Prepare research or technical reports on env... 2400 \n", "16 ['Research topics in area of expertise.'] 120 \n", "17 ['Administer tests to assess educational needs... 60 \n", "18 ['Advise students on academic or career matter... 30 \n", "19 ['Advise students on academic or career matter... 30 \n", "20 ['Guide class discussions.'] 2400 \n", "21 ['Analyze data to determine project feasibilit... 60 \n", "22 ['Advise students on academic or career matter... 30 \n", "23 ['Supervise employees.'] 480 \n", "24 ['Promote educational institutions or programs... 120 \n", "25 ['Research topics in area of expertise.', 'Wri... 14400 \n", "26 ['Serve on institutional or departmental commi... 120 \n", "27 ['Obtain information about goods or services.'] 60 \n", "28 ['Advise communities or institutions regarding... 2400 \n", "29 ['Compile specialized bibliographies or lists ... 240 \n", "\n", " golden_upper pred_lower_text pred_upper_text pred_lower pred_upper \\\n", "0 1440 30 minutes 4 hours 30 240 \n", "1 2400 30 minutes 4 hours 30 240 \n", "2 2400 30 minutes 4 hours 30 240 \n", "3 480 30 minutes 4 hours 30 240 \n", "4 57600 30 minutes 4 hours 30 240 \n", "5 28800 30 minutes 4 hours 30 240 \n", "6 120 30 minutes 4 hours 30 240 \n", "7 28800 30 minutes 4 hours 30 240 \n", "8 120 30 minutes 4 hours 30 240 \n", "9 28800 30 minutes 4 hours 30 240 \n", "10 57600 30 minutes 4 hours 30 240 \n", "11 28800 30 minutes 4 hours 30 240 \n", "12 28800 30 minutes 4 hours 30 240 \n", "13 28800 30 minutes 4 hours 30 240 \n", "14 57600 30 minutes 4 hours 30 240 \n", "15 57600 30 minutes 4 hours 30 240 \n", "16 480 30 minutes 4 hours 30 240 \n", "17 120 30 minutes 4 hours 30 240 \n", "18 240 30 minutes 4 hours 30 240 \n", "19 120 30 minutes 4 hours 30 240 \n", "20 7200 30 minutes 4 hours 30 240 \n", "21 120 30 minutes 4 hours 30 240 \n", "22 120 30 minutes 4 hours 30 240 \n", "23 28800 30 minutes 4 hours 30 240 \n", "24 480 30 minutes 4 hours 30 240 \n", "25 1152000 30 minutes 4 hours 30 240 \n", "26 480 30 minutes 4 hours 30 240 \n", "27 480 30 minutes 4 hours 30 240 \n", "28 14400 30 minutes 4 hours 30 240 \n", "29 2400 30 minutes 4 hours 30 240 \n", "\n", " loss_lower loss_upper \n", "0 0.000000 3.871201 \n", "1 1.386294 4.382027 \n", "2 2.079442 4.382027 \n", "3 1.386294 2.772589 \n", "4 4.382027 7.560080 \n", "5 0.000000 6.866933 \n", "6 0.693147 1.386294 \n", "7 0.000000 6.866933 \n", "8 0.693147 1.386294 \n", "9 0.000000 6.866933 \n", "10 2.079442 7.560080 \n", "11 0.000000 6.866933 \n", "12 0.000000 6.866933 \n", "13 0.000000 6.866933 \n", "14 4.382027 7.560080 \n", "15 4.382027 7.560080 \n", "16 1.386294 2.772589 \n", "17 0.693147 1.386294 \n", "18 0.000000 2.079442 \n", "19 0.000000 1.386294 \n", "20 4.382027 5.480639 \n", "21 0.693147 1.386294 \n", "22 0.000000 1.386294 \n", "23 2.772589 6.866933 \n", "24 1.386294 2.772589 \n", "25 6.173786 10.555813 \n", "26 1.386294 2.772589 \n", "27 0.693147 2.772589 \n", "28 4.382027 6.173786 \n", "29 2.079442 4.382027 " ], "text/html": [ "\n", "
\n", "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
TaskOccupationOccupation DescriptionLower boundUpper bounddwasgolden_lowergolden_upperpred_lower_textpred_upper_textpred_lowerpred_upperloss_lowerloss_upper
0Research equipment or component needs, sources...Electrical and Electronic Engineering Technolo...Apply electrical and electronic theory and rel...30 minutes3 days['Estimate technical or resource requirements ...30144030 minutes4 hours302400.0000003.871201
1Prepare documentation or presentations, includ...Remote Sensing TechniciansApply remote sensing technologies to assist sc...2 hours1 week['Prepare scientific or technical reports or p...120240030 minutes4 hours302401.3862944.382027
2Review material and labor requirements to deci...Cost EstimatorsPrepare cost estimates for product manufacturi...4 hours1 week['Estimate costs of goods or services.']240240030 minutes4 hours302402.0794424.382027
3Perform administrative duties, such as authori...First-Line Supervisors of Landscaping, Lawn Se...Directly supervise and coordinate activities o...2 hours8 hours['Document work hours or activities.']12048030 minutes4 hours302401.3862942.772589
4Write grant proposals to procure external rese...Biological Science Teachers, PostsecondaryTeach courses in biological sciences. Includes...1 week6 months['Write grant proposals.']24005760030 minutes4 hours302404.3820277.560080
5Maintain regularly scheduled office hours to a...Area, Ethnic, and Cultural Studies Teachers, P...Teach courses pertaining to the culture and de...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
6Compile, administer, and grade examinations, o...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...1 hour2 hours['Administer tests to assess educational needs...6012030 minutes4 hours302400.6931471.386294
7Maintain regularly scheduled office hours to a...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
8Compile, administer, and grade examinations, o...Social Work Teachers, PostsecondaryTeach courses in social work. Includes both te...1 hour2 hours['Administer tests to assess educational needs...6012030 minutes4 hours302400.6931471.386294
9Maintain regularly scheduled office hours to a...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
10Meet with parents and guardians to discuss the...Special Education Teachers, Secondary SchoolTeach academic, social, and life skills to sec...4 hours6 months['Discuss student progress with parents or gua...2405760030 minutes4 hours302402.0794427.560080
11Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
12Maintain regularly scheduled office hours to a...Architecture Teachers, PostsecondaryTeach courses in architecture and architectura...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
13Maintain regularly scheduled office hours to a...Family and Consumer Sciences Teachers, Postsec...Teach courses in childcare, family relations, ...30 minutes3 months['Advise students on academic or career matter...302880030 minutes4 hours302400.0000006.866933
14Write grant proposals to procure external rese...Philosophy and Religion Teachers, PostsecondaryTeach courses in philosophy, religion, and the...1 week6 months['Write grant proposals.']24005760030 minutes4 hours302404.3820277.560080
15Prepare technical and research reports, such a...Industrial EcologistsApply principles and processes of natural ecos...1 week6 months['Prepare research or technical reports on env...24005760030 minutes4 hours302404.3820277.560080
16Collaborate with colleagues to address teachin...Communications Teachers, PostsecondaryTeach courses in communications, such as organ...2 hours8 hours['Research topics in area of expertise.']12048030 minutes4 hours302401.3862942.772589
17Compile, administer, and grade examinations, o...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...1 hour2 hours['Administer tests to assess educational needs...6012030 minutes4 hours302400.6931471.386294
18Maintain student attendance records, grades, a...Business Teachers, PostsecondaryTeach courses in business administration and m...30 minutes4 hours['Advise students on academic or career matter...3024030 minutes4 hours302400.0000002.079442
19Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes2 hours['Advise students on academic or career matter...3012030 minutes4 hours302400.0000001.386294
20Initiate, facilitate, and moderate classroom d...Sociology Teachers, PostsecondaryTeach courses in sociology. Includes both teac...1 week3 weeks['Guide class discussions.']2400720030 minutes4 hours302404.3820275.480639
21Evaluate data processing proposals to assess p...Computer and Information Systems ManagersPlan, direct, or coordinate activities in such...1 hour2 hours['Analyze data to determine project feasibilit...6012030 minutes4 hours302400.6931471.386294
22Maintain regularly scheduled office hours to a...Anthropology and Archeology Teachers, Postseco...Teach courses in anthropology or archeology. I...30 minutes2 hours['Advise students on academic or career matter...3012030 minutes4 hours302400.0000001.386294
23Manage subcontractor activities, reviewing pro...LogisticiansAnalyze and coordinate the ongoing logistical ...8 hours3 months['Supervise employees.']4802880030 minutes4 hours302402.7725896.866933
24Participate in student recruitment, registrati...Agricultural Sciences Teachers, PostsecondaryTeach courses in the agricultural sciences. In...2 hours8 hours['Promote educational institutions or programs...12048030 minutes4 hours302401.3862942.772589
25Conduct research in a particular field of know...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...6 weeks10 years['Research topics in area of expertise.', 'Wri...14400115200030 minutes4 hours302406.17378610.555813
26Serve on academic or administrative committees...Engineering Teachers, PostsecondaryTeach courses pertaining to the application of...2 hours8 hours['Serve on institutional or departmental commi...12048030 minutes4 hours302401.3862942.772589
27Locate suppliers, using sources such as catalo...Procurement ClerksCompile information and records to draw up pur...1 hour8 hours['Obtain information about goods or services.']6048030 minutes4 hours302400.6931472.772589
28Consult with institutions or associations rega...Registered NursesAssess patient health problems and needs, deve...1 week6 weeks['Advise communities or institutions regarding...24001440030 minutes4 hours302404.3820276.173786
29Compile bibliographies of specialized material...Criminal Justice and Law Enforcement Teachers,...Teach courses in criminal justice, corrections...4 hours1 week['Compile specialized bibliographies or lists ...240240030 minutes4 hours302402.0794424.382027
\n", "
\n", "
\n", "\n", "
\n", " \n", "\n", " \n", "\n", " \n", "
\n", "\n", "\n", "
\n", " \n", "\n", "\n", "\n", " \n", "
\n", "\n", "
\n", "
\n" ], "application/vnd.google.colaboratory.intrinsic+json": { "type": "dataframe", "summary": "{\n \"name\": \"run(run_llm, model=\\\"openai/gpt-4\",\n \"rows\": 30,\n \"fields\": [\n {\n \"column\": \"Task\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 20,\n \"samples\": [\n \"Research equipment or component needs, sources, competitive prices, delivery times, or ongoing operational costs.\",\n \"Locate suppliers, using sources such as catalogs and the internet, and interview them to gather information about products to be ordered.\",\n \"Conduct research in a particular field of knowledge and publish findings in professional journals, books, or electronic media.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Occupation\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 23,\n \"samples\": [\n \"Business Teachers, Postsecondary\",\n \"Special Education Teachers, Secondary School\",\n \"Electrical and Electronic Engineering Technologists and Technicians\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Occupation Description\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 23,\n \"samples\": [\n \"Teach courses in business administration and management, such as accounting, finance, human resources, labor and industrial relations, marketing, and operations research. Includes both teachers primarily engaged in teaching and those who do a combination of teaching and research.\",\n \"Teach academic, social, and life skills to secondary school students with learning, emotional, or physical disabilities. Includes teachers who specialize and work with students who are blind or have visual impairments; students who are deaf or have hearing impairments; and students with intellectual disabilities.\",\n \"Apply electrical and electronic theory and related knowledge, usually under the direction of engineering staff, to design, build, repair, adjust, and modify electrical components, circuitry, controls, and machinery for subsequent evaluation and use by engineering staff in making engineering design decisions.\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Lower bound\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 7,\n \"samples\": [\n \"30 minutes\",\n \"2 hours\",\n \"8 hours\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"Upper bound\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 10,\n \"samples\": [\n \"10 years\",\n \"1 week\",\n \"2 hours\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"dwas\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 19,\n \"samples\": [\n \"['Estimate technical or resource requirements for development or production projects.']\",\n \"['Advise students on academic or career matters.']\",\n \"['Analyze data to determine project feasibility.']\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"golden_lower\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2684,\n \"min\": 30,\n \"max\": 14400,\n \"num_unique_values\": 7,\n \"samples\": [\n 30,\n 120,\n 480\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"golden_upper\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 208379,\n \"min\": 120,\n \"max\": 1152000,\n \"num_unique_values\": 10,\n \"samples\": [\n 1152000,\n 2400,\n 120\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"pred_lower_text\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1,\n \"samples\": [\n \"30 minutes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"pred_upper_text\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 1,\n \"samples\": [\n \"4 hours\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"pred_lower\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 30,\n \"max\": 30,\n \"num_unique_values\": 1,\n \"samples\": [\n 30\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"pred_upper\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 0,\n \"min\": 240,\n \"max\": 240,\n \"num_unique_values\": 1,\n \"samples\": [\n 240\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"loss_lower\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 1.777387632659938,\n \"min\": 0.0,\n \"max\": 6.173786103901937,\n \"num_unique_values\": 7,\n \"samples\": [\n 0.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"loss_upper\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 2.592803530198592,\n \"min\": 1.3862943611198906,\n \"max\": 10.555812738575819,\n \"num_unique_values\": 10,\n \"samples\": [\n 10.555812738575819\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" } }, "metadata": {}, "execution_count": 137 } ] }, { "cell_type": "code", "source": [ "datasets = {}" ], "metadata": { "id": "gww4dpDC4Wsd", "collapsed": true }, "execution_count": null, "outputs": [] } ] }