0% found this document useful (0 votes)
4K views

Complete Download Machine Learning Infrastructure and Best Practices for Software Engineers: Take your machine learning software from a prototype to a fully fledged software system 1st Edition Anonymous PDF All Chapters

Anonymous

Uploaded by

nunziaattas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4K views

Complete Download Machine Learning Infrastructure and Best Practices for Software Engineers: Take your machine learning software from a prototype to a fully fledged software system 1st Edition Anonymous PDF All Chapters

Anonymous

Uploaded by

nunziaattas
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Get ebook downloads in full at ebookmeta.

com

Machine Learning Infrastructure and Best Practices


for Software Engineers: Take your machine learning
software from a prototype to a fully fledged
software system 1st Edition Anonymous
https://ebookmeta.com/product/machine-learning-
infrastructure-and-best-practices-for-software-engineers-
take-your-machine-learning-software-from-a-prototype-to-a-
fully-fledged-software-system-1st-edition-anonymous/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Applied Machine Learning and AI for Engineers Jeff Prosise

https://ebookmeta.com/product/applied-machine-learning-and-ai-for-
engineers-jeff-prosise/

ebookmeta.com

Machine Learning Crash Course for Engineers 1st Edition


Eklas Hossain

https://ebookmeta.com/product/machine-learning-crash-course-for-
engineers-1st-edition-eklas-hossain/

ebookmeta.com

Software-Defined Radio for Engineers Travis F Collins

https://ebookmeta.com/product/software-defined-radio-for-engineers-
travis-f-collins/

ebookmeta.com

Shifting Trajectories in Globalization Labor and the


Transformation of Work 1st Edition Jonathan Westover

https://ebookmeta.com/product/shifting-trajectories-in-globalization-
labor-and-the-transformation-of-work-1st-edition-jonathan-westover/

ebookmeta.com
Financial Inclusion and Poverty Alleviation Perspectives
from Islamic Institutions and Instruments E. Whitley

https://ebookmeta.com/product/financial-inclusion-and-poverty-
alleviation-perspectives-from-islamic-institutions-and-instruments-e-
whitley/
ebookmeta.com

Silencing A Whistleblower A Story Of Hypocrisy 1st Edition


Cobus De Swardt

https://ebookmeta.com/product/silencing-a-whistleblower-a-story-of-
hypocrisy-1st-edition-cobus-de-swardt/

ebookmeta.com

Resilience By Design How to Survive and Thrive in a


Complex and Turbulent World 1st Edition Mike Weeks

https://ebookmeta.com/product/resilience-by-design-how-to-survive-and-
thrive-in-a-complex-and-turbulent-world-1st-edition-mike-weeks/

ebookmeta.com

Paradox in Public Relations: A Contrarian Critique of


Theory and Practice 1st Edition Kevin L. Stoker

https://ebookmeta.com/product/paradox-in-public-relations-a-
contrarian-critique-of-theory-and-practice-1st-edition-kevin-l-stoker/

ebookmeta.com

Six Scarlet Scorpions The Wild Adventures of Pat Savage


1st Edition Lester Dent Will Murray

https://ebookmeta.com/product/six-scarlet-scorpions-the-wild-
adventures-of-pat-savage-1st-edition-lester-dent-will-murray/

ebookmeta.com
Irish Vow The Irish King Book 3 1st Edition M James

https://ebookmeta.com/product/irish-vow-the-irish-king-book-3-1st-
edition-m-james/

ebookmeta.com
Machine Learning Infrastructure and Best
Practices for Software Engineers
Copyright © 2024 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy
of the information presented. However, the information contained in this book is
sold without warranty, either express or implied. Neither the author nor Packt
Publishing or its dealers and distributors, will be held liable for any damages
caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.

Group Product Manager: Niranjan Naikwadi

Publishing Product Manager: Yasir Ali Khan

Book Project Manager: Hemangi Lotlikar

Senior Editor: Sushma Reddy

Technical Editor: Kavyashree K S

Copy Editor: Safis Editing

Proofreader: Safis Editing


Indexer: Hemangini Bari

Production Designer: Gokul Raj S.T

DevRel Marketing Coordinator: Vinishka Kalra

First published: January 2024

Production reference: 1170124

Published by

Packt Publishing Ltd.

Grosvenor House

11 St Paul’s Square

Birmingham

B3 1RB, UK

ISBN 978-1-83763-406-4

www.packtpub.com
Writing a book with a lot of practical examples requires a lot of extra time,
which is often taken from family and friends. I dedicate this book to my family
– Alexander, Cornelia, Viktoria, and Sylwia – who always supported and
encouraged me, and to my parents and parents-in-law, who shaped me to be
who I am.
– Miroslaw Staron

Contributors

About the author


Miroslaw Staron is a professor of Applied IT at the University of Gothenburg in
Sweden with a focus on empirical software engineering, measurement, and
machine learning. He is currently editor-in-chief of Information and Software
Technology and co-editor of the regular Practitioner’s Digest column of IEEE
Software. He has authored books on automotive software architectures, software
measurement, and action research. He also leads several projects in AI for
software engineering and leads an AI and digitalization theme at Software Center.
He has written over 200 journal and conference articles.

I would like to thank my family for their support in writing this book. I would also
like to thank my colleagues from the Software Center program who provided me
with the ability to develop my ideas and knowledge in this area – in particular,
Wilhelm Meding, Jan Bosch, Ola Söder, Gert Frost, Martin Kitchen, Niels Jørgen
Strøm, and several other colleagues. One person who really ignited my interest in
this area is of course Mirosław “Mirek” Ochodek, to whom I am extremely grateful.
I would also like to thank the funders of my research, who supported my studies
throughout the years. I would like to thank my Ph.D. students, who challenged me
and encouraged me to always dig deeper into the topics. I’m also very grateful to
the reviewers of this book – Hongyi Zhang and Sushant K. Pandey, who provided
invaluable comments and feedback for the book. Finally, I would like to extend my
gratitude to my publishing team – Hemangi Lotlikar, Sushma Reddy, and Anant
Jaint – this book would not have materialized without you!

About the reviewers


Hongyi Zhang is a researcher at Chalmers University of Technology with over five
years of experience in the fields of machine learning and software engineering.
Specializing in machine learning, edge/cloud computing, and software engineering,
his research merges machine learning theory and software applications, driving
tangible improvements in industrial machine learning ecosystems.

Sushant Kumar Pandey is a dedicated post-doctoral researcher at the


Department of CSE, Chalmers at the University of Gothenburg, Sweden, who
seamlessly integrates academia with industry, collaborating with Volvo Cars in
Gothenburg. Armed with a Ph.D. in CSE from the esteemed Indian Institute of
Technology (BHU), India, Sushant specializes in the application of AI in software
engineering. His research advances technology’s transformative potential. As a
respected reviewer for prestigious venues such as IST, KBS, EASE, and ESWA,
Sushant actively contributes to shaping the discourse in his field. Beyond research,
he leverages his expertise to mentor students, fostering innovation and excellence
in the next generation of professionals.
Table of Contents

Preface
Part 1: Machine Learning Landscape in Software
Engineering

Machine Learning Compared to Traditional Software


Machine learning is not traditional software
Supervised, unsupervised, and reinforcement
learning – it is just the beginning
An example of traditional and machine learning
software
Probability and software – how well they go
together
Testing and evaluation – the same but different
Summary
References

Elements of a Machine Learning System


Elements of a production machine learning
system
Data and algorithms
Data collection
Feature extraction
Data validation
Configuration and monitoring
Configuration
Monitoring
Infrastructure and resource management
Data serving infrastructure
Computational infrastructure
How this all comes together – machine learning
pipelines
References

Data in Software Systems – Text, Images, Code, and


Their Annotations

Raw data and features – what are the


differences?
Images
Text
Visualization of output from more advanced text
processing
Structured text – source code of programs
Every data has its purpose – annotations and
tasks
Annotating text for intent recognition
Where different types of data can be used
together – an outlook on multi-modal data
models
References

Data Acquisition, Data Quality, and Noise


Sources of data and what we can do with them
Extracting data from software engineering tools
– Gerrit and Jira
Extracting data from product databases – GitHub
and Git
Data quality
Noise
Summary
References

Quantifying and Improving Data Properties


Feature engineering – the basics
Clean data
Noise in data management
Attribute noise
Splitting data
How ML models handle noise
References
Part 2: Data Acquisition and Management

Processing Data in Machine Learning Systems


Numerical data
Summarizing the data
Diving deeper into correlations
Summarizing individual measures
Reducing the number of measures – PCA
Other types of data – images
Text data
Toward feature engineering
References

Feature Engineering for Numerical and Image Data

Feature engineering
Feature engineering for numerical data
PCA
t-SNE
ICA
Locally linear embedding
Linear discriminant analysis
Autoencoders
Feature engineering for image data
Summary
References

Feature Engineering for Natural Language Data


Natural language data in software engineering
and the rise of GitHub Copilot
What a tokenizer is and what it does
Bag-of-words and simple tokenizers
WordPiece tokenizer
BPE
The SentencePiece tokenizer
Word embeddings
FastText
From feature extraction to models
References
Part 3: Design and Development of ML Systems

Types of Machine Learning Systems – Feature-Based


and Raw Data-Based (Deep Learning)
Why do we need different types of models?
Classical machine learning models
Convolutional neural networks and image
processing
BERT and GPT models
Using language models in software systems
Summary
References

10

Training and Evaluating Classical Machine Learning


Systems and Neural Networks
Training and testing processes
Training classical machine learning models
Understanding the training process
Random forest and opaque models
Training deep learning models
Misleading results – data leaking
Summary
References

11

Training and Evaluation of Advanced ML Algorithms –


GPT and Autoencoders

From classical ML to GenAI


The theory behind advanced models – AEs and
transformers
AEs
Transformers
Training and evaluation of a RoBERTa model
Training and evaluation of an AE
Developing safety cages to prevent models from
breaking the entire system
Summary
References

12

Designing Machine Learning Pipelines (MLOps) and


Their Testing
What ML pipelines are
Other documents randomly have
different content
be through Oxford when I am. It takes so beastly long to educate a
fellow. It may be eight years before I see you again.”
“Eight years! I shall die. Why won’t he take me? I can pay for myself.
Mrs. Hayne says I have eighty dollars a month. Don’t you think he’ll
change his mind?”
“He won’t! he won’t!”
When Lee had wept herself dry, she adjusted herself to fate. “Well,”
she said, with a heavy sigh, “we’ll write every week, won’t we?”
It was Cecil’s turn to be appalled. This was a phase of the tragedy
that had not occurred to him.
“Oh, Lee,” he faltered, “I hate to write letters!”
“But you will?” she cried shrilly. “You will?”
“Oh, I’ll try! I’ll try! But only one a month.”
“One a week or I won’t write at all. And it’s nice to get letters.”
“One a fortnight then.”
To this Lee finally consented, and then went upstairs and helped him
to pack. Their faces were so funereal at dinner that they were the
subject of much good-natured chaff. Many disapproving glances
were directed at Mr. Maundrell,—with whose ascent they had not
been made acquainted,—for the children had furnished the house
with much amusement, and they commanded no little sympathy.
After dinner Cecil and Lee sat in one of the bay windows in the front
parlour and talked of the future. Cecil good-naturedly promised that
life should be exactly like one of Scott’s novels, any one that Lee
preferred. After some excogitation she concluded that she liked the
poems best, particularly “Marmion,” and Cecil agreed to qualify for
the part. Lee in return vowed to go fishing and shooting with him,
never to scream at the wrong time, even if a blackbeetle got on her,
and never to get into rages and call him names. They also
exchanged tokens. Lee gave him a little gold heart with her picture—
cut from a tin-type—and a strand of her lank hair in it, and he gave
her a ring cut with the arms of his house, and begged her to keep it
in her pocket when his father was round.
The next morning Lee was graciously permitted to accompany the
travellers across the bay. She and Cecil paced up and down the
deck of the boat, too excited for melancholy; both under that spell
which cauterises so many wounds. Lee was to be left behind, but
she was in the midst of an event. Moreover, she was shortly to see
what a Pullman car was like. She wrung one more solemn promise
from Cecil to write.
Lord Barnstaple had taken a drawing-room for himself and his son,
and Lee examined the ornate interior and thought it very vulgar.
“You’ll be sure not to put your head out of the window, won’t you,
Cecil?” she asked anxiously. “And you’ll hold on tight at night and not
be pitched out of these things.”
Cecil grunted. She had hung a camphor bag on him, and presented
him with a large package of cough drops.
Lord Barnstaple took out his watch. “We start in eight minutes,” he
said. “You had better let me put you in the hack; I have told the man
to take you home.” He paused and smiled slightly. He was at peace
with the world, and inclined to be gracious to everybody; moreover,
there was just a chance, a bare chance, that this boy-and-girl affair
might come to something. His son had a tenacious will, and these
Americans were the devil and all for getting their own way. If Lee
should turn out a great heiress—he had a vague idea that all
American girls became heiresses as soon as they grew up—and
should fulfil her promise of even temper and sturdy character, Cecil
might, of course, do worse. Far be it from him to encourage the
invasion of the British aristocracy by the undisciplined American
female, but if another in the family was to be his unhappy fate, as
well drop into the plastic mind a few seeds from the gardens of
civilisation.
“We may see you in England, some day,” he said; “you Americans
are always travelling. Try to make yourself like English girls. Study
hard and improve your mind. A smattering is such a trial; it rhymes
with chattering. Don’t talk too much, and above all never have
hysterics. I am sure they are only a habit and can be controlled if you
begin early. And—ah—your manners are somewhat abrupt, and you
have a way of sprawling. Your mother, I am told, was a very elegant
woman. Try to grow like her. Mrs. Hayne says it is likely that some of
your mother’s friends will offer you a home. Accept, by all means; it
would be quite dreadful to be brought up in a boarding-house. I
believe that is all. Now say good-bye.”
Cecil gave Lee a mighty hug and winked rapidly. Lord Barnstaple
allowed them one minute, then took Lee firmly by the hand and
marched her to the hack.
“Good-bye,” he said kindly. “You are a jolly little thing—you don’t
make any fuss. Mind you never have hysterics.”
But Lee cried audibly all the way home, secure in the pawing of the
horses about her on the boat, and in the noise of the hack on the
cobble-stones thereafter. Cecil was gone, and there was no mother
awaiting her in the boarding-house. She could not even go into the
old room and cry on her mother’s bed, for strangers were there. She
was very forlorn, and life was as black as pitch.
CHAPTER XIII
AFTER several weeks’ exchange of vague suggestions, Mrs.
Montgomery, Mrs. Brannan, Mrs. Geary, and Mrs. Cartright met at
the house of the former to discuss the future of Marguerite Tarleton’s
child. Mrs. Cartright was the aunt of Helena Belmont, whose
energies were bottled for the moment in school. Mrs. Montgomery
and Mrs. Brannan were also preparing for the difficult rôles of
mothers of beauties. Mrs. Geary was a degree less important, her
daughter being bright rather than pretty. Mrs. Cartright, between the
imperious Helena and the incorrigible Colonel, her brother, over
whose home she had presided since his wife’s death, had long since
surrendered what little character she had brought to California; but
having a wide popularity, and a mighty flow of words, was never
absent from the counsels of her friends. Mrs. Montgomery was “very
Southern,” very impulsive, rather prone to do the wrong thing when
caught in the cyclone of her emotions. Mrs. Brannan was merely the
gorgeous Ila’s mother, but like the others of her intimate circle was a
Southerner, and had been a close friend of Marguerite Tarleton. Mrs.
Geary was the practical wife of a millionaire. Her husband, a man
from Maine, who looked not unlike a dried cod-fish, had panned for
gold in ’49, bought varas and ranches in the Fifties, become a
banker of international importance in the Sixties, and had succeeded
in making his Southern wife as close and practical as himself. Her
advice was always in demand by her more impetuous friends.
“It’s just this,” said Mrs. Cartright, beginning at once, “that dear child
cannot be brought up in a boarding-house, even in Mrs. Hayne’s.
Lee is a great-niece or second cousin of General Robert E. Lee and
third cousin of the Breckinridges, and Randolphs and Carrolls and
Prestons, to say nothing of the Tarletons. As long as poor dear proud
Marguerite lived we could do nothing, but now Lee belongs to us,
particularly as dear brother Jack and Mr. Brannan are her mother’s
executors and Lee’s guardians. Now, of course, I’d just jump at the
chance of taking her, if it were not for darling imperious Helena. She
will be home in a year now, and if they didn’t get on it would be really
dreadful. Helena is really the most kind-hearted creature in the world
—but such a tyrant! Her will has never been crossed, you see. You
don’t know what I go through sometimes, although I fairly worship
her. And Lee, you see, has simply managed poor dear Marguerite
and done exactly as she pleased for eleven years. It would be really
terrible if she didn’t give in to Helena, and I’m afraid she never
would. And it would be almost cruel to bring her up in a house where
she would have almost no individuality, although, of course, Helena
may marry at once——”
“How much income has she?” interrupted Mrs. Geary.
“Eighty dollars a month. Isn’t it shocking? Fancy Hayward Tarleton’s
daughter growing up on eighty dollars a month!”
“It’s quite enough to educate and dress her, and when she is ready
to come out we can each give her a frock, and help with the
trousseau when she marries.”
“But she’s got to have a home, meanwhile; that’s the point,” said
Mrs. Montgomery, who seemed to be repressing her own eloquence,
as great upon occasion as Mrs. Cartright’s. “She must have a home
and a mother, poor little thing. Think if it were Tiny! I have cried
myself ill. And she can’t grow up from pillar to post either; she would
become quite demoralised, quite unworthy of her blood——”
“The very oldest families of the South!” cried Mrs. Cartright with
enthusiasm.
“That’s all very well, but I can’t see why she shouldn’t be placed at
Mill’s Seminary for the next seven years,” said Mrs. Geary. “Of
course, she could spend her vacations in Menlo with us.”
Mrs. Montgomery shook her head with emphasis. “She must have a
home! She must have a mother! She’s full of feeling. It would wound
and demoralise her to feel a waif, with no anchor, no one in particular
who took an interest in her—it is too terrible to think of!”
“It comes to this then,” said Mrs. Geary: “one of us must take her.”
“That is what I mean,” said Mrs. Montgomery eagerly.
“If it were not for Helena——” began Mrs. Cartright, ready to
recapitulate. Mrs. Brannan interrupted her with unusual firmness.
“I’m afraid I cannot,” she said. “I’d really love to, and she would be
such company for Coralie; but Ila is so exacting and jealous, and as
imperious in her quiet way as Helena. I wait on her like a slave, and
she’d fairly hate an outsider who made any claim on me. Fortunately
Coralie adores her and is so sweet. It was all I could do to persuade
Ila to let me come back and look after Mr. Brannan and Coralie for a
few months—and I do hate Paris! I’ll do everything I can in the way
of a good substantial present at Christmas, and she and Coralie
might study together; that would save a little on both sides, and I’m
sure they’d get on, but I don’t dare risk taking her.”
“Of course you would take her if you could,” said Mrs. Montgomery;
“we all know how good and kind you are. And you, Maria?”
Mrs. Geary shook her head emphatically. “Mr. Geary wouldn’t listen
to it for a moment. He detests sentiment and everything out of the
common, and he has a special prejudice against adopting other
people’s children. Besides, as you know, Marguerite used to snub
him, as she did all Northerners, and he’s not the kind that ever
forgets. No, I haven’t even thought of it. I’ll make her little presents,
and give her a party dress when she’s eighteen, but I can’t do more.”
“And I’m afraid to venture,” sighed Mrs. Cartright, “but Jack will do
something handsome——”
“Then it’s settled,” cried Mrs. Montgomery. “I am to have her! The
very day of the funeral I begged her to come home with me, but she
wouldn’t: she thought that heartless Englishman would take her, poor
little innocent thing—but Cecil was a dear, quite as nice as any
Southern lad before the war. Well, when I got home, I reflected that
perhaps it was as well that Lee had refused, as I have made so
many resolutions to consult my children before taking any important
step—it is their right. I thought all night and finally decided that it did
not concern any one but Tiny and Randolph, as the others are
married. I spoke to Randolph the next morning, and he said he could
see no objection; he’s sixteen now, and so sensible; and after
breakfast I wrote a letter of ten pages to Tiny and told her all about it,
and how deeply I felt on the subject, and dilated upon the brilliant
prospects of Lee’s babyhood, and the distinguished blood in her
veins—a Tarleton of Louisiana! to say nothing of all the others! I
begged her to think it over carefully and write at once—it does take
so long to get an answer from Paris! I told her I would leave it
entirely to her. She has so much heart, but her head is far cooler
than mine. Even when she was a child I respected her judgment,
and she quite managed her elder sisters. I’ve rarely seen her
excited. Well! I had her answer this morning. That is the reason I
asked you to come to-day and decide once for all. She is so sweet
and sensible about it. She began by saying that of course it would be
a great risk to take an alien into the family, no matter how well we
had known the parents: for no matter how many different characters
there were in a family there was always a sort of general disposition
among them that carried things off. And we were all so devoted to
each other, and so happy together. It would be quite terrible if Lee
should turn out a strong individuality. Therefore she begged me not
to take her unless Mrs. Tarleton’s other friends absolutely refused to
do so. But if they did refuse, then I must not hesitate—I must take
her by all means and make her as much like my own children as
possible—after all, she was only eleven. So it’s decided! She’s
mine!”
“Tiny certainly has a level head,” said Mrs. Geary dryly. “And I really
don’t see how Lee could do better, or as well, if you really care to
take her. You will see that her manners are all that could be desired,
and that nobody ever speaks a cross word to her; and Tiny will see
that you do not spoil her, and that she acquires the family
disposition.”
“You dear sarcastic Maria! You know you’d just love to spoil her
yourself. I’m so happy. I haven’t dared go to see her, but I’ve sent
her candy, and fruit, and a new coat and hat. I’ll go straight away and
fetch her.”
Thus was the momentous question decided, and Lee entered upon
the third chapter of her life.
CHAPTER XIV
THAT same day she was installed in the old Montgomery house on
Rincon Hill. It was a low irregularly built house, wooden, but
substantial. The walls of the lower storey were panelled, and
covered with portraits of Southern ancestors and relations. The
furniture and carpets were worn, but as both had been bought in the
golden days of Mr. Montgomery’s career, before he, like Hayward
Tarleton, had speculated and lost, they were of the first quality, and
would last for many years to come. Moreover, his widow had picked
up many bibelots and much antique furniture in Europe, which added
to the reserved, aristocratic, and un-Californian atmosphere of the
house. And her silver and crystal were the finest in San Francisco.
Mrs. Montgomery was no longer wealthy, but she was as exclusive
as in the Fifties, when exclusiveness meant self-protection, and, if
not a social power, a person whom it showed a proper pride to know.
Mr. Montgomery had not lost his entire fortune, by any means, and
what his wife and the unmarried children inherited was
unencumbered. It was also sufficient to enable Mrs. Montgomery to
indulge her passion for travelling, to educate Tiny in Paris, to give
Randolph his leisurely choice of careers, to keep up the Rincon Hill
and the Menlo Park property, and to enable the family generally to
live as became one of the “old families of California,” i. e., of the
early Fifties.
The house was on the crest of the hill, and commanded a fine view
of the city and mountains and water. It stood in a dilapidated high-
walled garden, full of the Castilian roses, pinks, gladiolus, and
fuchsias of the older time. In one corner was a large weeping-willow,
and in the middle the remains of a stone fountain. The hum of the
city on the plain, and on the heights beyond, never reached that
quiet old garden, which symbolised a phase of California’s life
already remote.
Lee was given a pretty blue bedroom overlooking the city, and found
her new life very pleasant, albeit her roving propensities could no
longer be gratified. Mrs. Montgomery, indulgent and yielding in most
things, was inexorable on all points of deportment, and gave Lee
strict orders that she must never put her foot outside the gate alone.
She also missed not being obliged to think for herself, to have no
responsibility but punctuality at meals; even her studies were over
for the summer. But she was very young; the artificial habits of the
last five years fell from her, and the instincts of her nature reached
forth to the conditions which had been hers during her earlier years
and her mother’s before her. She was never quite so young and so
dependent as other children, but in less than a month she would
have shuddered at the mere mention of Market Street; and she loved
the repose and low-toned richness of her surroundings after the
clatter and vulgarities of a boarding-house. She still mourned her
mother with sudden childish outbursts, but she enjoyed the unbroken
rest of her nights, and felt strong and unfatigued as a little girl
should.
Randolph was a dark handsome boy—“exactly like his father, who
was the picture of his grandfather, who was a perfect cavalier, my
dear!”—and so polite that he made Lee feel like a Red Indian. When
she rose to leave the room he opened the door. He never sat until
she had placed herself, and he rose when she rose, ignoring the gulf
between sixteen and childhood. He was always on hand to adjust
her cape, and his attentions at table were really beautiful. He treated
his mother with a deference which was surely Southern, and when
Lee lamented that she was “so gawky,” and that Lord Barnstaple had
told her so, he assured her that the traditionally irreproachable Tiny
had been quite gauche by comparison at the age of eleven. After
that compliment Lee almost wavered in her allegiance to Cecil, who
doubtless would have told her the truth and asked her why she
bothered about “such things.” But she felt that she certainly was
improving, with her well-brushed hair in a tight plait, her dainty white
frocks, her thin boots, and hands no longer discoloured by liniments,
but washed in bran water and manicured once a week. She gave
strict attention to her poses, and forbade her legs to fly up and
herself to bounce down on the edge of her backbone. The mere fact
that her skirts were the same length all round made her feel less
awkward.
She renewed her baby acquaintance with Coralie Brannan, a fair
delicate child who promised a few years of ethereal beauty before
withering like a hot-house plant in the rude winds of life. She was
sweet and bright and adaptable, and adored Lee at once,
succumbing to the stronger nature, but companionable through the
liveliness of her mind. Of course she was permitted to read Cecil’s
letters; and she was volubly sympathetic over every phase of that
extraordinary friendship.
The summer months were passed in Menlo Park, which, although it
boasted a village and a very smart railway station of the English
pattern, was practically a collection of large plain substantial country
houses with deep verandahs, and surrounded by grounds more or
less extensive. These were scattered over an area of some six miles
in the great San Mateo Valley, along whose western rim towered a
mountain range covered with redwood forests. The Montgomery,
Yorba, Geary, Belmont, Brannan, Randolph, Folsom, and
Washington estates dated, in their present sub-division, from the
early Fifties: and these families (not all of whom appear in this
chronicle) may be said, for want of a better term, to have
represented the landed aristocracy of California’s second era—
counting the arcadian episode of the Spaniards as the first.
Cecil wrote with a praiseworthy attempt at regularity. He had
returned at once to Eton and to cricket. His parents were living in
comparative harmony, and his stepmother had promised him a new
horse and a boat. His letters were very brief, and there was the
creak of protesting machinery in every line, but he rarely failed to
assure Lee that her letters were “jolly,” and to beg her to be faithful,
as he did so love to get mail.
When Lee returned to town in the autumn, plump and strong and
pink, she settled down at once with Coralie to hard study under
private tutors. She was not only to be “thoroughly educated,” but
“highly accomplished.” Her studies were conducted entirely in
French. She pounded the piano daily until her back ached, covered
countless pads with birds and flowers and trees, tinkled the guitar
with her head on one side, attacked the German language, and took
three dancing lessons a week. These studies were pursued in the
old schoolroom at the back of the house, where there was always a
big fire roaring, and a polished floor. Randolph and Tom Brannan
attended the dancing-class when at home, and bestowed their
favours impartially. Tom was fourteen, a round-faced youth with a
large mouth, an amiable temper, and an inflammable heart. He sent
Lee an immense package of peanuts the day after he met her, and
announced himself violently in love. Both he and Randolph danced
to perfection, and between the two Lee rapidly developed the
inherent grace of her creole blood.
CHAPTER XV
HER life from eleven to eighteen was very monotonous and very
happy. Mrs. Montgomery petted and indulged her, the boys were her
slaves, and assured her, every time they came home from school,
and later from their whirl at College, that she was growing up the
prettiest girl in San Francisco. After Tiny’s return from Paris, which
was shortly after Lee entered her thirteenth year, the child caught
little glimpses of the world from her secluded tower. Tiny entered
society at once, and was as much of a belle as any girl so
constitutionally bored and indifferent could be. But her beauty made
an immediate impression; she was much entertained, and during her
first winter the young men came in shoals to the house on Rincon
Hill. She was very small and marvellously dignified. With a long train
and a high coiffure, her fine head held well back, emphasising her
fine aquiline profile, she actually had a presence. Her hair was soft
and brown; her brown eyes, under their level brows, very sweet and
thoughtful, her skin had the pure cold whiteness of the camellia; and
her admirers swore that her feet and hands necessitated a
magnifying glass. She was thin and delicate, but she had great force
of character and a sweet inflexible will. Lee conceived for her one of
those girlish adorations peculiar to the impulsive and imaginative of
her sex, and quite bitterly resented the rival claims to belledom of the
overwhelming Helena, the sinuous tropical Ila, the clever Miss
Geary, and the wealthy Miss Yorba. When Mrs. Montgomery gave a
party she was permitted to contemplate these radiant beings in the
dressing-room, and preferred Miss Yorba, with her tragically plain
face, because she was the only one who ever condescended to
notice her. Later, when she was supposed to be in bed, she lay
prone at the top of the stairs watching the dancing and flirting. In
summer, she saw even more of the mysterious life of grown people;
who appeared to live on the verandahs, and had many picnics.
When she was sixteen, men began to notice her, despite Mrs.
Montgomery’s efforts to keep her in the background and “a child as
long as possible.” But creole blood is quick and magnetic, and long
before it was time to take her place in society it was prophesied that
Lee was to succeed that famous trio of belles, Helena Belmont, Ila
Brannan, and Tiny Montgomery. Her own imaginings on the subject
were very satisfactory, but she studied hard and read so many books
that Tiny begged her to be careful lest she be thought clever.
CHAPTER XVI
CECIL, some five months after his eighteenth birthday, went up to
Oxford and entered Balliol. Here he gave the cold shoulder to
cricket, and took to the water with the enthusiasm of a man who has
the honour of his college to uphold and his blue to get. He also took
more kindly to correspondence, and wrote Lee long letters on the
tendencies of modern civilisation. His letters struck his friend, used
to the lighter mood of Mr. Montgomery and Mr. Brannan, as
decidedly priggish, and she worried over the development not a little,
—being unaware that the University youth of Great Britain must take
priggishness in the regular course of measles, mumps, whooping-
cough, Public School wickedness, the overwhelming discovery of his
own importance as an atom of the British Empire, and cynicism.
During the second term he became profoundly and theologically
religious, and Lee wept at the prospect of being a parson’s wife. His
excursions into the vast echoing region of spiritual mysteries nearly
addled her brains, and she felt quite miserable at times to think that
there was so little of the old Cecil left. But during the spring of his
second year there seemed to be a healthy reaction. A letter dated
from Maundrell Abbey informed Lee that he had been sent down for
breaking windows and attempting to feed a bonfire in the quadrangle
with an objectionable don. He further confided that upon the last
hilarious night before his exile he had been discovered by a good
Samaritan at the foot of his stairs calling imperiously upon the
Almighty to carry him up to his room and put him to bed.
During the months of his exile he travelled on the Continent. His
letters at this period were less like essays for posterity, and much of
his old self flashed through them. When he returned to Oxford in the
autumn he went in bitterly for politics, announced himself a Liberal,
and made cutting references to the House of Peers. Indeed, shortly
after he had been elected President of the Union, he gave full rein to
his eloquence and his new-born convictions, and so scathingly and
vituperously assailed the entire territorial system that he finished in a
perfect pandemonium of cheers and hisses, and was pestered for
months by the enterprising Socialist. During the following vacation he
attempted to convert his father, who was a blue-hot Tory; and the
fixity and bitterness of his convictions and his arrogant assumption of
advanced thinking so irritated Lord Barnstaple that he damned his
offspring for a prig; forgetting that in his own time he had been as
pretty a prig as Oxford had ever turned out. Cecil’s keynote at this
time—frequently quoted to Lee—was Matthew Arnold’s unpleasant
arraignment of their common country: “Our world of an aristocracy
materialised and null, a middle-class purblind and hideous, a lower
class crude and brutal.” Lord Maundrell was for reforming all three.
Unlike the great poet who inspired those lines, there was no danger
of his being the “passionate and dauntless soldier of a forlorn hope,
who, ignorant of the future, and unconsoled by its promises,
nevertheless waged against the conservatism of the old impossible
world so fiery battle.” To-day the future was quite clear, that is to say,
it was to be what its brilliant and determined youth chose to make it.
Lee thought these sentiments simply magnificent, and expressed her
approval with such fire and enthusiasm that Cecil wrote with
increasing frequency, and assured her that the way her style had
improved was really remarkable.
During his last year his fads had pretty well run their course,
although he was temporarily interested in “The Influence of Zola on
Modern Thought,” and bi-metallism. But his ideals, so he assured
Lee, were leaving him. All he really cared for in life was to take a
double first in Greats and History, and he was working like a horse.
There were long intervals between his letters, and when he wrote it
was to apologise on the score of fatigue. He was “dog tired.” So
were all the men. If they weren’t drivelling idiots when the thing was
over it was because nothing could really knock an Englishman out.
Of course he was on the water more or less, and took a turn every
day at cricket, which kept him in fair condition, although he was far
from fit. Meanwhile Lee was to pray that he was not ploughed. He
liked women to pray. Religion had gone with his other ideals, but it
was a beautiful thing in a woman.
CHAPTER XVII
A RAILROAD sliced off a corner of Lee’s ranch and paid her a large
indemnity, which was invested by Mr. Brannan in first mortgages;
and an earthquake presented another section of the ranch with a fine
assortment of mineral springs warranted to cure as many ills. A hotel
and bath-houses were promptly erected, and a heavy patronage
followed. Mrs. Montgomery insisted that every detail of her business
affairs should be explained to Lee after she passed her sixteenth
birthday, and that upon her eighteenth she should assume the entire
control of her property.
“I want Lee to know so much that no man can cheat her, and no
complication take her unawares,” she said, in a memorable interview
with Mr. Brannan, in which she completely routed that conservative
person. “Look at the women in this town who were once
distinguished members of society, and who are now getting their
bread Heaven only knows how. Their husbands died involved, and
they were helpless—for they had been petted dolls, nothing more.”
Lee awoke one morning and found herself eighteen. It was very
early, and the world was intensely still. The spring birds were silent in
the willow, the stars burned low.
She was very happy and very expectant: the princess was to come
down from her tower into the great hall of the castle and take part in
the beautiful and mysterious drama called Life. She was quite
convinced that not in the whole world was there a girl so fortunate as
herself. She was lovely to look at, her manners were soft and
convent-like: even the hypercritical Mrs. Montgomery assured her
that they were as fine as those of the women who had been the glory
of their country before the war; and her income added to her
consequence and would leave no wish she could think of ungratified.
She was delighted with the prospect of being a woman of affairs.
She felt very important and very proud; and as the original hotel on
her property was flimsy and hideous, she and Randolph, who was an
architect, had already planned a new one. It was to be a huge edifice
of adobe in the old Californian style, with a courtyard full of palms,
and a fountain tossing the least offensive of the waters.
Lee thought of all these things this morning, and of more. In the
background of her musings there was always the fairy prince. It was
hard work idealising Cecil in the light of his Oxford effusions, but Lee
did it; he was seven thousand miles away. And he belonged to the
land of poetry and romance, crusaders, castles, and splendour; he
would be the eighth earl and the eleventh viscount of his line, and
the very repairs of his ancestral home were older than the stars on
her flag. Deep in her imagination dwelt an ideal Cecil, a superb and
lovable creature upon whom Oxford had never breathed her blight,
with whom fads had never tampered, who was serious only when in
love, and who would descend upon her like a god and bear her off to
the abbey of his fathers. She never regretted the utter absence of
sentiment and tenderness in Cecil’s letters; it would have accorded ill
with Cecil in the present trying stages of his development. Cecil, as a
man of the world, was to be all that ever sprang from the fertile brain
of a romanticist. He would not condescend to be photographed, but
he could not fail to be handsome, and she could only pray that he
was tall. She, with a fine instinct, had never sent him her portrait, nor
alluded to her brilliant prospects. She wrote of her daily life, of the
books she read, and of himself, and, having a ready pen and a
generous endowment of femininity, never failed to make her letters
amusing. She wondered if, as he sauntered through the moonlit
gardens of Oxford—she, too, had read Matthew Arnold—or rowed
alone on the Isis at night, he dreamed tender and impassioned
dreams of her. If he did he gave no sign. On the other hand, there
was never the flutter of a petticoat in his letters. She had asked him
once if there were no girls in Oxford, and he had replied that he had
too much to do to think about girls, and that she was the only one he
could ever endure, anyhow. Those he met in his vacations bored him
to extinction; but he liked the married women, and intended to
cultivate them one of these days.
Lee yawned and sat up lazily. It was her duty to take another nap, for
she was to go to her first ball to-night. But sleep was a waste of time,
and her first day of young-ladyhood should be as long as possible.
Her hair was braided. She shook it loose and spread it about her. It
was fine and soft, and black enough to be sown with stars, but it had
never a wave in it. She took a hand-mirror from the table beside her
bed and regarded herself with some approval. Her skin was very
white, her cheeks and lips were pink, her light blue eyes were very
large and very radiant. The lashes were still short, but black and
thick, and the underlid was full. The hair grew about her low
forehead in a waving line, and her eyebrows, although straight and
heavy, seemed, like the irregular nose and mouth, to have been
made for her face alone. The short nose with its slight upward slope
had a spirited nostril; what the mouth lacked in conventional
prettiness it made up in colour and curves; and if the lower part of
her face was square, few took note of the lines under so much
beauty of texture. She knew her good points perfectly—her eyes,
complexion, poise of head, and length of limb—and she already
knew how to make the most of them.
She laughed, stretched herself, and slipped to the edge of her bed,
where she sat for a few moments in apparent indecision. The truth
was that she was in no haste to face the great fact of life, now that
the door stood ajar. Until she was dressed and had gone forth into
those parts of the house which were not her own exclusive bower,
she still lingered in the period of dreams and anticipation, and it was
very pleasant.
She thrust her feet into her night slippers, wandered about the room
for a moment, then opened a window and leaned out. The perfume
of roses and violets and lilacs came up to her from the old garden
below and from many another about. One or two of these gardens
she had full view of, others showed only a corner in the triangle of
crumbling walls built about the queer old-fashioned houses when the
city was young. At this early hour their secrets seemed whispering
along the eaves, cowering in the dark gardens, ready to lift their
heads and laugh. What Lee had not heard of the ancient history of
San Francisco had not been worth repeating, for Coralie had grown
up with her elders and missed nothing. In South Park, at the foot of
the hill, she could see the chimneys of the Randolph House, whose
tragedy seemed separated from her time by a dozen generations; so
rapid had been the evolution of the city, so furious its energies.
Beyond lay the plain and the steep hills bristling with the hives of
human beings, who dreamed of gold, and the loud peremptory roar
of Market Street. Telegraph Hill, sharp and bare and brown, passed
over in contempt by the dwellers on the fashionable heights, its
surface broken only by an occasional hovel, looked like an equally
contemptuous old grandmother. Far across the bay, to the right of
Rincon Hill, were the pink ranges of the coast; at the other end of the
plain the brown Twin Peaks, as yet unhonoured by the hideous
dwellings of rich and poor; and then the slopes of Lone Mountain, its
white slabs and vaults grey in the dawn, the sharp cone with its
Calvary behind black in the dull void.
The city looked grey and old, as if the gold in its veins had turned to
lead and its uneasy head were thick with ashes.
It was the first time in many years that Lee had seen San Francisco
in an ugly mood, for she was not given to early rising. She had found
it beautiful from her eyrie, with its brilliant floods of winter and spring
sunshine, its white mist robes and wild dust-cloak of summer. She
had almost forgotten the flare and glare of Market Street; and she
had rarely crossed that plain since her mother’s death,—never
except in the seclusion of Mrs. Montgomery’s carriage. She had as
seldom entered a shop. Her life in some respects had been almost
cloistered. To-day all was to be changed. She should never go out
alone, of course, but she was no longer to hold herself aloof from the
details of life. And to-night she was to go to her first party! She hardly
knew whether she was glad or sorry.
As the sun rose and the city turned pink, and a fine white mist rode
in and hung itself about the sparkling windows on the heights, and
the bay deepened into blue, and the bare peaks looked a richer
brown, the Contra Costa range a deeper pink patched with blue, the
darkness of night lingering only in its cañons, Lee decided that she
was glad. The world was very beautiful out there. San Francisco,
clad in her rosy gown, looked like the Sleeping Princess on her
wedding-morn, but peaceful and still—and happy. Lee could hardly
realise that it was a monster with a million nerves, a fevered brain, its
tainted blood swarming with the microbes of every vice, of every
passion; raging for gold and alcohol with a thirst that never slept; a
monster that had killed her father and Mr. Montgomery, and Colonel
Belmont, and Mr. Polk, and Don Roberto Yorba, and countless
others whose families were scattered to the winds; that it had in its
records as many terrible tragedies, as many shameful secrets as it
had nails in the spires of its churches. Over there, beyond her range
of vision, was a whole city of rottenness in which she would never
set her foot, which counted as nothing in her carefully guarded life,
and yet was crowded with beings, many of them young, not all of
them wholly bad. Mrs. Montgomery would not have a newspaper in
her house, but Lee knew that horrid and picturesque crimes were not
infrequent in those mysterious regions known as Barbary Coast,
Sailor Town, Spanish Town, and China Town, and longed for details
with that kindliness for sensation inherent in the American not wholly
a Southerner.
But what she could see was beautiful. She smiled indulgently into
the face of that great Fact out there. For Lee was a dreamer who
knew that she dreamed. In the background, ineffaced, were the hard
practical years of her youth; surrounding her was the lore she had
gathered from books and Coralie; to say nothing of the intellectual
agonies undergone at the hands of Lord Maundrell, and the
observations on the world as it is to young men settling themselves
in life, with which she had been favoured by her two faithful swains,
Randolph and Tom Brannan. She had helped them both to choose
their careers. Randolph had hovered between architecture and the
law, and Tom’s aspirations were directed equally towards ranching in
a cow-boy outfit, and stockbrokering, until persuaded by Lee that he
was too lazy to sit a horse all day and would be useful to her in town.
But she was none the less expectant, demanded none the less the
richest and most picturesque treasures of life, its most poignant and
abiding happiness. Beyond those hills, beyond the grey ocean,
whose roar came faintly to her, was the fairy prince—Cecil, with the
faint musty perfume of the ages about him, and the owls hooting in
the ruined cloisters of his abbey.

You might also like