title: How to get reference to AzureML Workspace Class in scoring script?
body: <p>My scoring function needs to refer to an Azure ML Registered Dataset for which I need a reference to the AzureML Workspace object. When including this in the <code>init()</code> function of the scoring script it  gives the following error:</p>
  <pre><code> &quot;code&quot;: &quot;ScoreInitRestart&quot;,
        &quot;message&quot;: &quot;Your scoring file's init() function restarts frequently. You can address the error by increasing the value of memory_gb in deployment_config.&quot;
  </code></pre>
  <p>On debugging the issue is:</p>
  <pre><code>To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code [REDACTED] to authenticate.
  </code></pre>
  <p>How can I resolve this issue without exposing Service Principal Credentials in the scoring script?</p>