Skip to content

Commit

Permalink
Update libraries and python 3.11 (#7856)
Browse files Browse the repository at this point in the history
* Update python 3.11

* Update ARM foundation image and minor improvements
  • Loading branch information
Martin-Molinero authored Mar 26, 2024
1 parent 78b49a1 commit 78647d3
Show file tree
Hide file tree
Showing 21 changed files with 465 additions and 504 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/virtual-environments.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@ jobs:
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.TensorflowProbabilityTest" --blame-hang-timeout 120seconds --blame-crash
# Run Hvplot Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.HvplotTest" --blame-hang-timeout 120seconds --blame-crash
# Run Stellargraph Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.StellargraphTest" --blame-hang-timeout 120seconds --blame-crash
# Run Keras Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.KerasTest" --blame-hang-timeout 120seconds --blame-crash
# Run Scikeras Python Package Test
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ScikerasTest" --blame-hang-timeout 120seconds --blame-crash
# Run Transformers
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transformers|XTransformers" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.Transformers" --blame-hang-timeout 120seconds --blame-crash
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.XTransformers" --blame-hang-timeout 120seconds --blame-crash
# Run Shap
dotnet test ./Tests/bin/Release/QuantConnect.Tests.dll --filter "FullyQualifiedName=QuantConnect.Tests.Python.PythonPackagesTests.ShapTest" --blame-hang-timeout 120seconds --blame-crash
2 changes: 1 addition & 1 deletion Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
<PackageReference Include="Accord" Version="3.6.0" />
<PackageReference Include="Accord.Fuzzy" Version="3.6.0" />
<PackageReference Include="Accord.MachineLearning" Version="3.6.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
<PackageReference Include="Accord" Version="3.6.0" />
<PackageReference Include="Accord.Math" Version="3.6.0" />
<PackageReference Include="Accord.Statistics" Version="3.6.0" />
Expand Down
4 changes: 2 additions & 2 deletions Algorithm.Python/ObjectStoreExampleAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def Initialize(self):

history = pd.read_csv(StringIO(values), header=None, index_col=0, squeeze=True)
history.index = pd.to_datetime(history.index)
for time, close in history.iteritems():
for time, close in history.items():
self.SPY_Close.Update(time, close)

else:
Expand All @@ -59,7 +59,7 @@ def Initialize(self):
# we're pulling the last year's worth of SPY daily trade bars to fee into our indicators
history = self.History(self.SPY, timedelta(365), Resolution.Daily).close.unstack(0).squeeze()

for time, close in history.iteritems():
for time, close in history.items():
self.SPY_Close.Update(time, close)

# save our warm up data so next time we don't need to issue the history request
Expand Down
2 changes: 1 addition & 1 deletion Algorithm.Python/QuantConnect.Algorithm.Python.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<Compile Include="..\Common\Properties\SharedAssemblyInfo.cs" Link="Properties\SharedAssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
</ItemGroup>
<ItemGroup>
<Content Include="FundamentalUniverseSelectionAlgorithm.py" />
Expand Down
2 changes: 1 addition & 1 deletion Algorithm.Python/SetHoldingsRegressionAlgorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ def OnData(self, data):
'''
if not self.Portfolio.Invested:
self.SetHoldings("SPY", 0.1)
self.SetHoldings("SPY", np.float(0.20))
self.SetHoldings("SPY", float(0.20))
self.SetHoldings("SPY", np.float64(0.30))
self.SetHoldings("SPY", 1)
2 changes: 1 addition & 1 deletion Algorithm/QuantConnect.Algorithm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
<PackageReference Include="NodaTime" Version="3.0.5" />
Expand Down
4 changes: 2 additions & 2 deletions AlgorithmFactory/Python/Wrappers/AlgorithmPythonWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ public void OnEndOfDay()
// Only throws if there is an error in its implementation body
catch (PythonException exception)
{
if (!exception.Message.StartsWith("OnEndOfDay()"))
if (!exception.Message.Contains("OnEndOfDay() missing 1 required positional argument"))
{
_baseAlgorithm.SetRunTimeError(exception);
}
Expand Down Expand Up @@ -810,7 +810,7 @@ public void OnEndOfDay(Symbol symbol)
// Only throws if there is an error in its implementation body
catch (PythonException exception)
{
if (!exception.Message.StartsWith("OnEndOfDay()"))
if (!exception.Message.Contains("OnEndOfDay() takes 1 positional argument but 2 were given"))
{
_baseAlgorithm.SetRunTimeError(exception);
}
Expand Down
2 changes: 1 addition & 1 deletion AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<PackageLicenseFile>LICENSE</PackageLicenseFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
<PackageReference Include="NodaTime" Version="3.0.5" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Common/QuantConnect.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Message Text="SelectedOptimization $(SelectedOptimization)" Importance="high" />
</Target>
<ItemGroup>
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.28" />
<PackageReference Include="QuantConnect.pythonnet" Version="2.0.29" />
<PackageReference Include="CloneExtensions" Version="1.3.0" />
<PackageReference Include="fasterflect" Version="3.0.0" />
<PackageReference Include="MathNet.Numerics" Version="5.0.0" />
Expand Down
Loading

0 comments on commit 78647d3

Please sign in to comment.