In October 2022, questions measuring the Labour Market Indicators were added to the Labour Force Survey as a supplement.

Question wording within the collection application is controlled dynamically based on responses provided throughout the survey.

Labour Market Indicators

ENTRY_Q01 / EQ1 – From the following list, please select the household member that will be completing this questionnaire on behalf of the entire household.

WFH_Q01 / EQ2 – At the present time, in which of the following locations (do/does) (Respondent’s name/this person/you) usually work as part of (his/her/their/your) main job or business?

WFH_Q02 / EQ3 – Last week, what proportion of (his/her/their/your) work hours did (Respondent name/this person/you) work at home as part of (his/her/their/your) main job or business?

INF_Q01 / EQ4 – Over the last month, that is since September 15 to today, how many hours of voluntary ( /paid) overtime or ( /paid) extra hours did (respondent’s name/this person/you) decide to work at any (business/businesses/job/jobs) in response to the recent increase in the cost of living?

INF_Q02 / EQ5 – When did (respondent’s name/this person/you) last receive a raise in (his/her/their/your) main job?

CHS_Q01 / EQ6 – Over the last month, that is since September 15 to today, how difficult or easy was it for your household to meet its financial needs in terms of transportation, housing, food, clothing and other necessary expenses?

CHS_Q02 / EQ7 – Today, could your household cover an unexpected expense of $500 from your household's resources?

Retail Commodity Survey: CVs for Total Sales (Second Quarter 2022)

Retail Commodity Survey: CVs for Total Sales (July 2022)
Table summary
This table displays the results of Retail Commodity Survey: CVs for total sales (second quarter 2022). The information is grouped by NAPCS-CANADA (appearing as row headers), and Quarter (appearing as column headers).
NAPCS-CANADA Quarter
2022Q1 2022Q2
Total commodities, retail trade commissions and miscellaneous services 1.17 0.93
Retail Services (except commissions) [561]  1.20 0.95
Food at retail [56111]  0.97 1.66
Soft drinks and alcoholic beverages, at retail [56112]  0.49 0.68
Cannabis products, at retail [56113] 0.00 0.00
Clothing at retail [56121]  1.25 2.96
Footwear at retail [56122]  1.50 2.61
Jewellery and watches, luggage and briefcases, at retail [56123]  6.58 6.12
Home furniture, furnishings, housewares, appliances and electronics, at retail [56131]  1.45 1.81
Sporting and leisure products (except publications, audio and video recordings, and game software), at retail [56141]  1.96 3.25
Publications at retail [56142] 5.80 7.06
Audio and video recordings, and game software, at retail [56143] 0.50 1.04
Motor vehicles at retail [56151]  1.86 1.78
Recreational vehicles at retail [56152]  3.65 3.02
Motor vehicle parts, accessories and supplies, at retail [56153]  1.62 1.63
Automotive and household fuels, at retail [56161]  1.90 1.60
Home health products at retail [56171]  2.10 2.59
Infant care, personal and beauty products, at retail [56172]  2.20 3.55
Hardware, tools, renovation and lawn and garden products, at retail [56181]  2.14 2.08
Miscellaneous products at retail [56191]  2.00 3.08
Total retail trade commissions and miscellaneous services Footnotes 1 1.76 1.57

Footnotes

Footnote 1

Comprises the following North American Product Classification System (NAPCS): 51411, 51412, 53112, 56211, 57111, 58111, 58121, 58122, 58131, 58141, 72332, 833111, 841, 85131 and 851511.

Return to footnote 1 referrer

Labour Market and Socio-economic Indicators - October 2022

In October 2022, the following questions measuring the Labour Market and Socioeconomic Indicators were added to the Labour Force Survey as a supplement.

The purpose of this survey is to identify changing dynamics within the Canadian labour market, and measure important socioeconomic indicators by gathering data on topics such as type of employment, quality of employment, support payments and unmet health care needs.

Question wording within the collection application is controlled dynamically based on responses provided throughout the survey.

Labour Market and Socio-economic Indicators

ENTRY_Q01 / EQ 1 - From the following list, please select the household member that will be completing this questionnaire on behalf of the entire household.

Employee Block

LMI_Q01 / EQ 2 - Is (respondent name's/this person's/your) main job permanent?

LMI_Q02 / EQ 3 - In what way is (respondent name's/this person's/your) main job not permanent?

LMI_Q03 / EQ 4 - In (his/her/their/your) main job, (are/is) (respondent name/this person/you) paid by a private employment or placement agency that is different from the company (he/she/this person/you) work(s) for?

LMI_Q04 / EQ 5 - What is the total duration of (respondent name's/this person's/your) contract or agreement in (his/her/their/your) main job?

LMI_Q05 / EQ 6 - In (respondent name's/this person's/your) main job, (is/are) (he/she/they/you) guaranteed a minimum number of work hours per pay period?

LMI_Q06 / EQ 7 - What would you say best describes (respondent name's/this person's/your) current situation in (his/her/their/your) main job?

Self-employed Block

LMI_Q07 / EQ 8 – What is the main reason why (respondent name/this person/you) (are/is) self-employed in (his/her/their/your) (main/other) job?

LMI_Q08 / EQ 9 – (Does/do) (respondent name/this person/you) have any partners or co-owners in (his/her/their/your) (main/side) business?

LMI_Q09 / EQ 10 – (Does/Do) (respondent name/this person/you) or (his/her/their/your) (partners/company/partners or company) own or lease a building or space dedicated to (his/her/their/your) (main/side) business?

LMI_Q10 / EQ 11 - In (respondent name's/this person's/your) (main/side) business, is/are (he/she/they/you) required to belong to a professional association or regulatory college to do (his/her/their/your) job?

LMI_Q11 / EQ 12 - Does (respondent name's/this person's/your) (main/side) business operate…?

LMI_Q12 / EQ 13 - What is the current mix of clients in (respondent name's/this person's/your) main business?

LMI_Q13 / EQ 14 - Would (respondent name/this person/you) be able to continue operating (his/her/their/your) main business for the next five years based on returning or existing clients alone?

LMI_Q14 / EQ 15 – To what extent do you agree or disagree with the following statement?
In normal times, it is easy for [Respondent's name/this person/you] to find new clients in [his/her/their/your] main business.

LMI_Q15 / EQ 16 – (Does/Do) (respondent name/this person/you) or (his/her/their/your) (partners/company/partners or company) currently have any contracts with businesses, government agencies, or non-profit organizations as part of (his/her/their/your) main business?

LMI_Q16 / EQ 17 - Thinking of (respondent name's/this person's/your) largest contract, what is the total duration of that contract?

LMI_Q17 / EQ 18 – During the last 12 months, did (respondent name/this person/you) have any full days with no clients or work in (his/her/their/your) main business even though (he/she/they/you) wanted to work?

LMI_Q18 / EQ 19 – What would you say is (respondent name's/this person's/your) plan with (his/her/their/your) main business over the next 12 months?

LMI_Q19 / EQ 20 - What is the main reason (respondent name/this person/you) expect(s) to stop working or close (his/her/their/your) main business?

LFI-CHECK1 / EQ 21 - Last week, did (he/she/this person/you) work at a job or business?

LFI-CHECK2 / EQ 22 - Last week, did (he/she/this person/you) have a job or business from which (he/she/this person/you) (were/was) absent?

LFI-CHECK3 / EQ 23 - Did (he/she/this person/you) have more than one job or business last week?

LFI-CHECK4 / EQ 24 - Was this because (he/she/this person/you) changed employers?

LFI-CHECK5 / EQ 25 - (Has/Have) (respondent name/this person/you) ever worked at a job or business?

LFI-CHECK6 / EQ 26 - When did (respondent name/this person/you) last work?

LMI_Q20 / EQ 27 - Excluding (his/her/their/your) main job or business, (has/have) (respondent's name/this person/you) earned any money by freelancing, doing a paid gig, or completing a short-term job or task during the last 12 months?

LMI_Q21 / EQ 28 - Was this freelancing, paid gig, or short-term task or job one of the jobs (respondent's name/this person/you) had last week, or something else entirely?

LMI_Q22 / EQ 29 - You mentioned earlier that (respondent name/this person/you) had a job or a business during the last 12 months.

In addition to the jobs or businesses (he/she/this person/you) had during this period, did (respondent name/this person/you) earn any money by freelancing, doing a paid gig, or completing any other short-term job or task during the last 12 months?

LMI_Q23 / EQ 30 – (You mentioned earlier that (respondent name/this person/you) did not have a job or a business during the last 12 months.)

(Has/Have) (respondent name/this person/you) earned any money by freelancing, doing a paid gig, or completing any other short-term job or task during the last 12 months?

LMI_Q24 / EQ 31 - When was the last time (respondent name/this person/you) freelanced, did a paid gig, or got paid to do a short-term task or job?

SCC1_Q05 / EQ 32 - In the last 12 months, did (respondent's name/you) receive support payments from a former spouse or partner?

SCC1_Q10 / EQ 33 - What is your best estimate of the amount of support payments (he/she/this person/you) received in the last 12 months?

SCC2_Q05 / EQ 34 - In the last 12 months, did (respondent's name/you) make support payments to a former spouse or partner?

SCC2_Q10 / EQ 35 - What is your best estimate of the total amount (he/she/this person/you) paid in support payments in the last 12 months?

SCC3_Q05 / EQ 36 - In the last 12 months, did (respondent's name/you) pay for child care, so that (he/she/they/you) could work at a paid job?

SCC3_Q10 / EQ 37 - What is your best estimate, of the total amount (he/she/this person/you) paid for child care in the last 12 months?

DSQ_Q01 / EQ 38 - (Do/Does) (respondent's name/you) have any difficulty seeing?

DSQ_Q02 / EQ 39 - (Do/Does) (he/she/this person/you) wear glasses or contact lenses to improve (respondent name's/this person's/your) vision?

DSQ_Q03 / EQ 40 - (Which/With (respondent name's/this person's/your) glasses or contact lenses, which) of the following best describes (respondent's name/your) ability to see?

DSQ_Q04 / EQ 41 - How often does this (difficulty seeing/seeing condition) limit (his/her/their/your) daily activities?

DSQ_Q05 / EQ 42 - (Do/Does) (respondent's name/you) have any difficulty hearing?

DSQ_Q06 / EQ 43 - (Do/Does) (he/she/this person/you) use a hearing aid or cochlear implant?

DSQ_Q07 / EQ 44 - (Which/With) (respondent name's/this person's/your) hearing aid or cochlear implant, which) of the following best describes (respondent's name/your) ability to hear?

DSQ_Q08 / EQ 45 - How often does this (difficulty hearing/hearing condition) limit (his/her/their/your) daily activities?

DSQ_Q09 / EQ 46 - (Do/Does) (respondent's name/you) have any difficulty walking, using stairs, using (his/her/their/your) hands or fingers or doing other physical activities?

DSQ_Q10 / EQ 47 - How much difficulty (do/does) (he/she/this person/you) have walking on a flat surface for 15 minutes without resting?

DSQ_Q11 / EQ 48 - How much difficulty (do/does) (he/she/this person/you) have walking up or down a flight of stairs, about 12 steps without resting?

DSQ_Q12 / EQ 49 - How often (does this difficulty walking/does this difficulty using stairs/do these difficulties) limit (his/her/their/your) daily activities?

DSQ_Q13 / EQ 50 - How much difficulty (do/does) (respondent's name/you) have bending down and picking up an object from the floor?

DSQ_Q14 / EQ 51 - How much difficulty (do/does) (he/she/this person/you) have reaching in any direction, for example, above (his/her/their/your) head?

DSQ_Q15 / EQ 52 - How often (does this difficulty bending down and picking up an object/does this difficulty reaching/do these difficulties) limit (his/her/their/your) daily activities?

DSQ_Q16 / EQ 53 - How much difficulty (do/does) (respondent's name/you) have using (his/her/their/your) fingers to grasp small objects like a pencil or scissors?

DSQ_Q17 / EQ 54 - How often does this difficulty using (his/her/their/your) fingers limit (his/her/their/your) daily activities?

DSQ_Q18 / EQ 55 - (Do/Does) (respondent's name/you) have pain that is always present?

DSQ_Q19 / EQ 56 - (Do/Does) (he/she/this person/you) ( /also) have periods of pain that reoccur from time to time?

DSQ_Q20 / EQ 57 - How often does this pain limit (his/her/their/your) daily activities?

DSQ_Q21 / EQ 58 - When (respondent's name/you) (are/is) experiencing this pain, how much difficulty (do/does) (he/she/they/you) have with (his/her/their/your) daily activities?

DSQ_Q22 / EQ 59 - (Do/Does) (respondent's name/you) have any difficulty learning, remembering or concentrating?

DSQ_Q23 / EQ 60 - Do you think (respondent's name/you) (has/have) a condition that makes it difficult in general for (him/her/them/you) to learn? This may include learning disabilities such as dyslexia, hyperactivity, attention problems, etc.

DSQ_Q24 / EQ 61 - Has a teacher, doctor or other health care professional ever said that (respondent's name/you) had a learning disability?

DSQ_Q25 / EQ 62 - How often are (his/her/their/your) daily activities limited by this condition?

DSQ_Q26 / EQ 63 - How much difficulty (do/does) (respondent's name/you) have with (his/her/their/your) daily activities because of this condition?

DSQ_Q27 / EQ 64 - Has a doctor, psychologist or other health care professional ever said that (respondent's name/you) had a developmental disability or disorder? This may include Down syndrome, autism, Asperger syndrome, mental impairment due to lack of oxygen at birth, etc.

DSQ_Q28 / EQ 65 - How often are (respondent's name/your) daily activities limited by this condition?

DSQ_Q29 / EQ 66 - How much difficulty (do/does) (respondent's name/you) have with (his/her/their/your) daily activities because of this condition?

DSQ_Q30 / EQ 67 - (Do/Does) (he/she/this person/you) have any ongoing memory problems or periods of confusion?

DSQ_Q31 / EQ 68 - How often are (his/her/their/your) daily activities limited by this problem?

DSQ_Q32 / EQ 69 - How much difficulty (do/does) (respondent's name/you) have with (his/her/their/your) daily activities because of this problem?

DSQ_Q33 / EQ 70 - (Do/Does) (respondent's name/you) have any emotional, psychological or mental health conditions?

DSQ_Q34 / EQ 71 - How often are (his/her/their/your) daily activities limited by this condition?

DSQ_Q35 / EQ 72 - When (respondent's name/you) (are/is) experiencing this condition, how much difficulty (do/does) (he/she/they/you) have with (his/her/their/your) daily activities?

DSQ_Q36 / EQ 73 - (Do/Does) (respondent's name/you) have any other health problem or long-term condition that has lasted or is expected to last for six months or more?

DSQ_Q37 / EQ 74 - How often does this health problem or long-term condition limit (his/her/their/your) daily activities?

DSQ_Q38 / EQ 75 - (Do/Does) (respondent's name/you) have pain that is always present?

DSQ_Q39 / EQ 76 - (Do/Does) (he/she/this person/you) ( /also) have periods of pain that reoccur from time to time?

DSQ_Q40 / EQ 77 - How often does this pain limit (his/her/their/your) daily activities?

DSQ_Q41 / EQ 78 - When (respondent's name/you) (are/is) experiencing this pain, how much difficulty (do/does) (he/she/they/you) have with (his/her/their/your) daily activities?

UNC_Q005 / EQ 79 - During the past 12 months, was there ever a time when (respondent's name/you) felt that (he/she/they/you) needed health care, other than homecare services, but (he/she/they/you) did not receive it?

UNC_Q010 / EQ 80 - Thinking of the most recent time (respondent's name/you) felt this way, why didn't (he/she/they/you) get care?

UNC_Q015 / EQ 81 - Again, thinking of the most recent time, what was the type of care that was needed?

UNC_Q020 / EQ 82 - Did (he/she/this person/you) actively try to obtain the health care that was needed?

UNC_Q025 / EQ 83 - Where did (he/she/this person/you) try to get the service (he/she/they/you) (was/were) seeking?

Sylvia Ostry: Lessons from A Legend

Video - Sylvia Ostry: Lessons from A Legend

Sylvia Ostry was Canada's first (and only) female chief statistician, the first woman appointed as a deputy minister in Canadian history, and the first female chief economist at the Organisation for Economic Co-operation and Development.

Canadian Economic News, September 2022 Edition

This module provides a concise summary of selected Canadian economic events, as well as international and financial market developments by calendar month. It is intended to provide contextual information only to support users of the economic data published by Statistics Canada. In identifying major events or developments, Statistics Canada is not suggesting that these have a material impact on the published economic data in a particular reference month.

All information presented here is obtained from publicly available news and information sources, and does not reflect any protected information provided to Statistics Canada by survey respondents.

Hurricane Fiona

  • The Government of Canada announced that Hurricane Fiona, the post-tropical storm, made landfall in Nova Scotia on September 24th bringing damaging winds, flooding, and power outages to much of Atlantic Canada and parts of Quebec.
  • On September 24th, the Government of Nova Scotia announced it had requested the support of the Canadian Armed Forces to assist in clean up and power restoration efforts after Hurricane Fiona. The Government also said it had made a request to the federal government for Federal Disaster Assistance Funding.
  • The Government of Canada announced on September 25th that the Province of Prince Edward Island had requested support from the Canadian Armed Forces to assist in clean up and power restoration.
  • The Government of Newfoundland and Labrador announced on September 25th that following the widespread impacts of Hurricane Fiona on residents, the Provincial Government was moving ahead with emergency response and recovery efforts. The Government said the scale of the storm was unprecedented in this province and the magnitude of the damage was severe, particularly on the southwest coast of the island. The Government of Canada also announced on September 25th that the Canadian Armed Forces was activating resources and personnel in the province to provide physical impact assessments and immediate on-the-ground support to local authorities.
  • The Government of New Brunswick announced on September 25th that significant damage was reported in various communities in the province and that about 12,000 NB Power customers remain without power.

Resources

  • Calgary-based Tamarack Valley Energy Ltd. announced it had entered into a definitive agreement to acquire Deltastream Energy Corporation, also of Calgary, for a total net consideration of $1.425 billion. Tamarack said the acquisition is expected to close prior to the end of October, subject to certain conditions and regulatory approvals.
  • Calgary-based Imperial Oil Limited announced a long-term contract with Air Products Inc. of Pennsylvania to supply low-carbon hydrogen for Imperial's proposed renewable diesel complex at its Strathcona refinery near Edmonton. Imperial said Air Products will provide pipeline supply from its hydrogen plant under construction in Edmonton and that Air Products is increasing overall investment in its Edmonton hydrogen facility to $1.6 billion to support the Imperial contract.
  • Calgary-based Enbridge Inc. and 23 First Nation and Métis communities announced an agreement whereby the communities will acquire, collectively, an 11.57% non-operating interest in seven Enbridge-operated pipelines in the Athabasca region of northern Alberta for $1.12 billion. The parties said that a newly created entity, Athabasca Indigenous Investments, will steward this investment and that the closing of the transaction is expected to occur within the next month.
  • UK-based Rio Tinto Group and Turquoise Hill Resources Ltd. of Montreal announced they had reached an agreement in principle for Rio Tinto to acquire the approximately 49% of the issued and outstanding common shares of Turquoise Hill that Rio Tinto does not currently own for approximately USD $3.3 billion. The companies said the transaction is expected to close in the fourth quarter of 2022, subject to shareholder approval.
  • Toronto-based Agnico Eagle Mines Limited and Teck Resources Limited of Vancouver announced that Agnico Eagle had agreed to subscribe for a 50% interest in Minas de San Nicolás, S.A.P.I. de C.V. (MSN), a wholly owned Teck subsidiary which owns the San Nicolás copper-zinc development project located in Zacatecas, Mexico for USD $580 million of MSN shares, giving Agnico Eagle a 50% interest in MSN. Teck and Agnico Eagle said they anticipate that development capital costs could be in the range of USD $1.0 billion to USD $1.1 billion. The companies said the closing of the transaction is expected to occur in the first half of 2023, subject to customary conditions precedent, including receipt of necessary regulatory approvals.
  • Teck Resources later announced that there had been a structural failure of the plant feed conveyor belt at its Elkview steelmaking coal operation in the Elk Valley of British Columbia and that production will be interrupted for 1-2 months. The company said it expects the impact on 2022 steelmaking coal production will be in the range of 1.5 million tonnes.

Transportation

  • Calgary-based WestJet Airlines Ltd. announced an agreement with Boeing to purchase an additional 42 MAX aircraft, along with options for 22 more. WestJet said the order is in addition to its remaining 23 MAX orders.
  • Mississauga-based Canada Jetlines Operations Ltd. announced on September 22nd it had commenced operations out of its travel hub at Toronto Pearson International Airport with its first scheduled route into Calgary International Airport. The company said it had commenced biweekly flights between Toronto and Calgary and that the frequency will increase to three flights per week in time for the holidays.

Manufacturing

  • Toronto-based De Havilland Aircraft of Canada Limited announced that the site of its new aircraft manufacturing facility will be near Calgary and will consist of a new aircraft assembly facility, runway, parts manufacturing, and distribution centres. De Havilland said it anticipates that once in full operation, there will be up to 1,500 jobs located at De Havilland Field. The company also said it hopes to start construction as early as late 2023 and expects that the first buildings could be operational by 2025.

Other news

  • The Government of Canada announced the removal of all COVID-19 entry restrictions, as well as testing, quarantine, and isolation requirements for anyone entering Canada, effective October 1, 2022. The Government said that on that day, all travellers, regardless of citizenship, will no longer have to:
    • Submit public health information through the ArriveCAN app or website;
    • Provide proof of vaccination;
    • Undergo pre- or on-arrival testing;
    • Carry out COVID-19-related quarantine or isolation;
    • Monitor and report if they develop signs or symptoms of COVID-19 upon arriving to Canada;
    • Undergo health checks for travel on air and rail; or
    • Wear masks on planes and trains.
  • The Government of Canada announced on September 20th that it had introduced legislation that would make life more affordable for Canadians and that measures in these bills would:
    • Double the Goods and Services Tax Credit for six months;
    • Provide a Canada Dental Benefit to children under 12 who do not have access to dental insurance, starting this year; and
    • Provide a one-time top-up to the Canada Housing Benefit to deliver $500 to 1.8 million renters who are struggling with the cost of housing.

    The Government said the support package totals more than $4.5 billion, of which $3.1 billion is in addition to funding previously allocated in Budget 2022.

  • The Bank of Canada increased its target for the overnight rate by 75 basis points to 3.25%. The last change in the target for the overnight rate was a 100 basis points increase in July 2022.
  • Mississauga-based Walmart Canada announced more than $100 million to build a new high-tech sortable fulfillment centre near Montreal in Vaudreuil-Dorion, Quebec, slated to open in 2024. The company said it also plans to update and remodel a record number of stores in a year as part of a multi-year $3.5 billion investment.

United States and other international news

  • On September 29th U.S. President Joseph R. Biden, Jr. declared that a major disaster exists in the State of Florida and ordered Federal aid to supplement State, tribal, and local recovery efforts in the areas affected by Hurricane Ian beginning on September 23, 2022 and continuing.
  • On September 29th President Joseph R. Biden, Jr. declared that an emergency exists in the State of South Carolina and ordered Federal assistance to supplement State, tribal, and local response efforts due to the emergency conditions resulting from Hurricane Ian beginning on September 25, 2022 and continuing.
  • The U.S. Federal Open Market Committee (FOMC) raised the target range for the federal funds rate by 75 basis points to 3.00% to 3.25% and said it anticipates that ongoing increases in the target range will be appropriate. The last change in the target range was a 75 basis points increase in July 2022. The Committee also said it will continue reducing its holdings of Treasury securities and agency debt and agency mortgage-backed securities.
  • The European Central Bank (ECB) announced it had decided to raise the three key ECB interest rates by 75 basis points to 1.25% (main refinancing operations), 1.50% (marginal lending facility), and 0.75% (deposit facility). The last change in these rates was a 50 basis points increase in July 2022.
  • The Bank of England's Monetary Policy Committee (MPC) voted to increase the Bank Rate by 50 basis points to 2.25%. The last change in the Bank Rate was a 50 basis points increase in August 2022. The Committee also voted to reduce the stock of purchased UK government bonds by £80 billion over the next twelve months, to a total of £758 billion.
  • The Bank of Japan (BoJ) announced it will apply a negative interest rate of -0.1% to the Policy-Rate Balances in current accounts held by financial institutions at the BoJ and that it will purchase a necessary amount of Japanese government bonds (JGBs) without setting an upper limit so that 10-year JGB yields will remain at around zero percent.
  • The Reserve Bank of Australia (RBA) increased the target for the cash rate by 50 basis points to 2.35%. The last change in the target for the cash rate was a 50 basis points increase in August 2022.
  • The Monetary Policy and Financial Stability Committee of Norway's Norges Bank raised the policy rate by 50 basis points to 2.25%. The last change in the policy rate was a 50 basis points increase in August 2022.
  • The Executive Board of Sweden's Riksbank raised the repo rate by 100 basis points to 1.75%. The last change in the repo rate was a 50 basis points increase in June 2022.
  • OPEC and non-OPEC members announced they had decided to revert to the production level of August 2022 for the month of October 2022 and that the upward adjustment of 0.1 mb/d to the production level was only intended for the month of September 2022.
  • California-based Adobe Inc. announced it had entered into a definitive merger agreement to acquire Figma, Inc., a collaborative design platform also of California, for approximately USD $20 billion. Adobe said the transaction is expected to close in 2023, subject to the receipt of required regulatory clearances and approvals and the satisfaction of other closing conditions, including the approval of Figma's stockholders.
  • Tennessee-based FedEx Corp. announced it expects to generate total cost savings of USD $2.2 billion to USD $2.7 billion in fiscal 2023 compared to the company's prior plan, by:
    • Reducing flight frequencies and temporarily parking aircraft;
    • Closing select sort operations, suspending certain Sunday operations, and other linehaul expense actions; and
    • Reducing vendor utilization, deferring certain projects, and closing certain FedEx Office and corporate locations.

    FedEx also said that effective January 1, 2023, rates will increase by an average of 6.9%.

  • Illinois-based BP America Inc announced on September 21st that the bp-Husky Toledo Refinery was shut down following a fire at the facility.
  • UK-based Cineworld Group plc announced that it and certain of its subsidiaries had commenced Chapter 11 cases in the United States Bankruptcy Court. Cineworld said it had secured commitments for an approximate USD $1.94 billion in debtor-in-possession financing facility, that it expects to operate its global business and cinemas as usual without interruption, and that it anticipates emerging from Chapter 11 during the first quarter of 2023.
  • Switzerland-based Nord Stream AG announced on September 27th that the significant pressure drop caused by the gas leak on both lines of the gas pipeline registered on September 26th leads to a strong assumption of the pipeline physical damage. Nord Stream said it had started mobilization of all necessary resources for a survey campaign to assess the damages in cooperation exchange with relevant local authorities and that it is not possible to estimate a timeframe for restoring the gas transport infrastructure.

Financial market news

  • West Texas Intermediate crude oil closed at USD $79.49 per barrel on September 30th, down from a closing value of USD $89.55 at the end of August. Western Canadian Select crude oil traded in the USD $55 to $68 per barrel range throughout September. The Canadian dollar closed at 72.96 cents U.S. on September 29th, down from 76.27 cents U.S. at the end of August. The S&P/TSX composite index closed at 18,444.22 on September 30th, down from 19,330.81 at the end of August.

Business or organization information

1. Which of the following categories best describes this business or organization?

  • Government agency
  • Private sector business
  • Non-profit organization
    • Who does this organization primarily serve?
      • Households or individuals
        e.g., child and youth services, community food services, food bank, women's shelter, community housing services, emergency relief services, religious organization, grant and giving services, social advocacy group, arts and recreation group
      • Businesses
        e.g., business association, chamber of commerce, condominium association, environment support or protection services, group benefit carriers (pensions, health, medical)
  • Don't know

Business or organization information

2. In what year was this business or organization first established?

Please provide the year this business or organization first began operations.
Year business or organization was first established:
OR
Don't know

3. Over the last 12 months, did this business or organization conduct any of the following international activities?

Select all that apply.

  • Export or sell goods outside of Canada
    Include both intermediate and final goods.
  • Export or sell services outside of Canada
    Include services delivered virtually and in person.
    e.g., software, cloud services, legal services, environmental services, architectural services, digital advertising
  • Make investments outside of Canada
  • Sell goods to businesses or organizations in Canada who then resold them outside of Canada
  • Import or buy goods from outside of Canada
    Include both intermediate and final goods.
  • Import or buy services from outside of Canada
    Include services received virtually and in person.
    e.g., software, cloud services, legal services, environmental services, architectural services, digital advertising
  • Relocate any business or organizational activities or employees from another country into Canada
  • Exclude temporary foreign workers.
  • Engage in other international business or organizational activities
    OR
  • None of the above

4. Over the next three months, how are each of the following expected to change for this business or organization?

Exclude seasonal factors or conditions.

  • Number of employees
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Vacant positions
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Sales of goods and services offered by this business or organization
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Selling price of goods and services offered by this business or organization
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Demand for goods and services offered by this business or organization
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Imports
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Exports
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Operating income
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Operating expenses
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Profitability
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Cash reserves
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Capital expenditures
    e.g., machinery, equipment
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Training expenditures
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Marketing and advertising budget
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know
  • Expenditures in research and development
    • Increase
    • Stay about the same
    • Decrease
    • Not applicable
    • Don't know

Business or organization obstacles

5. Over the next three months, which of the following are expected to be obstacles for this business or organization?

Select all that apply.

  • Shortage of labour force
  • Recruiting skilled employees
  • Retaining skilled employees
  • Shortage of space or equipment
  • Rising cost of inputs
    An input is an economic resource used in a firm's production process.
    e.g., labour, capital, energy and raw materials
  • Rising costs in real estate, leasing or property taxes
  • Rising inflation
  • Rising interest rates and debt costs
    e.g., borrowing fees, interest payments
  • Difficulty acquiring inputs, products or supplies from within Canada
  • Difficulty acquiring inputs, products or supplies from abroad
  • Maintaining inventory levels
  • Insufficient demand for goods or services offered
  • Fluctuations in consumer demand
  • Attracting new or returning customers
  • Cost of insurance
  • Transportation costs
  • Obtaining financing
  • Increasing competition
  • Challenges related to exporting or selling goods and services outside of Canada
  • Maintaining sufficient cash flow or managing debt
  • Other
    • Specify other:
    OR
  • None of the above

Flow condition: If "Recruiting skilled employees" or "Retaining skilled employees" is selected in Q5, go to Q6. Otherwise, go to Q7.

Labour challenges

6. Compared with 12 months ago, how would this business or organization describe its challenges with recruiting and retaining staff?

  • More challenging than 12 months ago
  • About the same
  • Less challenging than 12 months ago
  • Don't know

Flow condition: If "Difficulty acquiring inputs, products or supplies from within Canada", "Difficulty acquiring inputs, products or supplies from abroad", or "Maintaining inventory levels" is selected in Q5, go to Q7. Otherwise, go to Q12.

Supply chain challenges

7. How long does this business or organization expect the following to continue to be an obstacle?

  • Difficulty acquiring inputs, products or supplies from within Canada
    • Less than 3 months
    • 3 months to less than 6 months
    • 6 months to less than 12 months
    • 12 months or more
    • Don't know
  • Difficulty acquiring inputs, products or supplies from abroad
    • Less than 3 months
    • 3 months to less than 6 months
    • 6 months to less than 12 months
    • 12 months or more
    • Don't know
  • Maintaining inventory levels
    • Less than 3 months
    • 3 months to less than 6 months
    • 6 months to less than 12 months
    • 12 months or more
    • Don't know

8. Over the last three months, how have supply chain challenges experienced by this business or organization changed?

Supply chain challenges include difficulty acquiring inputs, products or supplies from within Canada or abroad and difficulty maintaining inventory levels.
Exclude seasonal factors or conditions.

  • Supply chain challenges have worsened
    • Which of the following factors have contributed to these challenges?
      Select all that apply.
      • Increased prices of inputs, products or supplies
      • Increased delays in deliveries of inputs, products or supplies
      • Supply shortages resulted in fewer inputs, products or supplies being available
      • Supply shortages resulted in no inputs, products or supplies available
      • Other
        • Specify other:
        OR
      • Don't know
  • Supply chain challenges have remained about the same
  • Supply chain challenges have improved

9. Over the next three months, how does this business or organization expect supply chain challenges to change?

Supply chain challenges include difficulty acquiring inputs, products or supplies from within Canada or abroad and difficulty maintaining inventory levels.
Exclude seasonal factors or conditions.

  • Supply chain challenges are expected to worsen
  • Supply chain challenges are expected to remain about the same
  • Supply chain challenges are expected to improve

Supply chain

10. Over the next 12 months, does this business or organization plan to make any of the following adjustments to its supply chain?

Select all that apply.

  • Relocate supply chain activities to Canada
  • Relocate supply chain activities outside of Canada
  • Substitute inputs, products or supplies with alternate inputs, products or supplies
  • Shift to local suppliers
  • Partner with new suppliers
  • Work with suppliers to improve timeliness
  • Implement technological improvements
  • Invest in research and development projects to identify alternate inputs, products, supplies, or production processes
  • Other
    • Specify other:
    OR
  • Don't know
    OR
  • None of the above

Display condition: If "Maintaining inventory levels" is selected in Q5, go to Q11. Otherwise, go to Q12.

11. Over the next three months, in response to an expected difficulty maintaining inventory levels, which of the following does this business or organization plan to do?

Select all that apply.

  • Raise selling prices for goods and services offered
  • Accept backorders for goods or delay date of services
  • Stop taking sales orders
  • Increase promotion for alternative goods with greater availability
  • Find alternate inputs
  • Improve or speed up production process
  • Improve inventory tracking to plan timing of purchases
  • Other
    • Specify other:
    OR
  • Don't know
    OR
  • None of the above

Flow condition: If the business or organization is a private sector business or non-profit organization, go to Q12. Otherwise, go to Q13.
Display condition: If the business or organization is a non-profit organization, do not display "Transfer the business" or "Sell the business".

Expectations for the next year

12. Over the next 12 months, does this business or organization plan to do any of the following?

Select all that apply.

  • Expand current location of this business or organization
  • Expand operations of this business or organization internationally
  • Expand operations of this business or organization into a new province or territory within Canada
  • Move operations of this business or organization to another province or territory within Canada entirely
  • Expand this business or organization to other locations within the same province
  • Expand this business or organization without increasing physical space
    i.e., hiring more staff who will work remotely
  • Restructure this business or organization
  • Restructuring involves changing the financial, operational, legal or other structures of the business or organization to make it more efficient or more profitable.
  • Acquire other businesses, organizations or franchises
  • Invest in other businesses or organizations
  • Merge with other businesses or organizations
  • Scale down operations of this business or organization to within a single province or territory within Canada
  • Transfer the business
  • Sell the business
    OR
  • Close the business or organization
    OR
  • Don't know
    OR
  • None of the above

Input costs

13. Over the next 12 months, how likely is this business or organization to pass on any increases in its costs to customers?

e.g., costs related to increases in wages, inputs, products, supplies, taxes, rents, and carbon prices.

  • Very likely
  • Somewhat likely
  • Somewhat unlikely
  • Very unlikely
  • Don't know

Retirement

14. What percentage of employees does this business or organization expect to voluntarily retire over the next 12 months?

Exclude layoffs.
Provide your best estimate rounded to the nearest percentage.
Percentage of employees expected to retire over the next 12 months:
OR
Don't know

Flow condition: If the percentage of employees expected to retire over the next 12 months is greater than 0% in Q14, go to Q15. Otherwise, go to Q16.

15. Does this business or organization have plans in place to address expected retirements?

e.g., hiring staff to fill vacancies due to retirements, training staff to take over responsibilities of retiring staff

  • Yes
  • No
  • Don't know

Wages

16. Over the next 12 months, does this business or organization expect the average wages paid to change?

  • Average wages are expected to increase
    • By what percentage are average wages expected to increase?
      Provide your best estimate rounded to the nearest percentage.
      • Percentage:
        OR
      • Don't know
  • Average wages are expected to decrease
    • By what percentage are average wages expected to decrease?
      Provide your best estimate rounded to the nearest percentage.
      • Percentage:
        OR
      • Don't know
  • Average wages are expected to stay approximately the same
  • Not applicable
    e.g., This business or organization does not pay wages

17. To what extent does this business or organization consider inflation when setting wages and salaries?

  • A large extent
  • A medium extent
  • A small extent
  • Not at all
  • Don't know

Recruitment, retention and training

18. Does this business or organization currently do or plan to do any of the following over the next 12 months?

Select all that apply.

  • Increase wages offered to new employees
  • Increase wages offered to existing employees
  • Increase benefits offered to new employees
  • Increase benefits offered to existing employees
  • Offer signing bonuses or incentives to new employees
  • Offer option to work remotely
  • Offer flexible scheduling
  • Apply for learning and development programs provided by governments in order to upskill or reskill current employees
  • Work with education and training institutions to offer work-integrated learning programs such as co-ops, internships, and apprenticeships
  • Provide tuition support to employees to take courses or programs
  • Provide employees with paid time to engage in learning and development programs
  • Provide training to employees to take other positions within this business or organization
  • Encourage employees to participate in on-the-job training
  • Encourage employees to acquire micro-credentials which help individuals develop job-related competencies
    Micro-credentials are short, concentrated groups of courses that are based on industry needs. They are generally offered in shorter or more flexible timespans and tend to be more narrowly focused in comparison with traditional degrees and certificates. Some micro-credentials may be stackable and can be combined to form a part of a larger credential.
    OR
  • None of the above

Volunteering

19. Does this business or organization have, or intend to recruit, volunteers?

  • Yes
    • Which of the following is this business or organization facing in volunteer recruitment and retention?
      Select all that apply.
      • Shortage of new volunteers
      • Volunteer retention
      • Volunteers not able to commit long term
      • High volunteer burnout and stress
      • Lack of time or resources for this business or organization to recruit volunteers
      • Other
        • Specify other:
        OR
      • No issues – No new volunteers are required
        OR
      • No issues – While some previous volunteers have not returned, this business or organization has been successful in recruiting new volunteers for all available roles
        OR
      • Don't know
  • No
  • Don't know

Display condition: If "Yes" is selected in Q19, go to Q20. Otherwise, go to Q21.

20. Volunteer recruitment and retention challenges have had which of the following impacts or expected impacts on this business or organization?

Select all that apply.

  • Paid employees working increased hours to take on volunteer roles
  • Employee burnout
  • Reduction of programs and services offered
  • Cancellation of programs and services offered
  • Adapting current volunteer tasks to meet operational requirements
    e.g., volunteers take on more responsibilities
  • Other
    • Specify other:
    OR
  • Don't know
    OR
  • There has been no impact on this business or organization

Technology and automation

21. Over the next 12 months, does this business or organization plan to adopt or incorporate any of the following technologies?

Exclude technologies already adopted.
Select all that apply.

  • Software or hardware using artificial intelligence
    e.g., machine learning, predictive technology, virtual personal assistants, online customer support bots, image or speech recognition
  • Robotics
  • Automation of certain tasks
    e.g., through the use of robots or computer algorithms
  • Cloud computing
    Cloud computing: services that are used over the internet to access software, computing power, or storage capacity.
    e.g., Microsoft 365®, Google Cloud™, Dropbox™
  • Collaboration tools
    e.g., Zoom™, Microsoft Teams™, Slack™
  • Security software tools
    e.g., anti-virus, anti-spyware, anti-malware, firewalls
  • Software or databases for purposes other than telework and online sales
  • Digital technology to move business operations or sales online (for purposes other than teleworking or remote working)
  • Other
    • Specify other:
    OR
  • None of the above

Flow condition: If at least one technology or "Other" is selected in Q21, go to Q22. Otherwise, go to Q23.

22. Using a scale from 1 to 5, where 1 means "not at all challenging" and 5 means "extremely challenging", how challenging are the following for this business or organization when adopting or incorporating technologies?

  • Reorienting business strategy and processes
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Retraining employees with skills to use new technologies and processes
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Hiring workers with skills in technologies
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Finding suitable hardware or software vendors
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Ensuring high-speed connectivity
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Integrating new digital technologies into this business' or organization's existing technology infrastructure
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Having access to financial resources to invest in new technologies
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant
  • Ensuring security and privacy of data
    • 1 – Not at all challenging
    • 2
    • 3
    • 4
    • 5 – Extremely challenging
    • Not relevant

Lending

23. Over the last 12 months, did this business or organization apply for a new line of credit, a new term loan, a new non-residential mortgage, or refinancing of an existing non-residential mortgage?

Include commercial mortgages.
Exclude residential mortgages.

  • Yes
    • Was the largest request made approved, either fully or partially?
      • Yes
      • No
        • What reasons were given by the credit provider for turning down the request?
          Select all that apply.
          • Insufficient sales or cash flow
          • Insufficient collateral
          • Poor or lack of credit experience or history
          • Project was considered too risky
          • Business or organization operates in an unstable industry
          • Other
            OR
          • No reason given by credit provider
            OR
          • Don't know
      • This business or organization is still waiting for the outcome
      • The request was withdrawn by the business or organization
      • Don't know
  • No
    • Which of the following were reasons this business or organization did not apply for a business loan?
      Select all that apply.
      • This business or organization did not require a loan
      • Thought the request would be turned down
      • Interest rates or cost of borrowing are too high
      • Concern about the economy or inflation
      • Applying for financing is too difficult or time consuming
      • Unaware of financing sources (private or government) that are available to this business or organization
      • Other
        OR
      • Don't know
  • Don't know

Liquidity

24. Does this business or organization have the cash or liquid assets required to operate for the next three months?

  • Yes
  • No
    • Will this business or organization be able to acquire the cash or liquid assets required?
      • Yes
      • No
      • Don't know
  • Don't know

Debt

25. Over the next three months, does this business or organization plan to apply for a new line of credit, a new term loan, a new non-residential mortgage, or refinancing of an existing non-residential mortgage?

Include commercial mortgages.
Exclude residential mortgages.

  • Yes
  • No
    • Does this business or organization have the ability to take on more debt?
      • Yes
      • No
        • For which of the following reasons is this business or organization unable to take on more debt?
          Select all that apply.
          • Cash flow
          • Lack of confidence or uncertainty in future sales
          • Request would be turned down
          • Too difficult or time consuming to apply
          • Interest rates are unfavourable
          • Payment terms are unfavourable
          • Credit rating
          • Other
            • Specify other:
            OR
          • Don't know
      • Don't know
  • Don't know

26. Which of the following best describes the current debt level of this business or organization?

  • Greater than the debt level just prior to the onset of the COVID-19 pandemic
  • About the same as it was just prior to the start of the COVID-19 pandemic
  • Below the debt level just before the start of the COVID-19 pandemic
  • Don't know
  • Not applicable
    e.g., The business or organization did not exist prior to the COVID-19 pandemic

27. Over the next 12 months, to what extent does this business or organization foresee challenges in repaying funding received from repayable government support programs put in place because of the COVID-19 pandemic?

Examples of repayable government support programs include the Canada Emergency Business Account (CEBA) or the Indigenous Business Initiative (sometimes referred to as the Emergency Loan Program (ELP), issued through an Aboriginal Financial Institutions (AFI) or Métis Capital Corporations (MCCs)).

  • Not a challenge
  • A minor challenge
  • A major challenge
  • Don't know
  • This business or organization did not receive any repayable funding from government support programs related to the COVID-19 pandemic

Working arrangements

28. Over the next three months, what percentage of the employees of this business or organization is anticipated to do each of the following?

Exclude staff that are primarily engaged in providing driving or delivery services or staff that primarily work at client premises.

Provide your best estimate rounded to the nearest percentage.
If the percentages are unknown, leave the question blank.

  • Work on-site exclusively
    Percentage of employees:
  • Work on-site most hours
    Percentage of employees:
  • Work the same amount of hours on-site and remotely
    Percentage of employees:
  • Work remotely most hours
    Percentage of employees:
  • Work remotely exclusively
    Percentage of employees:

Future outlook

29. Over the next 12 months, what is the future outlook for this business or organization?

  • Very optimistic
  • Somewhat optimistic
  • Somewhat pessimistic
  • Very pessimistic
  • Don't know

Flow condition: If the business or organization is a private sector business, go to Q30. Otherwise, go to "Contact person".

Ownership

(i) The groups identified within the following questions are included in order to gain a better understanding of businesses owned by members of various communities across Canada.

30. What percentage of this business or organization is owned by women?

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

31. What percentage of this business or organization is owned by First Nations, Métis or Inuit peoples?

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

32. What percentage of this business or organization is owned by immigrants to Canada?

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

33. What percentage of this business or organization is owned by persons with a disability?

Include visible and non-visible disabilities.

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

34. What percentage of this business or organization is owned by LGBTQ2 individuals?

The term LGBTQ2 refers to persons who identify as lesbian, gay, bisexual, transgender, queer and/or two-spirited.

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

35. What percentage of this business or organization is owned by members of visible minorities?

A member of a visible minority in Canada may be defined as someone (other than an Indigenous person) who is non-white in colour or race, regardless of place of birth.

Provide your best estimate rounded to the nearest percentage.

Percentage:
OR
Don't know

Flow condition: If more than 50% of this business or organization is owned by members of visible minorities, go to Q36. Otherwise, go to "Contact person".

36. It was indicated that at least 51% of this business or organization is owned by members of visible minorities. Please select the categories that describe the owner or owners.

Select all that apply.

  • South Asian
    e.g., East Indian, Pakistani, Sri Lankan
  • Chinese
  • Black
  • Filipino
  • Latin American
  • Arab
  • Southeast Asian
    e.g., Vietnamese, Cambodian, Laotian, Thai
  • West Asian
    e.g., Afghan, Iranian
  • Korean
  • Japanese
  • Other group
    • Specify other group:
    OR
  • Prefer not to say

MLflow Tracking: An efficient way of tracking modeling experiments

By: Mihir Gajjar, Statistics Canada
Contributors: Reginald Maltais, Allie Maclsaac, Claudia Mokbel and Jeremy Solomon, Statistics Canada

MLflow is an open source platform that manages the machine learning lifecycle, including experimentation, reproducibility, deployment and a central model registry. MLflow offers four components:

  • MLflow Tracking: Record and query experiments—code, data, configuration parameters and results.
  • MLflow Projects: Package data science code in a format to reproduce runs on any platform.
  • MLflow Models: Deploy machine learning models in diverse serving environments.
  • Model Registry: Store, annotate, discover and manage models in a central repository.

This article focuses on MLflow Tracking. The MLflow website has details on the remaining three components.

Benefits of MLFlow

MLflow Tracking provides a solution that can be scaled from your local machine to the entire enterprise. This allows data scientists to get started on their local machine while organizations can implement a solution that ensures long term maintainability and transparency in a central repository.

MLflow Tracking provides consistent and transparent tracking by:

  • Tracking parameters and the corresponding results for the modeling experiments programmatically and comparing them using a user interface.
  • Recovering the model having the best results along with its corresponding code for different metrics of interest across experiments for different projects.
  • Looking back through time to find experiments conducted with certain parameter values.
  • Enabling team members to experiment and share results collaboratively.
  • Exposing the status of multiple projects in a singular interface for management along with all their details (parameters, output plots, metrics, etc.).
  • Allowing tracking across runs and parameters through a single notebook, reducing time spent managing code and different notebook versions.
  • Providing an interface for tracking both Python and R based experiments.

How do I flow between my experiments with MLflow?

This article focuses on using MLflow with Python. The MLflow QuickStart document has examples of its use with R for a local installation on a single machine. Organizations wishing to deploy MLflow across teams could also refer to the QuickStart document.

This article will explore an example of using MLflow with Python; however, to get the best understanding of how MLFlow works, it's useful to go through each step on your machine.

Install MLflow

MLflow can be installed as a standard Python package by typing the following command in a terminal window:

$ pip install mlflow

After the command has finished executing, you can type mlflow in your terminal and explore the available options. For example, you can try: mlflow –version to see the version installed

Launch MLflow server

It's recommended to have a centralized MLflow server for an individual, team or organization so that runs for different projects can be logged in one central place, segregated by experiments (different experiments for different projects). This will be covered in more detail later in this article. To quickly get started with the tool, you can skip the server launch and still log the runs. By doing this, the runs are stored in a directory called "MLruns" located in the same directory as the code. You can later open MLflow UI in the same path and visualize the logged runs.

The runs can be logged to an MLflow server running locally or remotely by setting the appropriate tracking URI (uniform resource identifier). Setting the appropriate logging location is explained later.

If, however, you prefer to start the server right away, you can do so by issuing the following command:

$ mlflow server

The terminal will display information similar to what is below, which shows the server is listening at localhost port 5000This address is useful for accessing the MLflow user interface (UI). Feel free to explore the subtle difference between MLflow UI and MLflow server in the MLflow Tracking documentation.

[2021-07-09 16:17:11 –0400] [58373] [INFO] Starting gunicorn 20.1.0
[2021-07-09 16:17:11 –0400] [58373] [INFO] Listening at: http://127.0.0.1:5000 (58373)
[2021-07-09 16:17:11 –0400] [58373] [INFO] Using worker: sync
[2021-07-09 16:17:11 –0400] [58374] [INFO] Booting worker with pid: 58374
[2021-07-09 16:17:11 –0400] [58375] [INFO] Booting worker with pid: 58375
[2021-07-09 16:17:11 –0400] [58376] [INFO] Booting worker with pid: 58376
[2021-07-09 16:17:11 –0400] [58377] [INFO] Booting worker with pid: 58377

Logging data to MLflow

There are two main concepts in MLflow tracking: experiments and runs. The data logged during an experiment is recorded as a run in MLflow. The runs can be organized into experiments, which groups together runs for a specific task. One can visualize, search, compare, and download run artifacts and metadata for the runs logged in an MLflow experiment.

Data in an experiment can be logged as a run in MLflow using MLflow Python, R, Java packages, or through the REST API (application programming interface).

This article will demonstrate modeling for one of the "Getting started with NLP (natural language processing)" competitions on Kaggle called "Natural Language Processing with Disaster Tweets." A Jupyter notebook and the MLflow Python API will be used for logging data to MLflow. The focus will be on demonstrating how to log data to MLflow during modeling, rather than getting the best modeling results.

First, let's start with the usual modeling process, which includes imports, reading the data, text pre-processing, tf-idf (term frequency-inverse document frequency) features and support vector machine (SVM) model. At the end, there will be a section called "MLflow logging."

Note: The NLP pipeline is kept as simple as possible so that the focus is on MLflow logging. Some of the usual steps, like exploratory data analysis, are not relevant for this purpose and will be left out. The preferred way of logging data to MLflow is by leaving a chunk of code at the end to log. You can also configure MLflow at the beginning of the code and log data throughout the code, when the data or variable is available to log. An advantage to logging all the data together at the end using a single cell is that the entire pipeline would finish successfully, and the run will log the data (given the code for MLflow logging has no bugs). If the data are logged throughout the code and the code execution stops for any reason, the data logging will be incomplete. However, if there's a scenario where a code has more than one code chunk, which takes a significant amount of time to execute, then logging throughout the code, in multiple locations, may actually be beneficial.

Importing the libraries

Start by importing all the required libraries for the example:

# To create unique run name.
import time
# To load data in pandas dataframe.
import pandas as pd

# NLP libraries

# To perform lemmatization
from nltk import WordNetLemmatizer
# To split text into words
from nltk. tokenize import word_tokenize
# To remove the stopwords
from nltk.corpus import stopwords

# Scikit-learn libraries

# To use the SVC model
from sklearn.svm import SVC
# To evaluate model performance
from sklearn.model_selection import cross_validate, StratifiedkFold
# To perform Tf-idf vectorization
from sklearn.feature_extraction.text import TfidfVectorizer
# To get the performance metrics
from sklearn.metrics import f1_score, make_scorer
# For logging and tracking experiments
import mlflow

Create a unique run name

MLflow tracks multiple runs of an experiment through a run name parameter. The run name can be set to any value, but should be unique so you can identify it amongst different runs later. Below, a timestamp is used to guarantee a unique name.

run_name = str(int(time.time()))
print('Run name: ', run_name)

Gives:

Run name: 1625604741

Reading the data

Load the training and test data from the CSV files provided by the example.

# Kaggle competition data download link: https://www.kaggle.com/c/nlp-getting-started/data
train_data = pd.read_csv("./data/train.csv")
test_data = pd.read_csv("./data/test.csv")

By executing the following piece of code in a cell:

train_data

A sample of the training data that was just loaded can be seen in Figure 1.

Figure 1: A preview of the training data that was loaded.

Figure 1: A preview of the training data that was loaded.

Figure 1: A preview of the training data that was loaded.

The top and bottom five entries of the CSV file. It contains the columns: id, keyword, location, text and target. The text column contains the tweet itself and the target column, the class.

Figure 1: A preview of the training data that was loaded.
  id keyboard location text target
0 1 NaN Nan Our Deeds are the Reason of this #earthquake M… 1
1 4 NaN Nan Forest fire near La Ronge Sask. Canada 1
2 5 NaN Nan All residents asked to 'shelter in place' are… 1
3 6 NaN Nan 13,000 people receive #wildfires evacuation or… 1
4 7 NaN Nan Just got sent this photo from Ruby #Alaska as… 1
... ... ... ... ... ...
7608 10869 NaN Nan Two giant cranes holding a bridge collapse int… 1
7609 10870 NaN Nan @aria_ahrary @TheTawniest The out of control w… 1
7610 10871 NaN Nan M1.94 [01:04 UTC] ?5km S of Volcano Hawaii. Htt… 1
7611 10872 NaN Nan Police investigating after an e-bike collided… 1
7612 10873 NaN Nan The Latest: More Homes Razed by Northern Calif… 1

7613 rows x 5 columns

The training data are about 70% of the total data.

print('The length of the training data is %d' % len(train_data))
print('The length of the test data is %d' % len(test_data))

Output:

The length of the training data is 7613
The length of the test data is 3263

Text pre-processing

Depending on the task at hand, different types of preprocessing steps might be required to make the machine learning model learn better features. Preprocessing can normalize the input, remove some of the common words if required so that the model does not learn them as features, make logical and meaningful changes that can lead to the model performing and generalizing better. The following demonstrates how performing some pre-processing steps can help the model grab the right features when learning:

def clean_text(text):
    # split into words
    tokens = word_tokenize(text)
    # remove all tokens that are not alphanumeric. Can also use .isalpha() here if do not want to keep numbers.
    words = [word for word in tokens if word.isalnum()]
    # remove stopwords
    stop_words = stopwords.words('english')
    words = [word for word in words if word not in stop_words]
    # performing lemmatization
    wordnet_lemmatizer = WordNetLemmatizer()
    words = [wordnet_lemmatizer.lemmatize(word) for word in words]
    # Converting list of words to string
    words = ' '.join(words)
    return words
train_data['cleaned_text'] = train_data['text'].apply(clean_text) 

Comparing the original text to the cleaned text, non-words have been removed:

train_data['text'].iloc[100]

'.@NorwayMFA #Bahrain police had previously died in a road accident they were not killed by explosion https://t.co/gFJfgTodad'

train_data['cleaned_text'].iloc[100]rain_data['text'].iloc[100]

'NorwayMFA Bahrain police previously died road accident killed explosion http'

Reading the text above, one can say that, yes, it does contain information about a disaster and hence should be classified as one. To confirm this with the data, print out the label present in the CSV file for this tweet:

train_data['target'].iloc[100]

Output:

1

Tf-idf features

Next, we are converting a collection of raw documents to a matrix of TF-IDF features to feed into the model. For more information about tf-idf, please refer to tf–idf - Wikipedia and scikit-learn sklearn.feature_extraction.text documentation.

ngram_range=(1,1)
max_features=100
norm='l2'
tfidf_vectorizer = TfidfVectorizer(ngram_range=ngram_range, max_features=max_features, norm=norm)
train_data_tfidf = tfidf_vectorizer.fit_transform(train_data['cleaned_text'])
train_data_tfidf

Output:

<7613x100 sparse matrix of type '<class 'numpy.float64'>'
with 15838 stored elements in Compressed Sparse Row format>
tfidf_vectorizer.get_feature_names()[:10]

Output:

['accident',
'amp',
'and',
'as',
'attack',
'back',
'best',
'body',
'bomb',
'building']

SVC model

The next step to perform the modeling is to fit a model and evaluate the performance.

Stratified K-Folds cross-validator is used to evaluate the model. See scikit learn sklearn.model_selection for more information.

strat_k_fold = StratifiedKFold(n_splits=5, shuffle=True, random_state=42)

Making a scorer function using the f1-score metric to pass it as a parameter in the SVC model.

scoring_function_f1 = make_scorer(f1_score, pos_label=1, average='binary')

Now comes an important step of fitting the model to the data. This example uses the SVC classifier. See scikit learn sklearn.svm.svc for more information.

C = 1.0
kernel='poly'
max_iter=-1
random_state=42
svc = SVC(C=C, kernel=kernel, max_iter=max_iter, random_state=random_state) 
cv_results = cross_validate(estimator=svc, X=train_data_tfidf, y=train_data['target'], scoring=scoring_function_f1, cv=strat_k_fold, n_jobs=-1, return_train_score=True)
cv_results

Output:

{'fit_time': array([0.99043322, 0.99829006, 0.94024873, 0.97373009, 0.96771407]),
'score_time': array([0.13656974, 0.1343472 , 0.13345313, 0.13198996, 0.13271189]),
'test_score': array([0.60486891, 0.65035517, 0.5557656 , 0.5426945 , 0.63071895]),
'train_score': array([0.71281362, 0.76168757, 0.71334394, 0.7291713 , 0.75554698])}
def mean_sd_cv_results(cv_results, metric='F1'):
    print(f"{metric} Train CV results: {cv_results['train_score'].mean().round(3)} +- {cv_results['train_score'].std().round(3)}")
    print(f"{metric} Val CV results: {cv_results['test_score'].mean().round(3)} +- {cv_results['test_score'].std().round(3)}")

mean_sd_cv_results(cv_results)
F1 Train CV results: 0.735 +- 0.021
F1 Val CV results: 0.597 +- 0.042

Note: The code below is executed as a shell command by adding the exclamation mark: '!' in the beginning of the code in a Jupyter cell.

! Jupyter nbconvert --to html mlflow-example-real-or-not-disaster-tweets-modeling-SVC.ipynb
[NbConvertApp] Converting notebook mlflow-example-real-or-not-disaster-tweets-modeling-SVC.ipynb to html
[NbConvertApp] Writing 610630 bytes to mlflow-example-real-or-not-disaster-tweets-modeling-SVC.html

Logging to MLflow

First, set the server URI. As the server is running locally, set the tracking URI to localhost port 5000. The tracking URI can be set to a remote server as well (see Where Runs are Recorded).

server_uri = 'http://127.0.0.1:5000'
mlflow.set_tracking_uri(server_uri)

To organize the runs, an experiment was created and set where the runs will be logged. The "set_experiment" method will create a new run with the given string name and set it as the current experiment where the runs will be logged.

mlflow.set_experiment('nlp_with_disaster_tweets')

Finally, start a run and log data to MLflow.

# MLflow logging.
with mlflow.start_run(run_name=run_name) as run:

    # Logging tags
    # run_name.
    mlflow.set_tag(key='Run name', value=run_name)
    # Goal.
    mlflow.set_tag(key='Goal', value='Check model performance and decide whether we require further pre-processing/hyper-parameter tuning.')
    # Modeling exp.
    mlflow.set_tag(key='Modeling technique', value='SVC')

    # Logging parameters
    mlflow.log_param(key='ngram_range', value=ngram_range)
    mlflow.log_param(key='max_features', value=max_features)
    mlflow.log_param(key='norm', value=norm)
    mlflow.log_param(key='C', value=C)
    mlflow.log_param(key='kernel', value=kernel)
    mlflow.log_param(key='max_iter', value=max_iter)
    mlflow.log_param(key='random_state', value=random_state)

    # Logging the SVC model.
    mlflow.sklearn.log_model(sk_model=svc, artifact_path='svc_model')
   
    # Logging metrics.
    # mean F1-score - train.
    mlflow.log_metric(key='mean F1-score - train', value=cv_results['train_score'].mean().round(3))
    # mean F1-score - val.
    mlflow.log_metric(key='mean F1-score - val', value=cv_results['test_score'].mean().round(3))
    # std F1-score - train.
    mlflow.log_metric(key='std F1-score - train', value=cv_results['train_score'].std().round(3))
    # std F1-score - val.
    mlflow.log_metric(key='std F1-score - val', value=cv_results['test_score'].std().round(3))
   
    # Logging the notebook.
    # Nb.
    mlflow.log_artifact(local_path='real-or-not-disaster-tweets-modeling-SVC.ipynb', artifact_path='Notebook')
    # Nb in HTML.
    mlflow.log_artifact(local_path='real-or-not-disaster-tweets-modeling-SVC.html', artifact_path='Notebook')

In the code above, you begin a run with a run_name and then log the following:

  1. Tags: A key-value pair. Both the key and the value are strings. For instance, this can be used to log the goal of the run where the key would be 'Goal:' and the value can be 'To try out the performance of Random Forest Classifier with default parameters.'
  2. Parameters: Also, a key-value pair and can be used to log the model parameters.
  3. Model: Can be used to log the model. Here you are logging a scikit-learn model as an MLflow artifact, but we can also log a model for other supported machine learning libraries using the corresponding MLflow module.
  4. Metrics: A key-value pair. The key data type is "string" and it can have the metric name. The value parameter has a data type "float". The third optional parameter is "step" which is an integer that represents any measurement of training progress – number of training iterations, number of epochs, etc.
  5. Artifacts: A local file or directory can be logged as an artifact for the current run. In this example, we're logging using the notebook so that they're accessible for future runs. By doing this, you can save a plot like "loss curve" or "accuracy curve" in the code and log them as an artifact in MLflow.

There you have it—you successfully logged data for a run in MLflow! The next step is to visualize the logged data.

MLflow UI

If you scroll back to Figure 1, you'll remember that you launched the server and it was listening at localhost port 5000. Open this address in your preferred browser to access the MLflow UI. Once the MLflow UI is visible, you can use the interface to look at the experiment data that was logged. The experiments created appear in the sidebar of the UI, and the logged tags, parameters, model and metrics are shown in the columns.

Figure 2: MLflow UI

Figure 2: MLflow UI

Figure 2: MLflow UI

Figure 2 shows the MLflow UI. The experiment which was set above i.e. nlp_with_disaster_tweets is opened and the run that you logged earlier along with the details such as run name, parameters and metrics. It also shows the location where the artifacts are stored. You can click on the logged run to explore it in further detail.

Text in image: MLflow Expriements Models

Nlp_with_disaster_tweets (1. Click on this experiment)

Experiment ID: 1, Artifact Location: ./miruns/1 (Location of the logged artifacts)

Notes: None

2. Explore the logged data

Figure 2: MLflow UI
  Parameters Metrics Tags
Start Time Run Name User Source Version Model C Kernel max_feature Mean F1-s Mean F1-s Std F1-s Modeling t
2021-07-09 16:27:58 16258… Mihir ipykerne - sklearn 1.0 poly 100 0.735 0.597 0.021 SVC

3. The run that we logged using the Python API. Click on the link to open the run

To explore a specific run in greater detail, click on the relevant run in the Start Time column. This will allow you to explore a logged run in detail. The run name is shown and you can add any notes for the run such as logged parameters, metrics, tags and artifacts. The data logged using the Python API for this run are shown here.

The files logged as artifacts can be downloaded, which can be useful if you want to retrieve the code later. Since the code that generates results for every run is saved, you don't need to create multiple copies of the same code and can experiment using a single skeleton notebook by changing the code between runs.

The logged trained model can be loaded in a future experiment using the Python API from the logged run.

Figure 3: Exploring the logged artifacts in a run

Figure 3: Exploring the logged artifacts in a run

Figure 3: Exploring the logged artifacts in a run

Figure 3 explores the logged artifacts. The logged files (notebook and the model) are shown. The description of the model also provides code to load the logged model in Python.
Text in image:

Tags

Figure 3: Exploring the logged artifacts in a run
Name Value Actions
Goal Check model performance and decide whether we require further pre-processing hyper-parameter tuning. Edit – delete icons
Modeling technique SVC Edit – delete icons
Run name 16525862471 Edit – delete icons

Add Tag
Name – Value – Add

Artifacts
Notebook

  • Real-or-not-disaster-tweets-modeling-SVC.html
  • Real-or-not-disaster-tweets-modeling-SVC.ipynb

svc_model

  • MLmodel
  • conda.yaml
  • model.pld

Full Path: ./miruns/1/fcdc8362b2fe74329a4128fa522d80cb/artifacts/svc_model
Size: 0B

MLflow Model
The code snippets below demonstrate how to make predictions using the logged model

Model schema
Input and output schema for your model. Learn more
Name – Type
No Schema.

To demonstrate the run comparison functionality, more modeling experiments were performed and logged to MLflow by changing a few parameters in the same jupyter notebook. Feel free to change some parameters and log more runs to MLflow.

Figure 4 shows the different logged runs. You can filter, keep the columns you want, and compare the parameters or metrics between different runs. To perform a detailed comparison, you can select the runs you want to compare and click on the "Compare" button highlighted in the figure below.

Figure 4: Customizing and comparing different runs using MLflow UI

Figure 4: Customizing and comparing different runs using MLflow UI

Figure 4: Customizing and comparing different runs using MLflow UI

In MLflow UI, one can customize the columns being shown, filter and search for different runs based on the logged data and can easily compare the different logged runs based on the visible columns. You can also compare different logged runs in greater detail by selecting them and clicking on the "Compare" button.

Text in image: 
1. Can filter and keep the columns of interest
Columns: Start Time, User, Run Name, Source, Version, Models, Parameters, Metrics, Tags
2. Can compare different runs
3. Different runs logged. Select the runs you want to compare
Showing 5 matching runs. Compare, Delete, Download, CSV
4. Click Compare 

Figure 4: Customizing and comparing different runs using MLflow UI
  Parameters Metrics Tags
Start Time Run Name User Source Version Model C Kernel max_fe Mean F1-s Mean F1-s Std F1-s Modeling Run name Goal
2021-07-12 14:48:54 1626115725 Mihir ipykerne - sklearn 1.0 Poly 500 0.93 0.694 0.001 SVC 16261157 Check mo…
2021-07-12 14:48:16 1626115688 Mihir ipykerne - sklearn 1.0 Poly 500 0.931 0.693 0.001 SVC 16261156 Check mo…
2021-07-12 14:48:50 1626115602 Mihir ipykerne - sklearn 1.0 Poly 500 0.933 0.694 0.002 SVC 16261156 Check mo…
2021-07-12 14:48:01 1626115552 Mihir ipykerne - sklearn 1.0 Poly 500 0.876 0.649 0.002 SVC 16261155 Check mo…
2021-07-09 16:27:58 1625002471 Mihir ipykerne - sklearn 1.0 Poly 500 0.735 0.597 0.021 SVC 16258624 Check mo…

After clicking the "Compare" button, a table-like comparison between different runs will be generated, (as shown in Figure 5) allowing you to easily compare logged data across different runs. The parameters that differ across the runs are highlighted in yellow. This gives the user an idea of how model performance has changed over time based on the change in parameters.

Figure 5: Comparing logged runs in MLflow UI in detail

Figure 5: Comparing logged runs in MLflow UI in detail

Figure 5: Comparing logged runs in MLflow UI in detail

Figure 5 compares different logged runs in MLflow in detail. The tags, parameters and metrics are in different rows and the runs are in different columns. This allows a user to compare details of interest for different runs in a single window. The parameters which are different in different runs are highlighted in yellow. For example, in the experiments the parameters max_features and ngram_range were changed for different runs and hence they are highlighted in yellow in the image above.

Text in image:
Nlp_with_disaster_tweets > Comparing 5 Runs

Figure 5: Comparing logged runs in MLflow UI in detail
Run ID: 7a1448a5f88147c093
c357d787dbe3
264533b107b04be3
bd4981560bad0397
7670578718b3477abb
798d7e404fed6c
D2372d5873f2435c
94dc7e633a611889
Fdc8362b2f37432f9
a4128fa522d80cb
Run Name 1626115725 1626115688 1626115602 1626115552 16265862471
Start Time 2021-07-12 14:48:54 2021-07-12 14:48:16 2021-07-12 14:48:50 2021-07-12 14:46:01 2021-07-09 16:27:58
Parameters
C 1.0 1.0 1.0 1.0 1.0
Kernel Poly Poly Poly Poly Poly
Max_features 500 500 500 500 500
Max_iter -1 -1 -1 -1 -1
Ngram_range (1.3) (1.2) (1.1) (1.1) (1.1)
Norm 12 12 12 12 12
random_state 42 42 42 42 42
Metrics
Mean f1-score-train 0.93 0.931 0.933 0.876 0.735
Mean f1-score-val 0.694 0.693 0.694 0.649 0.597
std f1-score-train 0.001 0.001 0.002 0.002 0.021
std f1-score-val 0.008 0.009 0.01 0.013 0.042

Changes in the parameters and metrics across different runs can also be laid-out in a Scatter Plot. The values of the x-axis and y-axis can be set to any parameter or metric allowing the user to analyze the changes. In Figure 6, the reader can analyze the change in validation, in this case the mean F1-score, over different values for the parameter 'max_features'. If you hover over a data point, you can see details about that run.

Figure 6: Configuring the scatter plot to visualize the effects of different parameter configurations in the logged runs

Figure 6: Configuring the scatter plot to visualize the effects of different parameter configurations in the logged runs

Figure 6: Configuring the scatter plot to visualize the effects of different parameter configurations in the logged runs

A demonstration of MLflow's capability of plotting a graph using details from different runs. You can select a particular parameter on X-axis and a metric you want to monitor on the Y-axis; this will create a scatter plot with the details on the corresponding axis on the go and you will be able to visualize the effects of the parameter on the metric to get an idea about how the parameter is affecting the metric.

Text in image:
Scatter Plot
X-Axis: max_features
Y-Axis: mean F1-score-val

Figure 6: Configuring the scatter plot to visualize the effects of different parameter configurations in the logged runs
Run Name 1626115552
Start Time 2021-07-12 14:46:01
C 1.0
Kernel Poly
Max_features 500
Max_iter -1
Ngram_range (1.1)
Norm 12
random_state 42
Mean f1-score-train 0.876
Mean f1-score-val 0.649
std f1-score-train 0.002
std f1-score-val 0.013

The Parallel Coordinates Plot is also useful, as it shows the viewer the effect of the selected parameters on the desired metrics at a glance.

Figure 7: Configuring the parallel coordinates plot to visualize the effects of different parameters on the metrics of interest

Figure 7: Configuring the parallel coordinates plot to visualize the effects of different parameters on the metrics of interest

Figure 7: Configuring the parallel coordinates plot to visualize the effects of different parameters on the metrics of interest

In this image a parallel coordinates plot is configured. You can select different parameters and metrics using the provided input windows, based on which the parallel coordinates plot is updated. This plot can provide an idea about the results you get using different configurations in the experiments. It can help in comparing different configurations and selecting the parameters that perform better.

Text in image:
Scatter Plot – Contour Plot – Parallel Coordinates Plot
Paramters: random_state, norm, max_iter, max_features, C, kernel, ngram_range
Metrics: mean F1-score-val

Figure 7: Configuring the parallel coordinates plot to visualize the effects of different parameters on the metrics of interest
random_state norm Max_iter Max_features C Kernel ngram_range Mean F1-score-val  
46.20000   -1.10000 500.00000 1.10000     0.69400  
46.0000   -1.10000 500.00000 1.10000   (1.3) 0.68000 0.68
45.0000     450.00000          
44.0000   -1.05000 400.00000 1.05000     0.66000 0.66
43.0000     350.00000          
42.0000   -1.0000 300.00000 1.00000 poly (1.2) 0.64000 0.64
41.0000     250.00000          
40.0000   -0.95000 200.00000 0.95000     0.62000 0.62
39.0000     150.00000          
38.0000   -0.9000 100.00000 0.90000   (1.1) 0.60000 0.6
37.80000   -0.90000 100.0000 0.9000     0.59700  

Other interesting stuff in MLflow tracking:

There are other important points to note with MLflow tracking:

  • The runs can be exported to a CSV file directly using the MLflow UI.
  • All functions in the tracking UI can be accessed programmatically—you can query and compare runs with code, load artifacts from logged runs or run automated parameter search algorithms by querying the metrics from logged runs to decide the new parameters. You can also log new data to an already logged run in an experiment after loading it programmatically (visit Querying Runs Programmatically for more information).
  • By using the MLflow UI, users can search for runs having specific data values using the search bar. An example of this would be to use metrics.rmse < 1 and params.model='tree'. This is very helpful when you need to dig up a run with specific parameters executed in the past.
  • The Jupyter notebook used as an example in this blog post can be found on GitHub.

Feel free to contact us at statcan.dsnfps-rsdfpf.statcan@statcan.gc.ca and let me know about other interesting features or use case you like to use that you feel could have been mentioned. We will also have an opportunity for you to Meet the Data Scientist to discuss MLFlow in greater detail. See below for more details.

Register for the Data Science Network's Meet the Data Scientist Presentation

If you have any questions about this article or would like to discuss this further, we invite you to our new Meet the Data Scientist presentation series where the author will be presenting this topic to DSN readers and members.

Tuesday, October 18
2:00 to 3:00 p.m. EDT
MS Teams – link will be provided to the registrants by email

Register for the Data Science Network's Meet the Data Scientist Presentation. We hope to see you there!

Date modified:

Eh Sayers Episode 9 - Sylvia Ostry: Lessons From A Legend

Release date: October 7, 2022

Catalogue number: 45200003
ISSN: 2816-2250

Sylvia Ostry

Listen to "Eh Sayers" on:

Social media shareables

Tag us in your social media posts

  • Facebook StatisticsCanada
  • Instagram @statcan_eng
  • Twitter @StatCan_eng
  • Reddit StatCanada
  • YouTube StatisticsCanada

Visuals for social media

Sylvia Ostry graphic (PNG, 451 KB)

Sylvia Ostry graphic

If this is the first time you're hearing about Sylvia Ostry, buckle up.

Ostry was appointed Canada's first and only female chief statistician in 1972, but she didn't get there by playing by the rules. She was ambitious but grew up in a world where many thought that it was shameful to be female and have a career.

Sylvia was a Jewish woman in economics, and even after she earned a Ph.D. from the University of Cambridge, she was denied a job with the United Nations because of her gender. Nevertheless, she had a storied career, becoming the Chairman of the Economic Council of Canada then the Chief Economist at the OECD. But we're not focusing on her career highlights. We're going behind the scenes to look at how she challenged herself to succeed, becoming both a respected economist and mother, and how she handled setbacks, and discrimination, all while staying true to herself and demonstrating the integrity for which she's remembered today.

We're celebrating the 50th anniversary of Sylvia Ostry's appointment as chief statistician. In this episode of Eh Sayers, featuring interviews with her sons, Adam Ostry and Jonathan Ostry, we are pleased to introduce you to this remarkable woman and to share with you eight pieces of advice inspired by her life.

Host

Tegan Bridge

Guests

Adam Ostry, Jonathan Ostry

Listen to audio

Eh Sayers Episode 9 - Sylvia Ostry: Lessons From A Legend - Transcript

Tegan: Welcome to Eh Sayers, a podcast from Statistics Canada, where we meet the people behind the data and explore the stories behind the numbers. I'm your host Tegan Bridge.

In 1972, Sylvia Ostry became the first, and (so far!) only, female Chief Statistician of Canada. 50 years ago, the world was a different place. NASA was launching their Space Shuttle Program and the Godfather was in movie theaters.

The workplace was changing, with more and more women working outside the home than ever before. In 1972, 45% of women aged 25 to 54 participated in the labour market, that is, were employed or looking for a job. While that might seem like a relatively small percentage today, it represented a huge shift at the time. A decade earlier, in 1962, it was only 32%. That's a 40% increase in just ten years.

In 1952, while Sylvia became a lecturer at McGill, women in her home province of Manitoba were given the right to be jury members. Sylvia began working as the Director of Special Manpower Studies and Consultation at StatCan in 1965. Just one year before that, in 1964, women were given the right to open a bank account without their husband's signature. And in 1971, the year before Sylvia was made Chief Statistician, Manitoba stopped firing female municipal employees after they married.

When Sylvia Ostry was appointed head of the Economic Council of Canada, the Globe and Mail published an announcement at the bottom of the fifth page of the women's section.

Sylvia passed away in 2020, and to celebrate her, we're taking a look back at her life to see what we can learn from her.

You'll be hearing Sylvia's voice through clips from an interview she gave to Bronwyn Bragg and Mary Breen, recorded on May 28th, 2008.

So, here are 8 pieces of advice from the life of Sylvia Ostry.

(Chime)

Number one. Challenge yourself.

When you think about people who led remarkable lives, it's difficult to imagine who they were before they made it. Before they were successful.

Sylvia Ostry came from humble roots.

Adam: So, my name is Adam Ostry and Sylvia Ostry was my mother.

She was a pioneer, you know. Um. My her parents, now her mother had graduated from normal school in Winnipeg. She was an immigrant from England. She was born in in London. Tottenham Court Road. Can't get more working class than that in the 19-- in the 1890s. She, you know, she came from nothing. They had no money. They were penniless immigrants. My grandfather made money and then lost it during the depression and never really gained it back. You know my and my grandmother. Her mother was ended up being a she was a primary school teacher after having gone to normal school in Winnipeg. But that was it. She was the first uh, her and her brother were the first people to go on to graduate school and to get doctorates at universities. I mean. And then she rose to the top through sheer hard work.

Tegan: Sylvia Ostry challenged herself. She was intelligent and a hard worker, and she challenged herself to succeed.

In her own words;

Sylvia Ostry: at the University of Manitoba to get into medical school it was very difficult, it was a first-class medical school but it covered the whole of western Canada, there was no other medical school at that time and it was very difficult for a woman, I don't remember how many there were since the beginning not more than a handful, and it was much more difficult to be a Jew, so to be a female Jew really appealed to me that I would get in. I had two friends in high school very bright, and we sat down and said look we're going to do our pre-med and we'll going to get the highest marks in Western Canada, because we'll organize ourselves to study and we'll share notes and we'll get money and hire a special people that can teach us and we'll go one, two, three and I said, if they keep us out, we'll sue them, which sounds very strange at that time but I felt very strongly about that, but we did that.

Adam: The things that she respected the things that that she respected the most in people were talent and intelligence, integrity, so honesty, and hard work and discipline. So you know if given the opportunity to or one of her favorite expressions was to goof off, that's a very kind of 1950s expression, goof off, and she would invariably accuse me of goofing off when I wasn't doing my homework or wasn't working. But you know she when given the opportunity to goof off or to work she would invariably choose work.

(Chime)

Tegan: Number two. Follow your passions, even if they take you in an unexpected direction. Maybe especially then.

I think that quitting gets a bad rep. Have you heard of the sunk cost fallacy? Basically, it's when people tend to keep going with something if they've invested a lot of time, effort, or money into it, even if it no longer serves them or it's something they don't want anymore. You can apply this to things like relationships or jobs. I would like to actually encourage you to utilize strategic quitting. And I think Sylvia would too.

Sylvia realized during a visit to her brother, who was studying at Queen's University, that she wanted to study social sciences. The conversations she saw the students having about things like art, politics, and the economy were much more interesting to her than her studies in medicine. She wanted to join them. But to do that, she would have to quit medical school.

Sylvia Ostry: The first year was very boring, just anatomy and physiology and biochemistry and I got a 99 in biochemistry and the other two but that summer I went to see my brother who was at Queens and I spent the summer in Kingston and it was though I had gone to Mars, I had never met people who read books and talked about history and all I'd ever done was study.

I went to see the Dean of the medical school and I said, I really feel badly but I want to leave medical school because its so boring and he exploded and he screamed, you're the best example of why we will not let women in medical school, how correct we were to keep you out, you realize that you are keeping a man out and I said I know I'm sorry but I want to study something else. And he said, that's a lie, you're like all women, you're dropping out so you can go out and get married. I said, it's not true, I'm going to be a doctor, but it'll be a PhD, not a medical doctor. He said, that's a lie and I went out.

Jonathan: my name is Jonathan Ostry. I'm the younger son of Sylvia and Bernard Ostry.

She started off thinking she wanted to be a physician, a doctor, a medical doctor. And I think what had drove her in that direction is, you know, always choose the thing that is the most difficult, the most impossible and see if you can kick the ball through the goal post just for the heck of kicking the ball rather than specifically because this is your passion. And you know, she realized this this really wasn't her passion. And she had chosen this, this direction merely for the reason that I just said. And that was a a very poor reason to kind of motivate what you are gonna do for your life. Right. And so she decided she wanted to go into economics.

Tegan: For Sylvia, the most important thing wasn't necessarily what she was taking. It wasn't the topic of study. It was instead:

Sylvia Ostry: the concentration on learning and I came to McGill and I didn't want to take economics, I didn't care what I took but what happened was they said take economics we think you can do two years and…

Jonathan: I never really thought of my mother as an economist. I mean, she is an economist by training, but you know. But, you know, the is my mother, an economist, did I think of her as an economist? I really thought of her and my father as people who knew everything about everything.

(Chime)

Tegan: Number three. Refuse to accept the limitations put on you by other people.

Sylvia faced discrimination all her life. Even after earning a PhD, she was denied a job at the UN because she was a woman.

Sylvia Ostry: My initial thing was that I wanted to be a development economist and I went to the UN and I had my PhD and I went to see the person who was in charge of it all and I said I have all the qualifications and I would love to work here and he said, look, I might as well be clear to you, no government in the developing countries will hire a woman, and he said you'd better find another career, it's amazing how people could say things like that but it was honest and so when I went to McGill I had to find another, and I was very interested in labor economics so that's what I worked on.

Adam: My mother fought the good fight. She had, she had career disappointments. I mean, my mother wanted to be. My mother wanted to be Deputy Minister of Finance and then governor of the bank, you know. And she was a product of her time, and there was no way they were going to give those jobs to a woman. And she knew it. She was told that. You know, and it's uh. It's. It's. I... she made the best of... You know there's an old expression. You dance with the guy that brung you. And the fact is, is that what she made the best of the of the hand she was dealt,

Tegan: Although she was refused by the UN, she didn't let that stop her. Sylvia didn't quit when she was faced with a roadblock. She found her own way to succeed and refused to accept the limitations put on her by others. And you shouldn't either!

Jonathan: As an economist she had nine lives, right? She didn't just change from medicine to economics. She did her PhD at Cambridge on what today would be considered the most arcane obscure topic. she wrote, her thesis on the sort of this Soviet planning Soviet economic planning as it pertained to newly independent India. She didn't. She didn't work on Marx economics or development economics or Soviet planning. She went to the Oxford Institute of Statistics and Economics and she did other things. She became a labor economist. And then she became an expert on the Canadian labour market and all the challenges for the Canadian economy. She was chair of the Economic Council, Canada. She became an expert on regulatory and microeconomics when she was deputy at consumer and Corporate affairs. And then she became a formal global expert on international trade, which is a completely different topic. She so she reinvented herself. Yeah, in many in many different ways. She had the inner confidence and strength. To know that she could do it.

(Chime)

Tegan: Number four. When faced with a problem, try changing your perspective.

Prior to Sylvia's tenure as Director of Special Manpower Studies and Consultation, StatCan studied the labour supply by focusing on how many men were working and how many men wanted to work.

Sylvia Ostry: The first job they gave me at Statistics Canada was terrific, they gave me, it's a wonderful title today but it didn't bother me, called special manpower studies but it was very interesting they let me attach separate questionnaires to the household survey so I could get information on a whole range of things that nobody else had and we produced and I was able to hire academics and we produced some incredible studies, so I loved the job, it was really fascinating, and indeed some of my early publications were very important in the US, we developed new ways of looking at things, we developed ways, I wanted to develop measures on the amount of demand and not just supply.

Tegan: Sylvia wanted to look at labour supply from another angle. She wanted to look at the participation of workers in the labour market and why someone would choose not to participate in the labour market, not get a job, whether they might want to work under different conditions.

The Manpower Studies gave Sylvia the resources to study the Canadian labour force more closely, in a way that had not been done before. StatCan had been measuring the labour supply for a long time, but manpower was a bit literal and focused on men. Sylvia saw the value in expanding our research by including other groups in new measurements. Sylvia reimagined how we'd think of labour, of manpower, to expand the analysis to include not just men, but women as well. She studied the participation of women in the labour market- the question of what made a woman choose to work, or not to work, and the effect of factors like education, husband's earnings, and children on that decision. This was a big deal at a time when, in the words of economist Joan McFarland, "most of the analysis in economics… ignored the role of women in the economy altogether."

Sylvia Ostry studied the lifetime productivity of a person and the lost output from their premature death or retirement. The labour force participation and potential earnings of both the economic man and the economic woman are included, the first Canadian study of its kind.

Sylvia issued a challenge to traditional economics to change its perspective, not just looking at men but at women, and in doing so, increased our understanding of labour economics.

(Chime)

Tegan: Number five. Live by your own definition of success.

Sylvia Ostry herself was a mother and she also had a career, something other people sometimes judged her for.

Bronwyn: What did the people close to you – your friends and family and wider social network – what did they think of your choices?

Sylvia: Well, in Ottawa I was told that a large number of women were shocked and horrified that I was working they thought that was just appalling, I had children and I was working full-time. They never said this to me, but I heard this from a number of people. The only time there was anything overt was when I was appointed to the OECD, this was '79, I'm told that the wife of the Ambassador told her husband that I was not allowed to enter the Embassy because I was such a disgrace that she could not have me. I was married, I had two children, how could I come to a place like the OECD and be head of it? The chief economist and it was just disgraceful for a woman to be working

Jonathan: You know, when my mother went to the OECD as its chief economist, there were a number of firsts, and maybe and maybe more firsts than when my mother became chief statistician because she became chief statistician in Canada. Which was her country. Uhmm, and you know, you can say that because it's her country, there's a certain comfort level from rising in your country. But when she got the job at the OECD, most people in Paris were absolutely incredulous because first of all, that job had always really been the purview of the of a European citizen, a citizen of Europe. And Canadians or Americans, but you know, Canada was like a backwater and what is this Canadian woman coming to Paris for? That's one. So that was one thing. The other, there was very much, it was a quite a misogynist environment. And I can certainly well appreciate that my mother would have heard whispers and you know in the in the corridors about God, this, what is this woman doing here? That's so it's Canadian, there's woman and just this sense, that boy, she's not one of us. I mean it. It's just so many, well, probably being Jewish. So. So, you know, it's just like, you know, not part of that club and so and so you'll talk about being out of your comfort zone.

Tegan: We all get to decide for ourselves what success looks like. And if you would like to follow in Sylvia's footsteps and define success as raising two children and also becoming the Chief Economist at the OECD, yes! More power to you. You go Glen Coco.

(Chime)

Tegan: Number six. When prejudice closes a door, break that door down.

You might have heard the expression "when one door closes another opens." Maybe that's true. But. It's also true that sometimes doors are closed because of prejudice. And when those doors close, you kick them wide open. This maxim could apply metaphorically to many stories from Sylvia's life, but sometimes we actually mean it pretty literally.

Sylvia Ostry: The funniest thing was when Flo Byrd had her first meeting to discuss the Royal Commission on Women, it was held at a very fancy club in Ottawa and I was coming into have lunch with her and I was stopped at the entrance and I said, I'm sorry, I have a luncheon meeting with Senator Byrd. They said, you can't come in this door, I said what do you mean I can't come in this door? Not allowed, as a woman, you have to go in the side door. So I burst out laughing, I said, that's good cause we're having a meeting on a Royal Commission for Women and I'll make sure that this place is either closed or you open the front door.

(Chime)

Tegan: Number seven. Surround yourself with people who love and support you.

You know what they say. Haters gonna hate (hate hate hate). But take it from Sylvia. Surrounding yourself with people who love and support you makes all the difference. For Sylvia, it was her husband, Bernard.

Sylvia Ostry: My husband was just the most extraordinary man and as I said I had known him since I was five years old.

Adam: She wouldn't have survived without my father the ones that my father, my mother was. My mother was blessed with having my father as her husband, my father loved my mother, adored my mother, worshipped the ground she walked on uh for all sorts of reasons. My mother was. My mother never forgot the degree to which she was loved by him. Umm. And you know her two children were privileged to have grown up and to have been raised by two people who loved The way my parents loved each other. my family, my, my, my parents stayed married to each other for 50 years. And it was, uh, my mother, my mother, my mother expressed her love for my father in differently than the way my father expressed his love for my mother. I mean, my father's collecting of Art Nouveau and Art Deco furniture and objets d'art, which you could now see in the Royal Ontario Museum is a testament to his love for her. He did that not because he was interested in the period. He did that because she was. She had an intellectual interest in the Vimar Republican and French Art Deco. She was interested in the period she was interested in the in the political [unintelligible] and turmoil that was going on in the 20s and 30s and in Western Europe, notably France and Germany. 28:43 Umm. And so my father decided that he would begin surrounding her with the tangible illustrations of that period. That was the way he expressed his love for her. In all her major, major career um decisions in life she couldn't do anything without first consulting with him. And if you look at the career path, I don't think you'll find any examples of the husband consciously giving up career opportunities so that his wife could pursue her career. Even today, I dare say that there are the examples are few and far between.

Sylvia Ostry: I was appointed Chairman of the Economic Council and I was at the office one morning when I got a call from Paris and the assistant to the Director General, phoned and said the head of the economics department is leaving, he's retiring and we'd be very interested in interviewing you and the Director General wants to know if you'll come to Paris. And I was staggered and I said, well, I could get back to you on Friday, this was Wednesday and I came home that night and I had this insane call from Paris and I described it and I said I'll be polite and wait till Friday, and then I'll tell them and he said are you crazy? I said, what do you mean? He said, you'll never have another offer like this for the rest of your life that's a crucial job, he was right, it was very important at that time, I said what do you want me to do, I can't do it, he said yes you can, you're going to go and I'll work something out. That's what he was like. I couldn't be where I am without him.

(Chime)

Tegan: Number eight. Work hard.

Our last piece of advice comes straight from Sylvia Ostry herself.

Bronwyn: I was wondering if I could ask you if you have any advice for young women?

Sylvia: Yeah. I think my advice is what I did myself: You must be determined to be the best in what you do and you have to be disciplined and you have to work hard. I know it sounds platitudinous but that's what I did. I never thought about power, getting jobs or anything, I just wanted to do better than anyone else. And I was like that from when the time I was in grade 1.

Adam: Sylvia Ostry was a complicated and complex human being. She was highly intelligent. She was driven by her need to work. She expressed her identity through her work. And she devoted her life to. To work . She was full of integrity. She. She was brutally honest, first with herself and then demanded no less from others, starting from starting with her children. And so as a mother, she taught me, she tried anyway to teach me very early the discipline of work and of being honest with yourself in terms of what you can and cannot do. She believed very strongly in in trying to be the best that you could be and trying to. She always had a an expression that she would use with me whenever I would collapse and say that I couldn't do it she would get very upset and angry and say that you're not working hard enough. And if I had a goal that that I would then say I would never be able to she always said your reach should exceed your grasp. And then she lived by that credo for her entire life.

Jonathan: Sylvia dedicated her life to improving the welfare of Canadians. She was, you know, a not only a great intellectual, very broad in terms of, you know, her areas of expertise but also not interested in knowledge for knowledge's sake. She was interested in how to leverage knowledge to uh to guide policy with the ultimate purpose of the well being of Canadians or in a in a larger canvas. The world. And this is what she devoted her life to.

Adam: She committed, she devoted her entire life, her entire working life, to public service. There is no nobler calling and she as an is an exemplar of that. And I think that, you know, Canada recognized that. She died a companion of the order. But you know, she um if people remember her, I hope people remember her for her contribution to making Canada a better place in which to live.

(Outro)

Tegan: You've been listening to Eh Sayers. Thank you to Sylvia Ostry's sons, Adam Ostry and Jonathan Ostry, for their special contribution to this episode. Thank you to Joan McFarland for help with some of the economic concepts. To the librarians at Library and Archives, who helped us with the research. And to University of Ottawa Library Archives and Special Collections, who gave us permission to include excerpts from Bronwyn Bragg and Mary Been's 2008 interview with Sylvia Ostry.

You can subscribe to this show wherever you get your podcasts. There you can also find the French version of our show, called Hé-coutez bien. If you liked this show, please rate, review, and subscribe. Thanks for listening!

Sources

"Canadian Women's History." 2013. PSAC NCR. Public Service Alliance of Canada. January 9, 2013.

McFarland, Joan. 1976. "Economics and Women: A Critique of the Scope of Traditional Analysis and Research." Atlantis: Critical Studies in Gender, Culture and Social Justice 1 (2): 26–41.

Ostry, Sylvia. 2008. Sylvia Ostry Interview by Bronwyn Bragg and Mary Been. University of Ottawa Library Archives and Special Collections.

"The Surge of Women in the Workforce." 2018. Statistics Canada. May 17, 2018.