Foundry-Local icon indicating copy to clipboard operation
Foundry-Local copied to clipboard

Cannot run a model directly from the cache

Open natke opened this issue 3 months ago • 2 comments

Download a model Set the cache directory: foundry cache cd <folder> to the location of the downloaded model foundry cache ls foundry load <model id>

Output is

Exception: Model <model id> was not found in the catalog

AB#76094

natke avatar Sep 04 '25 17:09 natke

The model can now be loaded directly from the cache but there is a stack trace and timeout beforehand

[11:47:15 ERR] Exception fetching models from Azure Foundry catalog $System.Net.Http.HttpRequestException: An error occurred while sending the request.
 ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host..
 ---> System.Net.Sockets.SocketException (10054): An existing connection was forcibly closed by the remote host.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError, CancellationToken) + 0x3d
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16) + 0x52
   at System.Net.Security.SslStream.<EnsureFullTlsFrameAsync>d__168`1.MoveNext() + 0x1ab
--- End of stack trace from previous location ---
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16) + 0x29
   at System.Net.Security.SslStream.<ReadAsyncInternal>d__170`1.MoveNext() + 0x80b
--- End of stack trace from previous location ---
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16) + 0x29
   at System.Net.Http.HttpConnection.<<CheckUsabilityOnScavenge>g__ReadAheadWithZeroByteReadAsync|39_0>d.MoveNext() + 0x1d2
--- End of stack trace from previous location ---
   at System.Net.Http.HttpConnection.<SendAsync>d__56.MoveNext() + 0xd36
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnection.<SendAsync>d__56.MoveNext() + 0x1fc4
--- End of stack trace from previous location ---
   at System.Net.Http.HttpConnect
ionPool.<SendWithVersionDetectionAndRetryAsync>d__50.MoveNext() + 0xa29
--- End of stack trace from previous location ---
   at System.Net.Http.DiagnosticsHandler.<SendAsyncCore>d__10.MoveNext() + 0x5e7
--- End of stack trace from previous location ---
   at System.Net.Http.RedirectHandler.<SendAsync>d__4.MoveNext() + 0x1ce
--- End of stack trace from previous location ---
   at System.Net.Http.HttpClient.<<SendAsync>g__Core|83_0>d.MoveNext() + 0x3c2
--- End of stack trace from previous location ---
   at Microsoft.Neutron.AzureFoundry.AzureFoundryApiService.<FetchModelPageFromApiAsync>d__12.MoveNext() + 0x13a
--- End of stack trace from previous location ---
   at Microsoft.Neutron.AzureFoundry.AzureFoundryApiService.<FetchAllLocalModelsAsyncImpl>d__14.MoveNext() + 0xfb
--- End of stack trace from previous location ---
   at Microsoft.Neutron.AzureFoundry.AzureFoundryApiService.<FetchAllLocalModelsAsync>d__13.MoveNext() + 0x8b

natke avatar Sep 23 '25 18:09 natke

This issue still exists in 0.7.117

Repro steps.

  • Install foundry local
  • Run a model (successful)
  • Disconnect the network
  • Run the same model
Image

natke avatar Sep 27 '25 17:09 natke